#ifndef RED_BAKE_COMMAND_BUFF_H_ #define RED_BAKE_COMMAND_BUFF_H_ #include "cocos2d.h" #include 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 _commandsPool; uint32_t _nextFreeCommand; }; #endif // RED_BAKE_COMMAND_BUFF_H_