diff options
| author | realtradam <[email protected]> | 2022-11-26 16:46:01 -0500 |
|---|---|---|
| committer | realtradam <[email protected]> | 2022-11-26 16:46:01 -0500 |
| commit | 368269070f851ff78a1bce35c1d993d5f02cc5f9 (patch) | |
| tree | 83292448b320f561148f16efdbb456c85ab00f87 /src/shader.hpp | |
| parent | 68486053b032fd3313c887ea7d73064e59dce570 (diff) | |
| download | Ogle-368269070f851ff78a1bce35c1d993d5f02cc5f9.tar.gz Ogle-368269070f851ff78a1bce35c1d993d5f02cc5f9.zip | |
namespace it all
Diffstat (limited to 'src/shader.hpp')
| -rw-r--r-- | src/shader.hpp | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/src/shader.hpp b/src/shader.hpp index 88ac64a..057cd5f 100644 --- a/src/shader.hpp +++ b/src/shader.hpp @@ -9,27 +9,30 @@ // std libs #include <string> -class Shader +namespace Ogle { - public: - // id of the shader program - unsigned int ID; + class Shader + { + public: + // id of the shader program + unsigned int ID; - Shader(const char* vertexPath, const char* fragmentPath); + Shader(const char* vertexPath, const char* fragmentPath); - // activate the shader - void use(); + // activate the shader + void use(); - // utility setter functions for uniforms - void setBool(const std::string &name, bool value) const; - void setInt(const std::string &name, int value) const; - void set1f(const std::string &name, float value) const; - void set4f( - const std::string &name, - float value0, - float value1, - float value2, - float value3 - ) const; - void setMatrix4fv(const std::string &name, glm::mat4 matrix); -}; + // utility setter functions for uniforms + void setBool(const std::string &name, bool value) const; + void setInt(const std::string &name, int value) const; + void set1f(const std::string &name, float value) const; + void set4f( + const std::string &name, + float value0, + float value1, + float value2, + float value3 + ) const; + void setMatrix4fv(const std::string &name, glm::mat4 matrix); + }; +} |
