comparison 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
comparison
equal deleted inserted replaced
1916:c773b0c0ac89 1917:3f54b3ec5a07
651 IDirect3DDevice9_SetRenderState(data->device, D3DRS_DESTBLEND, 651 IDirect3DDevice9_SetRenderState(data->device, D3DRS_DESTBLEND,
652 D3DBLEND_SRCCOLOR); 652 D3DBLEND_SRCCOLOR);
653 break; 653 break;
654 } 654 }
655 655
656 switch (scaleMode) {
657 case SDL_TextureScaleMode_None:
658 case SDL_TextureScaleMode_Fast:
659 IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
660 D3DTEXF_POINT);
661 IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,
662 D3DTEXF_POINT);
663 break;
664 case SDL_TextureScaleMode_Slow:
665 IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
666 D3DTEXF_LINEAR);
667 IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,
668 D3DTEXF_LINEAR);
669 break;
670 case SDL_TextureScaleMode_Best:
671 IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MINFILTER,
672 D3DTEXF_GAUSSIANQUAD);
673 IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_MAGFILTER,
674 D3DTEXF_GAUSSIANQUAD);
675 break;
676 }
677
656 result = 678 result =
657 IDirect3DDevice9_SetTexture(data->device, 0, 679 IDirect3DDevice9_SetTexture(data->device, 0,
658 (IDirect3DBaseTexture9 *) texturedata-> 680 (IDirect3DBaseTexture9 *) texturedata->
659 texture); 681 texture);
660 if (FAILED(result)) { 682 if (FAILED(result)) {