Commit c3d3dcec authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

ddraw: Handle mipmapped TEXTUREMIN render states.

parent 19baae31
......@@ -2317,6 +2317,7 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
case D3DRENDERSTATE_TEXTUREMIN:
{
WINED3DTEXTUREFILTERTYPE tex_min = WINED3DTEXF_NONE;
WINED3DTEXTUREFILTERTYPE tex_mip = WINED3DTEXF_NONE;
switch ((D3DTEXTUREFILTER) Value)
{
......@@ -2326,10 +2327,30 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
case D3DFILTER_LINEAR:
tex_min = WINED3DTEXF_LINEAR;
break;
case D3DFILTER_MIPNEAREST:
tex_min = WINED3DTEXF_NONE;
tex_mip = WINED3DTEXF_POINT;
break;
case D3DFILTER_MIPLINEAR:
tex_min = WINED3DTEXF_NONE;
tex_mip = WINED3DTEXF_LINEAR;
break;
case D3DFILTER_LINEARMIPNEAREST:
tex_min = WINED3DTEXF_POINT;
tex_mip = WINED3DTEXF_LINEAR;
break;
case D3DFILTER_LINEARMIPLINEAR:
tex_min = WINED3DTEXF_LINEAR;
tex_mip = WINED3DTEXF_LINEAR;
break;
default:
ERR("Unhandled texture mag %d !\n",Value);
ERR("Unhandled texture min %d !\n",Value);
}
IWineD3DDevice_SetSamplerState(This->wineD3DDevice,
0, WINED3DSAMP_MIPFILTER,
tex_mip);
return IWineD3DDevice_SetSamplerState(This->wineD3DDevice,
0, WINED3DSAMP_MINFILTER,
tex_min);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment