[D3D] Small lighting fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@wanadoo.fr

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);

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux