Java Code Examples for org.lwjgl.opengl.EXTFramebufferObject#glDeleteRenderbuffersEXT()
The following examples show how to use
org.lwjgl.opengl.EXTFramebufferObject#glDeleteRenderbuffersEXT() .
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: OutlineUtils.java From LiquidBounce with GNU General Public License v3.0 | 6 votes |
/** * Sets up the FBO with depth and stencil * * @param fbo Framebuffer */ private static void setupFBO(final Framebuffer fbo) { // Deletes old render buffer extensions such as depth // Args: Render Buffer ID EXTFramebufferObject.glDeleteRenderbuffersEXT(fbo.depthBuffer); // Generates a new render buffer ID for the depth and stencil extension final int stencil_depth_buffer_ID = EXTFramebufferObject.glGenRenderbuffersEXT(); // Binds new render buffer by ID // Args: Target (GL_RENDERBUFFER_EXT), ID EXTFramebufferObject.glBindRenderbufferEXT(EXTFramebufferObject.GL_RENDERBUFFER_EXT, stencil_depth_buffer_ID); // Adds the depth and stencil extension // Args: Target (GL_RENDERBUFFER_EXT), Extension (GL_DEPTH_STENCIL_EXT), // Width, Height EXTFramebufferObject.glRenderbufferStorageEXT(EXTFramebufferObject.GL_RENDERBUFFER_EXT, EXTPackedDepthStencil.GL_DEPTH_STENCIL_EXT, Minecraft.getMinecraft().displayWidth, Minecraft.getMinecraft().displayHeight); // Adds the stencil attachment // Args: Target (GL_FRAMEBUFFER_EXT), Attachment // (GL_STENCIL_ATTACHMENT_EXT), Target (GL_RENDERBUFFER_EXT), ID EXTFramebufferObject.glFramebufferRenderbufferEXT(EXTFramebufferObject.GL_FRAMEBUFFER_EXT, EXTFramebufferObject.GL_STENCIL_ATTACHMENT_EXT, EXTFramebufferObject.GL_RENDERBUFFER_EXT, stencil_depth_buffer_ID); // Adds the depth attachment // Args: Target (GL_FRAMEBUFFER_EXT), Attachment // (GL_DEPTH_ATTACHMENT_EXT), Target (GL_RENDERBUFFER_EXT), ID EXTFramebufferObject.glFramebufferRenderbufferEXT(EXTFramebufferObject.GL_FRAMEBUFFER_EXT, EXTFramebufferObject.GL_DEPTH_ATTACHMENT_EXT, EXTFramebufferObject.GL_RENDERBUFFER_EXT, stencil_depth_buffer_ID); }
Example 2
Source File: Rendertarget.java From opsu-dance with GNU General Public License v3.0 | 5 votes |
/** * 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 3
Source File: FrameBufferContainer.java From LookingGlass with GNU General Public License v3.0 | 5 votes |
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 4
Source File: FramebufferRenderer.java From tribaltrouble with GNU General Public License v2.0 | 5 votes |
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 5
Source File: Rendertarget.java From opsu with GNU General Public License v3.0 | 5 votes |
/** * 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: LwjglGLFboEXT.java From jmonkeyengine with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public void glDeleteRenderbuffersEXT(IntBuffer param1) { checkLimit(param1); EXTFramebufferObject.glDeleteRenderbuffersEXT(param1); }
Example 7
Source File: LwjglGLFboEXT.java From jmonkeyengine with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public void glDeleteRenderbuffersEXT(final IntBuffer renderBuffers) { checkLimit(renderBuffers); EXTFramebufferObject.glDeleteRenderbuffersEXT(renderBuffers); }