Molecule Visualizer
 All Classes Namespaces Files Functions Enumerations Enumerator Macros Groups Pages
ShaderManager.hpp
Go to the documentation of this file.
1 
7 #ifndef SHADERMANAGER_HPP
8 #define SHADERMANAGER_HPP
9 
10 #include "Shader.hpp"
11 #include "GL/glew.h"
12 
14 {
15 public:
20 
41  {
46  };
47 
52  void Init();
53 
58  static ShaderManager* GetInstance();
59 
65  Shader* GetShader(ShaderType shaderType);
66 
72  GLuint GetShaderProgramId(ShaderType shaderType);
73 
74 private:
78  ShaderManager();
79 
80  static Shader** m_ppShaders;
81  static ShaderManager* m_spInstance;
82  GLuint m_stdProgramId;
83  GLuint m_depthMapProgramId;
84  GLuint m_ambientOcclProgramId;
85 };
86 
87 #endif
~ShaderManager()
Destructor.
Definition: ShaderManager.cpp:24
GLuint GetShaderProgramId(ShaderType shaderType)
A member function to get the ID of a shader.
Definition: ShaderManager.cpp:54
ShaderType
Definition: ShaderManager.hpp:40
Definition: ShaderManager.hpp:44
Definition: ShaderManager.hpp:13
Shader * GetShader(ShaderType shaderType)
A member function to get a pointer to a shader by specifying the desired shader as enum parameter...
Definition: ShaderManager.cpp:49
Class for a shader.
Definition: ShaderManager.hpp:43
Definition: Shader.hpp:13
Definition: ShaderManager.hpp:42
void Init()
A member function to initialize the ShaderManager.
Definition: ShaderManager.cpp:41
Definition: ShaderManager.hpp:45