TDME2  1.9.200
ShaderModel.cpp
Go to the documentation of this file.
2 
3 #include <string>
4 
5 #include <tdme/tdme.h>
6 #include <tdme/utilities/Enum.h>
7 
8 using std::string;
9 
12 
13 ShaderModel::ShaderModel(const string& name, int ordinal): Enum(name, ordinal)
14 {
15 }
16 
20 
22 {
23  if (SPECULAR->getName() == a0) return SPECULAR;
24  if (PBR->getName() == a0) return PBR;
25  if (SPECULARPBR->getName() == a0) return SPECULARPBR;
26  // TODO: throw exception here maybe
27  return nullptr;
28 }
static STATIC_DLL_IMPEXT ShaderModel * PBR
Definition: ShaderModel.h:24
static STATIC_DLL_IMPEXT ShaderModel * SPECULAR
Definition: ShaderModel.h:23
static ShaderModel * valueOf(const string &a0)
Definition: ShaderModel.cpp:21
static STATIC_DLL_IMPEXT ShaderModel * SPECULARPBR
Definition: ShaderModel.h:25
Enum base class.
Definition: Enum.h:14
const string & getName() const
Definition: Enum.h:37