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 }
func (c *vertexStreamContext) destroy() { gl.DeleteBuffer(c.buffer) c.buffer = gl.Buffer{} }
func (c *indexBufferContext) destroy() { gl.DeleteBuffer(c.buffer) c.buffer = gl.Buffer{} }
func (c *vertexStreamContext) destroy() { globalStats.vertexStreamContextCount.dec() gl.DeleteBuffer(c.buffer) c.buffer = gl.Buffer{} }
func (c *indexBufferContext) destroy() { globalStats.indexBufferContextCount.dec() gl.DeleteBuffer(c.buffer) c.buffer = gl.Buffer{} }