All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
UniformColoredMaterial.h
1 // Copyright eeGeo Ltd (2012-2015), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "IMaterial.h"
7 #include "Rendering.h"
8 #include "Lighting.h"
9 #include "VectorMathDecl.h"
10 #include "UniformColoredShader.h"
11 #include <string>
12 
13 namespace Eegeo
14 {
15  namespace Rendering
16  {
17  namespace Materials
18  {
20  {
21  public:
23  const TMaterialId materialId,
24  const std::string& name,
26  const v4& initialColor);
27 
28  const TMaterialId GetId() const { return m_id; }
29  const Shader& GetShader() const { return m_shader; }
30  const std::string& GetName() const { return m_name; }
31 
32  void SetState(Rendering::GLState& glState) const;
33 
34  void SetColor(const v4& color) { m_color = color; }
35  const v4& GetColor() const { return m_color; }
36 
37  void SetStatePerRenderable(const Rendering::RenderableBase* renderableBase, Rendering::GLState& glState) const;
38  protected:
39  const TMaterialId m_id;
40  const std::string m_name;
42  v4 m_color;
43  };
44  }
45  }
46 }