#import <CC3Texture.h>
Additional Inherited Members | |
Properties inherited from CC3Texture | |
CCTexture *ccTexture2D | __deprecated |
CCTexture * | ccTexture |
CGSize | coverage |
BOOL | hasAlpha |
BOOL | hasMipmap |
BOOL | hasPremultipliedAlpha |
GLenum | horizontalWrappingFunction |
GLenum | initialAttachmentFace |
BOOL | isBumpMap |
BOOL | isPOT |
BOOL | isPOTHeight |
BOOL | isPOTWidth |
BOOL | isTexture2D |
BOOL | isTextureCube |
BOOL | isUpsideDown |
CC3Vector | lightDirection |
GLenum | magnifyingFunction |
GLenum | minifyingFunction |
GLenum | pixelFormat |
GLenum | pixelType |
GLenum | samplerSemantic |
BOOL | shouldFlipHorizontallyOnLoad |
BOOL | shouldFlipVerticallyOnLoad |
CC3IntSize | size |
CC3Texture * | texture |
GLuint | textureID |
ccTexParams | textureParameters |
GLenum | textureTarget |
CC3TextureUnit * | textureUnit |
GLenum | verticalWrappingFunction |
The representation of a 2D texture loaded into the GL engine.
This class is used for all 2D texture types except PVR.
This class is part of a class-cluster under the parent CC3Texture class. Although you can invoke an instance creation method on this class directly, you will more commonly invoke them on the CC3Texture class instead. The creation and initialization methods will ensure that the correct subclass for the texture type, and in some cases, the texture file type, is created and returned. Because of this class-cluster structure, be aware that the class of the instance returned by an instance creation or initialization method may be different than the receiver of that method.
+ (BOOL) defaultShouldFlipHorizontallyOnLoad |
This class-side property determines the initial value of the shouldFlipHorizontallyOnLoad for instances of this class.
The initial value for 2D textures is NO.
Implements CC3Texture.
+ (BOOL) defaultShouldFlipVerticallyOnLoad |
This class-side property determines the initial value of the shouldFlipVerticallyOnLoad for instances of this class.
The initial value for 2D textures is YES, indicating that a 2D texture that has been loaded in upsdide-down will be fipped the right way up.
Implements CC3Texture.
- (void) replacePixels: | (CC3Viewport) | rect | |
withContent: | (ccColor4B *) | colorArray | |
Replaces a portion of the content of this texture by writing the specified array of pixels into the specified rectangular area within this texture, The specified content replaces the texture data within the specified rectangle.
The specified content array must be large enough to contain content for the number of pixels in the specified rectangle.
Content is read from the specified array left to right across each row of pixels within the specified image rectangle, starting at the row at the bottom of the rectangle, and ending at the row at the top of the rectangle.
Within the specified array, the pixel content should be packed tightly, with no gaps left at the end of each row. The last pixel of one row should immediately be followed by the first pixel of the next row.
The pixels in the specified array are in standard 32-bit RGBA. If the pixelFormat and pixelType properties of this texture are not GL_RGBA and GL_UNSIGNED_BYTE, respectively, the pixels in the specified array will be converted to the format and type of this texture before being inserted into the texture. Be aware that this conversion will reduce the performance of this method. For maximum performance, match the format and type of this texture to the 32-bit RGBA format of the specified array, by setting the pixelFormat property to GL_RGBA and the pixelType property to GL_UNSIGNED_BYTE. However, keep in mind that the 32-bit RGBA format consumes more memory than most other formats, so if performance is of lesser concern, you may choose to minimize the memory requirements of this texture by setting the pixelFormat and pixelType properties to values that consume less memory.
If this texture has mipmaps, they are not automatically updated. Once all desired content has been replaced, invoke the generateMipmap method to regenerate the mipmaps.
+ (void) setDefaultShouldFlipHorizontallyOnLoad: | (BOOL) | shouldFlip |
This class-side property determines the initial value of the shouldFlipHorizontallyOnLoad for instances of this class.
The initial value for 2D textures is NO.
Implements CC3Texture.
+ (void) setDefaultShouldFlipVerticallyOnLoad: | (BOOL) | shouldFlip |
This class-side property determines the initial value of the shouldFlipVerticallyOnLoad for instances of this class.
The initial value for 2D textures is YES, indicating that a 2D texture that has been loaded in upsdide-down will be fipped the right way up.
Implements CC3Texture.