From b885965a6375f98d6bec63a43233461f9f42006d Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Wed, 20 Dec 2017 17:39:48 +0000 Subject: Added default shaders, update version script --- yage/core/glslprogram.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'yage/core/glslprogram.h') 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 -- cgit