diff src/render/opengl/SDL_renderer_gl.c @ 5187:d976b67150c5

Restored SDL_BLENDMODE_MOD for MAME
author Sam Lantinga <slouken@libsdl.org>
date Fri, 04 Feb 2011 19:50:56 -0800
parents 4d39eeaad00b
children
line wrap: on
line diff
--- a/src/render/opengl/SDL_renderer_gl.c	Fri Feb 04 19:18:08 2011 -0800
+++ b/src/render/opengl/SDL_renderer_gl.c	Fri Feb 04 19:50:56 2011 -0800
@@ -529,6 +529,11 @@
             data->glEnable(GL_BLEND);
             data->glBlendFunc(GL_SRC_ALPHA, GL_ONE);
             break;
+        case SDL_BLENDMODE_MOD:
+            data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+            data->glEnable(GL_BLEND);
+            data->glBlendFunc(GL_ZERO, GL_SRC_COLOR);
+            break;
         }
         data->blendMode = blendMode;
     }