All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
InteriorsDiffuseTexturedMaterial.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Interiors.h"
6 #include "InteriorsMaterialBase.h"
7 #include "PackedDiffuseMaterial.h"
8 #include "IdTypes.h"
9 #include "Rendering.h"
10 #include "Lighting.h"
11 
12 #include <string>
13 
14 namespace Eegeo
15 {
16  namespace Resources
17  {
18  namespace Interiors
19  {
21  {
22  public:
24  const Rendering::TMaterialId materialId,
25  const std::string& name,
26  const Lighting::GlobalLighting& lighting,
27  IInteriorsMaterialAssignmentObserver& materialAssignmentObserver,
28  bool useAlternativeAmbient,
29  bool isTranslucent,
30  const v4& diffuseColor,
31  InteriorsRenderableLayer::Type renderableLayer,
32  const InteriorsDiffuseTexturedShader& shader,
33  IInteriorsTextureResource& interiorsTextureResource,
34  Rendering::TextureMinifyType textureMinifyType,
35  bool textureRepeat);
36 
38 
39  void SetState(Rendering::GLState& glState) const;
40 
41  void SetStatePerRenderable(const Rendering::RenderableBase* renderableBase, Rendering::GLState& glState) const;
42 
43  void SetStatePerInstanceRenderable(int instanceIndex, const Rendering::Renderables::InstancedInteriorFloorRenderable& instancedRenderable, Rendering::GLState& glState) const;
44 
45  const Rendering::Shader& GetShader() const;
46  private:
47  const InteriorsDiffuseTexturedShader& m_shader;
48  IInteriorsTextureResource& m_interiorsTextureResource;
49  const Rendering::TextureMinifyType m_textureMinifyType;
50  const bool m_textureRepeat;
51  };
52  }
53  }
54 }