12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- #ifndef _CC_PRIMITIVE_COMMAND_H__
- #define _CC_PRIMITIVE_COMMAND_H__
- #include "renderer/CCPrimitive.h"
- #include "renderer/CCRenderCommand.h"
- NS_CC_BEGIN
- class GLProgramState;
- class CC_DLL PrimitiveCommand : public RenderCommand
- {
- public:
-
- PrimitiveCommand();
- ~PrimitiveCommand();
-
-
-
-
- void init(float globalOrder, GLuint textureID, GLProgramState* glProgramState, BlendFunc blendType, Primitive* primitive, const Mat4& mv, uint32_t flags);
- CC_DEPRECATED_ATTRIBUTE void init(float globalOrder, GLuint textureID, GLProgramState* glProgramState, BlendFunc blendType, Primitive* primitive,const Mat4& mv);
-
-
- uint32_t getMaterialID() const { return _materialID; }
-
- GLuint getTextureID() const { return _textureID; }
-
- GLProgramState* getGLProgramState() const { return _glProgramState; }
-
- BlendFunc getBlendType() const { return _blendType; }
-
- const Mat4& getModelView() const { return _mv; }
-
- void execute() const;
- protected:
-
- uint32_t _materialID;
- GLuint _textureID;
- GLProgramState* _glProgramState;
- BlendFunc _blendType;
- Primitive* _primitive;
- Mat4 _mv;
- };
- NS_CC_END
- #endif
|