Command used to render one or more Quads, similar to TrianglesCommand.
More...
#include <CCQuadCommand.h>
|
| QuadCommand () |
| Constructor. More...
|
|
| ~QuadCommand () |
| Destructor. More...
|
|
void | init (float globalOrder, GLuint textureID, GLProgramState *shader, 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...
|
|
void | useMaterial () const |
| 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...
|
|
V3F_C4B_T2F_Quad * | getQuads () const |
| Get the pointer of the rendered quads. More...
|
|
local | getQuads () |
| Get the pointer of the rendered quads. More...
|
|
ssize_t | getQuadCount () const |
| Get the number of quads for rendering. More...
|
|
GLProgramState * | getGLProgramState () const |
| Get the glprogramstate. More...
|
|
BlendFunc | getBlendType () const |
| 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...
|
|
float | getGlobalOrder () const |
| Get global Z order. More...
|
|
Type | getType () const |
| Returns the Command type. More...
|
|
bool | isTransparent () const |
| Retruns whether is transparent. More...
|
|
void | setTransparent (bool 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 seperately. More...
|
|
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...
|
|
void | set3D (bool value) |
| Set the command rendered in 3D mode or not. More...
|
|
float | getDepth () const |
| Get the depth by current model view matrix. 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.
void generateMaterialID |
( |
| ) |
|
|
protected |
Generate the material ID by textureID, glProgramState, and blend function.
var generateMaterialID |
( |
| ) |
|
|
protected |
Generate the material ID by textureID, glProgramState, and blend function.
local generateMaterialID |
( |
| ) |
|
|
protected |
Generate the material ID by textureID, glProgramState, and blend function.
var getGLProgramState |
( |
| ) |
|
|
inline |
local getGLProgramState |
( |
| ) |
|
|
inline |
Get the material id of command.
Get the material id of command.
Get the material id of command.
const Mat4& getModelView |
( |
| ) |
const |
|
inline |
Get the model view matrix.
Get the model view matrix.
Get the model view matrix.
Get the number of quads for rendering.
Get the number of quads for rendering.
Get the number of quads for rendering.
Get the pointer of the rendered quads.
Get the pointer of the rendered quads.
Get the pointer of the rendered quads.
GLuint getTextureID |
( |
| ) |
const |
|
inline |
Get the openGL texture handle.
Get the openGL texture handle.
Get the openGL texture handle.
Initializes the command.
- Parameters
-
globalOrder | GlobalZOrder of the command. |
textureID | The openGL handle of the used texture. |
glProgramState | The specified glProgram and 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 |
shader, |
|
|
var |
blendType, |
|
|
var |
quads, |
|
|
var |
quadCount, |
|
|
var |
mv, |
|
|
var |
flags |
|
) |
| |
Initializes the command.
- Parameters
-
globalOrder | GlobalZOrder of the command. |
textureID | The openGL handle of the used texture. |
glProgramState | The specified glProgram and 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 |
shader, |
|
|
local |
blendType, |
|
|
local |
quads, |
|
|
local |
quadCount, |
|
|
local |
mv, |
|
|
local |
flags |
|
) |
| |
Initializes the command.
- Parameters
-
globalOrder | GlobalZOrder of the command. |
textureID | The openGL handle of the used texture. |
glProgramState | The specified glProgram and 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. |
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.
void useMaterial |
( |
| ) |
const |
Apply the texture, shaders, programs, blend functions to GPU pipeline.
Apply the texture, shaders, programs, blend functions to GPU pipeline.
Apply the texture, shaders, programs, blend functions to GPU pipeline.
Blend function when rendering the triangles.
Blend function when rendering the triangles.
Blend function when rendering the triangles.
GLprogramstate for the commmand.
encapsulate shaders and uniforms.
GLprogramstate for the commmand.
encapsulate shaders and uniforms.
GLprogramstate for the commmand.
encapsulate shaders and uniforms.
Model view matrix when rendering the triangles.
Model view matrix when rendering the triangles.
Model view matrix when rendering the triangles.
The pointer to the rendered quads.
The pointer to the rendered quads.
The pointer to the rendered quads.
The number of quads for rendering.
The number of quads for rendering.
The number of quads for rendering.
OpenGL handle for texture.
OpenGL handle for texture.
OpenGL handle for texture.
The documentation for this class was generated from the following file: