fix render advanced pipeline issues

This commit is contained in:
MihailRis
2025-07-12 17:31:55 +03:00
parent 0ab23a117d
commit ac9772cd67
12 changed files with 192 additions and 86 deletions
+2 -2
View File
@@ -181,9 +181,9 @@ void GBuffer::bindSSAOBuffer() const {
glBindTexture(GL_TEXTURE_2D, ssaoBuffer);
}
void GBuffer::bindDepthBuffer() {
void GBuffer::bindDepthBuffer(int drawFbo) {
glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, drawFbo);
glBlitFramebuffer(0, 0, width, height, 0, 0, width, height,
GL_DEPTH_BUFFER_BIT, GL_NEAREST);
}