opengl spot_cutoff > 90 invalid?

May 22, 2006 at 4:31pm

opengl spot_cutoff > 90 invalid?

“spot_cutoff” values between 90 and 180 are triggering error messages. I’d
like to morph from 360 positional lighting to spotlights, but I can’t.

using jitter 1.5.2 I get:
ob3d_draw_end popmatrix: GL Error: Invalid value.

180 or 90 (and below) is fine with Jitter, but everything in between is
invalid.

Is this not accepted by OpenGL standards or is it a possible Jitter bug?

-thijs

#26109
May 22, 2006 at 4:40pm

Sounds like it might be a good idea to mention again that the standard
OpenGL stuff is available online for you at http://www.opengl.org/ .
It’s
a great resource.

#77602
May 22, 2006 at 5:56pm

From the Red Book (p.~189):

“To specify the angle between the axis of the cone an a ray along the
edge of the cone, use the GL_SPOT_CUTOFF parameter….By default, the
spotlight feature is disabled because the GL_SPOT_CUTOFF parameter is
180.0. This value means that light is emitted in all directions (the
angle at the cone’s apex is 360 degrees,so it isn’t a cone at all). The
value for GL_SPOT_CUTOFF is restricted to the range [0.0 90.0] (unless
it has the special value 180.).”

Andrew B.

#77603
May 22, 2006 at 7:19pm

Ah, thanks. Sorry for the wasted time and bandwidth. I must have overlooked
it.

-thijs

#77604

You must be logged in to reply to this topic.