comparison src/video/SDL_renderer_gl.c @ 2922:dc4523c7c22d

Significant performance boost with blend mode none
author Sam Lantinga <slouken@libsdl.org>
date Mon, 29 Dec 2008 19:48:01 +0000
parents bd518fc76f28
children 7e21f7662208
comparison
equal deleted inserted replaced
2921:3c45e98e0547 2922:dc4523c7c22d
442 SetBlendMode(GL_RenderData * data, int blendMode) 442 SetBlendMode(GL_RenderData * data, int blendMode)
443 { 443 {
444 if (blendMode != data->blendMode) { 444 if (blendMode != data->blendMode) {
445 switch (blendMode) { 445 switch (blendMode) {
446 case SDL_BLENDMODE_NONE: 446 case SDL_BLENDMODE_NONE:
447 data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); 447 data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
448 data->glDisable(GL_BLEND); 448 data->glDisable(GL_BLEND);
449 break; 449 break;
450 case SDL_BLENDMODE_MASK: 450 case SDL_BLENDMODE_MASK:
451 case SDL_BLENDMODE_BLEND: 451 case SDL_BLENDMODE_BLEND:
452 data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); 452 data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);