All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PackedFoggedMaterial.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "IDiffuseMaterial.h"
7 #include "IdTypes.h"
8 #include "Rendering.h"
9 #include "Lighting.h"
10 #include "PackedDiffuseFoggedShader.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 Lighting::GlobalLighting& lighting,
27  const Lighting::GlobalFogging& fogging,
28  Rendering::TextureMinifyType textureMinifyType,
29  bool useAlternativeAmbient,
30  bool textureRepeat
31  );
32 
33  bool IsUsingAlternativeAmbient() const { return m_useAlternativeAmbient; }
34  void UseAlternativeAmbient(bool useAlternativeAmbient) { m_useAlternativeAmbient = useAlternativeAmbient; }
35 
36  const TMaterialId GetId() const { return m_id; }
37  const Shaders::PackedDiffuseFoggedShader& GetShader() const { return m_shader; }
38  const std::string& GetName() const { return m_name; }
39 
40  Rendering::TextureMinifyType GetTextureMinifyType() const { return m_textureMinifyType; }
41  bool GetTextureRepeat() const { return m_textureRepeat; }
42 
43  void SetState(Rendering::GLState& glState) const;
44  void SetStatePerRenderable(const Rendering::RenderableBase* renderableBase, Rendering::GLState& glState) const;
45 
46  protected:
47  const TMaterialId m_id;
48  const std::string m_name;
50  const Lighting::GlobalLighting& m_lighting;
51  const Lighting::GlobalFogging& m_fogging;
52  Rendering::TextureMinifyType m_textureMinifyType;
53  bool m_useAlternativeAmbient;
54  bool m_textureRepeat;
55  };
56  }
57  }
58 }