[D3D 94] Handle COLORVERTEX state

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

 



Changelog
 Handle the COLORVERTEX render state

-- 
		 Lionel Ulmer - http://www.bbrox.org/
--- ../wine_base/dlls/ddraw/mesa.c	Thu Jan 30 22:07:23 2003
+++ dlls/ddraw/mesa.c	Sun Feb  9 21:32:28 2003
@@ -432,6 +432,10 @@
 		glLightModelfv(GL_LIGHT_MODEL_AMBIENT, (float *) light);
 	    } break;
 
+	    case D3DRENDERSTATE_COLORVERTEX:          /* 141 */
+	          /* Nothing to do here.. Only storage matters */
+	          break;
+		  
 	    case D3DRENDERSTATE_LOCALVIEWER:          /* 142 */
 	        if (dwRenderState)
 		    glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);
--- ../wine_base/dlls/ddraw/d3ddevice/mesa.c	Sun Feb  2 12:44:58 2003
+++ dlls/ddraw/d3ddevice/mesa.c	Sun Feb  9 21:27:20 2003
@@ -773,7 +773,8 @@
 
     /* Handle the code for pre-vertex material properties */
     if (vertex_transformed == FALSE) {
-        if (This->state_block.render_state[D3DRENDERSTATE_LIGHTING - 1] == TRUE) {
+        if ((This->state_block.render_state[D3DRENDERSTATE_LIGHTING - 1] == TRUE) &&
+	    (This->state_block.render_state[D3DRENDERSTATE_COLORVERTEX - 1] == TRUE)) {
 	    if ((This->state_block.render_state[D3DRENDERSTATE_DIFFUSEMATERIALSOURCE - 1] != D3DMCS_MATERIAL) ||
 		(This->state_block.render_state[D3DRENDERSTATE_AMBIENTMATERIALSOURCE - 1] != D3DMCS_MATERIAL) ||
 		(This->state_block.render_state[D3DRENDERSTATE_EMISSIVEMATERIALSOURCE - 1] != D3DMCS_MATERIAL) ||
@@ -935,7 +936,8 @@
 
 inline static void handle_diffuse(STATEBLOCK *sb, DWORD *color, BOOLEAN lighted) {
     if ((lighted == FALSE) &&
-	(sb->render_state[D3DRENDERSTATE_LIGHTING - 1] == TRUE)) {
+	(sb->render_state[D3DRENDERSTATE_LIGHTING - 1] == TRUE) &&
+	(sb->render_state[D3DRENDERSTATE_COLORVERTEX - 1] == TRUE)) {
         if (sb->render_state[D3DRENDERSTATE_DIFFUSEMATERIALSOURCE - 1] == D3DMCS_COLOR1) {
 	    glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
 	    handle_diffuse_base(sb, color);
@@ -960,7 +962,8 @@
 
 inline static void handle_specular(STATEBLOCK *sb, DWORD *color, BOOLEAN lighted) {
     if ((lighted == FALSE) &&
-	(sb->render_state[D3DRENDERSTATE_LIGHTING - 1] == TRUE)) {
+	(sb->render_state[D3DRENDERSTATE_LIGHTING - 1] == TRUE) &&
+	(sb->render_state[D3DRENDERSTATE_COLORVERTEX - 1] == TRUE)) {
         if (sb->render_state[D3DRENDERSTATE_DIFFUSEMATERIALSOURCE - 1] == D3DMCS_COLOR2) {
 	    glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
 	    handle_specular_base(sb, color);

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

  Powered by Linux