Some GLprogram state could be shared. More...
Public Member Functions | |
GLProgramState * | getGLProgramState (GLProgram *program) |
Get the shared GLProgramState by the owner GLProgram. | |
local | getGLProgramState ( local program) |
Get the shared GLProgramState by the owner GLProgram. | |
void | removeAllGLProgramState () |
Remove all the cached GLProgramState. | |
void | removeUnusedGLProgramState () |
Remove unused GLProgramState. | |
Static Public Member Functions | |
static GLProgramStateCache * | getInstance () |
Get the GLProgramStateCache singleton instance. | |
static void | destroyInstance () |
Destroy the GLProgramStateCache singleton. | |
Some GLprogram state could be shared.
GLProgramStateCache is used to cache this, and will reuse the old GLProgramState, which will accelerate the creation of game objects such as sprites, particles etc.