fix for deferred rendering example.

This commit is contained in:
Jett 2023-12-19 12:00:40 -05:00
commit 668c204159

View file

@ -254,8 +254,8 @@ int main(void)
EndMode3D();
// As a last step, we now copy over the depth buffer from our g-buffer to the default framebuffer.
rlEnableFramebuffer(gBuffer.framebuffer); //glBindFramebuffer(GL_READ_FRAMEBUFFER, gBuffer.framebuffer);
rlEnableFramebuffer(0); //glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
rlBindFramebuffer(GL_READ_FRAMEBUFFER, gBuffer.framebuffer);
rlBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
rlBlitFramebuffer(0, 0, screenWidth, screenHeight, 0, 0, screenWidth, screenHeight, 0x00000100); // GL_DEPTH_BUFFER_BIT
rlDisableFramebuffer();