typedef enum eImageFormat { kCCImageFormatJPEG = 0, kCCImageFormatPNG = 1, } tImageFormat; class CCRenderTexture : public CCNode { CCSprite* getSprite(); void setSprite(CCSprite* psprite); void begin(); void endToLua(); void beginWithClear(float r, float g, float b, float a); void clear(float r, float g, float b, float a); CCImage* newCCImage(); bool saveToFile(const char *szFilePath); bool saveToFile(const char *name, tCCImageFormat format); static CCRenderTexture * renderTextureWithWidthAndHeight(int w, int h, CCTexture2DPixelFormat eFormat); static CCRenderTexture * renderTextureWithWidthAndHeight(int w, int h); };