all repos — mgba @ 3797e1e5f6b001fa1cb2855304c752d81ef25ff6

mGBA Game Boy Advance Emulator

GBA Video: Minor GL cleanup
Vicki Pfau vi@endrift.com
Tue, 14 May 2019 22:44:00 -0700
commit

3797e1e5f6b001fa1cb2855304c752d81ef25ff6

parent

ee6cd3640222dbd95f9f245a51ba1fa34aced9bd

1 files changed, 3 insertions(+), 7 deletions(-)

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

@@ -856,16 +856,12 @@ glDrawBuffers(1, (GLenum[]) { GL_COLOR_ATTACHMENT3 });

glClear(GL_COLOR_BUFFER_BIT); glBindFramebuffer(GL_FRAMEBUFFER, glRenderer->fbo[GBA_GL_FBO_OBJ]); - glDrawBuffers(1, (GLenum[]) { GL_COLOR_ATTACHMENT0 }); - glClear(GL_COLOR_BUFFER_BIT); - glDrawBuffers(1, (GLenum[]) { GL_COLOR_ATTACHMENT1 }); + glDrawBuffers(2, (GLenum[]) { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1 }); glClear(GL_COLOR_BUFFER_BIT); for (i = 0; i < 4; ++i) { glBindFramebuffer(GL_FRAMEBUFFER, glRenderer->bg[i].fbo); - glDrawBuffers(1, (GLenum[]) { GL_COLOR_ATTACHMENT0 }); - glClear(GL_COLOR_BUFFER_BIT); - glDrawBuffers(1, (GLenum[]) { GL_COLOR_ATTACHMENT1 }); + glDrawBuffers(2, (GLenum[]) { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1 }); glClear(GL_COLOR_BUFFER_BIT); } glDrawBuffers(1, (GLenum[]) { GL_COLOR_ATTACHMENT0 });

@@ -890,6 +886,7 @@ } else {

glRenderer->firstAffine = -1; } + GBAVideoGLRendererDrawWindow(glRenderer, y); if (GBARegisterDISPCNTIsObjEnable(glRenderer->dispcnt) && !glRenderer->d.disableOBJ) { if (glRenderer->oamDirty) { glRenderer->oamMax = GBAVideoRendererCleanOAM(glRenderer->d.oam->obj, glRenderer->sprites, 0);

@@ -906,7 +903,6 @@ GBAVideoGLRendererDrawSprite(glRenderer, &sprite->obj, y, sprite->y);

} } - GBAVideoGLRendererDrawWindow(glRenderer, y); _compositeLayer(glRenderer, glRenderer->layers[GBA_GL_TEX_OBJ_COLOR], glRenderer->layers[GBA_GL_TEX_OBJ_FLAGS], 4, y); unsigned priority; for (priority = 4; priority--;) {