[D3D] Small lighting fix

Christian Costa titan.costa at wanadoo.fr
Mon Sep 29 14:58:49 CDT 2003


Hi,

This patch fixes a lighting issue that caused characters to appear black 
in Martian Gothic.

Bye,
Christian.

Changelog :
Small lighting fix.

Christian Costa   titan.costa at wanadoo.fr

-------------- next part --------------
Index: mesa.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/d3ddevice/mesa.c,v
retrieving revision 1.139
diff -u -r1.139 mesa.c
--- mesa.c	15 Sep 2003 20:00:03 -0000	1.139
+++ mesa.c	29 Sep 2003 19:53:38 -0000
@@ -1320,12 +1320,9 @@
 	}
     }
     
-    /* Just a hack for now.. Will have to find better algorithm :-/ */
-    if ((d3dvtVertexType & D3DFVF_POSITION_MASK) != D3DFVF_XYZ) {
+    if ( ((d3dvtVertexType & D3DFVF_POSITION_MASK) != D3DFVF_XYZ) ||
+         ((d3dvtVertexType & D3DFVF_POSITION_MASK) == D3DFVF_XYZ) && ((d3dvtVertexType & D3DFVF_NORMAL) == 0) )
         vertex_lighted = TRUE;
-    } else {
-        if ((d3dvtVertexType & D3DFVF_NORMAL) == 0) glNormal3f(0.0, 0.0, 0.0);
-    }
     
     /* Compute the number of active texture stages and set the various texture parameters */
     num_active_stages = draw_primitive_handle_textures(This);


More information about the wine-patches mailing list