Beispiel #1
0
func (glRenderer *OpenglRenderer) DestroyPostEffects(shader *renderer.Shader) {
	for i, po := range glRenderer.postEffects {
		if po.shader == shader {
			gl.DeleteRenderbuffers(1, &po.dboId)
			gl.DeleteTextures(1, &po.textureId)
			gl.DeleteFramebuffers(1, &po.fboId)
			glRenderer.postEffects = append(glRenderer.postEffects[:i], glRenderer.postEffects[i+1:]...)
			break
		}
	}
}
Beispiel #2
0
/* Delete frame buffer object */
func (f *FrameBuffer) Delete() {
    gl.DeleteFramebuffers(1, &f.id)
    f.id = 0
}