mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
graphics: Bug fix: Can't delete object after GL context is restored
This commit is contained in:
parent
bccf76867e
commit
50b50effc0
@ -138,16 +138,6 @@ func (s *openGLState) reset(context *opengl.Context) error {
|
|||||||
s.lastColorMatrix = nil
|
s.lastColorMatrix = nil
|
||||||
s.lastColorMatrixTranslation = nil
|
s.lastColorMatrixTranslation = nil
|
||||||
|
|
||||||
if s.arrayBuffer != zeroBuffer {
|
|
||||||
context.DeleteBuffer(s.arrayBuffer)
|
|
||||||
}
|
|
||||||
if s.indexBufferQuads != zeroBuffer {
|
|
||||||
context.DeleteBuffer(s.indexBufferQuads)
|
|
||||||
}
|
|
||||||
if s.programTexture != zeroProgram {
|
|
||||||
context.DeleteProgram(s.programTexture)
|
|
||||||
}
|
|
||||||
|
|
||||||
shaderVertexModelviewNative, err := context.NewShader(opengl.VertexShader, shader(context, shaderVertexModelview))
|
shaderVertexModelviewNative, err := context.NewShader(opengl.VertexShader, shader(context, shaderVertexModelview))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(fmt.Sprintf("graphics: shader compiling error:\n%s", err))
|
panic(fmt.Sprintf("graphics: shader compiling error:\n%s", err))
|
||||||
|
Loading…
Reference in New Issue
Block a user