# HG changeset patch # User Yuri K. Schlesner # Date 1370053991 18000 # Fri May 31 21:33:11 2013 -0500 # Node ID d0684dc3b218d268d6607a63e888da8a4eb71f60 # Parent bbb6b079cfe51ec1320fe5203723600f79b0f0d4 Set direct3d texturing mode to CLAMP to match opengl renderer. diff -r bbb6b079cfe5 -r d0684dc3b218 src/render/direct3d/SDL_render_d3d.c --- a/src/render/direct3d/SDL_render_d3d.c Wed May 29 06:31:48 2013 -0500 +++ b/src/render/direct3d/SDL_render_d3d.c Fri May 31 21:33:11 2013 -0500 @@ -385,6 +385,8 @@ IDirect3DDevice9_SetRenderState(data->device, D3DRS_LIGHTING, FALSE); IDirect3DDevice9_GetRenderTarget(data->device, 0, &data->defaultRenderTarget); data->scaleMode = D3DTEXF_FORCE_DWORD; + IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP); + IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP); return 0; } @@ -637,6 +639,9 @@ D3DTA_TEXTURE); IDirect3DDevice9_SetTextureStageState(data->device, 0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE); + /* Set texture wrapping mode to CLAMP */ + IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP); + IDirect3DDevice9_SetSamplerState(data->device, 0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP); /* Disable second texture stage, since we're done */ IDirect3DDevice9_SetTextureStageState(data->device, 1, D3DTSS_COLOROP, D3DTOP_DISABLE);