123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- #ifndef __CCGLPROGRAMSTATECACHE_H__
- #define __CCGLPROGRAMSTATECACHE_H__
- #include "base/ccTypes.h"
- #include "base/CCVector.h"
- #include "base/CCMap.h"
- #include "math/Vec2.h"
- #include "math/Vec3.h"
- #include "math/Vec4.h"
- NS_CC_BEGIN
- class GLProgram;
- class GLProgramState;
- class CC_DLL GLProgramStateCache
- {
- public:
-
- static GLProgramStateCache* getInstance();
-
- static void destroyInstance();
-
-
- GLProgramState* getGLProgramState(GLProgram* program);
-
- void removeAllGLProgramState();
-
- void removeUnusedGLProgramState();
- protected:
- GLProgramStateCache();
- ~GLProgramStateCache();
-
- Map<GLProgram*, GLProgramState*> _glProgramStates;
- static GLProgramStateCache* s_instance;
- };
- NS_CC_END
- #endif
|