HatchitGraphics
ht_glshader.h
1 
15 #pragma once
16 
17 #include <ht_platform.h>
18 #include <ht_shader.h>
19 #include <ht_gl.h>
20 #include <ht_math.h>
21 #include <map>
22 #include <cstring>
23 
24 namespace Hatchit {
25 
26  namespace Graphics {
27 
28  namespace OpenGL {
29 
30  class HT_API GLShader : public IShader
31  {
32  friend class GLMaterial;
33  public:
34  GLShader();
35 
36  virtual ~GLShader();
37 
38  bool VInitFromFile(Core::File* file) override;
39 
40  void VOnLoaded() override;
41 
42  virtual void VCompile();
43 #ifdef _DEBUG
44  void LoadDirectlyFromFile(std::string path);
45 #endif
46 
47  protected:
48  GLuint shader;
49  std::map<std::string, GLuint> m_uniformMap;
50  std::map<std::string, GLuint> m_textureMap;
51 
52  void printShaderLog();
53  void compileGL(GLenum shaderType);
54  };
55  }
56  }
57 }
Definition: ht_glshader.h:30
Hatchit Engine Copyright(c) 2015-2016 Third-Degree.
Hatchit Engine Copyright(c) 2015-2016 Third-Degree.
Definition: ht_color.h:19
Definition: ht_glmaterial.h:39