src/video/windows/SDL_d3drender.c
changeset 5138 da10636e5eca
parent 5062 e8916fe9cfc8
child 5140 e743b9c3f6d6
     1.1 --- a/src/video/windows/SDL_d3drender.c	Mon Jan 31 22:21:29 2011 -0800
     1.2 +++ b/src/video/windows/SDL_d3drender.c	Mon Jan 31 22:44:43 2011 -0800
     1.3 @@ -107,8 +107,6 @@
     1.4                                    SDL_Texture * texture);
     1.5  static int D3D_SetTextureBlendMode(SDL_Renderer * renderer,
     1.6                                     SDL_Texture * texture);
     1.7 -static int D3D_SetTextureScaleMode(SDL_Renderer * renderer,
     1.8 -                                   SDL_Texture * texture);
     1.9  static int D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
    1.10                               const SDL_Rect * rect, const void *pixels,
    1.11                               int pitch);
    1.12 @@ -150,8 +148,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 |
    1.17 -      SDL_SCALEMODE_SLOW | SDL_SCALEMODE_BEST),
    1.18       0,
    1.19       {0},
    1.20       0,
    1.21 @@ -461,7 +457,6 @@
    1.22      renderer->SetTextureColorMod = D3D_SetTextureColorMod;
    1.23      renderer->SetTextureAlphaMod = D3D_SetTextureAlphaMod;
    1.24      renderer->SetTextureBlendMode = D3D_SetTextureBlendMode;
    1.25 -    renderer->SetTextureScaleMode = D3D_SetTextureScaleMode;
    1.26      renderer->UpdateTexture = D3D_UpdateTexture;
    1.27      renderer->LockTexture = D3D_LockTexture;
    1.28      renderer->UnlockTexture = D3D_UnlockTexture;
    1.29 @@ -804,23 +799,6 @@
    1.30  }
    1.31  
    1.32  static int
    1.33 -D3D_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
    1.34 -{
    1.35 -    switch (texture->scaleMode) {
    1.36 -    case SDL_SCALEMODE_NONE:
    1.37 -    case SDL_SCALEMODE_FAST:
    1.38 -    case SDL_SCALEMODE_SLOW:
    1.39 -    case SDL_SCALEMODE_BEST:
    1.40 -        return 0;
    1.41 -    default:
    1.42 -        SDL_Unsupported();
    1.43 -        texture->scaleMode = SDL_SCALEMODE_NONE;
    1.44 -        return -1;
    1.45 -    }
    1.46 -    return 0;
    1.47 -}
    1.48 -
    1.49 -static int
    1.50  D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
    1.51                    const SDL_Rect * rect, const void *pixels, int pitch)
    1.52  {
    1.53 @@ -1342,27 +1320,10 @@
    1.54          shader = data->ps_mask;
    1.55      }
    1.56  
    1.57 -    switch (texture->scaleMode) {
    1.58 -    case SDL_SCALEMODE_NONE:
    1.59 -    case SDL_SCALEMODE_FAST:
    1.60 -        IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
    1.61 -                                         D3DTEXF_POINT);
    1.62 -        IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,
    1.63 -                                         D3DTEXF_POINT);
    1.64 -        break;
    1.65 -    case SDL_SCALEMODE_SLOW:
    1.66 -        IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
    1.67 -                                         D3DTEXF_LINEAR);
    1.68 -        IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,
    1.69 -                                         D3DTEXF_LINEAR);
    1.70 -        break;
    1.71 -    case SDL_SCALEMODE_BEST:
    1.72 -        IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
    1.73 -                                         D3DTEXF_GAUSSIANQUAD);
    1.74 -        IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,
    1.75 -                                         D3DTEXF_GAUSSIANQUAD);
    1.76 -        break;
    1.77 -    }
    1.78 +    IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
    1.79 +                                     D3DTEXF_LINEAR);
    1.80 +    IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,
    1.81 +                                     D3DTEXF_LINEAR);
    1.82  
    1.83      result =
    1.84          IDirect3DDevice9_SetTexture(data->device, 0, (IDirect3DBaseTexture9 *)