diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-08-01 23:47:35 +0100 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-08-01 23:47:35 +0100 |
commit | 31317175d72c62994b98a93e1b827633b4de9cb2 (patch) | |
tree | 91e9f1068da03a7a5419c44a927a30ff7d29235c /include/YAGE/glslprogram.hpp | |
parent | 67770ad6b1fcbc6730c140b0d3edd3fc9efbdc7b (diff) | |
download | YAGE-31317175d72c62994b98a93e1b827633b4de9cb2.tar.gz YAGE-31317175d72c62994b98a93e1b827633b4de9cb2.zip |
Fixing constructors and destructors
Diffstat (limited to 'include/YAGE/glslprogram.hpp')
-rw-r--r-- | include/YAGE/glslprogram.hpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/include/YAGE/glslprogram.hpp b/include/YAGE/glslprogram.hpp index 28222ede..70f30b73 100644 --- a/include/YAGE/glslprogram.hpp +++ b/include/YAGE/glslprogram.hpp @@ -19,19 +19,24 @@ namespace yage class GlslProgram { private: - // compiled shader program id - GLuint program_id_ = 0; - GLuint vertex_shader_id_ = 0; - GLuint fragment_shader_id_ = 0; - int attribute_index_ = 0; + /// compiled shader program id + GLuint program_id_=0; + GLuint vertex_shader_id_=0; + GLuint fragment_shader_id_=0; + int attribute_index_=0; - // compiles one shader + /// compiles one shader void compileShader(const GLuint &shader, const std::string &file_path); public: - GlslProgram(); + GlslProgram()=default; + GlslProgram(const GlslProgram&)=delete; + GlslProgram(GlslProgram&&)=delete; ~GlslProgram(); - // compiles vertex and fragment shader + 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 linkShaders(); void addAttribute(const std::string &attribute_name); |