Skip to content

Commit 2afc8bc

Browse files
committed
Set GL_DEPTH_BUFFER_BIT when blitting the depth buffer to the screen.
(Fixes a copy-paste bug, previously the GL_STENCIL_BUFFER_BIT was being set.)
1 parent c3f33c3 commit 2afc8bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/renderpass_gl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ void RenderPass::blit_to(const Vector2i &src_offset,
359359
target_id = 0;
360360
what = GL_COLOR_BUFFER_BIT;
361361
if (screen->has_depth_buffer() && m_targets[0])
362-
what |= GL_STENCIL_BUFFER_BIT;
362+
what |= GL_DEPTH_BUFFER_BIT;
363363
if (screen->has_stencil_buffer() && m_targets[1])
364364
what |= GL_STENCIL_BUFFER_BIT;
365365
} else if (rp) {

0 commit comments

Comments
 (0)