Java Code Examples for org.lwjgl.opengl.EXTFramebufferObject#glDeleteFramebuffersEXT()

The following examples show how to use org.lwjgl.opengl.EXTFramebufferObject#glDeleteFramebuffersEXT() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Rendertarget.java    From opsu-dance with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Destroy the OpenGL objects associated with this Rendertarget. Do not try
 * to use this rendertarget with OpenGL after calling this method.
 */
public void destroyRTT() {
	EXTFramebufferObject.glDeleteFramebuffersEXT(fboID);
	EXTFramebufferObject.glDeleteRenderbuffersEXT(depthBufferID);
	GL11.glDeleteTextures(textureID);
	GL15.glDeleteBuffers(vboID);
}
 
Example 2
Source File: FrameBufferContainer.java    From LookingGlass with GNU General Public License v3.0 5 votes vote down vote up
private synchronized void freeFrameBuffer() {
	try {
		if (this.texture != 0) GL11.glDeleteTextures(this.texture);
		this.texture = 0;
		if (depthBuffer != 0) EXTFramebufferObject.glDeleteRenderbuffersEXT(depthBuffer);
		depthBuffer = 0;
		if (this.framebuffer != 0) EXTFramebufferObject.glDeleteFramebuffersEXT(this.framebuffer);
		this.framebuffer = 0;
	} catch (Exception e) {
		// Just in case, we make sure we don't crash. Because crashing is bad.
		LoggerUtils.error("Error while cleaning up a world view frame buffer.");
	}
}
 
Example 3
Source File: FramebufferRenderer.java    From tribaltrouble with GNU General Public License v2.0 5 votes vote down vote up
private void deleteBuffers() {
	IntBuffer tmp = BufferUtils.createIntBuffer(4);
	tmp.put(0, fb_id);
	EXTFramebufferObject.glDeleteFramebuffersEXT(tmp);
	tmp.put(0, rb_id);
	EXTFramebufferObject.glDeleteRenderbuffersEXT(tmp);
}
 
Example 4
Source File: FramebufferTextureRenderer.java    From tribaltrouble with GNU General Public License v2.0 5 votes vote down vote up
private void deleteBuffers() {
	IntBuffer tmp = BufferUtils.createIntBuffer(4);
	tmp.put(0, fb_id);
	EXTFramebufferObject.glDeleteFramebuffersEXT(tmp);
	tmp.put(0, rb_id);
	GL11.glDeleteTextures(tmp);
}
 
Example 5
Source File: Rendertarget.java    From opsu with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Destroy the OpenGL objects associated with this Rendertarget. Do not try
 * to use this rendertarget with OpenGL after calling this method.
 */
public void destroyRTT() {
	EXTFramebufferObject.glDeleteFramebuffersEXT(fboID);
	EXTFramebufferObject.glDeleteRenderbuffersEXT(depthBufferID);
	GL11.glDeleteTextures(textureID);
	GL15.glDeleteBuffers(vboID);
}
 
Example 6
Source File: FBOGraphics.java    From slick2d-maven with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
/**
 * @see org.newdawn.slick.Graphics#destroy()
 */
public void destroy() {
	super.destroy();

	IntBuffer buffer = BufferUtils.createIntBuffer(1);
	buffer.put(FBO);
	buffer.flip();
	
	EXTFramebufferObject.glDeleteFramebuffersEXT(buffer);
	valid = false;
}
 
Example 7
Source File: LwjglGLFboEXT.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public void glDeleteFramebuffersEXT(IntBuffer param1) {
    checkLimit(param1);
    EXTFramebufferObject.glDeleteFramebuffersEXT(param1);
}
 
Example 8
Source File: LwjglGLFboEXT.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public void glDeleteFramebuffersEXT(final IntBuffer frameBuffers) {
    checkLimit(frameBuffers);
    EXTFramebufferObject.glDeleteFramebuffersEXT(frameBuffers);
}