aboutsummaryrefslogtreecommitdiffstats
path: root/yage/core/glslprogram.h
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-12-17 09:23:05 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-12-17 09:23:05 +0000
commit9d6ca56d5ac15634958f773e991d41a977f909bf (patch)
treecc10786c091a7f185feae2c3f536981f222e9117 /yage/core/glslprogram.h
parente6215e764bc149497ab5772d9ea136809d898993 (diff)
downloadYAGE-9d6ca56d5ac15634958f773e991d41a977f909bf.tar.gz
YAGE-9d6ca56d5ac15634958f773e991d41a977f909bf.zip
Making simplegame and travis
Diffstat (limited to 'yage/core/glslprogram.h')
-rw-r--r--yage/core/glslprogram.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/yage/core/glslprogram.h b/yage/core/glslprogram.h
index d4bbe093..50b2a7de 100644
--- a/yage/core/glslprogram.h
+++ b/yage/core/glslprogram.h
@@ -18,16 +18,6 @@ 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;
-
- /// compiles one shader
- void compileShader(const GLuint &shader, const std::string &file_path);
-
public:
GlslProgram() = default;
GlslProgram(const GlslProgram &) = delete;
@@ -45,6 +35,18 @@ public:
GLint getUniformLocation(const std::string &uniform_name);
void use();
void unuse();
+
+ void defaultSetup();
+
+private:
+ /// 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
+ void compileShader(const GLuint &shader, const std::string &file_path);
};
} // namespace yage