[jak2] fix glow sprite flickering (#2912)

oops, forgot to set `glDepthMask`, so sometimes it was enabled, and the
drawing for the clear was writing into the depth buffer.
Fixes https://github.com/open-goal/jak-project/issues/2735
This commit is contained in:
water111 2023-08-16 20:42:52 -04:00 committed by GitHub
parent df1b0a341c
commit 5c00f1abe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -539,6 +539,8 @@ void GlowRenderer::draw_probes(SharedRenderState* render_state,
glBindVertexArray(m_ogl.vao);
glEnable(GL_PRIMITIVE_RESTART);
glPrimitiveRestartIndex(UINT32_MAX);
// don't want to write to the depth buffer we just copied, just test against it.
glDepthMask(GL_FALSE);
GLint old_viewport[4];
glGetIntegerv(GL_VIEWPORT, old_viewport);
glViewport(0, 0, m_ogl.probe_fbo_w, m_ogl.probe_fbo_h);