Skip to content

Commit

Permalink
Merge pull request #1965 from zenustech/fix-depth-texture-2
Browse files Browse the repository at this point in the history
fix depth texture 2
  • Loading branch information
legobadman authored Jul 30, 2024
2 parents 072f286 + 9757d6c commit 3fa6bae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zenovis/src/Scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ std::vector<char> Scene::record_frame_offline(int hdrSize, int rgbComps) {
CHECK_GL(glBindRenderbuffer(GL_RENDERBUFFER, rbo1));
CHECK_GL(glRenderbufferStorageMultisample(GL_RENDERBUFFER, drawOptions->msaa_samples, GL_RGBA, camera->m_nx, camera->m_ny));
CHECK_GL(glBindRenderbuffer(GL_RENDERBUFFER, rbo2));
CHECK_GL(glRenderbufferStorageMultisample(GL_RENDERBUFFER, drawOptions->msaa_samples, GL_DEPTH_COMPONENT32, camera->m_nx, camera->m_ny));
CHECK_GL(glRenderbufferStorageMultisample(GL_RENDERBUFFER, drawOptions->msaa_samples, GL_DEPTH_COMPONENT32F, camera->m_nx, camera->m_ny));
CHECK_GL(glBindRenderbuffer(GL_RENDERBUFFER, 0));

CHECK_GL(glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, rbo1));
Expand All @@ -199,7 +199,7 @@ std::vector<char> Scene::record_frame_offline(int hdrSize, int rgbComps) {
CHECK_GL(glBindRenderbuffer(GL_RENDERBUFFER, srbo1));
CHECK_GL(glRenderbufferStorage(GL_RENDERBUFFER, GL_RGBA, nx, ny));
CHECK_GL(glBindRenderbuffer(GL_RENDERBUFFER, srbo2));
CHECK_GL(glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT32, nx, ny));
CHECK_GL(glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT32F, nx, ny));

auto bindReadSFbo = opengl::scopeGLBindFramebuffer(GL_DRAW_FRAMEBUFFER, sfbo);
CHECK_GL(glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER,
Expand Down

0 comments on commit 3fa6bae

Please sign in to comment.