All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
InteriorsShader.h
1 // Copyright (c) 2015 eeGeo. All rights reserved.
2 
3 #pragma once
4 
5 #include "Interiors.h"
6 #include "Shader.h"
7 #include "ShaderMacros.h"
8 #include "VectorMath.h"
9 
10 namespace Eegeo
11 {
12  namespace Resources
13  {
14  namespace Interiors
15  {
17  {
18  public:
19  static InteriorsShader* Create(const Rendering::TShaderId shaderId);
20 
21  virtual void SetMVP(const m44& mvp) const {;}
22  void SetUnpackModelViewProjectionMatrix(const m44& unpackModelViewProjectionMatrix) const;
23  void SetDiffuseColor(const v4& color) const;
24  void SetHighlightColor(const v4& color) const;
25  void SetSaturation(float saturation) const;
26  void SetLightColors(const m44& colors) const;
27  void SetModelToLightDirections(const m44& modelSpaceToLightDirections) const;
28  void Use(Rendering::GLState& glState) const;
29 
30  protected:
32  const Rendering::TShaderId shaderId,
33  const std::string& vertexShaderCode,
34  const std::string& fragmentShaderCode);
35 
36  private:
37  GLuint m_unpackModelViewProjectionMatrixUniformLocation ;
38  GLuint m_lightColorsUniformLocation;
39  GLuint m_modelToLightDirectionsUniformLocation;
40  GLuint m_diffuseColorUniformLocation;
41  GLuint m_highlightColorUniformLocation;
42  GLuint m_saturationParamUniformLocation;
43  };
44  }
45  }
46 }
47