ddraw: Get some texture stage states from their equivalent sampler states.
This commit is contained in:
parent
d4b63bbd87
commit
3d14118fb7
@ -3975,11 +3975,49 @@ IDirect3DDeviceImpl_7_GetTextureStageState(IDirect3DDevice7 *iface,
|
|||||||
if(!State)
|
if(!State)
|
||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
|
|
||||||
|
switch(TexStageStateType)
|
||||||
|
{
|
||||||
|
/* Mipfilter is a sampler state with different values */
|
||||||
|
case D3DTSS_MIPFILTER:
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
WINED3DTEXTUREFILTERTYPE value;
|
||||||
|
|
||||||
|
hr = IWineD3DDevice_GetSamplerState(This->wineD3DDevice,
|
||||||
|
Stage,
|
||||||
|
WINED3DSAMP_MIPFILTER,
|
||||||
|
&value);
|
||||||
|
switch(value)
|
||||||
|
{
|
||||||
|
case WINED3DTEXF_NONE: *State = D3DTFP_NONE; break;
|
||||||
|
case WINED3DTEXF_POINT: *State = D3DTFP_POINT; break;
|
||||||
|
case WINED3DTEXF_LINEAR: *State = D3DTFP_LINEAR; break;
|
||||||
|
default:
|
||||||
|
ERR("Unexpected mipfilter value %d\n", value);
|
||||||
|
*State = D3DTFP_NONE;
|
||||||
|
}
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Minfilter is a sampler state too, equal values */
|
||||||
|
case D3DTSS_MINFILTER:
|
||||||
|
return IWineD3DDevice_GetSamplerState(This->wineD3DDevice,
|
||||||
|
Stage,
|
||||||
|
WINED3DSAMP_MINFILTER,
|
||||||
|
State);
|
||||||
|
/* Same for MAGFILTER */
|
||||||
|
case D3DTSS_MAGFILTER:
|
||||||
|
return IWineD3DDevice_GetSamplerState(This->wineD3DDevice,
|
||||||
|
Stage,
|
||||||
|
WINED3DSAMP_MAGFILTER,
|
||||||
|
State);
|
||||||
|
default:
|
||||||
return IWineD3DDevice_GetTextureStageState(This->wineD3DDevice,
|
return IWineD3DDevice_GetTextureStageState(This->wineD3DDevice,
|
||||||
Stage,
|
Stage,
|
||||||
TexStageStateType,
|
TexStageStateType,
|
||||||
State);
|
State);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI
|
static HRESULT WINAPI
|
||||||
Thunk_IDirect3DDeviceImpl_3_GetTextureStageState(IDirect3DDevice3 *iface,
|
Thunk_IDirect3DDeviceImpl_3_GetTextureStageState(IDirect3DDevice3 *iface,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user