aboutsummaryrefslogtreecommitdiffstats
path: root/include/YAGE/glslprogram.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/YAGE/glslprogram.hpp')
-rw-r--r--include/YAGE/glslprogram.hpp21
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);