CSEngine
|
Public Types | |
enum | SMaterialMode { FORWARD = 0 , DEFERRED = 1 , DEPTH_ONLY = 2 } |
Public Member Functions | |
RESOURCE_DEFINE_CONSTRUCTOR (SMaterial) | |
SMaterial (const SMaterial *material) | |
void | Exterminate () override |
int | AttachElement (int textureLayout) const |
SMaterial::Element * | GetElement (const std::string &key) const |
const ElementsMap & | GetElements () const |
void | InitElements (const ElementsMap &elements, SShaderGroup *shaders) |
void | SetInt (const std::string &name, int value) |
void | SetFloat (const std::string &name, float value) |
void | SetVec3 (const std::string &name, const vec3 &value) |
void | SetTexture (const std::string &name, SResource *texture) |
void | SetRawData (const std::string &name, std::vector< std::string > raw) |
short | GetOrderLayer () const |
void | SetOrderLayer (int orderLayer) |
SMaterialMode | GetMode () const |
void | SetMode (SMaterialMode mode) |
SShaderGroup * | GetShaders () const |
int | GetTextureCount () const |
std::string | PrintMaterial () const |
void | SetValue (std::string name_str, Arguments value) override |
std::string | PrintValue () const override |
![]() | |
SResource (std::string classType) | |
SResource (const SResource *resource, bool isRegister) | |
void | SetName (std::string name) |
void | SetAbsoluteID (std::string id) |
std::string | GetName () const |
std::string | GetAbsoluteID () const |
AssetMgr::AssetReference * | GetAssetReference (std::string hash="") const |
void | LinkResource (AssetMgr::AssetReference *asset) |
void | LinkResource (std::string name) |
void | SetHash (std::string &hash) override |
![]() | |
SObject (bool isRegister) | |
virtual void | SetUndestroyable (bool enable) |
virtual void | Destroy () |
std::string | GetHash () const |
![]() | |
![]() | |
ReflectionObject (std::string type) | |
void | SetClassType (std::string type) |
const char * | GetClassType () const |
bool | IsSameClass (const char *classType) const |
Static Public Member Functions | |
static SMaterial * | GenerateMaterial (SShaderGroup *shaders) |
![]() | |
template<class T > | |
static T * | Create (const std::string &name) |
static SResource * | Create (const std::string &name, const std::string &classType) |
template<class T > | |
static T * | Create (const AssetMgr::AssetReference *asset) |
static SResource * | Create (const AssetMgr::AssetReference *asset, const std::string &classType) |
template<class T > | |
static T * | Get (std::string name) |
static SResource * | Get (std::string &name) |
![]() | |
static ReflectionObject * | NewObject (const std::string &name) |
Protected Member Functions | |
void | Init (const AssetMgr::AssetReference *asset) override |
![]() | |
![]() |
Additional Inherited Members | |
![]() | |
typedef std::vector< std::string > | Arguments |
![]() | |
std::string | m_hash |
![]() | |
std::string | m_class |
Definition at line 16 of file SMaterial.h.
enum CSE::SMaterial::SMaterialMode |
Definition at line 18 of file SMaterial.h.
|
explicit |
Definition at line 17 of file SMaterial.cpp.
|
override |
Definition at line 40 of file SMaterial.cpp.
int SMaterial::AttachElement | ( | int | textureLayout | ) | const |
Definition at line 56 of file SMaterial.cpp.
|
overridevirtual |
Implements CSE::SObject.
Definition at line 44 of file SMaterial.cpp.
|
static |
Definition at line 303 of file SMaterial.cpp.
SMaterial::Element * SMaterial::GetElement | ( | const std::string & | key | ) | const |
Definition at line 67 of file SMaterial.cpp.
|
inline |
Definition at line 44 of file SMaterial.h.
SMaterial::SMaterialMode SMaterial::GetMode | ( | ) | const |
Definition at line 291 of file SMaterial.cpp.
short SMaterial::GetOrderLayer | ( | ) | const |
Definition at line 279 of file SMaterial.cpp.
SShaderGroup * SMaterial::GetShaders | ( | ) | const |
Definition at line 287 of file SMaterial.cpp.
int SMaterial::GetTextureCount | ( | ) | const |
Definition at line 299 of file SMaterial.cpp.
|
overrideprotectedvirtual |
Implements CSE::SResource.
Definition at line 122 of file SMaterial.cpp.
void SMaterial::InitElements | ( | const ElementsMap & | elements, |
SShaderGroup * | shaders ) |
Definition at line 73 of file SMaterial.cpp.
std::string SMaterial::PrintMaterial | ( | ) | const |
Definition at line 326 of file SMaterial.cpp.
|
overridevirtual |
Implements CSE::VariableBinder.
Definition at line 354 of file SMaterial.cpp.
void SMaterial::SetFloat | ( | const std::string & | name, |
float | value ) |
Definition at line 97 of file SMaterial.cpp.
void SMaterial::SetInt | ( | const std::string & | name, |
int | value ) |
Definition at line 91 of file SMaterial.cpp.
void SMaterial::SetMode | ( | SMaterialMode | mode | ) |
Definition at line 295 of file SMaterial.cpp.
void SMaterial::SetOrderLayer | ( | int | orderLayer | ) |
Definition at line 283 of file SMaterial.cpp.
void SMaterial::SetRawData | ( | const std::string & | name, |
std::vector< std::string > | raw ) |
Definition at line 115 of file SMaterial.cpp.
void SMaterial::SetTexture | ( | const std::string & | name, |
SResource * | texture ) |
Definition at line 109 of file SMaterial.cpp.
|
overridevirtual |
Used to get serialized values. All classes that inherit from VariableBinder will unconditionally call this function first during initialization.
name_str | Name of values |
value | Serialized values |
Implements CSE::VariableBinder.
Definition at line 350 of file SMaterial.cpp.
void SMaterial::SetVec3 | ( | const std::string & | name, |
const vec3 & | value ) |
Definition at line 103 of file SMaterial.cpp.