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

#include <CCVertexIndexBuffer.h>

Inheritance diagram for IndexBuffer:
Ref

Public Types

enum  IndexType { INDEX_TYPE_SHORT_16, INDEX_TYPE_UINT_32 }
 

Public Member Functions

IndexType getType () const
int getSizePerIndex () const
int getIndexNumber () const
bool updateIndices (const void *indices, int count, int begin)
int getSize () const
GLuint getVBO () const
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()

Static Public Member Functions

static IndexBuffercreate (IndexType type, int number)
static bool isShadowCopyEnabled ()
static void enableShadowCopy (bool enabled)

Protected Member Functions

 IndexBuffer ()
virtual ~IndexBuffer ()
bool init (IndexType type, int number)
void recreateVBO () const
- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 

Protected Attributes

GLuint _vbo
IndexType _type
int _indexNumber
EventListenerCustom_recreateVBOEventListener
std::vector< unsigned char > _shadowCopy
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 

Static Protected Attributes

static bool _enableShadowCopy

Member Enumeration Documentation

enum IndexType
strong
Enumerator
INDEX_TYPE_SHORT_16 
INDEX_TYPE_UINT_32 

Constructor & Destructor Documentation

IndexBuffer ( )
protected
virtual ~IndexBuffer ( )
protectedvirtual

Member Function Documentation

static IndexBuffer* create ( IndexType  type,
int  number 
)
static
static void enableShadowCopy ( bool  enabled)
inlinestatic
int getIndexNumber ( ) const
int getSize ( ) const
int getSizePerIndex ( ) const
IndexType getType ( ) const
GLuint getVBO ( ) const
bool init ( IndexType  type,
int  number 
)
protected
static bool isShadowCopyEnabled ( )
inlinestatic
void recreateVBO ( ) const
protected
bool updateIndices ( const void *  indices,
int  count,
int  begin 
)

Member Data Documentation

bool _enableShadowCopy
staticprotected
int _indexNumber
protected
EventListenerCustom*
_recreateVBOEventListener
protected
std::vector<unsigned char>
_shadowCopy
protected
IndexType _type
protected
GLuint _vbo
mutableprotected

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