@Override public void glFramebufferTexture2D (int target, int attachment, int textarget, int texture, int level) { GL30.glFramebufferTexture2D(target, attachment, textarget, texture, level); }
@Override public void glFramebufferTexture2D (int target, int attachment, int textarget, int texture, int level) { GL30.glFramebufferTexture2D(target, attachment, textarget, texture, level); }
@Override public void glFramebufferTexture2D (int target, int attachment, int textarget, int texture, int level) { GL30.glFramebufferTexture2D(target, attachment, textarget, texture, level); }
@Override public void glFramebufferTexture2D (int target, int attachment, int textarget, int texture, int level) { GL30.glFramebufferTexture2D(target, attachment, textarget, texture, level); }
@Override public void glFramebufferTexture2DEXT(final int target, final int attachment, final int texTarget, final int texture, final int level) { GL30.glFramebufferTexture2D(target, attachment, texTarget, texture, level); }
@Override public void glFramebufferTexture2DEXT(int param1, int param2, int param3, int param4, int param5) { GL30.glFramebufferTexture2D(param1, param2, param3, param4, param5); }
public LwjglFrameBufferObject(ResourceUrn urn, BaseVector2i size) { this.size = ImmutableVector2i.createOrUse(size); IntBuffer fboId = BufferUtils.createIntBuffer(1); GL30.glGenFramebuffers(fboId); frame = fboId.get(0); Texture texture = generateTexture(urn); GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, frame); GL30.glFramebufferTexture2D(GL30.GL_FRAMEBUFFER, GL30.GL_COLOR_ATTACHMENT0, GL11.GL_TEXTURE_2D, texture.getId(), 0); int result = GL30.glCheckFramebufferStatus(GL30.GL_FRAMEBUFFER); if (result != GL30.GL_FRAMEBUFFER_COMPLETE) { throw new IllegalStateException("Something went wrong with framebuffer! " + result); } GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, 0); }
@Override public void glFramebufferTexture2D(int target, int attachment, int textureTarget, int texture, int level) { GL30.glFramebufferTexture2D(target, attachment, textureTarget, texture, level); }
@Override public void glFramebufferTexture2D (int target, int attachment, int textarget, int texture, int level) { GL30.glFramebufferTexture2D(target, attachment, textarget, texture, level); }
@Override public void glFramebufferTexture2D (int target, int attachment, int textarget, int texture, int level) { GL30.glFramebufferTexture2D(target, attachment, textarget, texture, level); }
@Override public void glFramebufferTexture2DEXT(int param1, int param2, int param3, int param4, int param5) { GL30.glFramebufferTexture2D(param1, param2, param3, param4, param5); }
public void createColorTextureAttachment(int texture, int i) { glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + i, GL_TEXTURE_2D, texture, 0); }
public void createColorTextureMultisampleAttachment(int texture, int i){ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + i, GL_TEXTURE_2D_MULTISAMPLE, texture, 0 ); }
public void createDepthTextureMultisampleAttachment(int texture){ glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D_MULTISAMPLE, texture, 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 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 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); }
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); }