func (c *Context) Delete() { cleanupSound() gl.BindVertexArray(0) gl.DeleteVertexArrays(1, &c.VAO) if c.window != nil { c.window.Destroy() } glfw.Terminate() }
func (p *Program) Delete() { gl.DeleteVertexArrays(1, &p.vao) p.vao = 0 gl.DeleteProgram(p.program) p.program = 0 }
// Cleaning up the memory from a LineReader. func (lr *LineRender) Destroy() { gl.DeleteVertexArrays(1, &lr.vao) gl.DeleteBuffers(1, &lr.vbo) gl.DeleteBuffers(1, &lr.ebo) }
// Destroying the resources of a RenderObject. func (renderObject *RenderObject) Destroy() { gl.DeleteVertexArrays(1, &renderObject.vao) gl.DeleteBuffers(1, &renderObject.vbo) gl.DeleteBuffers(1, &renderObject.ebo) }