List of usage examples for org.lwjgl.opengl GL30 GL_FRAMEBUFFER_BINDING
int GL_FRAMEBUFFER_BINDING
To view the source code for org.lwjgl.opengl GL30 GL_FRAMEBUFFER_BINDING.
Click Source Link
From source file:com.grillecube.client.opengl.GLH.java
public static int glhGetBoundFBO() { return (glhGetBinding(GL30.GL_FRAMEBUFFER_BINDING)); }
From source file:cuchaz.jfxgl.prism.JFXGLContext.java
License:Open Source License
@Override public int getBoundFBO() { return GL11.glGetInteger(GL30.GL_FRAMEBUFFER_BINDING); }
From source file:ion2d.INGrabber.java
License:Open Source License
/** * Grabs an image of the display and attachs it to the specified texture * @param INTexture2D texture/* w w w . j a v a2s . co m*/ * @throws Exception */ public void grab(INTexture2D texture) throws Exception { GL11.glGetInteger(GL30.GL_FRAMEBUFFER_BINDING, this.oldBufferObject); GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, this.bufferObject.get(0)); GL30.glFramebufferTexture2D(GL30.GL_FRAMEBUFFER, GL30.GL_COLOR_ATTACHMENT0, GL11.GL_TEXTURE_2D, texture.getId(), 0); int status = GL30.glCheckFramebufferStatus(GL30.GL_FRAMEBUFFER); if (status != GL30.GL_FRAMEBUFFER_COMPLETE) { throw new Exception("Frame Grabber could not attach texture to framebuffer"); } GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, this.oldBufferObject.get(0)); }
From source file:ion2d.INGrabber.java
License:Open Source License
/** * Before Rendering of grabbing the screen *///from w ww .java 2s. c o m 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); }