On Sunday 29 May 2011 09:46:10 Frédéric Delanoy wrote:
default:
hr = wined3d_device_set_render_state(This->wined3d_device,
State, Value);
hr =
wined3d_device_set_render_state(This->wined3d_device, + wined3drenderstatetype_from_d3drenderstatetype(State), Value); } wined3d_mutex_unlock();
d3d8's SetRenderState and GetRenderState already have a switch-case statement because ZBIAS doesn't exist in wined3d, so strictly speaking a direct cast is not possible. You cannot move the switch-case from SetRenderState to the state conversion function because the meaning of the Value parameter is different between D3DRS_ZBIAS and WINED3DRS_DEPTHBIAS. So I'd suggest to put the cast into the default cases of d3ddevice8::SetRenderState and d3device8::GetRenderState
In d3d9 you can cast between the d3d9 and wined3d render state types.