ddraw: Track some more render states in the primary stateblock.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-11-27 23:53:37 -06:00 committed by Alexandre Julliard
parent cb6f488215
commit b29c7da5f0
1 changed files with 8 additions and 0 deletions

View File

@ -3555,6 +3555,7 @@ static void setup_lighting(const struct d3d_device *device, DWORD fvf, DWORD fla
if (!device->material || !(fvf & D3DFVF_NORMAL) || (flags & D3DDP_DONOTLIGHT))
enable = FALSE;
wined3d_stateblock_set_render_state(device->state, WINED3D_RS_LIGHTING, enable);
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_LIGHTING, enable);
}
@ -7033,11 +7034,18 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_ZENABLE,
d3d_device_update_depth_stencil(device));
if (version == 1) /* Color keying is initially enabled for version 1 devices. */
{
wined3d_stateblock_set_render_state(ddraw->state, WINED3D_RS_COLORKEYENABLE, TRUE);
wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_COLORKEYENABLE, TRUE);
}
else if (version == 2)
{
wined3d_stateblock_set_render_state(ddraw->state, WINED3D_RS_SPECULARENABLE, TRUE);
wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_SPECULARENABLE, TRUE);
}
if (version < 7)
{
wined3d_stateblock_set_render_state(ddraw->state, WINED3D_RS_NORMALIZENORMALS, TRUE);
wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_NORMALIZENORMALS, TRUE);
IDirect3DDevice3_SetRenderState(&device->IDirect3DDevice3_iface,
D3DRENDERSTATE_TEXTUREMAPBLEND, D3DTBLEND_MODULATE);