All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
StencilAreaMaterial.h
1 // Copyright (c) 2015 eeGeo. 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 "StencilAreaShader.h"
11 #include <string>
12 
13 namespace Eegeo
14 {
15  namespace Data
16  {
17  namespace StencilArea
18  {
19  namespace Materials
20  {
22  {
23  public:
25  const Rendering::TMaterialId materialId,
26  const std::string& name,
27  StencilAreaShader& shader
28  );
29 
30  const Rendering::TMaterialId GetId() const { return m_id; }
31  const Rendering::Shader& GetShader() const { return m_shader; }
32  const std::string& GetName() const { return m_name; }
33 
34  void SetState(Rendering::GLState& glState) const;
35 
36  void SetStatePerRenderable(const Rendering::RenderableBase* renderableBase, Rendering::GLState& glState) const;
37  protected:
38  const Rendering::TMaterialId m_id;
39  const std::string m_name;
40  StencilAreaShader& m_shader;
41  };
42  }
43  }
44  }
45 }