all repos — mgba @ e1fc8cd9123e5a7eb3532c9e370789ebc653df45

mGBA Game Boy Advance Emulator

GBA Video: Fix depth/stencil masking while clearing
Vicki Pfau vi@endrift.com
Mon, 30 Nov 2020 21:17:36 -0800
commit

e1fc8cd9123e5a7eb3532c9e370789ebc653df45

parent

fc3a6153e2c327cbbbc10439c9dca8a1ccb66ab5

1 files changed, 2 insertions(+), 0 deletions(-)

jump to
M src/gba/renderers/gl.csrc/gba/renderers/gl.c

@@ -1394,6 +1394,8 @@ #else

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);