VertexBuffer is an abstraction of low level openGL Vertex Buffer Object.
More...
Inherits Ref.
|
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.
|
|
VertexBuffer is an abstraction of low level openGL Vertex Buffer Object.
It is used to save an array of vertices.
static VertexBuffer* create |
( |
int |
sizePerVertex, |
|
|
int |
vertexNumber, |
|
|
GLenum |
usage = GL_STATIC_DRAW |
|
) |
| |
|
static |
Create an instance of VertexBuffer.
- Parameters
-
sizePerVertex | Size in bytes of one vertex. |
vertexNumber | The number of vertex. |
usage | A hint to indicate whether the vertexBuffer are updated frequently or not to let GL optimise it. |
local create |
( |
local |
sizePerVertex, |
|
|
local |
vertexNumber, |
|
|
local |
usage = GL_STATIC_DRAW |
|
) |
| |
|
static |
Create an instance of VertexBuffer.
- Parameters
-
sizePerVertex | Size in bytes of one vertex. |
vertexNumber | The number of vertex. |
usage | A hint to indicate whether the vertexBuffer are updated frequently or not to let GL optimise it. |
int getSizePerVertex |
( |
| ) |
const |
Get the size in bytes of one vertex.
local getSizePerVertex |
( |
| ) |
|
Get the size in bytes of one vertex.
int getVertexNumber |
( |
| ) |
const |
Get the number of vertices.
local getVertexNumber |
( |
| ) |
|
Get the number of vertices.
bool updateVertices |
( |
const void * |
verts, |
|
|
int |
count, |
|
|
int |
begin |
|
) |
| |
Update all or part of vertices data, if the range specified exceeds the vertex buffer, it will be clipped.
- Parameters
-
verts | The pointer of the vertex data. |
count | The number of vertices to update. |
begin | The first vertex to update. |
local updateVertices |
( |
local |
verts, |
|
|
local |
count, |
|
|
local |
begin |
|
) |
| |
Update all or part of vertices data, if the range specified exceeds the vertex buffer, it will be clipped.
- Parameters
-
verts | The pointer of the vertex data. |
count | The number of vertices to update. |
begin | The first vertex to update. |
The documentation for this class was generated from the following file: