bugfix [#22390] Lamp drawing circle bug

was drawing the circle when out of view.
This commit is contained in:
Campbell Barton 2010-05-22 11:58:21 +00:00
parent 93f5303e3f
commit 1a2ba8072e

@ -988,21 +988,23 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
/* Outer circle */
circrad = 3.0f*lampsize;
drawcircball(GL_LINE_LOOP, vec, circrad, imat);
}
else
circrad = 0.0f;
setlinestyle(3);
setlinestyle(3);
/* draw dashed outer circle if shadow is on. remember some lamps can't have certain shadows! */
if (la->type!=LA_HEMI) {
if ((la->mode & LA_SHAD_RAY) ||
((la->mode & LA_SHAD_BUF) && (la->type==LA_SPOT)) )
{
drawcircball(GL_LINE_LOOP, vec, circrad + 3.0f*pixsize, imat);
drawcircball(GL_LINE_LOOP, vec, circrad, imat);
/* draw dashed outer circle if shadow is on. remember some lamps can't have certain shadows! */
if(la->type!=LA_HEMI) {
if( (la->mode & LA_SHAD_RAY) ||
((la->mode & LA_SHAD_BUF) && (la->type==LA_SPOT))
) {
drawcircball(GL_LINE_LOOP, vec, circrad + 3.0f*pixsize, imat);
}
}
}
else {
setlinestyle(3);
circrad = 0.0f;
}
/* draw the pretty sun rays */
if(la->type==LA_SUN) {