ddraw: Forward D3DRS_TEXTUREADDRESS* and D3DTSS_ADDRESS* to sampler states.
This commit is contained in:
parent
8295d9040b
commit
7c40f9aaa2
|
@ -2195,28 +2195,15 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
case D3DRENDERSTATE_TEXTUREADDRESSU:
|
|
||||||
case D3DRENDERSTATE_TEXTUREADDRESSV:
|
|
||||||
case D3DRENDERSTATE_TEXTUREADDRESS:
|
case D3DRENDERSTATE_TEXTUREADDRESS:
|
||||||
{
|
case D3DRENDERSTATE_TEXTUREADDRESSU:
|
||||||
WINED3DTEXTURESTAGESTATETYPE TexStageStateType;
|
return IWineD3DDevice_GetSamplerState(This->wineD3DDevice,
|
||||||
|
0, WINED3DSAMP_ADDRESSU,
|
||||||
if (RenderStateType == D3DRENDERSTATE_TEXTUREADDRESS)
|
Value);
|
||||||
{
|
case D3DRENDERSTATE_TEXTUREADDRESSV:
|
||||||
TexStageStateType = WINED3DTSS_ADDRESS;
|
return IWineD3DDevice_GetSamplerState(This->wineD3DDevice,
|
||||||
}
|
0, WINED3DSAMP_ADDRESSV,
|
||||||
else if (RenderStateType == D3DRENDERSTATE_TEXTUREADDRESSU)
|
Value);
|
||||||
{
|
|
||||||
TexStageStateType = WINED3DTSS_ADDRESSU;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TexStageStateType = WINED3DTSS_ADDRESSV;
|
|
||||||
}
|
|
||||||
return IWineD3DDevice_GetTextureStageState(This->wineD3DDevice,
|
|
||||||
0, TexStageStateType,
|
|
||||||
Value);
|
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/* FIXME: Unhandled: D3DRENDERSTATE_STIPPLEPATTERN00 - 31 */
|
/* FIXME: Unhandled: D3DRENDERSTATE_STIPPLEPATTERN00 - 31 */
|
||||||
|
@ -2348,29 +2335,19 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
|
||||||
tex_min);
|
tex_min);
|
||||||
}
|
}
|
||||||
|
|
||||||
case D3DRENDERSTATE_TEXTUREADDRESSU:
|
|
||||||
case D3DRENDERSTATE_TEXTUREADDRESSV:
|
|
||||||
case D3DRENDERSTATE_TEXTUREADDRESS:
|
case D3DRENDERSTATE_TEXTUREADDRESS:
|
||||||
{
|
IWineD3DDevice_SetSamplerState(This->wineD3DDevice,
|
||||||
WINED3DTEXTURESTAGESTATETYPE TexStageStateType;
|
0, WINED3DSAMP_ADDRESSV,
|
||||||
|
Value);
|
||||||
if (RenderStateType == D3DRENDERSTATE_TEXTUREADDRESS)
|
/* Drop through */
|
||||||
{
|
case D3DRENDERSTATE_TEXTUREADDRESSU:
|
||||||
TexStageStateType = WINED3DTSS_ADDRESS;
|
return IWineD3DDevice_SetSamplerState(This->wineD3DDevice,
|
||||||
}
|
0, WINED3DSAMP_ADDRESSU,
|
||||||
else if (RenderStateType == D3DRENDERSTATE_TEXTUREADDRESSU)
|
Value);
|
||||||
{
|
case D3DRENDERSTATE_TEXTUREADDRESSV:
|
||||||
TexStageStateType = WINED3DTSS_ADDRESSU;
|
return IWineD3DDevice_SetSamplerState(This->wineD3DDevice,
|
||||||
}
|
0, WINED3DSAMP_ADDRESSV,
|
||||||
else
|
Value);
|
||||||
{
|
|
||||||
TexStageStateType = WINED3DTSS_ADDRESSV;
|
|
||||||
}
|
|
||||||
|
|
||||||
return IWineD3DDevice_SetTextureStageState(This->wineD3DDevice,
|
|
||||||
0, TexStageStateType,
|
|
||||||
Value);
|
|
||||||
}
|
|
||||||
|
|
||||||
case D3DRENDERSTATE_TEXTUREMAPBLEND:
|
case D3DRENDERSTATE_TEXTUREMAPBLEND:
|
||||||
{
|
{
|
||||||
|
@ -4020,11 +3997,23 @@ IDirect3DDeviceImpl_7_GetTextureStageState(IDirect3DDevice7 *iface,
|
||||||
Stage,
|
Stage,
|
||||||
WINED3DSAMP_MAGFILTER,
|
WINED3DSAMP_MAGFILTER,
|
||||||
State);
|
State);
|
||||||
|
|
||||||
|
case D3DTSS_ADDRESS:
|
||||||
|
case D3DTSS_ADDRESSU:
|
||||||
|
return IWineD3DDevice_GetSamplerState(This->wineD3DDevice,
|
||||||
|
Stage,
|
||||||
|
WINED3DSAMP_ADDRESSU,
|
||||||
|
State);
|
||||||
|
case D3DTSS_ADDRESSV:
|
||||||
|
return IWineD3DDevice_GetSamplerState(This->wineD3DDevice,
|
||||||
|
Stage,
|
||||||
|
WINED3DSAMP_ADDRESSV,
|
||||||
|
State);
|
||||||
default:
|
default:
|
||||||
return IWineD3DDevice_GetTextureStageState(This->wineD3DDevice,
|
return IWineD3DDevice_GetTextureStageState(This->wineD3DDevice,
|
||||||
Stage,
|
Stage,
|
||||||
TexStageStateType,
|
TexStageStateType,
|
||||||
State);
|
State);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4103,12 +4092,28 @@ IDirect3DDeviceImpl_7_SetTextureStageState(IDirect3DDevice7 *iface,
|
||||||
WINED3DSAMP_MAGFILTER,
|
WINED3DSAMP_MAGFILTER,
|
||||||
State);
|
State);
|
||||||
|
|
||||||
|
case D3DTSS_ADDRESS:
|
||||||
|
IWineD3DDevice_SetSamplerState(This->wineD3DDevice,
|
||||||
|
Stage,
|
||||||
|
WINED3DSAMP_ADDRESSV,
|
||||||
|
State);
|
||||||
|
/* Drop through */
|
||||||
|
case D3DTSS_ADDRESSU:
|
||||||
|
return IWineD3DDevice_SetSamplerState(This->wineD3DDevice,
|
||||||
|
Stage,
|
||||||
|
WINED3DSAMP_ADDRESSU,
|
||||||
|
State);
|
||||||
|
case D3DTSS_ADDRESSV:
|
||||||
|
return IWineD3DDevice_SetSamplerState(This->wineD3DDevice,
|
||||||
|
Stage,
|
||||||
|
WINED3DSAMP_ADDRESSV,
|
||||||
|
State);
|
||||||
default:
|
default:
|
||||||
|
|
||||||
return IWineD3DDevice_SetTextureStageState(This->wineD3DDevice,
|
return IWineD3DDevice_SetTextureStageState(This->wineD3DDevice,
|
||||||
Stage,
|
Stage,
|
||||||
TexStageStateType,
|
TexStageStateType,
|
||||||
State);
|
State);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue