CC3OpenGLES11Lighting manages trackers for lighting state. More...
#import <CC3OpenGLES11Lighting.h>
Public Member Functions | |
(CC3OpenGLES11Light *) | - lightAt: |
Properties | |
GLuint | lightCount |
CCArray * | lights |
CC3OpenGLES11StateTrackerSceneLightColor * | sceneAmbientLight |
CC3OpenGLES11Lighting manages trackers for lighting state.
- (CC3OpenGLES11Light*) lightAt: | (GLuint) | ltIndx |
Returns the tracker for the light with the specified index.
Index ltIndx corresponds to i in the GL capability name GL_LIGHTi, and must be between zero and the number of available lights minus one, inclusive.
The number of available lights can be retrieved from [CC3OpenGLES11Engine engine].platform.maxLights.value.
- (GLuint) lightCount [read, assign] |
Returns the number of active lights.
This value will be between zero and the maximum number of lights, as determined from [CC3OpenGLES11Engine engine].platform.maxLights.value.
To conserve memory, lights are lazily allocated when requested by the lightAt: method. The value of this property will initially be zero, and will subsequently be one more than the largest value passed to lightAt:.
- (CCArray *) lights [read, write, retain] |
Tracks lighting state for each light (GL capability name GL_LIGHTi).
Do not access individual light trackers through this property. Use the lightAt: method instead.
The number of available lights is retrieved from [CC3OpenGLES11Engine engine].platform.maxLights.value.
To conserve memory, lights are lazily allocated when requested by the lightAt: method. The array returned by this property will initially be empty, and will subsequently contain a number of lights one more than the largest value passed to lightAt:.
- (CC3OpenGLES11StateTrackerSceneLightColor *) sceneAmbientLight [read, write, retain] |
Tracks scene ambient light color (GL name GL_LIGHT_MODEL_AMBIENT).