graphics: Bug fix: Can't delete object after GL context is restored

This commit is contained in:
Hajime Hoshi 2017-01-21 03:05:21 +09:00
parent bccf76867e
commit 50b50effc0

View File

@ -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))