func (r *GlowRenderer) Delete() error { gl.BindTexture(gl.TEXTURE_2D, 0) gl.BindFramebuffer(gl.FRAMEBUFFER, 0) gl.BindRenderbuffer(gl.RENDERBUFFER, 0) gl.BindBuffer(gl.ARRAY_BUFFER, 0) gl.DeleteFramebuffers(1, &r.GlowFb) gl.DeleteTextures(1, &r.GlowTex) gl.DeleteFramebuffers(1, &r.BlurFb) gl.DeleteTextures(1, &r.BlurTex) gl.DeleteBuffers(1, &r.coords) return r.GetError() }
func (t *Texture) Delete() { if t.id != 0 { gl.BindTexture(gl.TEXTURE_2D, 0) gl.DeleteTextures(1, &t.id) t.id = 0 } }
func (r *EffectsRenderer) Delete() error { gl.BindTexture(gl.TEXTURE_2D, 0) gl.BindFramebuffer(gl.FRAMEBUFFER, 0) gl.BindRenderbuffer(gl.RENDERBUFFER, 0) gl.BindBuffer(gl.ARRAY_BUFFER, 0) gl.DeleteFramebuffers(1, &r.framebuffer) gl.DeleteTextures(1, &r.texture) gl.DeleteBuffers(1, &r.coords) return r.GetError() }
// Destroying a Texture. func DestroyTexture(texture Texture) { iTexture := uint32(texture) gl.DeleteTextures(1, &iTexture) }
func (f *Font) Release() { gl.DeleteTextures(1, &f.textureID) f.config = nil }