A type of CC3OpenGLES11StateTracker that tracks the state of a single primitive GL state value. More...
#import <CC3OpenGLES11StateTracker.h>
Public Member Functions | |
(void) | - getGLValue |
(id) | - initForState: |
(void) | - logGetGLValue |
(void) | - logSetValue: |
(void) | - restoreOriginalValue |
(void) | - setGLValue |
Static Public Member Functions | |
(CC3GLESStateOriginalValueHandling) | + defaultOriginalValueHandling |
(id) | + trackerForState: |
(id) | + trackerForState:andOriginalValueHandling: |
Properties | |
GLenum | name |
CC3GLESStateOriginalValueHandling | originalValueHandling |
BOOL | valueIsKnown |
This is an abstract class. Subclasses will define tracking each type of primitive GL state data.
- (void) close |
Depending on the value of the originalValueHandling property, this implementation may attempt to restore the GL value back to the value read when the open method was invoked.
Implements CC3OpenGLES11StateTracker.
+ (CC3GLESStateOriginalValueHandling) defaultOriginalValueHandling |
The default technique for handling the GL state value as it was before tracking is opened.
See the notes for the CC3GLESStateOriginalValueHandling enumeration for more on handling original GL state.
The default value of this abstract implementation is kCC3GLESStateOriginalValueIgnore. Subclasses will override to establish different defaults.
- (void) getGLValue |
Template method to get the value from the GL engine and store it as the original value.
This abstract implementation does nothing. Subclasses will override to get the value and store it in an original value instance variable of the appropriate type.
The application should not invoke this method directly.
- (id) initForState: | (GLenum) | qName |
Initializes this instance with the specified enumerated GL name.
- (id) initForState: | (GLenum) | aName | |
andOriginalValueHandling: | (CC3GLESStateOriginalValueHandling) | origValueHandling | |
Initializes this instance with the specified enumerated GL name, and to handle original values as specified.
- (void) logGetGLValue |
Template method to log the value retrieved by the getGLValue method.
This abstract implementation does nothing. Subclasses will override to log the value as the appropriate variable type.
The application should not invoke this method directly.
- (void) logSetValue: | (BOOL) | wasSet |
Template method to log the value set in the GL engine by the setGLValue method.
The wasSet parameter indicates whether the value has changed and was set in the GL engine.
This abstract implementation does nothing. Subclasses will override to log the value as the appropriate variable type.
The application should not invoke this method directly.
- (void) open |
Depending on the value of the originalValueHandling property, this implementation may call the OpenGL ES 1.1 engine to read the GL value being tracked.
Implements CC3OpenGLES11StateTracker.
- (void) restoreOriginalValue |
Template method that sets the current value of the GL state back to the original value.
The value will only be propagated to the GL engine if the original value is different than the current GL value, or if the current value in the GL engine is unknown.
This abstract implementation does nothing. Subclasses will override to set the value using the appropriate variable type.
This method is invoked automatically when the close method is invoked, and the original value is to be restored. The application should not invoke this method directly.
- (void) setGLValue |
Template method to set the value into the GL engine.
This abstract implementation does nothing. Subclasses will override to set a value of the appropriate type into the GL engine.
The application should not invoke this method directly.
+ (id) trackerForState: | (GLenum) | qName |
Allocates and initializes an autoreleased instance with the specified enumerated GL name.
+ (id) trackerForState: | (GLenum) | aName | |
andOriginalValueHandling: | (CC3GLESStateOriginalValueHandling) | origValueHandling | |
Allocates and initializes an autoreleased instance with the specified enumerated GL name, and to handle original values as specified.
- (GLenum) name [read, write, assign] |
The enumerated name under which the GL engine identifies this state.
- (CC3GLESStateOriginalValueHandling) originalValueHandling [read, write, assign] |
The type of handling to apply to the value of the GL state at the time the open and close method are invoked.
See the notes for the CC3GLESStateOriginalValueHandling enumeration for more on handling original GL state.
The initial value is set to the value returned by the defaultOriginalValueHandling method. Different subclasses may return different values from the defaultOriginalValueHandling method.
- (BOOL) valueIsKnown [read, write, assign] |
Indicates whether the current state in the GL engine is known.