All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ProceduralLandmarkDiffuseMaterial.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "PackedDiffuseMaterial.h"
6 #include "IdTypes.h"
7 #include "Rendering.h"
8 #include "Lighting.h"
9 #include "PackedDiffuseAlphaShader.h"
10 #include <string>
11 
12 namespace Eegeo
13 {
14  namespace Rendering
15  {
16  namespace Materials
17  {
19  {
20  public:
22  const TMaterialId materialId,
23  const std::string& name,
25  const Lighting::GlobalLighting& lighting,
27  Rendering::TextureMinifyType textureMinifyType,
28  bool useAlternativeAmbient,
29  bool textureRepeat);
30 
31  bool IsUsingAlternativeAmbient() const { return m_useAlternativeAmbient; }
32  void UseAlternativeAmbient(bool useAlternativeAmbient) { m_useAlternativeAmbient = useAlternativeAmbient; }
33 
34  const TMaterialId GetId() const { return m_id; }
35  const Shader& GetShader() const { return m_shader; }
36  const std::string& GetName() const { return m_name; }
37 
38  void SetDiffuseTexture(Rendering::AsyncTexturing::IAsyncTexture& textureId) { m_textureId = &textureId; }
39  Rendering::AsyncTexturing::IAsyncTexture& GetTextureId() const { return *m_textureId; }
40 
41  void SetState(Rendering::GLState& glState) const;
42 
43  void SetStatePerRenderable(const Rendering::RenderableBase* renderableBase, Rendering::GLState& glState) const;
44 
45  private:
46  const TMaterialId m_id;
47  const std::string m_name;
49  const Lighting::GlobalLighting& m_lighting;
51  Rendering::TextureMinifyType m_textureMinifyType;
52  bool m_textureRepeat;
53  bool m_useAlternativeAmbient;
54  };
55  }
56  }
57 }