Public Member Functions | Static Public Member Functions | Properties

CC3OpenGLES11StateTrackerLightColor Class Reference

CC3OpenGLES11StateTrackerLightColor tracks a color GL state value for an individual light. More...

#import <CC3OpenGLES11Lighting.h>

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

List of all members.

Public Member Functions

(id) - initWithParent:forState:andLightIndex:

Static Public Member Functions

(id) + trackerWithParent:forState:andLightIndex:

Properties

GLenum glLightIndex
GLuint lightIndex

Detailed Description

CC3OpenGLES11StateTrackerLightColor tracks a color GL state value for an individual light.

The property lightIndex identifies the particular light for which the state is being tracked.

This implementation uses GL function glGetLightfv to read the value from the GL engine, and GL function glLightfv to set the value in the GL engine.

The originalValueHandling property is set to kCC3GLESStateOriginalValueIgnore, which will not read the GL value from the GL engine in the open method, and will not restore the value in the close method.


Member Function Documentation

- (id) initWithParent: (CC3OpenGLES11StateTracker *)  aTracker
forState: (GLenum)  qName
andLightIndex: (GLuint)  ltIndx 

Initialize this instance to track the GL state with the specified name 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.

+ (id) trackerWithParent: (CC3OpenGLES11StateTracker *)  aTracker
forState: (GLenum)  qName
andLightIndex: (GLuint)  ltIndx 

Allocates and initializes an autoreleased instance to track the GL state with the specified name 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

- (GLenum) glLightIndex [read, assign]

The GL enumeration value GL_LIGHTi, where i is determined by the value property.

- (GLuint) lightIndex [read, assign]

The index of the light being tracked.


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