View Full Version : Max light's?
what is the max number of lights that opengl can handle?
or what is the best way to do this:
i have unlimited house placed on terrain
and when night comes to world, you can see house windows emit light and road lights too
10-03-2001, 02:24 AM
The max hardware accelerated lights that OpenGL can supports is 8 (GL_LIGHT0-7).
But, I would strongly suggest researching lightmapping and radiosity. Its a much faster alternative, and allows for as many lights as you want! http://www.opengl.org/discussion_boards/ubb/smile.gif
It has to support AT LEAST 8 lights, not MAX 8 lights. Any implementation can choose to support as many light as it feels like, as ling as it supports at least 8 lights.
For implementations that suports more than 8 lights, lights are identified with GL_LIGHT0+n, where n is the light number.
And the specs doesn't say anything about whether the light must be HW or SW, as long as they are supported, everything is fine.
To get the number of supported lights, use glGetIntegerv along with GL_MAX_LIGHTS.
[This message has been edited by Bob (edited 10-03-2001).]
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.