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