cocos2d-x  3.3
 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 globalOrder, GLuint textureID, GLProgramState *glProgramState, BlendFunc blendType, GLuint vertexBuffer, GLuint indexBuffer, GLenum primitive, GLenum indexType, ssize_t indexCount, const Mat4 &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 execute ()
 
void preBatchDraw ()
 
void batchDraw ()
 
void postBatchDraw ()
 
void genMaterialID (GLuint texID, void *glProgramState, GLuint vertexBuffer, GLuint indexBuffer, const BlendFunc &blend)
 
uint32_t getMaterialID () const
 
void listenRendererRecreated (EventCustom *event)
 
- Public Member Functions inherited from RenderCommand
float getGlobalOrder () const
 Get Render Command Id. 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...
 

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 ()
 
virtual ~RenderCommand ()
 
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
 
Mat4 _mv
 
unsigned int _lightMask
 
EventListenerCustom_rendererRecreatedListener
 
- Protected Attributes inherited from RenderCommand
Type _type
 
float _globalOrder
 
bool _isTransparent
 

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
}
 

Constructor & Destructor Documentation

Member Function Documentation

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

Member Data Documentation

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

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