src/video/SDL_renderer_gles.c
changeset 5138 da10636e5eca
parent 5053 b5b42be9333c
child 5140 e743b9c3f6d6
     1.1 --- a/src/video/SDL_renderer_gles.c	Mon Jan 31 22:21:29 2011 -0800
     1.2 +++ b/src/video/SDL_renderer_gles.c	Mon Jan 31 22:44:43 2011 -0800
     1.3 @@ -73,8 +73,6 @@
     1.4                                     SDL_Texture * texture);
     1.5  static int GLES_SetTextureBlendMode(SDL_Renderer * renderer,
     1.6                                      SDL_Texture * texture);
     1.7 -static int GLES_SetTextureScaleMode(SDL_Renderer * renderer,
     1.8 -                                    SDL_Texture * texture);
     1.9  static int GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
    1.10                                const SDL_Rect * rect, const void *pixels,
    1.11                                int pitch);
    1.12 @@ -112,7 +110,6 @@
    1.13        SDL_TEXTUREMODULATE_ALPHA),
    1.14       (SDL_BLENDMODE_NONE | SDL_BLENDMODE_MASK |
    1.15        SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD),
    1.16 -     (SDL_SCALEMODE_NONE | SDL_SCALEMODE_FAST | SDL_SCALEMODE_SLOW), 6,
    1.17       {
    1.18        /* OpenGL ES 1.x supported formats list */
    1.19        SDL_PIXELFORMAT_RGBA4444,
    1.20 @@ -241,7 +238,6 @@
    1.21      renderer->SetTextureColorMod = GLES_SetTextureColorMod;
    1.22      renderer->SetTextureAlphaMod = GLES_SetTextureAlphaMod;
    1.23      renderer->SetTextureBlendMode = GLES_SetTextureBlendMode;
    1.24 -    renderer->SetTextureScaleMode = GLES_SetTextureScaleMode;
    1.25      renderer->UpdateTexture = GLES_UpdateTexture;
    1.26      renderer->LockTexture = GLES_LockTexture;
    1.27      renderer->UnlockTexture = GLES_UnlockTexture;
    1.28 @@ -449,9 +445,9 @@
    1.29      data->formattype = type;
    1.30      renderdata->glBindTexture(data->type, data->texture);
    1.31      renderdata->glTexParameteri(data->type, GL_TEXTURE_MIN_FILTER,
    1.32 -                                GL_NEAREST);
    1.33 +                                GL_LINEAR);
    1.34      renderdata->glTexParameteri(data->type, GL_TEXTURE_MAG_FILTER,
    1.35 -                                GL_NEAREST);
    1.36 +                                GL_LINEAR);
    1.37      renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_S,
    1.38                                  GL_CLAMP_TO_EDGE);
    1.39      renderdata->glTexParameteri(data->type, GL_TEXTURE_WRAP_T,
    1.40 @@ -535,25 +531,6 @@
    1.41  }
    1.42  
    1.43  static int
    1.44 -GLES_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
    1.45 -{
    1.46 -    switch (texture->scaleMode) {
    1.47 -    case SDL_SCALEMODE_NONE:
    1.48 -    case SDL_SCALEMODE_FAST:
    1.49 -    case SDL_SCALEMODE_SLOW:
    1.50 -        return 0;
    1.51 -    case SDL_SCALEMODE_BEST:
    1.52 -        SDL_Unsupported();
    1.53 -        texture->scaleMode = SDL_SCALEMODE_SLOW;
    1.54 -        return -1;
    1.55 -    default:
    1.56 -        SDL_Unsupported();
    1.57 -        texture->scaleMode = SDL_SCALEMODE_NONE;
    1.58 -        return -1;
    1.59 -    }
    1.60 -}
    1.61 -
    1.62 -static int
    1.63  GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
    1.64                     const SDL_Rect * rect, const void *pixels, int pitch)
    1.65  {
    1.66 @@ -878,23 +855,6 @@
    1.67  
    1.68      GLES_SetBlendMode(data, texture->blendMode, 0);
    1.69  
    1.70 -    switch (texture->scaleMode) {
    1.71 -    case SDL_SCALEMODE_NONE:
    1.72 -    case SDL_SCALEMODE_FAST:
    1.73 -        data->glTexParameteri(texturedata->type, GL_TEXTURE_MIN_FILTER,
    1.74 -                              GL_NEAREST);
    1.75 -        data->glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER,
    1.76 -                              GL_NEAREST);
    1.77 -        break;
    1.78 -    case SDL_SCALEMODE_SLOW:
    1.79 -    case SDL_SCALEMODE_BEST:
    1.80 -        data->glTexParameteri(texturedata->type, GL_TEXTURE_MIN_FILTER,
    1.81 -                              GL_LINEAR);
    1.82 -        data->glTexParameteri(texturedata->type, GL_TEXTURE_MAG_FILTER,
    1.83 -                              GL_LINEAR);
    1.84 -        break;
    1.85 -    }
    1.86 -
    1.87      if (data->GL_OES_draw_texture_supported && data->useDrawTexture) {
    1.88          /* this code is a little funny because the viewport is upside down vs SDL's coordinate system */
    1.89          SDL_Window *window = renderer->window;