Esempio n. 1
0
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()
}
Esempio n. 2
0
func (t *Texture) Delete() {
	if t.id != 0 {
		gl.BindTexture(gl.TEXTURE_2D, 0)
		gl.DeleteTextures(1, &t.id)
		t.id = 0
	}
}
Esempio n. 3
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()
}
Esempio n. 4
0
// Destroying a Texture.
func DestroyTexture(texture Texture) {
	iTexture := uint32(texture)
	gl.DeleteTextures(1, &iTexture)
}
Esempio n. 5
0
func (f *Font) Release() {
	gl.DeleteTextures(1, &f.textureID)
	f.config = nil
}