Cocos2d-x  v3.10
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
BatchCommand Class Reference

Command used to draw batches in one TextureAtlas. More...

Inherits RenderCommand.

Public Member Functions

 BatchCommand ()
 Constructor.
 
 ~BatchCommand ()
 Destructor.
 
void init (float globalZOrder, GLProgram *shader, BlendFunc blendType, TextureAtlas *textureAtlas, const Mat4 &modelViewTransform, uint32_t flags)
 Init the batch command. More...
 
local init ( local globalZOrder, local shader, local blendType, local textureAtlas, local modelViewTransform, local flags)
 Init the batch command. More...
 
void init (float depth, GLProgram *shader, BlendFunc blendType, TextureAtlas *textureAtlas, const Mat4 &modelViewTransform)
 Deprecated function, you should call upper init function instead. More...
 
void execute ()
 Execute the command, which will call openGL function to draw the texture atlas.
 
- 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 separately. More...
 
void setSkipBatching (bool 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...
 

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...
 

Detailed Description

Command used to draw batches in one TextureAtlas.

Member Function Documentation

void init ( float  globalZOrder,
GLProgram shader,
BlendFunc  blendType,
TextureAtlas textureAtlas,
const Mat4 modelViewTransform,
uint32_t  flags 
)

Init the batch command.

GlobalZOrder of the render command. Shader used for draw the texture atlas. Blend function for texture atlas. Texture atlas, will contain both quads and texture for rendering. Model view transform used for rendering. Indicate the render command should be rendered in 3D mode or not.

var init ( var  globalZOrder,
var  shader,
var  blendType,
var  textureAtlas,
var  modelViewTransform,
var  flags 
)

Init the batch command.

GlobalZOrder of the render command. Shader used for draw the texture atlas. Blend function for texture atlas. Texture atlas, will contain both quads and texture for rendering. Model view transform used for rendering. Indicate the render command should be rendered in 3D mode or not.

local init ( local  globalZOrder,
local  shader,
local  blendType,
local  textureAtlas,
local  modelViewTransform,
local  flags 
)

Init the batch command.

GlobalZOrder of the render command. Shader used for draw the texture atlas. Blend function for texture atlas. Texture atlas, will contain both quads and texture for rendering. Model view transform used for rendering. Indicate the render command should be rendered in 3D mode or not.

void init ( float  depth,
GLProgram shader,
BlendFunc  blendType,
TextureAtlas textureAtlas,
const Mat4 modelViewTransform 
)

Deprecated function, you should call upper init function instead.

GlobalZOrder of the render command. Shader used for draw the texture atlas. Blend function for texture atlas. Texture atlas, will contain both quads and texture for rendering. Model view transform used for rendering.

var init ( var  depth,
var  shader,
var  blendType,
var  textureAtlas,
var  modelViewTransform 
)

Deprecated function, you should call upper init function instead.

GlobalZOrder of the render command. Shader used for draw the texture atlas. Blend function for texture atlas. Texture atlas, will contain both quads and texture for rendering. Model view transform used for rendering.

local init ( local  depth,
local  shader,
local  blendType,
local  textureAtlas,
local  modelViewTransform 
)

Deprecated function, you should call upper init function instead.

GlobalZOrder of the render command. Shader used for draw the texture atlas. Blend function for texture atlas. Texture atlas, will contain both quads and texture for rendering. Model view transform used for rendering.


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