123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- #ifndef __CCRENDERCOMMAND_H_
- #define __CCRENDERCOMMAND_H_
- #include <stdint.h>
- #include "platform/CCPlatformMacros.h"
- #include "base/ccTypes.h"
- NS_CC_BEGIN
- class CC_DLL RenderCommand
- {
- public:
-
- enum class Type
- {
-
- UNKNOWN_COMMAND,
-
- QUAD_COMMAND,
-
- CUSTOM_COMMAND,
-
- BATCH_COMMAND,
-
- GROUP_COMMAND,
-
- MESH_COMMAND,
-
- PRIMITIVE_COMMAND,
-
- TRIANGLES_COMMAND
- };
-
- void init(float globalZOrder, const Mat4& modelViewTransform, uint32_t flags);
-
-
- float getGlobalOrder() const { return _globalOrder; }
-
- Type getType() const { return _type; }
-
-
- bool isTransparent() const { return _isTransparent; }
-
-
- void setTransparent(bool isTransparent) { _isTransparent = isTransparent; }
-
- bool isSkipBatching() const { return _skipBatching; }
-
- void setSkipBatching(bool value) { _skipBatching = value; }
-
- bool is3D() const { return _is3D; }
-
- void set3D(bool value) { _is3D = value; }
-
- float getDepth() const { return _depth; }
-
- protected:
-
- RenderCommand();
-
- virtual ~RenderCommand();
-
- void printID();
-
- Type _type;
-
- float _globalOrder;
-
-
- bool _isTransparent;
-
-
- bool _skipBatching;
-
-
- bool _is3D;
-
-
- float _depth;
- };
- NS_CC_END
- #endif
|