Only 8 lights?!

Started by
2 comments, last by Sebo 22 years, 3 months ago
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?!
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).

Kippesoep
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
Yup.

||--------------------------||
Black Hole Productions
Resident expert on stuff
max621@gdnmail.net
||--------------------------||
||--------------------------||Black Hole Productionshttp://bhp.nydus.netResident expert on stuffmax621@barrysworld.com||--------------------------||

This topic is closed to new replies.

Advertisement