[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32173] trunk/blender/source/blender/gpu/ intern/gpu_draw.c: need to set GL_SHININESS to the default value for weight painting.

Campbell Barton ideasman42 at gmail.com
Tue Sep 28 13:08:45 CEST 2010


Revision: 32173
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32173
Author:   campbellbarton
Date:     2010-09-28 13:08:45 +0200 (Tue, 28 Sep 2010)

Log Message:
-----------
need to set GL_SHININESS to the default value for weight painting.

Modified Paths:
--------------
    trunk/blender/source/blender/gpu/intern/gpu_draw.c

Modified: trunk/blender/source/blender/gpu/intern/gpu_draw.c
===================================================================
--- trunk/blender/source/blender/gpu/intern/gpu_draw.c	2010-09-28 10:04:41 UTC (rev 32172)
+++ trunk/blender/source/blender/gpu/intern/gpu_draw.c	2010-09-28 11:08:45 UTC (rev 32173)
@@ -1061,6 +1061,7 @@
 
 		glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, diff);
 		glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, spec);
+		glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 35); /* blender default */
 
 		return 0;
 	}
@@ -1323,7 +1324,6 @@
 	/* also called when doing opengl rendering and in the game engine */
 	float mat_ambient[] = { 0.0, 0.0, 0.0, 0.0 };
 	float mat_specular[] = { 0.5, 0.5, 0.5, 1.0 };
-	float mat_shininess[] = { 35.0 };
 	int a, x, y;
 	GLubyte pat[32*32];
 	const GLubyte *patc= pat;
@@ -1331,7 +1331,7 @@
 	glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, mat_ambient);
 	glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mat_specular);
 	glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat_specular);
-	glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, mat_shininess);
+	glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 35);
 
 	GPU_default_lights();
 	





More information about the Bf-blender-cvs mailing list