#import <CCRenderTexture.h>
Inherits CCNode.

Public Member Functions | |
| (id) | - initWithWidth:height: |
| (BOOL) | - saveBuffer: |
| (BOOL) | - saveBuffer:format: |
| (void) | - clear:g:b:a: |
Static Public Member Functions | |
| (id) | + renderTextureWithWidth:height: |
Properties | |
| CCSprite * | sprite |
RenderTexture is a generic rendering target. To render things into it, simply construct a render target, call begin on it, call visit on any cocos scenes or objects to render them, and call end. For convienience, render texture adds a sprite as it's display child with the results, so you can simply add the render texture to your scene and treat it like any other CocosNode. There are also functions for saving the render texture to disk in PNG or JPG format.
Definition at line 49 of file CCRenderTexture.h.
| - (void) clear: | (float) | r | ||
| g: | (float) | g | ||
| b: | (float) | b | ||
| a: | (float) | a | ||
clears the texture with a color
| - (id) initWithWidth: | (int) | width | ||
| height: | (int) | height | ||
initializes a RenderTexture object with width and height
| + (id) renderTextureWithWidth: | (int) | width | ||
| height: | (int) | height | ||
creates a RenderTexture object with width and height
| - (BOOL) saveBuffer: | (NSString *) | name |
saves the texture into a file
| - (BOOL) saveBuffer: | (NSString *) | name | ||
| format: | (int) | format | ||
saves the texture into a file. The format can be JPG or PNG
- (CCSprite*) sprite [read, write, assign] |
sprite being used
Definition at line 58 of file CCRenderTexture.h.