GBA Video: Fix depth/stencil masking while clearing

This commit is contained in:
Vicki Pfau 2020-11-30 21:17:36 -08:00
parent fc3a6153e2
commit e1fc8cd912
1 changed files with 2 additions and 0 deletions

View File

@ -1394,6 +1394,8 @@ void GBAVideoGLRendererDrawScanline(struct GBAVideoRenderer* renderer, int y) {
glClearDepth(1);
#endif
glClearStencil(0);
glDepthMask(GL_TRUE);
glStencilMask(1);
glBindFramebuffer(GL_FRAMEBUFFER, glRenderer->fbo[GBA_GL_FBO_OBJ]);
glDrawBuffers(1, (GLenum[]) { GL_COLOR_ATTACHMENT0 });
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);