Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Sebo

Only 8 lights?!

This topic is 6028 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The gllighfv procedure, requires a glenum type. You give the Lights names from GL_LIGHT0 up to GL_LIGHT7 is that all?! You can only generate 8 Lights?!

Share this post


Link to post
Share on other sites
Advertisement
There can be more, depending on the OpenGL implementation/driver. However, I think you''ll find things can become intolerably slow with 8 lights already. What you should realise is that this means there may be 8 lights used while rendering a triangle. You may have any number of lights in your program, of course. What you should do is select the 8 most important lights and set up those. You could do this on a triangle basis, but it''s probably more efficient to do this per object (or in case of a bigger mesh, such as a Quake level, per sector).

Share this post


Link to post
Share on other sites
As you render each polygon, group of polygons, or whatever, you specify what eight lights are "active". Thus, you might light one object with the eight lights nearest to it, and another object with a totally different set of lights.

You can therefore create as many lights as you want...you just can''t have more than eight activated at any given time.

No consumer videocard on the market supports more lights than this in hardware (up to and including the Geforce 3 Ti 500 and Radeon 8500.)

- Roulette

Share this post


Link to post
Share on other sites
Yup.

||--------------------------||
Black Hole Productions
Resident expert on stuff
max621@gdnmail.net
||--------------------------||

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!