IndexBuffer is an abstraction of low level openGL Buffer Object.
More...
Inherits Ref.
|
IndexType | getType () const |
| Getter for type of indices.
|
|
int | getSizePerIndex () const |
| Get the size in bytes for one index, will be 2 for INDEX_TYPE_SHORT_16 and 4 for INDEX_TYPE_UINT_32.
|
|
int | getIndexNumber () const |
| Get the number of indices.
|
|
bool | updateIndices (const void *indices, int count, int begin) |
| Update all or part of indices data, if the range specified exceeds the vertex buffer, it will be clipped. More...
|
|
int | getSize () const |
| Get the size in bytes of the array of indices.
|
|
GLuint | getVBO () const |
| Get the openGL handle for index buffer.
|
|
local | getVBO () |
| Get the openGL handle for index buffer.
|
|
void | retain () |
| Retains the ownership. More...
|
|
void | release () |
| Releases the ownership immediately. More...
|
|
local | release () |
| Releases the ownership immediately. More...
|
|
Ref * | autorelease () |
| Releases the ownership sometime soon automatically. More...
|
|
unsigned int | getReferenceCount () const |
| Returns the Ref's current reference count. More...
|
|
local | getReferenceCount () |
| Returns the Ref's current reference count. More...
|
|
virtual | ~Ref () |
| Destructor. More...
|
|
|
unsigned int | _ID |
| object id, ScriptSupport need public _ID
|
|
local | _ID |
| object id, ScriptSupport need public _ID
|
|
int | _luaID |
| Lua reference id.
|
|
local | _luaID |
| Lua reference id.
|
|
void * | _scriptObject |
| scriptObject, support for swift
|
|
local | _scriptObject |
| scriptObject, support for swift
|
|
bool | _rooted |
| When true, it means that the object was already rooted.
|
|
local | _rooted |
| When true, it means that the object was already rooted.
|
|
IndexBuffer is an abstraction of low level openGL Buffer Object.
It used to save an array of indices.
Create an instance of IndexBuffer.
- Parameters
-
type | type of index. |
number | The number of indices. |
usage | A hint to indicate whether the vertexBuffer are updated frequently or not to let GL optimise it. |
local create |
( |
local |
type, |
|
|
local |
number, |
|
|
local |
usage = GL_STATIC_DRAW |
|
) |
| |
|
static |
Create an instance of IndexBuffer.
- Parameters
-
type | type of index. |
number | The number of indices. |
usage | A hint to indicate whether the vertexBuffer are updated frequently or not to let GL optimise it. |
bool updateIndices |
( |
const void * |
indices, |
|
|
int |
count, |
|
|
int |
begin |
|
) |
| |
Update all or part of indices data, if the range specified exceeds the vertex buffer, it will be clipped.
- Parameters
-
indices | The pointer of the index data. |
count | The number of indices to update. |
begin | The start index to update. |
local updateIndices |
( |
local |
indices, |
|
|
local |
count, |
|
|
local |
begin |
|
) |
| |
Update all or part of indices data, if the range specified exceeds the vertex buffer, it will be clipped.
- Parameters
-
indices | The pointer of the index data. |
count | The number of indices to update. |
begin | The start index to update. |
The documentation for this class was generated from the following file: