View Full Version : Lighting Question
08-08-2005, 02:43 PM
In gl.h, there is a constant GL_MAX_LIGHTS and it's a hex number. The same number in decimal is 3377. Is that right? Can I have 3377 light sources?
08-08-2005, 07:42 PM
Not quite. Use glGetIntegerv() to query the OpenGL state machine and print the result, and you'll see the maximum number of lights is actually much lower. :)
08-09-2005, 12:36 AM
#define GL_MAX_LIGHTS 0x0D31
it means that the maximum number of lights is the integer at the adress 0x0D31. it's just a pointer!
With 3377 lights, I'll be able to build a big night club :D
08-09-2005, 01:10 AM
Pointers? That sounds like "Peeks and pokes for OpenGL". ;)
The GL_ defines are the GLenum values you use in most OpenGL commands. They are by no means pointers, just values.
08-10-2005, 12:12 AM
I know it's not a pointer. But, for example, GL_EXP2,GL_CCW or GL_TRIANGLES are just some constants used in switch statement.
GL_MAX_LIGHT refers to an intern pointer. I kwow it's not THE real pointer but it refers to a pointer. That is why you must call the function glGet...
Sorry if my answer wasn't clair and if I'm in a mist, thank you for correcting me ;)
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.