[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29391] trunk/blender/source/blender/ editors/space_view3d/drawobject.c: Fixed bug #22558, Show Cone & Square look strange

Nicholas Bishop nicholasbishop at gmail.com
Thu Jun 10 21:35:37 CEST 2010


Revision: 29391
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29391
Author:   nicholasbishop
Date:     2010-06-10 21:35:37 +0200 (Thu, 10 Jun 2010)

Log Message:
-----------
Fixed bug #22558, Show Cone & Square look strange

* Fixed a couple things: for triangle fans, you have to put an extra vert to make them closed, and also flipped the draw order so that the normals went the same as for circle cones.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_view3d/drawobject.c

Modified: trunk/blender/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawobject.c	2010-06-10 19:10:43 UTC (rev 29390)
+++ trunk/blender/source/blender/editors/space_view3d/drawobject.c	2010-06-10 19:35:37 UTC (rev 29391)
@@ -868,25 +868,17 @@
 
 static void draw_spot_cone(Lamp *la, float x, float z)
 {
-	float vec[3];
-
 	z= fabs(z);
 
 	glBegin(GL_TRIANGLE_FAN);
 	glVertex3f(0.0f, 0.0f, -x);
 
 	if(la->mode & LA_SQUARE) {
-		vec[0]= z;
-		vec[1]= z;
-		vec[2]= 0.0;
-
-		glVertex3fv(vec);
-		vec[1]= -z;
-		glVertex3fv(vec);
-		vec[0]= -z;
-		glVertex3fv(vec);
-		vec[1]= z;
-		glVertex3fv(vec);
+		glVertex3f(z, z, 0);
+		glVertex3f(-z, z, 0);
+		glVertex3f(-z, -z, 0);
+		glVertex3f(z, -z, 0);
+		glVertex3f(z, z, 0);
 	}
 	else {
 		float angle;





More information about the Bf-blender-cvs mailing list