![]() |
cocos2d-iphone
2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
|
#import <CCTexturePVR.h>
Public Member Functions | |
(id) | - initWithContentsOfFile: |
(id) | - initWithContentsOfURL: |
Static Public Member Functions | |
(id) | + pvrTextureWithContentsOfFile: |
(id) | + pvrTextureWithContentsOfURL: |
Protected Attributes | |
struct CCPVRMipmap | _mipmaps [CC_PVRMIPMAP_MAX] |
NSUInteger | _numberOfMipmaps |
uint32_t | _width |
uint32_t | _height |
GLuint | _name |
BOOL | _hasAlpha |
BOOL | _hasPremultipliedAlpha |
BOOL | _forcePremultipliedAlpha |
BOOL | _retainName |
CCTexture2DPixelFormat | _format |
const ccPVRTexturePixelFormatInfo * | _pixelFormatInfo |
Properties | |
GLuint | name |
uint32_t | width |
uint32_t | height |
BOOL | hasAlpha |
BOOL | hasPremultipliedAlpha |
BOOL | forcePremultipliedAlpha |
NSUInteger | numberOfMipmaps |
BOOL | retainName |
CCTexture2DPixelFormat | format |
Object that loads PVR images.
Supported PVR formats:
Limitations: Pre-generated mipmaps, such as PVR textures with mipmap levels embedded in file, are only supported if all individual sprites are of square size. To use mipmaps with non-square textures, instead call generateMipmap (CCTexture2D) on the sheet texture itself (and to save space, save the PVR sprite sheet without mip maps included).
- (id) initWithContentsOfFile: | (NSString *) | path |
initializes a CCTexturePVR with a path
- (id) initWithContentsOfURL: | (NSURL *) | url |
initializes a CCTexturePVR with an URL
+ (id) pvrTextureWithContentsOfFile: | (NSString *) | path |
creates and initializes a CCTexturePVR with a path
+ (id) pvrTextureWithContentsOfURL: | (NSURL *) | url |
creates and initializes a CCTexturePVR with an URL
- (BOOL) forcePremultipliedAlpha [read, assign] |
whether or not the texture should use hasPremultipliedAlpha instead of global default
- (BOOL) hasAlpha [read, assign] |
whether or not the texture has alpha
- (BOOL) hasPremultipliedAlpha [read, assign] |
whether or not the texture has premultiplied alpha
- (uint32_t) height [read, assign] |
texture height
- (GLuint) name [read, assign] |
texture id name
- (NSUInteger) numberOfMipmaps [read, assign] |
how many mipmaps the texture has. 1 means one level (level 0
- (uint32_t) width [read, assign] |
texture width