Command used to render one or more Quads, similar to TrianglesCommand. More...
Inherits TrianglesCommand.
Public Member Functions | |
QuadCommand () | |
Constructor. More... | |
QuadCommand () | |
Constructor. More... | |
~QuadCommand () | |
Destructor. More... | |
~QuadCommand () | |
Destructor. More... | |
~QuadCommand () | |
Destructor. More... | |
void | init (float globalOrder, GLuint textureID, GLProgramState *glProgramState, const BlendFunc &blendType, V3F_C4B_T2F_Quad *quads, ssize_t quadCount, const Mat4 &mv, uint32_t flags) |
Initializes the command. More... | |
void | init (float globalOrder, GLuint textureID, GLProgramState *shader, const BlendFunc &blendType, V3F_C4B_T2F_Quad *quads, ssize_t quadCount, const Mat4 &mv) |
Deprecated function, the params is similar as the upper init function, with flags equals 0. More... | |
local | init ( local globalOrder, local textureID, local shader, local blendType, local quads, local quadCount, local mv) |
Deprecated function, the params is similar as the upper init function, with flags equals 0. More... | |
Public Member Functions inherited from TrianglesCommand | |
TrianglesCommand () | |
Constructor. More... | |
TrianglesCommand () | |
Constructor. More... | |
TrianglesCommand () | |
Constructor. More... | |
~TrianglesCommand () | |
Destructor. More... | |
~TrianglesCommand () | |
Destructor. More... | |
void | init (float globalOrder, GLuint textureID, GLProgramState *glProgramState, BlendFunc blendType, const Triangles &triangles, const Mat4 &mv, uint32_t flags) |
Initializes the command. More... | |
void | init (float globalOrder, GLuint textureID, GLProgramState *glProgramState, BlendFunc blendType, const Triangles &triangles, const Mat4 &mv) |
Deprecated function, the params is similar as the upper init function, with flags equals 0. More... | |
var | init ( var globalOrder, var textureID, var glProgramState, var blendType, var triangles, var mv) |
Deprecated function, the params is similar as the upper init function, with flags equals 0. More... | |
void | useMaterial () const |
Apply the texture, shaders, programs, blend functions to GPU pipeline. More... | |
var | useMaterial () |
Apply the texture, shaders, programs, blend functions to GPU pipeline. More... | |
local | useMaterial () |
Apply the texture, shaders, programs, blend functions to GPU pipeline. More... | |
uint32_t | getMaterialID () const |
Get the material id of command. More... | |
GLuint | getTextureID () const |
Get the openGL texture handle. More... | |
const Triangles & | getTriangles () const |
Get a const reference of triangles. More... | |
local | getTriangles () |
Get a const reference of triangles. More... | |
ssize_t | getVertexCount () const |
Get the vertex count in the triangles. More... | |
local | getVertexCount () |
Get the vertex count in the triangles. More... | |
ssize_t | getIndexCount () const |
Get the index count of the triangles. More... | |
local | getIndexCount () |
Get the index count of the triangles. More... | |
const V3F_C4B_T2F * | getVertices () const |
Get the vertex data pointer. More... | |
var | getVertices () |
Get the vertex data pointer. More... | |
local | getVertices () |
Get the vertex data pointer. More... | |
const unsigned short * | getIndices () const |
Get the index data pointer. More... | |
local | getIndices () |
Get the index data pointer. More... | |
GLProgramState * | getGLProgramState () const |
Get the glprogramstate. More... | |
local | getGLProgramState () |
Get the glprogramstate. More... | |
BlendFunc | getBlendType () const |
Get the blend function. More... | |
var | getBlendType () |
Get the blend function. More... | |
local | getBlendType () |
Get the blend function. More... | |
const Mat4 & | getModelView () const |
Get the model view matrix. More... | |
Public Member Functions inherited from RenderCommand | |
void | init (float globalZOrder, const Mat4 &modelViewTransform, uint32_t flags) |
Init function, will be called by all the render commands. More... | |
var | init ( var globalZOrder, var modelViewTransform, var flags) |
Init function, will be called by all the render commands. More... | |
local | init ( local globalZOrder, local modelViewTransform, local flags) |
Init function, will be called by all the render commands. More... | |
float | getGlobalOrder () const |
Get global Z order. More... | |
local | getGlobalOrder () |
Get global Z order. More... | |
Type | getType () const |
Returns the Command type. More... | |
local | getType () |
Returns the Command type. More... | |
bool | isTransparent () const |
Returns whether is transparent. More... | |
local | isTransparent () |
Returns whether is transparent. More... | |
void | setTransparent (bool isTransparent) |
Set transparent flag. More... | |
var | setTransparent ( var isTransparent) |
Set transparent flag. More... | |
local | setTransparent ( local isTransparent) |
Set transparent flag. More... | |
bool | isSkipBatching () const |
Get skip batching status, if a rendering is skip batching, it will be forced to be rendering separately. | |
void | setSkipBatching (bool value) |
Set skip batching. More... | |
local | setSkipBatching ( local value) |
Set skip batching. More... | |
bool | is3D () const |
Whether the command should be rendered at 3D mode. More... | |
var | is3D () |
Whether the command should be rendered at 3D mode. More... | |
local | is3D () |
Whether the command should be rendered at 3D mode. More... | |
void | set3D (bool value) |
Set the command rendered in 3D mode or not. More... | |
var | set3D ( var value) |
Set the command rendered in 3D mode or not. More... | |
local | set3D ( local value) |
Set the command rendered in 3D mode or not. More... | |
float | getDepth () const |
Get the depth by current model view matrix. More... | |
local | getDepth () |
Get the depth by current model view matrix. More... | |
Additional Inherited Members | |
Public Types inherited from RenderCommand | |
enum | Type { UNKNOWN_COMMAND, QUAD_COMMAND, CUSTOM_COMMAND, BATCH_COMMAND, GROUP_COMMAND, MESH_COMMAND, PRIMITIVE_COMMAND, TRIANGLES_COMMAND } |
Enum the type of render command. More... | |
Command used to render one or more Quads, similar to TrianglesCommand.
Every QuadCommand will have generate material ID by give textureID, glProgramState, Blend function if the material id is the same, these QuadCommands could be batched to save draw call.
QuadCommand | ( | ) |
Constructor.
var QuadCommand | ( | ) |
Constructor.
local QuadCommand | ( | ) |
Constructor.
~QuadCommand | ( | ) |
Destructor.
var ~QuadCommand | ( | ) |
Destructor.
local ~QuadCommand | ( | ) |
Destructor.
void init | ( | float | globalOrder, |
GLuint | textureID, | ||
GLProgramState * | glProgramState, | ||
const BlendFunc & | blendType, | ||
V3F_C4B_T2F_Quad * | quads, | ||
ssize_t | quadCount, | ||
const Mat4 & | mv, | ||
uint32_t | flags | ||
) |
Initializes the command.
globalOrder | GlobalZOrder of the command. |
textureID | The openGL handle of the used texture. |
glProgramState | The glProgram with its uniform. |
blendType | Blend function for the command. |
quads | Rendered quads for the command. |
quadCount | The number of quads when rendering. |
mv | ModelView matrix for the command. |
flags | to indicate that the command is using 3D rendering or not. |
var init | ( | var | globalOrder, |
var | textureID, | ||
var | glProgramState, | ||
var | blendType, | ||
var | quads, | ||
var | quadCount, | ||
var | mv, | ||
var | flags | ||
) |
Initializes the command.
globalOrder | GlobalZOrder of the command. |
textureID | The openGL handle of the used texture. |
glProgramState | The glProgram with its uniform. |
blendType | Blend function for the command. |
quads | Rendered quads for the command. |
quadCount | The number of quads when rendering. |
mv | ModelView matrix for the command. |
flags | to indicate that the command is using 3D rendering or not. |
local init | ( | local | globalOrder, |
local | textureID, | ||
local | glProgramState, | ||
local | blendType, | ||
local | quads, | ||
local | quadCount, | ||
local | mv, | ||
local | flags | ||
) |
Initializes the command.
globalOrder | GlobalZOrder of the command. |
textureID | The openGL handle of the used texture. |
glProgramState | The glProgram with its uniform. |
blendType | Blend function for the command. |
quads | Rendered quads for the command. |
quadCount | The number of quads when rendering. |
mv | ModelView matrix for the command. |
flags | to indicate that the command is using 3D rendering or not. |
void init | ( | float | globalOrder, |
GLuint | textureID, | ||
GLProgramState * | shader, | ||
const BlendFunc & | blendType, | ||
V3F_C4B_T2F_Quad * | quads, | ||
ssize_t | quadCount, | ||
const Mat4 & | mv | ||
) |
Deprecated function, the params is similar as the upper init function, with flags equals 0.
var init | ( | var | globalOrder, |
var | textureID, | ||
var | shader, | ||
var | blendType, | ||
var | quads, | ||
var | quadCount, | ||
var | mv | ||
) |
Deprecated function, the params is similar as the upper init function, with flags equals 0.
local init | ( | local | globalOrder, |
local | textureID, | ||
local | shader, | ||
local | blendType, | ||
local | quads, | ||
local | quadCount, | ||
local | mv | ||
) |
Deprecated function, the params is similar as the upper init function, with flags equals 0.