cocos2d-x  3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GLProgramStateCache Class Reference

Some GLprogram state could be shared. More...

#include <CCGLProgramStateCache.h>

Public Member Functions

GLProgramStategetGLProgramState (GLProgram *program)
 Get the shared GLProgramState by the owner GLProgram. More...
 
var getGLProgramState ( var 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...
 
static void destroyInstance ()
 Destroy the GLProgramStateCache singleton. More...
 

Protected Member Functions

 GLProgramStateCache ()
 ~GLProgramStateCache ()

Protected Attributes

Map< GLProgram
*, GLProgramState * > 
_glProgramStates
local _glProgramStates

Static Protected Attributes

static GLProgramStateCaches_instance

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.

Constructor & Destructor Documentation

GLProgramStateCache ( )
protected
var GLProgramStateCache ( )
protected
local GLProgramStateCache ( )
protected
~GLProgramStateCache ( )
protected
var ~GLProgramStateCache ( )
protected
local ~GLProgramStateCache ( )
protected

Member Function Documentation

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.

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.

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.

Member Data Documentation

Map<GLProgram*, GLProgramState*>
_glProgramStates
protected
var _glProgramStates
protected
local _glProgramStates
protected
GLProgramStateCache* s_instance
staticprotected
var s_instance
staticprotected
local s_instance
staticprotected

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