all repos — mgba @ c0120cd58608da068d1218796a02f2f3468608b0

mGBA Game Boy Advance Emulator

OpenGL: Fix 1.x interframe blending
Vicki Pfau vi@endrift.com
Thu, 04 Jul 2019 13:44:23 -0700
commit

c0120cd58608da068d1218796a02f2f3468608b0

parent

a24bd073b41c64d4f1ee258e57584defa0f1c612

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

jump to
M src/platform/opengl/gl.csrc/platform/opengl/gl.c

@@ -117,7 +117,6 @@ glOrtho(0, v->width, v->height, 0, 0, 1);

glMatrixMode(GL_MODELVIEW); glLoadIdentity(); if (v->interframeBlending) { - glEnable(GL_BLEND); glBlendFunc(GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA); glBlendColor(1, 1, 1, 0.5); glBindTexture(GL_TEXTURE_2D, context->tex[context->activeTex ^ 1]);

@@ -129,6 +128,7 @@ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);

glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); } glDrawArrays(GL_TRIANGLE_FAN, 0, 4); + glEnable(GL_BLEND); } glBindTexture(GL_TEXTURE_2D, context->tex[context->activeTex]); if (v->filter) {