diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-12-20 17:59:48 +0000 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-12-20 17:59:48 +0000 |
commit | cc35bb2471c6d3fd695e3f8985ef168cda3fb39c (patch) | |
tree | 2cf90c623fdb75086e486b368c5d65f35a839c10 /yage/core/glslprogram.h | |
parent | 1fcd6a0fe38a8db2c6d317c2735419aa04e9cd83 (diff) | |
parent | b885965a6375f98d6bec63a43233461f9f42006d (diff) | |
download | YAGE-cc35bb2471c6d3fd695e3f8985ef168cda3fb39c.tar.gz YAGE-cc35bb2471c6d3fd695e3f8985ef168cda3fb39c.zip |
Merge branch 'develop'
Diffstat (limited to 'yage/core/glslprogram.h')
-rw-r--r-- | yage/core/glslprogram.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/yage/core/glslprogram.h b/yage/core/glslprogram.h index 50b2a7de..9e49d329 100644 --- a/yage/core/glslprogram.h +++ b/yage/core/glslprogram.h @@ -1,5 +1,5 @@ -/* ---------------------------------------------------------------------------- - * glslprogram.h +/** --------------------------------------------------------------------------- + * @file: glslprogram.h * * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> * MIT License, see LICENSE file for more details. @@ -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 |