Beispiel #1
0
func (p *glParams) renderDelete() {
	c := p.context
	c.shader.deleteShader()
	if c.vertexBuffer.Valid() {
		gl.DeleteBuffer(c.vertexBuffer)
	}
	for _, texture := range c.textures {
		if texture.tex.Valid() && (texture.flags&ImageNoDelete) == 0 {
			gl.DeleteTexture(texture.tex)
		}
	}
	p.context = nil
}
Beispiel #2
0
func (c *vertexStreamContext) destroy() {
	gl.DeleteBuffer(c.buffer)
	c.buffer = gl.Buffer{}
}
Beispiel #3
0
func (c *indexBufferContext) destroy() {
	gl.DeleteBuffer(c.buffer)
	c.buffer = gl.Buffer{}
}
Beispiel #4
0
func (c *vertexStreamContext) destroy() {
	globalStats.vertexStreamContextCount.dec()
	gl.DeleteBuffer(c.buffer)
	c.buffer = gl.Buffer{}
}
Beispiel #5
0
func (c *indexBufferContext) destroy() {
	globalStats.indexBufferContextCount.dec()
	gl.DeleteBuffer(c.buffer)
	c.buffer = gl.Buffer{}
}