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

the sprite3D material is only texture for now More...

#include <CCSprite3DMaterial.h>

Public Member Functions

bool addSprite3DMaterial (const std::string &key, Texture2D *tex)
 add to cache More...
 
Texture2DgetSprite3DMaterial (const std::string &key)
 get material from cache More...
 
void removeAllSprite3DMaterial ()
 remove all spritematerial More...
 
void removeUnusedSprite3DMaterial ()
 remove unused spritematerial More...
 
 ~Sprite3DMaterialCache ()
 

Static Public Member Functions

static Sprite3DMaterialCachegetInstance ()
 get & destroy cache More...
 
static void destroyInstance ()
 

Public Attributes

CC_CONSTRUCTOR_ACCESS __pad0__: Sprite3DMaterialCache()
 

Protected Attributes

std::unordered_map
< std::string, Texture2D * > 
_materials
 

Static Protected Attributes

static Sprite3DMaterialCache_cacheInstance
 

Detailed Description

the sprite3D material is only texture for now

Constructor & Destructor Documentation

Member Function Documentation

bool addSprite3DMaterial ( const std::string &  key,
Texture2D tex 
)

add to cache

static void destroyInstance ( )
static
static Sprite3DMaterialCache* getInstance ( )
static

get & destroy cache

Texture2D* getSprite3DMaterial ( const std::string &  key)

get material from cache

void removeAllSprite3DMaterial ( )

remove all spritematerial

void removeUnusedSprite3DMaterial ( )

remove unused spritematerial

Member Data Documentation

Sprite3DMaterialCache* _cacheInstance
staticprotected
std::unordered_map<std::string, Texture2D*> _materials
protected

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