axmol/tools/tolua++/CCRenderTexture.pkg

32 lines
1.0 KiB
Plaintext
Raw Normal View History

2011-06-14 14:31:25 +08:00
typedef enum eImageFormat
{
kCCImageFormatJPEG = 0,
2012-02-02 14:26:38 +08:00
kCCImageFormatPNG = 1,
2011-06-14 14:31:25 +08:00
} 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);
void beginWithClear(float r, float g, float b, float a, float depthValue);
void beginWithClear(float r, float g, float b, float a, float depthValue, int stencilValue);
2011-06-14 14:31:25 +08:00
void clear(float r, float g, float b, float a);
void clearDepth(float depthValue);
void clearStencil(int stencilValue);
CCImage* newCCImage();
bool saveToFile(const char *szFilePath);
bool saveToFile(const char *name, tCCImageFormat format);
2011-06-14 14:31:25 +08:00
static CCRenderTexture * create(int w ,int h, CCTexture2DPixelFormat eFormat, GLuint uDepthStencilFormat);
static CCRenderTexture * create(int w, int h, CCTexture2DPixelFormat eFormat);
static CCRenderTexture * create(int w, int h);
2011-06-14 14:31:25 +08:00
};