Ocular Engine
ShaderProgram.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_GRAPHICS_SHADER_PROGRAM__H__
19 #define __H__OCULAR_GRAPHICS_SHADER_PROGRAM__H__
20 
21 #include "Resources/Resource.hpp"
22 
23 #include "VertexShader.hpp"
24 #include "GeometryShader.hpp"
25 #include "FragmentShader.hpp"
26 #include "PreTessellationShader.hpp"
27 #include "PostTessellationShader.hpp"
28 
29 //------------------------------------------------------------------------------------------
30 
35 namespace Ocular
36 {
41  namespace Graphics
42  {
43 
54  class ShaderProgram : public Core::Resource
55  {
56  public:
57 
58  ShaderProgram();
59  virtual ~ShaderProgram();
60 
61  virtual void unload() override;
62 
67  void setVertexShader(VertexShader* shader);
68 
74 
79  void setGeometryShader(GeometryShader* shader);
80 
86 
91  void setFragmentShader(FragmentShader* shader);
92 
98 
104 
110 
116 
122 
129  void setPixelShader(PixelShader* shader);
130 
138 
145  void setHullShader(HullShader* shader);
146 
154 
161  void setDomainShader(DomainShader* shader);
162 
170 
171  protected:
172 
173  VertexShader* m_VertexShader;
174  GeometryShader* m_GeometryShader;
175  FragmentShader* m_FragmentShader;
176  PreTessellationShader* m_PreTessellationShader;
177  PostTessellationShader* m_PostTessellationShader;
178 
179  private:
180  };
181  }
185 }
190 //------------------------------------------------------------------------------------------
191 
192 #endif
VertexShader * getVertexShader()
Definition: ShaderProgram.cpp:83
void setHullShader(HullShader *shader)
Definition: ShaderProgram.cpp:132
void setPreTessellationShader(PreTessellationShader *shader)
Definition: ShaderProgram.cpp:121
Definition: FragmentShader.hpp:40
PostTessellationShader * getPostTessellationShader()
Definition: ShaderProgram.cpp:149
Definition: VertexShader.hpp:40
GeometryShader * getGeometryShader()
Definition: ShaderProgram.cpp:94
FragmentShader * getFragmentShader()
Definition: ShaderProgram.cpp:105
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: PreTessellationShader.hpp:40
virtual void unload() override
Definition: ShaderProgram.cpp:49
void setPixelShader(PixelShader *shader)
Definition: ShaderProgram.cpp:110
PixelShader * getPixelShader()
Definition: ShaderProgram.cpp:116
Definition: ShaderProgram.hpp:54
void setVertexShader(VertexShader *shader)
Definition: ShaderProgram.cpp:77
PreTessellationShader * getPreTessellationShader()
Definition: ShaderProgram.cpp:127
void setPostTessellationShader(PostTessellationShader *shader)
Definition: ShaderProgram.cpp:143
Definition: PostTessellationShader.hpp:40
void setFragmentShader(FragmentShader *shader)
Definition: ShaderProgram.cpp:99
void setDomainShader(DomainShader *shader)
Definition: ShaderProgram.cpp:154
void setGeometryShader(GeometryShader *shader)
Definition: ShaderProgram.cpp:88
DomainShader * getDomainShader()
Definition: ShaderProgram.cpp:160
Definition: GeometryShader.hpp:40
HullShader * getHullShader()
Definition: ShaderProgram.cpp:138
Definition: Resource.hpp:46