Public Member Functions | Properties

CC3OpenGLES11Lighting Class Reference

CC3OpenGLES11Lighting manages trackers for lighting state. More...

#import <CC3OpenGLES11Lighting.h>

Inheritance diagram for CC3OpenGLES11Lighting:
Inheritance graph
[legend]
Collaboration diagram for CC3OpenGLES11Lighting:
Collaboration graph
[legend]

List of all members.

Public Member Functions

(CC3OpenGLES11Light *) - lightAt:

Properties

GLuint lightCount
CCArray * lights
CC3OpenGLES11StateTrackerWorldLightColorworldAmbientLight

Detailed Description

CC3OpenGLES11Lighting manages trackers for lighting state.


Member Function Documentation

- (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.


Property Documentation

- (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:.

- (CC3OpenGLES11StateTrackerWorldLightColor *) worldAmbientLight [read, write, retain]

Tracks world ambient light color (GL name GL_LIGHT_MODEL_AMBIENT).


The documentation for this class was generated from the following file: