diff src/video/SDL_renderer_gl.c @ 4929:aa8888658021

Use the enumerated type for blend and scale mode instead of int Renamed SDL_TextureScaleMode to SDL_ScaleMode
author Sam Lantinga <slouken@libsdl.org>
date Sun, 12 Dec 2010 15:19:05 -0800
parents f205711f73d5
children 397e748d901a
line wrap: on
line diff
--- a/src/video/SDL_renderer_gl.c	Thu Dec 02 11:56:23 2010 -0800
+++ b/src/video/SDL_renderer_gl.c	Sun Dec 12 15:19:05 2010 -0800
@@ -126,8 +126,7 @@
       SDL_TEXTUREMODULATE_ALPHA),
      (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK |
       SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
-     (SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_FAST |
-      SDL_TEXTURESCALEMODE_SLOW),
+     (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST | SDL_SCALEMODE_SLOW),
      15,
      {
       SDL_PIXELFORMAT_INDEX1LSB,
@@ -1004,17 +1003,17 @@
 GL_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
 {
     switch (texture->scaleMode) {
-    case SDL_TEXTURESCALEMODE_NONE:
-    case SDL_TEXTURESCALEMODE_FAST:
-    case SDL_TEXTURESCALEMODE_SLOW:
+    case SDL_SCALEMODE_NONE:
+    case SDL_SCALEMODE_FAST:
+    case SDL_SCALEMODE_SLOW:
         return 0;
-    case SDL_TEXTURESCALEMODE_BEST:
+    case SDL_SCALEMODE_BEST:
         SDL_Unsupported();
-        texture->scaleMode = SDL_TEXTURESCALEMODE_SLOW;
+        texture->scaleMode = SDL_SCALEMODE_SLOW;
         return -1;
     default:
         SDL_Unsupported();
-        texture->scaleMode = SDL_TEXTURESCALEMODE_NONE;
+        texture->scaleMode = SDL_SCALEMODE_NONE;
         return -1;
     }
 }
@@ -1365,15 +1364,15 @@
 
     if (texture->scaleMode != data->scaleMode) {
         switch (texture->scaleMode) {
-        case SDL_TEXTURESCALEMODE_NONE:
-        case SDL_TEXTURESCALEMODE_FAST:
+        case SDL_SCALEMODE_NONE:
+        case SDL_SCALEMODE_FAST:
             data->glTexParameteri(texturedata->type, GL_TEXTURE_MIN_FILTER,
                                   GL_NEAREST);
             data->glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER,
                                   GL_NEAREST);
             break;
-        case SDL_TEXTURESCALEMODE_SLOW:
-        case SDL_TEXTURESCALEMODE_BEST:
+        case SDL_SCALEMODE_SLOW:
+        case SDL_SCALEMODE_BEST:
             data->glTexParameteri(texturedata->type, GL_TEXTURE_MIN_FILTER,
                                   GL_LINEAR);
             data->glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER,