Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@gmail.com>2010-06-10 23:35:37 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2010-06-10 23:35:37 +0400
commit7d841b2f8327160f0adcd76c2f4a1aa65dd1089a (patch)
treea8a93a06b218a5a1b8ac1797553b6bbc780799b9 /source/blender/editors/space_view3d/drawobject.c
parentac59cad93fb200fc88c2e062dda058b78deb9fd9 (diff)
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.
Diffstat (limited to 'source/blender/editors/space_view3d/drawobject.c')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index b4e9b227a91..7172da55744 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -868,25 +868,17 @@ static void spotvolume(float *lvec, float *vvec, float inp)
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;