aboutsummaryrefslogtreecommitdiffstats
path: root/include/YAGE/glslprogram.hpp
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-08-06 17:03:05 +0100
committerYann Herklotz <ymherklotz@gmail.com>2017-08-06 17:07:43 +0100
commitf7ce70d139effc5553c4ed2fa604724413b9d9b2 (patch)
tree5a05620ed6a65cf999b4ea0f3976b803b44504c8 /include/YAGE/glslprogram.hpp
parent932537776012c33dcdb6ae34dbb419f13717804d (diff)
downloadYAGE-f7ce70d139effc5553c4ed2fa604724413b9d9b2.tar.gz
YAGE-f7ce70d139effc5553c4ed2fa604724413b9d9b2.zip
Adding clang format with my style based on google
Diffstat (limited to 'include/YAGE/glslprogram.hpp')
-rw-r--r--include/YAGE/glslprogram.hpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/include/YAGE/glslprogram.hpp b/include/YAGE/glslprogram.hpp
index 70f30b73..fd97c3a0 100644
--- a/include/YAGE/glslprogram.hpp
+++ b/include/YAGE/glslprogram.hpp
@@ -13,38 +13,38 @@
#include <string>
-namespace yage
-{
+namespace yage {
-class GlslProgram
-{
+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;
+ 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);
+ void compileShader(const GLuint& shader, const std::string& file_path);
+
public:
- GlslProgram()=default;
- GlslProgram(const GlslProgram&)=delete;
- GlslProgram(GlslProgram&&)=delete;
+ GlslProgram() = default;
+ GlslProgram(const GlslProgram&) = delete;
+ GlslProgram(GlslProgram&&) = delete;
~GlslProgram();
- GlslProgram& operator=(const GlslProgram&)=delete;
- GlslProgram& operator=(GlslProgram&&)=delete;
+ 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 compileShaders(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);
+ void addAttribute(const std::string& attribute_name);
+ GLint getUniformLocation(const std::string& uniform_name);
void use();
void unuse();
};
-} // yage
+} // yage
#endif