Пример #1
0
func (c *Context) Delete() {
	cleanupSound()
	gl.BindVertexArray(0)
	gl.DeleteVertexArrays(1, &c.VAO)
	if c.window != nil {
		c.window.Destroy()
	}
	glfw.Terminate()
}
Пример #2
0
func (p *Program) Delete() {
	gl.DeleteVertexArrays(1, &p.vao)
	p.vao = 0
	gl.DeleteProgram(p.program)
	p.program = 0
}
Пример #3
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)
}
Пример #4
0
// 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)
}