mirror of https://github.com/axmolengine/axmol.git
73 lines
2.2 KiB
Plaintext
73 lines
2.2 KiB
Plaintext
|
|
typedef enum {
|
|
kCCTexture2DPixelFormat_Automatic = 0,
|
|
//! 32-bit texture: RGBA8888
|
|
kCCTexture2DPixelFormat_RGBA8888,
|
|
//! 24-bit texture: RGBA888
|
|
kCCTexture2DPixelFormat_RGB888,
|
|
//! 16-bit texture without Alpha channel
|
|
kCCTexture2DPixelFormat_RGB565,
|
|
//! 8-bit textures used as masks
|
|
kCCTexture2DPixelFormat_A8,
|
|
//! 8-bit intensity texture
|
|
kCCTexture2DPixelFormat_I8,
|
|
//! 16-bit textures used as masks
|
|
kCCTexture2DPixelFormat_AI88,
|
|
//! 16-bit textures: RGBA4444
|
|
kCCTexture2DPixelFormat_RGBA4444,
|
|
//! 16-bit textures: RGB5A1
|
|
kCCTexture2DPixelFormat_RGB5A1,
|
|
//! 4-bit PVRTC-compressed texture: PVRTC4
|
|
kCCTexture2DPixelFormat_PVRTC4,
|
|
//! 2-bit PVRTC-compressed texture: PVRTC2
|
|
kCCTexture2DPixelFormat_PVRTC2,
|
|
|
|
//! Default texture format: RGBA8888
|
|
kCCTexture2DPixelFormat_Default = kCCTexture2DPixelFormat_RGBA8888,
|
|
|
|
// backward compatibility stuff
|
|
kTexture2DPixelFormat_Automatic = kCCTexture2DPixelFormat_Automatic,
|
|
kTexture2DPixelFormat_RGBA8888 = kCCTexture2DPixelFormat_RGBA8888,
|
|
kTexture2DPixelFormat_RGB888 = kCCTexture2DPixelFormat_RGB888,
|
|
kTexture2DPixelFormat_RGB565 = kCCTexture2DPixelFormat_RGB565,
|
|
kTexture2DPixelFormat_A8 = kCCTexture2DPixelFormat_A8,
|
|
kTexture2DPixelFormat_RGBA4444 = kCCTexture2DPixelFormat_RGBA4444,
|
|
kTexture2DPixelFormat_RGB5A1 = kCCTexture2DPixelFormat_RGB5A1,
|
|
kTexture2DPixelFormat_Default = kCCTexture2DPixelFormat_Default
|
|
} CCTexture2DPixelFormat;
|
|
|
|
class CCTexture2D : public CCObject
|
|
{
|
|
CCTexture2DPixelFormat getPixelFormat();
|
|
|
|
unsigned int getPixelsWide();
|
|
unsigned int getPixelsHigh();
|
|
|
|
GLuint getName();
|
|
|
|
CCSize getContentSizeInPixels();
|
|
|
|
void setMaxS(GLfloat val);
|
|
GLfloat getMaxS();
|
|
|
|
GLfloat getMaxT();
|
|
void setMaxT(GLfloat val);
|
|
|
|
bool getHasPremultipliedAlpha();
|
|
|
|
void drawAtPoint(CCPoint point);
|
|
void drawInRect(CCRect rect);
|
|
|
|
CCSize getContentSize(void);
|
|
|
|
void setTexParameters(ccTexParams* texParams);
|
|
void setAntiAliasTexParameters();
|
|
void setAliasTexParameters();
|
|
void generateMipmap();
|
|
|
|
int bitsPerPixelForFormat();
|
|
|
|
static void setDefaultAlphaPixelFormat(CCTexture2DPixelFormat format);
|
|
static CCTexture2DPixelFormat defaultAlphaPixelFormat();
|
|
};
|