Cocos2d-x  v3.17
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
GLProgramStateCache Class Reference

Some GLprogram state could be shared. More...

Public Member Functions

GLProgramStategetGLProgramState (GLProgram *program)
 Get the shared GLProgramState by the owner GLProgram. More...
 
local getGLProgramState ( local program)
 Get the shared GLProgramState by the owner GLProgram. More...
 
void removeAllGLProgramState ()
 Remove all the cached GLProgramState. More...
 
void removeUnusedGLProgramState ()
 Remove unused GLProgramState. More...
 

Static Public Member Functions

static GLProgramStateCachegetInstance ()
 Get the GLProgramStateCache singleton instance. More...
 
local getInstance ()
 Get the GLProgramStateCache singleton instance. More...
 
static void destroyInstance ()
 Destroy the GLProgramStateCache singleton. More...
 

Detailed Description

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.

Member Function Documentation

static GLProgramStateCache*
getInstance
( )
static

Get the GLProgramStateCache singleton instance.

var getInstance ( )
static

Get the GLProgramStateCache singleton instance.

local getInstance ( )
static

Get the GLProgramStateCache singleton instance.

static void destroyInstance ( )
static

Destroy the GLProgramStateCache singleton.

var destroyInstance ( )
static

Destroy the GLProgramStateCache singleton.

local destroyInstance ( )
static

Destroy the GLProgramStateCache singleton.

GLProgramState* getGLProgramState ( GLProgram program)

Get the shared GLProgramState by the owner GLProgram.

var getGLProgramState ( var  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.

var removeAllGLProgramState ( )

Remove all the cached GLProgramState.

local removeAllGLProgramState ( )

Remove all the cached GLProgramState.

void removeUnusedGLProgramState ( )

Remove unused GLProgramState.

var removeUnusedGLProgramState ( )

Remove unused GLProgramState.

local removeUnusedGLProgramState ( )

Remove unused GLProgramState.


The documentation for this class was generated from the following file: