src/video/win32/SDL_d3drender.c
changeset 1917 3f54b3ec5a07
parent 1916 c773b0c0ac89
child 1918 092bd3a019c5
--- 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->