示例#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()
}
示例#2
0
func (t *Texture) Delete() {
	if t.id != 0 {
		gl.BindTexture(gl.TEXTURE_2D, 0)
		gl.DeleteTextures(1, &t.id)
		t.id = 0
	}
}
示例#3
0
文件: effects.go 项目: pikkpoiss/ld33
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()
}
示例#4
0
// Destroying a Texture.
func DestroyTexture(texture Texture) {
	iTexture := uint32(texture)
	gl.DeleteTextures(1, &iTexture)
}
示例#5
0
文件: font.go 项目: CubeLite/gltext-1
func (f *Font) Release() {
	gl.DeleteTextures(1, &f.textureID)
	f.config = nil
}