CCTexture(CC3) Category Reference
Declared in | CC3Texture.h |
Tasks
-
– setName:
-
pixelGLFormat
property -
pixelGLType
property -
hasAlpha
property -
bytesPerPixel
property -
hasMipmap
property -
isUpsideDown
property -
+ texturesAreLoadedUpsideDown
-
imageData
property -
– flipVertically
-
– flipHorizontally
-
– rotateHalfCircle
-
– resizeTo:
-
– deleteImageData
-
– addToCacheWithName:
-
pixelWidth
property -
pixelHeight
property
Properties
bytesPerPixel
Returns the number of bytes in each pixel of content.
@property (nonatomic, readonly) GLuint bytesPerPixel
Declared In
CC3Texture.h
hasAlpha
Indicates whether this texture has an alpha channel, representing opacity.
@property (nonatomic, readonly) BOOL hasAlpha
Discussion
The value of this property is derived from the value of the pixelGLFomat property.
Declared In
CC3Texture.h
hasMipmap
Returns whether a mipmap has been generated for this texture.
@property (nonatomic, readonly) BOOL hasMipmap
Discussion
Mipmaps can also be generated by invoking the generateMipmap method.
Declared In
CC3Texture.h
imageData
Returns NULL. For compatibility with CC3Texture2DContent.
@property (nonatomic, readonly) const GLvoid *imageData
Declared In
CC3Texture.h
isUpsideDown
Indicates whether this texture is upside-down.
@property (nonatomic, readonly) BOOL isUpsideDown
Discussion
The vertical axis of the coordinate system of OpenGL is inverted relative to the CoreGraphics view coordinate system. As a result, texture content can be initially loaded upside down. When this happens, this property will return YES, otherwise, it will return NO.
Declared In
CC3Texture.h
pixelGLFormat
Returns the GL engine pixel format of the texture.
@property (nonatomic, readonly) GLenum pixelGLFormat
Discussion
See the pixelFormat property of CC3Texture for the range of possible values.
Declared In
CC3Texture.h
pixelGLType
Returns the pixel data type.
@property (nonatomic, readonly) GLenum pixelGLType
Discussion
Possible values depend on the value of the pixelFormat property. See the pixelType property of CC3Texture for the range of possible values.
Declared In
CC3Texture.h
Instance Methods
addToCacheWithName:
If a CCTexture with the specified name does not already exist in the CCTextureCache, this texture is added to the CCTextureCache under that name.
- (void)addToCacheWithName:(NSString *)texName
Discussion
If a texture already exists in the cache under the specified name, or if the specified name is nil, this texture is not added to the cache.
Declared In
CC3Texture.h
deleteImageData
Does nothing. For compatibility with CC3Texture2DContent.
- (void)deleteImageData
Declared In
CC3Texture.h
flipHorizontally
Does nothing. For compatibility with CC3Texture2DContent.
- (void)flipHorizontally
Declared In
CC3Texture.h
flipVertically
Does nothing. For compatibility with CC3Texture2DContent.
- (void)flipVertically
Declared In
CC3Texture.h
resizeTo:
Resizes this texture to the specified dimensions.
- (void)resizeTo:(CC3IntSize)size
Discussion
This method changes the values of the size, width, height, maxS & maxT properties, and deletes any contained image data, but does not make any changes to the texture within the GL engine. This method is invoked during the resizing of a texture that backs a surface.
Declared In
CC3Texture.h