Skip to main content
GameDev.net gamedev.net
🔒 Locked

Easy Light Question

Started by Shyft777 Sep 3, 2003 at 8:30 PM 0 replies 550+ views
Original Post
Shyft777
Shyft777
I''m somewhat confused about creating different kinds of lights. I understand the code involved, but I don''t know how to specify the light type (Point, Spot, etc.) Lights seem to default to point lights, but will it automatically become a spot light if I set GL_SPOT_DIRECTION? Also, DX has an option for Directional lights. Is there any such thing in GL? Thanks
Myopic Rhino
Myopic Rhino
When you set a light''s position, the fourth parameter controls whether or not it is a directional (0.0) or point (otherwise) light. To create a spotlight, you just have to set GL_SPOT_CUTOFF (which is a per-light setting) to a value between 0 and 90. By default (or if you set GL_SPOT_CUTOFF to 180), spotlighting is disabled.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.