diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-08-24 00:25:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-24 00:25:31 +0100 |
commit | a326354ea6fccf76665a4212bf14daeba0f52ec8 (patch) | |
tree | 18cd2deb0c30b38d8ca7c5305735d2323259e020 /include/YAGE/glslprogram.hpp | |
parent | 0a49874288f92c120d7e165550eb6dbbe1ef7307 (diff) | |
parent | 5403490b941f7c031bf1aafdb91b1098f69edbf2 (diff) | |
download | YAGE-0.1.0.tar.gz YAGE-0.1.0.zip |
Merge pull request #3 from ymherklotz/developv0.1.0
Merge develop to master
Diffstat (limited to 'include/YAGE/glslprogram.hpp')
-rw-r--r-- | include/YAGE/glslprogram.hpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/include/YAGE/glslprogram.hpp b/include/YAGE/glslprogram.hpp index fd97c3a0..eaa19c52 100644 --- a/include/YAGE/glslprogram.hpp +++ b/include/YAGE/glslprogram.hpp @@ -13,9 +13,11 @@ #include <string> -namespace yage { +namespace yage +{ -class GlslProgram { +class GlslProgram +{ private: /// compiled shader program id GLuint program_id_ = 0; @@ -24,27 +26,27 @@ private: int attribute_index_ = 0; /// compiles one shader - void compileShader(const GLuint& shader, const std::string& file_path); + void compileShader(const GLuint &shader, const std::string &file_path); public: GlslProgram() = default; - GlslProgram(const GlslProgram&) = delete; - GlslProgram(GlslProgram&&) = delete; + GlslProgram(const GlslProgram &) = delete; + GlslProgram(GlslProgram &&) = delete; ~GlslProgram(); - GlslProgram& operator=(const GlslProgram&) = delete; - GlslProgram& operator=(GlslProgram&&) = delete; + GlslProgram &operator=(const GlslProgram &) = delete; + GlslProgram &operator=(GlslProgram &&) = delete; /// compiles vertex and fragment shader - void compileShaders(const std::string& vertex_shader_path, - const std::string& fragment_shader_path); + void compileShaders(const std::string &vertex_shader_path, + const std::string &fragment_shader_path); void linkShaders(); - void addAttribute(const std::string& attribute_name); - GLint getUniformLocation(const std::string& uniform_name); + void addAttribute(const std::string &attribute_name); + GLint getUniformLocation(const std::string &uniform_name); void use(); void unuse(); }; -} // yage +} // yage #endif |