CC3OpenGLES11MatrixStack provides access to several commands that operate on one of the matrix stacks, none of which require state tracking. More...
#import <CC3OpenGLES11Matrices.h>
Public Member Functions | |
(void) | - activate |
(GLuint) | - getDepth |
(void) | - getTop: |
(void) | - identity |
(id) | - initWithParent:withMode:andTopName:andDepthName:andModeTracker: |
(void) | - load: |
(void) | - multiply: |
(void) | - pop |
(void) | - push |
Static Public Member Functions | |
(id) | + trackerWithParent:withMode:andTopName:andDepthName:andModeTracker: |
CC3OpenGLES11MatrixStack provides access to several commands that operate on one of the matrix stacks, none of which require state tracking.
Even though this class does not track any state, it does rely on the tracker for the matrix mode, to ensure that the matrix mode associated with this matrix stack is active before calling a GL function.
- (void) activate |
Activates the matrix mode for this matrix in GL, by setting the value of the matrix mode tracker to the mode for this matrix stack.
Most of the command methods will first invoke this method, to ensure that the correct matrix mode is active before issuing a GL command to operate on a matrix stack.
- (GLuint) getDepth |
Returns the depth this matrix stack.
- (void) getTop: | (GLvoid *) | glMatrix |
Retrieves the matrix at the top of this matrix stack, and populates the specified matrix with its contents.
- (void) identity |
Loads the identity matrix onto the top of this matrix stack.
- (id) initWithParent: | (CC3OpenGLES11StateTracker *) | aTracker | |
withMode: | (GLenum) | matrixMode | |
andTopName: | (GLenum) | tName | |
andDepthName: | (GLenum) | dName | |
andModeTracker: | (CC3OpenGLES11StateTrackerEnumeration *) | aModeTracker | |
Initializes this instance for the specified matrix mode.
The specified tName is used to query the matrix at the top of this matrix stack. The specified dName is used to query the depth of this matrix stack. The specified aModeTracker is used to ensure that the matrix mode of this matrix is active before issuing any commands.
- (void) load: | (GLvoid *) | glMatrix |
Loads the specified matrix onto the top of this matrix stack.
- (void) multiply: | (GLvoid *) | glMatrix |
Multiplies the matrix at top of this matrix stack with the specified matrix.
- (void) pop |
Activates this matrix mode, then pops this matrix stack.
- (void) push |
Activates this matrix mode, then pushes this matrix stack.
+ (id) trackerWithParent: | (CC3OpenGLES11StateTracker *) | aTracker | |
withMode: | (GLenum) | matrixMode | |
andTopName: | (GLenum) | tName | |
andDepthName: | (GLenum) | dName | |
andModeTracker: | (CC3OpenGLES11StateTrackerEnumeration *) | aModeTracker | |
Allocates and initializes an autoreleased instance for the specified matrix mode.
The specified tName is used to query the matrix at the top of this matrix stack. The specified dName is used to query the depth of this matrix stack. The specified aModeTracker is used to ensure that the matrix mode of this matrix is active before issuing any commands.