forked from bartvdbraak/blender
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.
This commit is contained in:
parent
ac59cad93f
commit
7d841b2f83
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user