Mercurial > sdl-ios-xcode
diff src/video/win32/SDL_d3drender.c @ 1917:3f54b3ec5a07
Implemented scaling in the D3D renderer
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 19 Jul 2006 05:45:42 +0000 |
parents | c773b0c0ac89 |
children | 092bd3a019c5 |
line wrap: on
line diff
--- a/src/video/win32/SDL_d3drender.c Wed Jul 19 05:03:21 2006 +0000 +++ b/src/video/win32/SDL_d3drender.c Wed Jul 19 05:45:42 2006 +0000 @@ -653,6 +653,28 @@ break; } + switch (scaleMode) { + case SDL_TextureScaleMode_None: + case SDL_TextureScaleMode_Fast: + IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER, + D3DTEXF_POINT); + IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER, + D3DTEXF_POINT); + break; + case SDL_TextureScaleMode_Slow: + IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER, + D3DTEXF_LINEAR); + IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER, + D3DTEXF_LINEAR); + break; + case SDL_TextureScaleMode_Best: + IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER, + D3DTEXF_GAUSSIANQUAD); + IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER, + D3DTEXF_GAUSSIANQUAD); + break; + } + result = IDirect3DDevice9_SetTexture(data->device, 0, (IDirect3DBaseTexture9 *) texturedata->