func stop() { gl.DeleteProgram(glimage.program) gl.DeleteBuffer(glimage.quadXY) gl.DeleteBuffer(glimage.quadUV) texmap.Lock() for _, t := range texmap.texs { if t.gltex.Value != 0 { gl.DeleteTexture(t.gltex) } t.gltex = gl.Texture{} } texmap.Unlock() }
func onStop() { gl.DeleteProgram(program) gl.DeleteBuffer(buf) }