123456789101112131415161718192021222324252627282930 |
- #ifndef RED_BAKE_COMMAND_BUFF_H_
- #define RED_BAKE_COMMAND_BUFF_H_
- #include "cocos2d.h"
- #include <vector>
- class CommandBuff {
- public:
- static CommandBuff* getInstance ();
- static void destroyInstance ();
- void update (float delta);
- cocos2d::TrianglesCommand* addCommand(cocos2d::Renderer* renderer, float globalOrder, cocos2d::Texture2D* texture, cocos2d::GLProgramState* glProgramState, cocos2d::BlendFunc blendType, const cocos2d::TrianglesCommand::Triangles& triangles, const cocos2d::Mat4& mv, uint32_t flags);
- protected:
- CommandBuff ();
- ~CommandBuff();
- void reset ();
- cocos2d::TrianglesCommand* nextFreeCommand ();
- // pool of commands
- std::vector<cocos2d::TrianglesCommand*> _commandsPool;
- uint32_t _nextFreeCommand;
- };
- #endif // RED_BAKE_COMMAND_BUFF_H_
|