diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-12-20 17:39:48 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-12-20 17:39:48 +0000 |
commit | b885965a6375f98d6bec63a43233461f9f42006d (patch) | |
tree | 454d197fe5c3ca2dc721062cc383da5abdd8a596 /yage/core/glslprogram.h | |
parent | c60164953dd6a4ee485c42211a3bcf8ee9eba06f (diff) | |
download | YAGE-b885965a6375f98d6bec63a43233461f9f42006d.tar.gz YAGE-b885965a6375f98d6bec63a43233461f9f42006d.zip |
Added default shaders, update version script
Diffstat (limited to 'yage/core/glslprogram.h')
-rw-r--r-- | yage/core/glslprogram.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/yage/core/glslprogram.h b/yage/core/glslprogram.h index 729ed427..9e49d329 100644 --- a/yage/core/glslprogram.h +++ b/yage/core/glslprogram.h @@ -28,8 +28,10 @@ public: 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 &vertexShader, + const std::string fragmentShader); + void compileShadersFromFile(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); @@ -46,7 +48,9 @@ private: int attribute_index_ = 0; /// compiles one shader - void compileShader(const GLuint &shader, const std::string &file_path); + void compileShader(GLuint shader, const std::string &shaderContent); + void compileShaderFromFile(GLuint shader, const std::string &file_path); + void initShaderId(); }; } // namespace yage |