List of usage examples for org.lwjgl.opengl GL30 glBindFramebuffer
public static void glBindFramebuffer(@NativeType("GLenum") int target, @NativeType("GLuint") int framebuffer)
From source file:ion2d.INGrabber.java
License:Open Source License
/** * Before Rendering of grabbing the screen *//*from w w w. j a v a2 s. c om*/ public void beforeRender() { GL11.glGetInteger(GL30.GL_FRAMEBUFFER_BINDING, this.oldBufferObject); GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, this.bufferObject.get(0)); GL11.glClearColor(0, 0, 0, 0); GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); }
From source file:ion2d.INGrabber.java
License:Open Source License
/** * After Rendering of grabbing the screen */ public void afterRender() { GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, this.oldBufferObject.get(0)); }
From source file:me.thehutch.fusion.engine.render.opengl.gl30.OpenGL30FrameBuffer.java
License:Open Source License
@Override public void bind() { GL30.glBindFramebuffer(GL_FRAMEBUFFER, fbo); }
From source file:me.thehutch.fusion.engine.render.opengl.gl30.OpenGL30FrameBuffer.java
License:Open Source License
@Override public void unbind() { GL30.glBindFramebuffer(GL_FRAMEBUFFER, 0); }
From source file:me.thehutch.fusion.engine.render.opengl.gl30.OpenGL30FrameBuffer.java
License:Open Source License
@Override public void attachTexture(int point, Texture texture) { // Bind the frame buffer GL30.glBindFramebuffer(GL_FRAMEBUFFER, fbo); // Bind the texture to the frame buffer GL30.glFramebufferTexture2D(GL_FRAMEBUFFER, point, GL_TEXTURE_2D, texture.getId(), 0); // Add the attachment to the outputs if it is a colour type if (isColourAttachment(point)) { this.outputBuffers.add(point); }/*from w w w . j av a 2s. co m*/ // Update the output buffers updateOutputBuffers(); // Check to see if the frame buffer is complete if (GL30.glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { throw new IllegalStateException("Unable to complete frame buffer!"); } // Unbind the frame buffer GL30.glBindFramebuffer(GL_FRAMEBUFFER, 0); // Check for errors RenderUtil.checkGLError(); }
From source file:me.thehutch.fusion.engine.render.opengl.gl30.OpenGL30FrameBuffer.java
License:Open Source License
@Override public void attachBuffer(int point, RenderBuffer buffer) { // Bind the frame buffer GL30.glBindFramebuffer(GL_FRAMEBUFFER, fbo); // Attach the render buffer to the frame buffer GL30.glFramebufferRenderbuffer(GL_FRAMEBUFFER, point, GL_RENDERBUFFER, buffer.getId()); RenderUtil.checkGLError();//from ww w . j ava 2s. co m // Add the attachment to the outputs if it is a colour type if (isColourAttachment(point)) { this.outputBuffers.add(point); } // Update the output buffers updateOutputBuffers(); // Check to see if the frame buffer is complete if (GL30.glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { throw new IllegalStateException("Unable to complete frame buffer!"); } // Unbind the frame buffer GL30.glBindFramebuffer(GL_FRAMEBUFFER, 0); // Check for errors RenderUtil.checkGLError(); }
From source file:me.thehutch.fusion.engine.render.opengl.gl30.OpenGL30FrameBuffer.java
License:Open Source License
@Override public void detach(int point) { // Bind the frame buffer GL30.glBindFramebuffer(GL_FRAMEBUFFER, fbo); // Detach the render buffer from the frame buffer GL30.glFramebufferRenderbuffer(GL_FRAMEBUFFER, point, GL_RENDERBUFFER, 0); // Remove the attachment from the outputs if it is a colour type if (isColourAttachment(point)) { this.outputBuffers.remove(point); }/*from ww w . j av a2 s. c om*/ // Update the output buffers updateOutputBuffers(); // Check to see if the frame buffer is complete if (GL30.glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { throw new IllegalStateException("Unable to complete frame buffer!"); } // Unbind the frame buffer GL30.glBindFramebuffer(GL_FRAMEBUFFER, 0); // Check for errors RenderUtil.checkGLError(); }
From source file:net.smert.frameworkgl.opengl.helpers.FrameBufferObjectHelper.java
License:Apache License
public void bind(int fboID) { GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, fboID); }
From source file:net.smert.frameworkgl.opengl.helpers.FrameBufferObjectHelper.java
License:Apache License
public void setBlitTargets(int sourceFboID, int destinationFboID) { GL30.glBindFramebuffer(GL30.GL_DRAW_FRAMEBUFFER, destinationFboID); GL30.glBindFramebuffer(GL30.GL_READ_FRAMEBUFFER, sourceFboID); }
From source file:net.smert.frameworkgl.opengl.helpers.FrameBufferObjectHelper.java
License:Apache License
public void unbind() { GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, 0); }