v2.0.2
Instance Methods | Class Methods | Properties | List of all members
CCTexture(CC3) Category Reference

#import <CC3Texture.h>

Instance Methods

(void) - addToCacheWithName:
 
(void) - deleteImageData
 
(void) - flipHorizontally
 
(void) - flipVertically
 
(void) - resizeTo:
 
(void) - rotateHalfCircle
 
(void) - setName:
 

Class Methods

(BOOL) + texturesAreLoadedUpsideDown
 

Properties

GLuint bytesPerPixel
 
BOOL hasAlpha
 
BOOL hasMipmap
 
const GLvoid * imageData
 
BOOL isUpsideDown
 
GLenum pixelGLFormat
 
GLenum pixelGLType
 

Detailed Description

Extension category to support Cocos3D functionality.

Method Documentation

- (void) addToCacheWithName: (NSString *)  texName

If a CCTexture with the specified name does not already exist in the CCTextureCache, this texture is added to the CCTextureCache under that name.

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.

- (void) deleteImageData

Does nothing.

For compatibility with CC3Texture2DContent.

- (void) flipHorizontally

Does nothing.

For compatibility with CC3Texture2DContent.

- (void) flipVertically

Does nothing.

For compatibility with CC3Texture2DContent.

- (void) resizeTo: (CC3IntSize size

Resizes this texture to the specified dimensions.

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.

- (void) rotateHalfCircle

Does nothing.

For compatibility with CC3Texture2DContent.

- (void) setName: (GLuint)  name

Sets the GL texture ID.

+ (BOOL) texturesAreLoadedUpsideDown

Indicates whether texture are loaded upside-down.

For Cocos2D 3.0 and before, textures are loaded and applied upside-down. For Cocos2D 3.1 and after, textures are loaded and applied right-side-up.

Property Documentation

- (GLuint) bytesPerPixel
readnonatomicassign

Returns the number of bytes in each pixel of content.

- (BOOL) hasAlpha
readnonatomicassign

Indicates whether this texture has an alpha channel, representing opacity.

The value of this property is derived from the value of the pixelGLFomat property.

- (BOOL) hasMipmap
readnonatomicassign

Returns whether a mipmap has been generated for this texture.

Mipmaps can also be generated by invoking the generateMipmap method.

- (const GLvoid*) imageData
readnonatomicassign

Returns NULL.

For compatibility with CC3Texture2DContent.

- (BOOL) isUpsideDown
readnonatomicassign

Indicates whether this texture is upside-down.

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.

- (GLenum) pixelGLFormat
readnonatomicassign

Returns the GL engine pixel format of the texture.

See the pixelFormat property of CC3Texture for the range of possible values.

- (GLenum) pixelGLType
readnonatomicassign

Returns the pixel data type.

Possible values depend on the value of the pixelFormat property. See the pixelType property of CC3Texture for the range of possible values.


The documentation for this category was generated from the following file: