src/video/SDL_renderer_gles.c
changeset 2884 9dde605c7540
parent 2859 99210400e8b9
child 2936 066384910f50
     1.1 --- a/src/video/SDL_renderer_gles.c	Sat Dec 20 08:41:05 2008 +0000
     1.2 +++ b/src/video/SDL_renderer_gles.c	Sat Dec 20 12:00:00 2008 +0000
     1.3 @@ -85,9 +85,8 @@
     1.4        SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED),
     1.5       (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_COLOR |
     1.6        SDL_TEXTUREMODULATE_ALPHA),
     1.7 -     (SDL_TEXTUREBLENDMODE_NONE | SDL_TEXTUREBLENDMODE_MASK |
     1.8 -      SDL_TEXTUREBLENDMODE_BLEND | SDL_TEXTUREBLENDMODE_ADD |
     1.9 -      SDL_TEXTUREBLENDMODE_MOD),
    1.10 +     (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK |
    1.11 +      SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
    1.12       (SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_FAST |
    1.13        SDL_TEXTURESCALEMODE_SLOW), 2,
    1.14       {
    1.15 @@ -499,15 +498,15 @@
    1.16  GLES_SetTextureBlendMode(SDL_Renderer * renderer, SDL_Texture * texture)
    1.17  {
    1.18      switch (texture->blendMode) {
    1.19 -    case SDL_TEXTUREBLENDMODE_NONE:
    1.20 -    case SDL_TEXTUREBLENDMODE_MASK:
    1.21 -    case SDL_TEXTUREBLENDMODE_BLEND:
    1.22 -    case SDL_TEXTUREBLENDMODE_ADD:
    1.23 -    case SDL_TEXTUREBLENDMODE_MOD:
    1.24 +    case SDL_BLENDMODE_NONE:
    1.25 +    case SDL_BLENDMODE_MASK:
    1.26 +    case SDL_BLENDMODE_BLEND:
    1.27 +    case SDL_BLENDMODE_ADD:
    1.28 +    case SDL_BLENDMODE_MOD:
    1.29          return 0;
    1.30      default:
    1.31          SDL_Unsupported();
    1.32 -        texture->blendMode = SDL_TEXTUREBLENDMODE_NONE;
    1.33 +        texture->blendMode = SDL_BLENDMODE_NONE;
    1.34          return -1;
    1.35      }
    1.36  }
    1.37 @@ -680,22 +679,22 @@
    1.38  
    1.39      if (texture->blendMode != data->blendMode) {
    1.40          switch (texture->blendMode) {
    1.41 -        case SDL_TEXTUREBLENDMODE_NONE:
    1.42 +        case SDL_BLENDMODE_NONE:
    1.43              data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
    1.44              data->glDisable(GL_BLEND);
    1.45              break;
    1.46 -        case SDL_TEXTUREBLENDMODE_MASK:
    1.47 -        case SDL_TEXTUREBLENDMODE_BLEND:
    1.48 +        case SDL_BLENDMODE_MASK:
    1.49 +        case SDL_BLENDMODE_BLEND:
    1.50              data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
    1.51              data->glEnable(GL_BLEND);
    1.52              data->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    1.53              break;
    1.54 -        case SDL_TEXTUREBLENDMODE_ADD:
    1.55 +        case SDL_BLENDMODE_ADD:
    1.56              data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
    1.57              data->glEnable(GL_BLEND);
    1.58              data->glBlendFunc(GL_SRC_ALPHA, GL_ONE);
    1.59              break;
    1.60 -        case SDL_TEXTUREBLENDMODE_MOD:
    1.61 +        case SDL_BLENDMODE_MOD:
    1.62              data->glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
    1.63              data->glEnable(GL_BLEND);
    1.64              data->glBlendFunc(GL_ZERO, GL_SRC_COLOR);