//停止时触发,清理 func onStop(glctx gl.Context) { glctx.DeleteProgram(program) glctx.DeleteBuffer(positionbuf) glctx.DeleteBuffer(colorbuf) fps.Release() images.Release() }
func onStop(glctx gl.Context) { glctx.DeleteProgram(program) glctx.DeleteBuffer(buf) fps.Release() if statusPainter != nil { statusPainter.Release() } images.Release() }
// Use this to exit your game safely // It will automatically unload all your assets and dispose the stage // Schedule an exit from the application. On android, this will cause a call to pause() and dispose() some time in the future, // it will not immediately finish your application. // On iOS this should be avoided in production as it breaks Apples guidelines func appStop(glctx gl.Context) { println("Exiting") running = false if currentScene.OnPause != nil { currentScene.OnPause(currentScene) soundsPlayer.Close() } glctx.DeleteProgram(program) glctx.DeleteBuffer(buf) fps.Release() images.Release() }
func (buf *floatBuffer) Delete(ctx gl.Context) { ctx.DeleteBuffer(buf.Buffer) }
func onStop(glctx gl.Context) { glctx.DeleteProgram(program) glctx.DeleteBuffer(buf) fps.Release() images.Release() }
// DestroyKey cleans up any resources for the key when destorying the key. func (k *PianoKey) DestroyKey(glctx gl.Context) { glctx.DeleteBuffer(k.glBuf) al.DeleteSources(k.soundSources...) al.DeleteBuffers(k.soundBuffers) al.CloseDevice() }
func (buf Buffer) Delete(ctx gl.Context) { ctx.DeleteBuffer(buf.Buffer) // buf.Update = nil }