cocos2d-x  2.2.3-gd2.113-rev1ec524e
Loading...
Searching...
No Matches
CCTexturePVR Class Reference

CCTexturePVR. More...

#include <CCTexturePVR.h>

Inheritance diagram for CCTexturePVR:
[legend]
Collaboration diagram for CCTexturePVR:
[legend]

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)
 NA. More...
 
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)
 
 CCObject (const CCObject &)
 
CCObjectoperator= (const CCObject &)
 
virtual void encodeWithCoder (DS_Dictionary *)
 
virtual bool canEncode ()
 
CCObjectType getObjType () const
 
virtual int getTag () const
 
virtual void setTag (int nTag)
 
void setObjType (CCObjectType)
 
- 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...
 
- Static Public Member Functions inherited from CCObject
static CCObjectcreateWithCoder (DS_Dictionary *)
 

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
 
int m_nTag
 
int m_eObjType
 
unsigned int m_uObjectIdxInArray
 

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). NA NA

Constructor & Destructor Documentation

◆ CCTexturePVR()

◆ ~CCTexturePVR()

virtual ~CCTexturePVR ( )
virtual

Member Function Documentation

◆ create()

static CCTexturePVR * create ( const char *  path)
static

creates and initializes a CCTexturePVR with a path

◆ getFormat()

CCTexture2DPixelFormat getFormat ( )
inline

◆ getHeight()

unsigned int getHeight ( )
inline

texture height

◆ getName()

unsigned int getName ( )
inline

texture id name

◆ getNumberOfMipmaps()

unsigned int getNumberOfMipmaps ( )
inline

how many mipmaps the texture has.

1 means one level (level 0

◆ getWidth()

unsigned int getWidth ( )
inline

texture width

◆ hasAlpha()

bool hasAlpha ( )
inline

whether or not the texture has alpha

◆ hasPremultipliedAlpha()

bool hasPremultipliedAlpha ( )
inline

whether or not the texture has premultiplied alpha

◆ initWithContentsOfFile()

bool initWithContentsOfFile ( const char *  path)

initializes a CCTexturePVR with a path

◆ isForcePremultipliedAlpha()

bool isForcePremultipliedAlpha ( )
inline

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

◆ isRetainName()

bool isRetainName ( )
inline

◆ setRetainName()

void setRetainName ( bool  retainName)
inline

Member Data Documentation

◆ m_asMipmaps

struct CCPVRMipmap m_asMipmaps[CC_PVRMIPMAP_MAX]
protected

◆ m_bForcePremultipliedAlpha

bool m_bForcePremultipliedAlpha
protected

◆ m_bHasAlpha

bool m_bHasAlpha
protected

◆ m_bHasPremultipliedAlpha

bool m_bHasPremultipliedAlpha
protected

◆ m_bRetainName

bool m_bRetainName
protected

◆ m_eFormat

CCTexture2DPixelFormat m_eFormat
protected

◆ m_pPixelFormatInfo

const ccPVRTexturePixelFormatInfo* m_pPixelFormatInfo
protected

◆ m_uHeight

unsigned int m_uHeight
protected

◆ m_uName

GLuint m_uName
protected

◆ m_uNumberOfMipmaps

unsigned int m_uNumberOfMipmaps
protected

◆ m_uWidth

unsigned int m_uWidth
protected

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