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...
|
| |
| 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. More...
|
| |
|
int | getSize () const |
| | Get the size in bytes of the array of indices.
|
| |
|
GLuint | getVBO () const |
| | Get the openGL handle for index buffer.
|
| |
| void | retain () |
| | Retains the ownership. More...
|
| |
| void | 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...
|
| |
| virtual | ~Ref () |
| | Destructor. More...
|
| |
|
|
unsigned int | _ID |
| | object id, ScriptSupport need public _ID
|
| |
|
int | _luaID |
| | Lua reference id.
|
| |
|
void * | _scriptObject |
| | scriptObject, support for swift
|
| |
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: