Henri Verbeet : wined3d: Pass a wined3d_state structure to apply_lights().
Alexandre Julliard
julliard at winehq.org
Mon Sep 27 11:29:39 CDT 2010
Module: wine
Branch: master
Commit: 9f75633a4f662506d2c46481db56fd85d0a78536
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9f75633a4f662506d2c46481db56fd85d0a78536
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Sep 27 12:07:54 2010 +0200
wined3d: Pass a wined3d_state structure to apply_lights().
---
dlls/wined3d/stateblock.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 7e1cfe1..3716ace 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -895,13 +895,15 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
return WINED3D_OK;
}
-static void apply_lights(IWineD3DDevice *device, const IWineD3DStateBlockImpl *This)
+static void apply_lights(IWineD3DDevice *device, const struct wined3d_state *state)
{
UINT i;
- for(i = 0; i < LIGHTMAP_SIZE; i++) {
+
+ for (i = 0; i < LIGHTMAP_SIZE; ++i)
+ {
struct list *e;
- LIST_FOR_EACH(e, &This->state.light_map[i])
+ LIST_FOR_EACH(e, &state->light_map[i])
{
const struct wined3d_light_info *light = LIST_ENTRY(e, struct wined3d_light_info, entry);
@@ -942,7 +944,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
This->state.vs_consts_b + This->contained_vs_consts_b[i], 1);
}
- apply_lights(device, This);
+ apply_lights(device, &This->state);
if (This->changed.pixelShader)
IWineD3DDevice_SetPixelShader(device, (IWineD3DPixelShader *)This->state.pixel_shader);
More information about the wine-cvs
mailing list