cocos2d-x  3.4
 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, GLenum usage=GL_STATIC_DRAW)
static bool isShadowCopyEnabled ()
var isShadowCopyEnabled ()
local isShadowCopyEnabled ()
static void enableShadowCopy (bool enabled)
var enableShadowCopy ( var enabled)
local enableShadowCopy ( local enabled)

Protected Member Functions

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

Protected Attributes

GLuint _vbo
IndexType _type
int _indexNumber
EventListenerCustom_recreateVBOEventListener
var _recreateVBOEventListener
local _recreateVBOEventListener
std::vector< unsigned char > _shadowCopy
var _shadowCopy
local _shadowCopy
GLenum _usage
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 
var _referenceCount
 count of references More...
 
local _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 
var IndexType
strong
Enumerator
INDEX_TYPE_SHORT_16 
INDEX_TYPE_UINT_32 
local IndexType
strong
Enumerator
INDEX_TYPE_SHORT_16 
INDEX_TYPE_UINT_32 

Constructor & Destructor Documentation

IndexBuffer ( )
protected
var IndexBuffer ( )
protected
local IndexBuffer ( )
protected
virtual ~IndexBuffer ( )
protectedvirtual
var ~IndexBuffer ( )
protectedvirtual
local ~IndexBuffer ( )
protectedvirtual

Member Function Documentation

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

Member Data Documentation

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

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