cocos2d-x  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CCTexturePVR Class Reference

CCTexturePVR. More...

#include <CCTexturePVR.h>

Inheritance diagram for CCTexturePVR:
CCObject CCCopying

Public Member Functions

 CCTexturePVR ()
virtual ~CCTexturePVR ()
bool initWithContentsOfFile (const char *path)
 initializes a CCTexturePVR with a path More...
 
unsigned int getName ()
 texture id name More...
 
unsigned int getWidth ()
 texture width More...
 
unsigned int getHeight ()
 texture height More...
 
bool hasAlpha ()
 whether or not the texture has alpha More...
 
bool hasPremultipliedAlpha ()
 whether or not the texture has premultiplied alpha More...
 
bool isForcePremultipliedAlpha ()
 whether or not the texture should use hasPremultipliedAlpha instead of global default More...
 
unsigned int getNumberOfMipmaps ()
 how many mipmaps the texture has. More...
 
CCTexture2DPixelFormat getFormat ()
bool isRetainName ()
void setRetainName (bool retainName)
- Public Member Functions inherited from CCObject
 CCObject (void)
virtual ~CCObject (void)
void release (void)
void retain (void)
CCObjectautorelease (void)
CCObjectcopy (void)
bool isSingleReference (void) const
unsigned int retainCount (void) const
virtual bool isEqual (const CCObject *pObject)
virtual void acceptVisitor (CCDataVisitor &visitor)
virtual void update (float dt)
- Public Member Functions inherited from CCCopying
virtual CCObjectcopyWithZone (CCZone *pZone)

Static Public Member Functions

static CCTexturePVRcreate (const char *path)
 creates and initializes a CCTexturePVR with a path More...
 

Protected Attributes

struct CCPVRMipmap m_asMipmaps [CC_PVRMIPMAP_MAX]
unsigned int m_uNumberOfMipmaps
unsigned int m_uWidth
unsigned int m_uHeight
GLuint m_uName
bool m_bHasAlpha
bool m_bHasPremultipliedAlpha
bool m_bForcePremultipliedAlpha
bool m_bRetainName
CCTexture2DPixelFormat m_eFormat
const ccPVRTexturePixelFormatInfom_pPixelFormatInfo
- Protected Attributes inherited from CCObject
unsigned int m_uReference
unsigned int m_uAutoReleaseCount

Additional Inherited Members

- Public Attributes inherited from CCObject
unsigned int m_uID
int m_nLuaID

Detailed Description

CCTexturePVR.

Object that loads PVR images.

Supported PVR formats:

  • RGBA8888
  • BGRA8888
  • RGBA4444
  • RGBA5551
  • RGB565
  • A8
  • I8
  • AI88
  • PVRTC 4BPP
  • PVRTC 2BPP

Limitations: Pre-generated mipmaps, such as PVR textures with mipmap levels embedded in file, are only supported if all individual sprites are of square size. To use mipmaps with non-square textures, instead call CCTexture2D::generateMipmap on the sheet texture itself (and to save space, save the PVR sprite sheet without mip maps included).

Constructor & Destructor Documentation

virtual ~CCTexturePVR ( )
virtual

Member Function Documentation

static CCTexturePVR* create ( const char *  path)
static

creates and initializes a CCTexturePVR with a path

CCTexture2DPixelFormat getFormat ( )
inline
unsigned int getHeight ( )
inline

texture height

unsigned int getName ( )
inline

texture id name

unsigned int getNumberOfMipmaps ( )
inline

how many mipmaps the texture has.

1 means one level (level 0

unsigned int getWidth ( )
inline

texture width

bool hasAlpha ( )
inline

whether or not the texture has alpha

bool hasPremultipliedAlpha ( )
inline

whether or not the texture has premultiplied alpha

bool initWithContentsOfFile ( const char *  path)

initializes a CCTexturePVR with a path

bool isForcePremultipliedAlpha ( )
inline

whether or not the texture should use hasPremultipliedAlpha instead of global default

bool isRetainName ( )
inline
void setRetainName ( bool  retainName)
inline

Member Data Documentation

struct CCPVRMipmap m_asMipmaps[CC_PVRMIPMAP_MAX]
protected
bool m_bForcePremultipliedAlpha
protected
bool m_bHasAlpha
protected
bool m_bHasPremultipliedAlpha
protected
bool m_bRetainName
protected
CCTexture2DPixelFormat m_eFormat
protected
const
ccPVRTexturePixelFormatInfo*
m_pPixelFormatInfo
protected
unsigned int m_uHeight
protected
GLuint m_uName
protected
unsigned int m_uNumberOfMipmaps
protected
unsigned int m_uWidth
protected

The documentation for this class was generated from the following file: