private void bindFrameBuffer(FrameBuffer fb) { if (fb == null) { if (context.boundFBO != 0) { glfbo.glBindFramebufferEXT(GLFbo.GL_FRAMEBUFFER_EXT, 0); statistics.onFrameBufferUse(null, true); context.boundFBO = 0; context.boundFB = null; } } else { assert fb.getId() != -1 && fb.getId() != 0; if (context.boundFBO != fb.getId()) { glfbo.glBindFramebufferEXT(GLFbo.GL_FRAMEBUFFER_EXT, fb.getId()); context.boundFBO = fb.getId(); context.boundFB = fb; statistics.onFrameBufferUse(fb, true); } else { statistics.onFrameBufferUse(fb, false); } } }
private void bindFrameBuffer(FrameBuffer fb) { if (fb == null) { if (context.boundFBO != 0) { glfbo.glBindFramebufferEXT(GLFbo.GL_FRAMEBUFFER_EXT, 0); statistics.onFrameBufferUse(null, true); context.boundFBO = 0; context.boundFB = null; } } else { assert fb.getId() != -1 && fb.getId() != 0; if (context.boundFBO != fb.getId()) { glfbo.glBindFramebufferEXT(GLFbo.GL_FRAMEBUFFER_EXT, fb.getId()); context.boundFBO = fb.getId(); context.boundFB = fb; statistics.onFrameBufferUse(fb, true); } else { statistics.onFrameBufferUse(fb, false); } } }
statistics.onFrameBufferUse(null, true); statistics.onFrameBufferUse(fb, true); statistics.onFrameBufferUse(fb, false);