mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +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.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))
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("graphics: shader compiling error:\n%s", err))
|
||||
|
Loading…
Reference in New Issue
Block a user