TextureMgr Class Reference
#import <TextureMgr.h>
List of all members.
Detailed Description
Singleton that handles the loading of textures Once the texture is loaded, the next time it will return a reference of the previously loaded texture reducing GPU & CPU memory
Member Function Documentation
| - (Texture2D*) addCGImage: |
|
(CGImageRef) |
image |
|
|
Returns a Texture2D object given an CGImageRef image If the image was not previously loaded, it will create a new Texture2D object and it will return it. Otherwise it will return a reference of a previosly loaded image
| - (Texture2D*) addImage: |
|
(NSString *) |
fileimage |
|
|
Returns a Texture2D object given an file image If the file image was not previously loaded, it will create a new Texture2D object and it will return it. Otherwise it will return a reference of a previosly loaded image. Supported images extensions: .png, .bmp, .tiff, .jpeg, .pvr
| - (Texture2D*) addPVRTCImage: |
|
(NSString *) |
filename |
|
|
Returns a Texture2D object given an PVRTC filename If the file image was not previously loaded, it will create a new Texture2D object and it will return it. Otherwise it will return a reference of a previosly loaded image
| - (Texture2D*) addPVRTCImage: |
|
(NSString *) |
fileimage |
| bpp: |
|
(int) |
bpp |
| hasAlpha: |
|
(BOOL) |
alpha |
| width: |
|
(int) |
w | |
|
|
| | |
Returns a Texture2D object given an PVRTC RAW filename If the file image was not previously loaded, it will create a new Texture2D object and it will return it. Otherwise it will return a reference of a previosly loaded image
It can only load square images: width == height, and it must be a power of 2 (128,256,512...) bpp can only be 2 or 4. 2 means more compression but lower quality. hasAlpha: whether or not the image contains alpha channel
| - (void) removeAllTextures |
|
|
|
|
Purges the dictionary of loaded textures. Call this method if you receive the "Memory Warning" In the short term: it will free some resources preventing your app from being killed In the medium term: it will allocate more resources In the long term: it will be the same
Deletes a texture from the Texture Manager
Retruns ths shared instance of the Texture Manager
The documentation for this class was generated from the following file:
- /Users/riq/progs/cocos2d-iphone/branches/branch-0.7/cocos2d/TextureMgr.h