CC3OpenGLES11Textures manages trackers for texture and texture environment state. More...
#import <CC3OpenGLES11Textures.h>
Public Member Functions | |
(CC3OpenGLES11TextureUnit *) | - textureUnitAt: |
Static Public Member Functions | |
(GLuint) | + minimumTextureUnits |
(void) | + setMinimumTextureUnits: |
Properties | |
CC3OpenGLES11StateTrackerActiveTexture * | activeTexture |
CC3OpenGLES11StateTrackerActiveTexture * | clientActiveTexture |
GLuint | textureUnitCount |
CCArray * | textureUnits |
CC3OpenGLES11Textures manages trackers for texture and texture environment state.
+ (GLuint) minimumTextureUnits |
The minimum number of GL texture unit trackers to create initially.
This value should be at least equal to the number of texture units that have been activated by cocos2d.
Normally, cocos2d only uses texture unit GL_TEXTURE0, so the initial value of this property is one. If your cocos2d application performs multi-texturing and has activated texture unit GL_TEXTURE1 or beyond, make sure that you set the value of this property to the number of texture units used by your cocos2d application.
The value of this property must be set before this class is instantiated when the CC3OpenGLES11Engine is created.
+ (void) setMinimumTextureUnits: | (GLuint) | minTexUnits |
The minimum number of GL texture unit trackers to create initially.
This value should be at least equal to the number of texture units that have been activated by cocos2d.
Normally, cocoss2d only uses texture unit GL_TEXTURE0, so the initial value of this property is one. If your cocos2d application performs multi-texturing and has activated texture unit GL_TEXTURE1 or beyond, make sure that you set the value of this property to the number of texture units used by your cocos2d application.
The value of this property must be set before this class is instantiated when the CC3OpenGLES11Engine is created.
- (CC3OpenGLES11TextureUnit*) textureUnitAt: | (GLuint) | texUnit |
Returns the tracker for the texture unit with the specified index.
Index texUnit corresponds to i in the GL capability name GL_TEXTUREi, and must be between zero and the number of available texture units minus one, inclusive.
The number of available texture units can be retrieved from [CC3OpenGLES11Engine engine].platform.maxTextureUnits.value.
To conserve memory, texture units are lazily allocated when requested by this method.
- (CC3OpenGLES11StateTrackerActiveTexture *) activeTexture [read, write, retain] |
Tracks active texture (GL get name GL_ACTIVE_TEXTURE and set function glActiveTexture).
- (CC3OpenGLES11StateTrackerActiveTexture *) clientActiveTexture [read, write, retain] |
Tracks active client texture (GL get name GL_CLIENT_ACTIVE_TEXTURE and set function glClientActiveTexture).
- (GLuint) textureUnitCount [read, assign] |
Returns the number of active texture units.
This value will be between zero and the maximum number of texture units, as determined from [CC3OpenGLES11Engine engine].platform.maxTextureUnits.value.
To conserve memory, texture units are lazily allocated when requested by the textureUnitAt: method. The value of this property will initially be zero, and will subsequently be one more than the largest value passed to textureUnitAt:.
- (CCArray *) textureUnits [read, write, retain] |
Tracks state for each texture unit (GL name GL_TEXTUREi).
Do not access individual texture unit trackers through this property. Use the textureUnitAt: method instead.
The number of available texture units can be retrieved from [CC3OpenGLES11Engine engine].platform.maxTextureUnits.value.
To conserve memory, texture units are lazily allocated when requested by the textureUnitAt: method. The array returned by this property will initially be empty, and will subsequently contain a number of texture units one more than the largest value passed to textureUnitAt:.