View Full Version : More than 7 lights?
Drag0n
10-09-2001, 08:00 AM
Is there a way around the limit of 7 (or 8) light sources in OpenGL? Using Windows...
Thx
Drag0n
Get an implementation that supports more than 8 lights. If you can't find one, then download MESA, chanage the source and recompile.
... or, do the lighting calculations yourself.
Fredy
10-09-2001, 10:55 AM
http://developer.nvidia.com/view.asp?IO=Lights_Demo
Selva
10-09-2001, 11:46 AM
my GL.h says this.
#define GL_MAX_LIGHTS 0x0D31
Does this mean allowed lights in system is
3377?
DFrey
10-09-2001, 01:20 PM
No, that is simply the value of the token GL_MAX_LIGHTS. You pass that to glGet to get the maximum number of lights.
ShiningKnight
10-09-2001, 04:13 PM
Cross-posting eh? Hehe, I just responded to the same question on Gamedev.net... http://www.gamedev.net/community/forums/topic.asp?topic_id=62752
Drag0n
10-10-2001, 01:37 AM
Originally posted by ShiningKnight:
Cross-posting eh? Hehe, I just responded to the same question on Gamedev.net... http://www.gamedev.net/community/forums/topic.asp?topic_id=62752
http://www.opengl.org/discussion_boards/ubb/biggrin.gif
That might be because I asked the same questiong twice...
Thx anyway...
Drag0n
Rob The Bloke
10-10-2001, 08:13 AM
You could probably blag it by drawing the scene a few times and using blending :
Disable your eight lights
Enable blending
Enable another 8 lights
Redraw.
Disable blending
swap buffers
Lighting is an additive process.....
alternatively look towards using light mapping .....
marcus256
10-11-2001, 03:50 AM
You very seldom need more than 5-6 lights lighting a single surface => it pretty quikly gets totally white.
Try using some per-object based dynamic ligtht source enabling/disabling, based on:
A) distance to the light source
B) light source position relative to the object and the viewer (if it's "behind" the object from a certain viewpoint, its effect will never be seen by the viewer)
This way you will not only solve your problem, but you will most likely gain speed aswell.
/Marcus
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.