@Override public void glReadBuffer (int mode) { GL11.glReadBuffer(mode); }
@Override public void glReadBuffer (int mode) { GL11.glReadBuffer(mode); }
@Override public void glReadBuffer (int mode) { GL11.glReadBuffer(mode); }
@Override public void glReadBuffer (int mode) { GL11.glReadBuffer(mode); }
@Override public void glReadBuffer(final int mode) { GL11.glReadBuffer(mode); }
public void glReadBuffer(int param1) { GL11.glReadBuffer(param1); }
GL11.glReadBuffer(GL11.GL_NONE); GL20.glDrawBuffers(GL11.GL_NONE); } else {
GL11.glReadBuffer(GL11.GL_NONE); GL20.glDrawBuffers(GL11.GL_NONE); } else {
@Override public void glReadBuffer (int mode) { GL11.glReadBuffer(mode); }
@Override public void glReadBuffer (int mode) { GL11.glReadBuffer(mode); }
private void setReadBuffer(final int attachVal) { GL11.glReadBuffer(attachVal); }
public void glReadBuffer(int param1) { GL11.glReadBuffer(param1); }
public void glReadBuffer(int param1) { GL11.glReadBuffer(param1); }
/** * Bind to the FBO created */ private void bind() { EXTFramebufferObject.glBindFramebufferEXT(EXTFramebufferObject.GL_FRAMEBUFFER_EXT, FBO); GL11.glReadBuffer(EXTFramebufferObject.GL_COLOR_ATTACHMENT0_EXT); }
/** * Unbind from the FBO created */ private void unbind() { EXTFramebufferObject.glBindFramebufferEXT(EXTFramebufferObject.GL_FRAMEBUFFER_EXT, 0); GL11.glReadBuffer(GL11.GL_BACK); }
public BufferedImage readPixels(int width, int height) { glReadBuffer(GL_FRONT); ByteBuffer buf = BufferUtils.createByteBuffer(width * height * 4); glReadPixels(0, 0, width, height, GL_BGRA, GL_UNSIGNED_BYTE, buf); checkGLError(); BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); int[] pixels = new int[width*height]; buf.asIntBuffer().get(pixels); img.setRGB(0, 0, width, height, pixels, 0, width); if (Visage.trace) Visage.log.finest("Read pixels"); return img; } }
public void blitFrameBuffer(int sourceAttachment, int destinationAttachment, int writeFBO, int width, int height){ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, writeFBO); glBindFramebuffer(GL_READ_FRAMEBUFFER, id); glReadBuffer(GL_COLOR_ATTACHMENT0 + sourceAttachment); glDrawBuffer(GL_COLOR_ATTACHMENT0 + destinationAttachment); glBlitFramebuffer(0,0,width,height,0,0,width,height, GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT, GL_NEAREST); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); glBindFramebuffer(GL_READ_FRAMEBUFFER, 0); }
public ShadowBuffer() throws Exception { // Create a FBO to render the depth map depthMapFBO = glGenFramebuffers(); // Create the depth map textures depthMap = new ArrTexture(ShadowRenderer.NUM_CASCADES, SHADOW_MAP_WIDTH, SHADOW_MAP_HEIGHT, GL_DEPTH_COMPONENT); // Attach the the depth map texture to the FBO glBindFramebuffer(GL_FRAMEBUFFER, depthMapFBO); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, depthMap.getIds()[0], 0); // Set only depth glDrawBuffer(GL_NONE); glReadBuffer(GL_NONE); if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { throw new Exception("Could not create FrameBuffer"); } // Unbind glBindFramebuffer(GL_FRAMEBUFFER, 0); }
public ShadowMap() throws Exception { // Create a FBO to render the depth map depthMapFBO = glGenFramebuffers(); // Create the depth map texture depthMap = new Texture(SHADOW_MAP_WIDTH, SHADOW_MAP_HEIGHT, GL_DEPTH_COMPONENT); // Attach the the depth map texture to the FBO glBindFramebuffer(GL_FRAMEBUFFER, depthMapFBO); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, depthMap.getId(), 0); // Set only depth glDrawBuffer(GL_NONE); glReadBuffer(GL_NONE); if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { throw new Exception("Could not create FrameBuffer"); } // Unbind glBindFramebuffer(GL_FRAMEBUFFER, 0); }
public ShadowBuffer() throws Exception { // Create a FBO to render the depth map depthMapFBO = glGenFramebuffers(); // Create the depth map textures depthMap = new ArrTexture(ShadowRenderer.NUM_CASCADES, SHADOW_MAP_WIDTH, SHADOW_MAP_HEIGHT, GL_DEPTH_COMPONENT); // Attach the the depth map texture to the FBO glBindFramebuffer(GL_FRAMEBUFFER, depthMapFBO); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, depthMap.getIds()[0], 0); // Set only depth glDrawBuffer(GL_NONE); glReadBuffer(GL_NONE); if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { throw new Exception("Could not create FrameBuffer"); } // Unbind glBindFramebuffer(GL_FRAMEBUFFER, 0); }