2011-06-14 14:31:25 +08:00
|
|
|
|
|
|
|
typedef enum eImageFormat
|
|
|
|
{
|
2012-02-02 14:26:38 +08:00
|
|
|
kCCImageFormatJPG = 0,
|
|
|
|
kCCImageFormatPNG = 1,
|
2011-06-14 14:31:25 +08:00
|
|
|
kCCImageFormatRawData = 2
|
|
|
|
} tImageFormat;
|
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
class CCRenderTexture : public CCNode
|
2011-06-14 14:31:25 +08:00
|
|
|
{
|
2012-02-02 14:26:38 +08:00
|
|
|
CCSprite* getSprite();
|
|
|
|
void setSprite(CCSprite* psprite);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
void begin();
|
2011-06-14 14:31:25 +08:00
|
|
|
void endToLua();
|
2012-02-02 14:26:38 +08:00
|
|
|
void beginWithClear(float r, float g, float b, float a);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
|
|
|
void clear(float r, float g, float b, float a);
|
2012-02-02 14:26:38 +08:00
|
|
|
bool saveBuffer(const char *name);
|
|
|
|
bool saveBuffer(const char *name, int format);
|
2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
static CCRenderTexture * renderTextureWithWidthAndHeight(int w, int h, CCTexture2DPixelFormat eFormat);
|
|
|
|
static CCRenderTexture * renderTextureWithWidthAndHeight(int w, int h);
|
2011-06-14 14:31:25 +08:00
|
|
|
};
|