Primitive can support sending points, lines and triangles to glpipeline, which is an abstraction of primitive data. More...
Inherits Ref.
Public Member Functions | |
const VertexData * | getVertexData () const |
Get the vertexData. More... | |
local | getVertexData () |
Get the vertexData. More... | |
const IndexBuffer * | getIndexData () const |
Get the optional index data, will return null if index data is not used. More... | |
local | getIndexData () |
Get the optional index data, will return null if index data is not used. More... | |
int | getType () const |
Get the primitive type. More... | |
void | draw () |
called by rendering framework, will send the data to GLPipeline. More... | |
int | getStart () const |
Get the start index of primitive. More... | |
int | getCount () const |
Get the number of vertices or indices used for drawing. More... | |
var | getCount () |
Get the number of vertices or indices used for drawing. More... | |
local | getCount () |
Get the number of vertices or indices used for drawing. More... | |
void | setStart (int start) |
Setter for the start index. More... | |
var | setStart ( var start) |
Setter for the start index. More... | |
local | setStart ( local start) |
Setter for the start index. More... | |
void | setCount (int count) |
Setter for the count. More... | |
var | setCount ( var count) |
Setter for the count. More... | |
local | setCount ( local count) |
Setter for the count. More... | |
Public Member Functions inherited from Ref | |
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... | |
Static Public Member Functions | |
static Primitive * | create (VertexData *verts, IndexBuffer *indices, int type) |
Create an instance of primitive. More... | |
var | create ( var verts, var indices, var type) |
Create an instance of primitive. More... | |
local | create ( local verts, local indices, local type) |
Create an instance of primitive. More... | |
Additional Inherited Members | |
Public Attributes inherited from 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. | |
Primitive can support sending points, lines and triangles to glpipeline, which is an abstraction of primitive data.
|
static |
Create an instance of primitive.
verts | VertexData used in the primitive. |
indices | Optional index data. |
type | The type (Points, Lines, Triangles) used. |
|
static |
Create an instance of primitive.
verts | VertexData used in the primitive. |
indices | Optional index data. |
type | The type (Points, Lines, Triangles) used. |
|
static |
Create an instance of primitive.
verts | VertexData used in the primitive. |
indices | Optional index data. |
type | The type (Points, Lines, Triangles) used. |
const VertexData* getVertexData | ( | ) | const |
Get the vertexData.
var getVertexData | ( | ) |
Get the vertexData.
local getVertexData | ( | ) |
Get the vertexData.
const IndexBuffer* getIndexData | ( | ) | const |
Get the optional index data, will return null if index data is not used.
var getIndexData | ( | ) |
Get the optional index data, will return null if index data is not used.
local getIndexData | ( | ) |
Get the optional index data, will return null if index data is not used.
|
inline |
Get the primitive type.
|
inline |
Get the primitive type.
|
inline |
Get the primitive type.
void draw | ( | ) |
called by rendering framework, will send the data to GLPipeline.
var draw | ( | ) |
called by rendering framework, will send the data to GLPipeline.
local draw | ( | ) |
called by rendering framework, will send the data to GLPipeline.
|
inline |
Get the start index of primitive.
|
inline |
Get the start index of primitive.
|
inline |
Get the start index of primitive.
|
inline |
Get the number of vertices or indices used for drawing.
|
inline |
Get the number of vertices or indices used for drawing.
|
inline |
Get the number of vertices or indices used for drawing.
void setStart | ( | int | start | ) |
Setter for the start index.
var setStart | ( | var | start | ) |
Setter for the start index.
local setStart | ( | local | start | ) |
Setter for the start index.
void setCount | ( | int | count | ) |
Setter for the count.
var setCount | ( | var | count | ) |
Setter for the count.
local setCount | ( | local | count | ) |
Setter for the count.