cocos2d-x  3.0Beta0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MaterialManager Class Reference

#include <CCMaterialManager.h>

Inheritance diagram for MaterialManager:
Object

Public Member Functions

void getMaterialID (GLuint textureID, GLuint shaderID, BlendFunc blendFunc)
var getMaterialID ( var textureID, var shaderID, var blendFunc)
local getMaterialID ( local textureID, local shaderID, local blendFunc)
void registerTexture (GLuint textureID)
void unregisterTexture (GLuint textureID)
var unregisterTexture ( var textureID)
local unregisterTexture ( local textureID)
void registerShader (GLuint shaderID)
void unregisterShader (GLuint shaderID)
var unregisterShader ( var shaderID)
local unregisterShader ( local shaderID)
- Public Member Functions inherited from Object
 Object ()
 Constructor. More...
 
 Object ()
 Constructor. More...
 
virtual ~Object ()
void release ()
 Release the ownership immediately. More...
 
void retain ()
 Retains the ownership. More...
 
Objectautorelease ()
 Release the ownership sometime soon automatically. More...
 
bool isSingleReference () const
 Returns a boolean value that indicates whether there is only one reference to the object. More...
 
unsigned int retainCount () const
 Returns the object's current reference count. More...
 
local retainCount ()
 Returns the object's current reference count. More...
 
virtual bool isEqual (const Object *object)
 Returns a boolean value that indicates whether this object and a given object are equal. More...
 
virtual void acceptVisitor (DataVisitor &visitor)
virtual void update (float dt)

Static Public Member Functions

static MaterialManagergetInstance ()
local getInstance ()
static void destroyInstance ()
var destroyInstance ()
local destroyInstance ()

Protected Member Functions

 MaterialManager ()
virtual ~MaterialManager ()
var ~MaterialManager ()
local ~MaterialManager ()
bool init ()
int getTextureID (GLuint textureID)
int getShaderID (GLuint shaderID)
int getBlendFuncID (GLint blendFunc)

Protected Attributes

std::map< GLuint, int > _textureIDMapping
var _textureIDMapping
local _textureIDMapping
std::map< GLuint, int > _shaderIDMapping
var _shaderIDMapping
local _shaderIDMapping
std::map< BlendFunc, int > _blendFuncMapping
var _blendFuncMapping
local _blendFuncMapping
- Protected Attributes inherited from Object
unsigned int _reference
 count of references More...
 
var _reference
 count of references More...
 
local _reference
 count of references More...
 
unsigned int _autoReleaseCount
 count of autorelease More...
 
var _autoReleaseCount
 count of autorelease More...
 
local _autoReleaseCount
 count of autorelease More...
 

Additional Inherited Members

- Public Attributes inherited from Object
unsigned int _ID
 object id, ScriptSupport need public _ID More...
 
int _luaID
 Lua reference id. More...
 
var _luaID
 Lua reference id. More...
 
local _luaID
 Lua reference id. More...
 

Constructor & Destructor Documentation

MaterialManager ( )
protected
var MaterialManager ( )
protected
local MaterialManager ( )
protected
virtual ~MaterialManager ( )
protectedvirtual
var ~MaterialManager ( )
protectedvirtual
local ~MaterialManager ( )
protectedvirtual

Member Function Documentation

static void destroyInstance ( )
static
var destroyInstance ( )
static
local destroyInstance ( )
static
int getBlendFuncID ( GLint  blendFunc)
protected
var getBlendFuncID ( var  blendFunc)
protected
local getBlendFuncID ( local  blendFunc)
protected
static MaterialManager* getInstance ( )
static
var getInstance ( )
static
local getInstance ( )
static
void getMaterialID ( GLuint  textureID,
GLuint  shaderID,
BlendFunc  blendFunc 
)
var getMaterialID ( var  textureID,
var  shaderID,
var  blendFunc 
)
local getMaterialID ( local  textureID,
local  shaderID,
local  blendFunc 
)
int getShaderID ( GLuint  shaderID)
protected
var getShaderID ( var  shaderID)
protected
local getShaderID ( local  shaderID)
protected
int getTextureID ( GLuint  textureID)
protected
var getTextureID ( var  textureID)
protected
local getTextureID ( local  textureID)
protected
bool init ( )
protected
var init ( )
protected
local init ( )
protected
void registerShader ( GLuint  shaderID)
var registerShader ( var  shaderID)
local registerShader ( local  shaderID)
void registerTexture ( GLuint  textureID)
var registerTexture ( var  textureID)
local registerTexture ( local  textureID)
void unregisterShader ( GLuint  shaderID)
var unregisterShader ( var  shaderID)
local unregisterShader ( local  shaderID)
void unregisterTexture ( GLuint  textureID)
var unregisterTexture ( var  textureID)
local unregisterTexture ( local  textureID)

Member Data Documentation

std::map<BlendFunc, int>
_blendFuncMapping
protected
var _blendFuncMapping
protected
local _blendFuncMapping
protected
std::map<GLuint, int>
_shaderIDMapping
protected
var _shaderIDMapping
protected
local _shaderIDMapping
protected
std::map<GLuint, int>
_textureIDMapping
protected
var _textureIDMapping
protected
local _textureIDMapping
protected

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