Zebediah Figura : ddraw: Track some more render states in the primary stateblock.
Alexandre Julliard
julliard at winehq.org
Fri Nov 29 13:17:28 CST 2019
Module: wine
Branch: master
Commit: b29c7da5f06f9650c316106abc71cd59e2b83026
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b29c7da5f06f9650c316106abc71cd59e2b83026
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Wed Nov 27 23:53:37 2019 -0600
ddraw: Track some more render states in the primary stateblock.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ddraw/device.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 51576c81e2..def3e7c2a4 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -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);
More information about the wine-cvs
mailing list