@Override public int glCheckFramebufferStatus (int target) { return GL30.glCheckFramebufferStatus(target); }
@Override public int glCheckFramebufferStatus (int target) { return GL30.glCheckFramebufferStatus(target); }
@Override public int glCheckFramebufferStatus (int target) { return GL30.glCheckFramebufferStatus(target); }
@Override public int glCheckFramebufferStatus (int target) { return GL30.glCheckFramebufferStatus(target); }
@Override public int glCheckFramebufferStatusEXT(final int target) { return GL30.glCheckFramebufferStatus(target); }
@Override public int glCheckFramebufferStatusEXT(int param1) { return GL30.glCheckFramebufferStatus(param1); }
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 int glCheckFramebufferStatus(int target) { return GL30.glCheckFramebufferStatus(target); }
@Override public int glCheckFramebufferStatus (int target) { return GL30.glCheckFramebufferStatus(target); }
@Override public int glCheckFramebufferStatus (int target) { return GL30.glCheckFramebufferStatus(target); }
@Override public int glCheckFramebufferStatusEXT(int param1) { return GL30.glCheckFramebufferStatus(param1); }
public static void checkFramebufferStatus() { if (Visage.debug) { int status = glCheckFramebufferStatus(GL_FRAMEBUFFER); buildMapping(); if (status != GL_FRAMEBUFFER_COMPLETE) { Visage.log.warning("== FRAMEBUFFER INCOMPLETE =="); Visage.log.warning("0x"+Integer.toHexString(status).toUpperCase(Locale.ROOT)+" ("+Joiner.on(", ").join(mapping.get(status))+")"); for (StackTraceElement ste : new Throwable().fillInStackTrace().getStackTrace()) { Visage.log.warning(ste.toString()); } } } } }
@Override public JCGLFramebufferStatus framebufferDrawValidate() throws JCGLException { if (this.bind_draw == null) { throw new JCGLExceptionFramebufferNotBound( "No draw framebuffer is bound"); } return LWJGL3TypeConversions.framebufferStatusFromGL( GL30.glCheckFramebufferStatus(GL30.GL_DRAW_FRAMEBUFFER)); }
@Override public JCGLFramebufferStatus framebufferReadValidate() throws JCGLException { if (this.bind_read == null) { throw new JCGLExceptionFramebufferNotBound( "No read framebuffer is bound"); } return LWJGL3TypeConversions.framebufferStatusFromGL( GL30.glCheckFramebufferStatus(GL30.GL_READ_FRAMEBUFFER)); }
@Override public JCGLFramebufferStatus framebufferDrawValidate() throws JCGLException { if (this.bind_draw == null) { throw new JCGLExceptionFramebufferNotBound( "No draw framebuffer is bound"); } return LWJGL3TypeConversions.framebufferStatusFromGL( GL30.glCheckFramebufferStatus(GL30.GL_DRAW_FRAMEBUFFER)); }
@Override public JCGLFramebufferStatus framebufferReadValidate() throws JCGLException { if (this.bind_read == null) { throw new JCGLExceptionFramebufferNotBound( "No read framebuffer is bound"); } return LWJGL3TypeConversions.framebufferStatusFromGL( GL30.glCheckFramebufferStatus(GL30.GL_READ_FRAMEBUFFER)); }
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 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); }