Cocos2d-x  v4
QuadCommand Class Reference

Command used to render one or more Quads, similar to TrianglesCommand. More...

Inherits TrianglesCommand.

Public Member Functions

 QuadCommand ()
 Constructor.
 
 ~QuadCommand ()
 Destructor.
 
void init (float globalOrder, Texture2D *texture, const BlendFunc &blendType, V3F_C4B_T2F_Quad *quads, ssize_t quadCount, const Mat4 &mv, uint32_t flags)
 Initializes the command. More...
 

Detailed Description

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.

Member Function Documentation

◆ init()

void init ( float  globalOrder,
Texture2D texture,
const BlendFunc blendType,
V3F_C4B_T2F_Quad quads,
ssize_t  quadCount,
const Mat4 mv,
uint32_t  flags 
)

Initializes the command.

Parameters
globalOrderGlobalZOrder of the command.
textureThe texture used in the command.
blendTypeBlend function for the command.
quadsRendered quads for the command.
quadCountThe number of quads when rendering.
mvModelView matrix for the command.
flagsto indicate that the command is using 3D rendering or not.

The documentation for this class was generated from the following file: