cocos2d-x  3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MeshCommand Class Reference

#include <CCMeshCommand.h>

Inheritance diagram for MeshCommand:
RenderCommand

Public Member Functions

 MeshCommand ()
 ~MeshCommand ()
void init (float globalZOrder, GLuint textureID, GLProgramState *glProgramState, BlendFunc blendType, GLuint vertexBuffer, GLuint indexBuffer, GLenum primitive, GLenum indexFormat, ssize_t indexCount, const Mat4 &mv, uint32_t flags)
var init ( var globalZOrder, var textureID, var glProgramState, var blendType, var vertexBuffer, var indexBuffer, var primitive, var indexFormat, var indexCount, var mv, var flags)
local init ( local globalZOrder, local textureID, local glProgramState, local blendType, local vertexBuffer, local indexBuffer, local primitive, local indexFormat, local indexCount, local mv, local flags)
void init (float globalZOrder, GLuint textureID, GLProgramState *glProgramState, BlendFunc blendType, GLuint vertexBuffer, GLuint indexBuffer, GLenum primitive, GLenum indexType, ssize_t indexCount, const Mat4 &mv)
var init ( var globalZOrder, var textureID, var glProgramState, var blendType, var vertexBuffer, var indexBuffer, var primitive, var indexType, var indexCount, var mv)
local init ( local globalZOrder, local textureID, local glProgramState, local blendType, local vertexBuffer, local indexBuffer, local primitive, local indexType, local indexCount, local mv)
void setCullFaceEnabled (bool enable)
void setCullFace (GLenum cullFace)
void setDepthTestEnabled (bool enable)
void setDepthWriteEnabled (bool enable)
void setDisplayColor (const Vec4 &color)
void setMatrixPalette (const Vec4 *matrixPalette)
void setMatrixPaletteSize (int size)
void setLightMask (unsigned int lightmask)
void setTransparent (bool value)
void execute ()
void preBatchDraw ()
void batchDraw ()
void postBatchDraw ()
void genMaterialID (GLuint texID, void *glProgramState, GLuint vertexBuffer, GLuint indexBuffer, const BlendFunc &blend)
var genMaterialID ( var texID, var glProgramState, var vertexBuffer, var indexBuffer, var blend)
local genMaterialID ( local texID, local glProgramState, local vertexBuffer, local indexBuffer, local blend)
uint32_t getMaterialID () const
void listenRendererRecreated (EventCustom *event)
local listenRendererRecreated ( local event)
- 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...
 

Protected Member Functions

void buildVAO ()
void releaseVAO ()
void applyRenderState ()
void setLightUniforms ()
void restoreRenderState ()
void MatrixPalleteCallBack (GLProgram *glProgram, Uniform *uniform)
void resetLightUniformValues ()
- Protected Member Functions inherited from RenderCommand
 RenderCommand ()
 Constructor. More...
 
virtual ~RenderCommand ()
 Desctructor. More...
 
local ~RenderCommand ()
 Desctructor. More...
 
void printID ()

Protected Attributes

GLuint _textureID
GLProgramState_glProgramState
BlendFunc _blendType
GLuint _textrueID
Vec4 _displayColor
const Vec4_matrixPalette
int _matrixPaletteSize
uint32_t _materialID
GLuint _vao
GLuint _vertexBuffer
GLuint _indexBuffer
GLenum _primitive
GLenum _indexFormat
ssize_t _indexCount
bool _cullFaceEnabled
GLenum _cullFace
bool _depthTestEnabled
bool _depthWriteEnabled
bool _forceDepthWrite
bool _renderStateCullFaceEnabled
var _renderStateCullFaceEnabled
local _renderStateCullFaceEnabled
bool _renderStateDepthTest
GLboolean _renderStateDepthWrite
var _renderStateDepthWrite
local _renderStateDepthWrite
GLenum _renderStateCullFace
Mat4 _mv
unsigned int _lightMask
EventListenerCustom_rendererRecreatedListener
- Protected Attributes inherited from RenderCommand
Type _type
 Type used in order to avoid dynamic cast, faster. More...
 
float _globalOrder
 Commands are sort by global Z order. More...
 
bool _isTransparent
 Transparent flag. More...
 
bool _skipBatching
 QuadCommand and TrianglesCommand could be auto batched if there material ID is the same, however, if a command is skip batching, it would be forced to draw in a seperate function call, and break the batch. More...
 
bool _is3D
 Is the command been rendered on 3D pass. More...
 
float _depth
 Depth from the 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...
 

Constructor & Destructor Documentation

var MeshCommand ( )
local MeshCommand ( )
var ~MeshCommand ( )
local ~MeshCommand ( )

Member Function Documentation

void applyRenderState ( )
protected
var applyRenderState ( )
protected
local applyRenderState ( )
protected
void batchDraw ( )
var batchDraw ( )
local batchDraw ( )
void buildVAO ( )
protected
var buildVAO ( )
protected
local buildVAO ( )
protected
void execute ( )
var execute ( )
local execute ( )
void genMaterialID ( GLuint  texID,
void *  glProgramState,
GLuint  vertexBuffer,
GLuint  indexBuffer,
const BlendFunc blend 
)
var genMaterialID ( var  texID,
var  glProgramState,
var  vertexBuffer,
var  indexBuffer,
var  blend 
)
local genMaterialID ( local  texID,
local  glProgramState,
local  vertexBuffer,
local  indexBuffer,
local  blend 
)
uint32_t getMaterialID ( ) const
inline
var getMaterialID ( )
inline
local getMaterialID ( )
inline
void init ( float  globalZOrder,
GLuint  textureID,
GLProgramState glProgramState,
BlendFunc  blendType,
GLuint  vertexBuffer,
GLuint  indexBuffer,
GLenum  primitive,
GLenum  indexFormat,
ssize_t  indexCount,
const Mat4 mv,
uint32_t  flags 
)
var init ( var  globalZOrder,
var  textureID,
var  glProgramState,
var  blendType,
var  vertexBuffer,
var  indexBuffer,
var  primitive,
var  indexFormat,
var  indexCount,
var  mv,
var  flags 
)
local init ( local  globalZOrder,
local  textureID,
local  glProgramState,
local  blendType,
local  vertexBuffer,
local  indexBuffer,
local  primitive,
local  indexFormat,
local  indexCount,
local  mv,
local  flags 
)
void init ( float  globalZOrder,
GLuint  textureID,
GLProgramState glProgramState,
BlendFunc  blendType,
GLuint  vertexBuffer,
GLuint  indexBuffer,
GLenum  primitive,
GLenum  indexType,
ssize_t  indexCount,
const Mat4 mv 
)
var init ( var  globalZOrder,
var  textureID,
var  glProgramState,
var  blendType,
var  vertexBuffer,
var  indexBuffer,
var  primitive,
var  indexType,
var  indexCount,
var  mv 
)
local init ( local  globalZOrder,
local  textureID,
local  glProgramState,
local  blendType,
local  vertexBuffer,
local  indexBuffer,
local  primitive,
local  indexType,
local  indexCount,
local  mv 
)
void listenRendererRecreated ( EventCustom event)
var listenRendererRecreated ( var  event)
local listenRendererRecreated ( local  event)
void MatrixPalleteCallBack ( GLProgram glProgram,
Uniform uniform 
)
protected
var MatrixPalleteCallBack ( var  glProgram,
var  uniform 
)
protected
local MatrixPalleteCallBack ( local  glProgram,
local  uniform 
)
protected
void postBatchDraw ( )
var postBatchDraw ( )
local postBatchDraw ( )
void preBatchDraw ( )
var preBatchDraw ( )
local preBatchDraw ( )
void releaseVAO ( )
protected
var releaseVAO ( )
protected
local releaseVAO ( )
protected
void resetLightUniformValues ( )
protected
var resetLightUniformValues ( )
protected
local resetLightUniformValues ( )
protected
void restoreRenderState ( )
protected
var restoreRenderState ( )
protected
local restoreRenderState ( )
protected
void setCullFace ( GLenum  cullFace)
var setCullFace ( var  cullFace)
local setCullFace ( local  cullFace)
void setCullFaceEnabled ( bool  enable)
var setCullFaceEnabled ( var  enable)
local setCullFaceEnabled ( local  enable)
void setDepthTestEnabled ( bool  enable)
var setDepthTestEnabled ( var  enable)
local setDepthTestEnabled ( local  enable)
void setDepthWriteEnabled ( bool  enable)
var setDepthWriteEnabled ( var  enable)
local setDepthWriteEnabled ( local  enable)
void setDisplayColor ( const Vec4 color)
var setDisplayColor ( var  color)
local setDisplayColor ( local  color)
void setLightMask ( unsigned int  lightmask)
inline
var setLightMask ( var  lightmask)
inline
local setLightMask ( local  lightmask)
inline
void setLightUniforms ( )
protected
var setLightUniforms ( )
protected
local setLightUniforms ( )
protected
void setMatrixPalette ( const Vec4 matrixPalette)
inline
var setMatrixPalette ( var  matrixPalette)
inline
local setMatrixPalette ( local  matrixPalette)
inline
void setMatrixPaletteSize ( int  size)
inline
var setMatrixPaletteSize ( var  size)
inline
local setMatrixPaletteSize ( local  size)
inline
void setTransparent ( bool  value)
var setTransparent ( var  value)
local setTransparent ( local  value)

Member Data Documentation

BlendFunc _blendType
protected
var _blendType
protected
local _blendType
protected
GLenum _cullFace
protected
var _cullFace
protected
local _cullFace
protected
bool _cullFaceEnabled
protected
var _cullFaceEnabled
protected
local _cullFaceEnabled
protected
bool _depthTestEnabled
protected
var _depthTestEnabled
protected
local _depthTestEnabled
protected
bool _depthWriteEnabled
protected
var _depthWriteEnabled
protected
local _depthWriteEnabled
protected
Vec4 _displayColor
protected
var _displayColor
protected
local _displayColor
protected
bool _forceDepthWrite
protected
var _forceDepthWrite
protected
local _forceDepthWrite
protected
GLProgramState* _glProgramState
protected
var _glProgramState
protected
local _glProgramState
protected
GLuint _indexBuffer
protected
var _indexBuffer
protected
local _indexBuffer
protected
ssize_t _indexCount
protected
var _indexCount
protected
local _indexCount
protected
GLenum _indexFormat
protected
var _indexFormat
protected
local _indexFormat
protected
unsigned int _lightMask
protected
var _lightMask
protected
local _lightMask
protected
uint32_t _materialID
protected
var _materialID
protected
local _materialID
protected
const Vec4* _matrixPalette
protected
var _matrixPalette
protected
local _matrixPalette
protected
int _matrixPaletteSize
protected
var _matrixPaletteSize
protected
local _matrixPaletteSize
protected
Mat4 _mv
protected
var _mv
protected
local _mv
protected
GLenum _primitive
protected
var _primitive
protected
local _primitive
protected
EventListenerCustom*
_rendererRecreatedListener
protected
var _rendererRecreatedListener
protected
local _rendererRecreatedListener
protected
GLenum _renderStateCullFace
protected
var _renderStateCullFace
protected
local _renderStateCullFace
protected
bool _renderStateCullFaceEnabled
protected
var _renderStateCullFaceEnabled
protected
local _renderStateCullFaceEnabled
protected
bool _renderStateDepthTest
protected
var _renderStateDepthTest
protected
local _renderStateDepthTest
protected
GLboolean _renderStateDepthWrite
protected
var _renderStateDepthWrite
protected
local _renderStateDepthWrite
protected
GLuint _textrueID
protected
var _textrueID
protected
local _textrueID
protected
GLuint _textureID
protected
var _textureID
protected
GLuint _vao
protected
var _vao
protected
local _vao
protected
GLuint _vertexBuffer
protected
var _vertexBuffer
protected
local _vertexBuffer
protected

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