All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
InteriorsMaterial.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 #include "ICallback.h"
12 
13 #include <string>
14 
15 namespace Eegeo
16 {
17  namespace Resources
18  {
19  namespace Interiors
20  {
22  {
23  public:
25  const Rendering::TMaterialId materialId,
26  const std::string& name,
27  const Lighting::GlobalLighting& lighting,
28  IInteriorsMaterialAssignmentObserver& materialAssignmentObserver,
29  bool useAlternativeAmbient,
30  bool isTranslucent,
31  const v4& diffuseColor,
32  InteriorsRenderableLayer::Type renderableLayer,
33  const InteriorsShader& shader
34  );
35 
37 
38  const Rendering::Shader& GetShader() const;
39 
40  void SetState(Rendering::GLState& glState) const;
41 
42  void SetStatePerRenderable(const Rendering::RenderableBase* renderableBase, Rendering::GLState& glState) const;
43 
44  void SetStatePerInstanceRenderable(int instanceIndex, const Rendering::Renderables::InstancedInteriorFloorRenderable& instancedRenderable, Rendering::GLState& glState) const;
45 
46  private:
47  const InteriorsShader& m_shader;
48  };
49  }
50  }
51 }