From 9d6ca56d5ac15634958f773e991d41a977f909bf Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sun, 17 Dec 2017 09:23:05 +0000 Subject: Making simplegame and travis --- yage/core/glslprogram.cpp | 4 ++++ yage/core/glslprogram.h | 22 ++++++++++++---------- yage/math/matrix.h | 2 +- 3 files changed, 17 insertions(+), 11 deletions(-) (limited to 'yage') diff --git a/yage/core/glslprogram.cpp b/yage/core/glslprogram.cpp index 542afc6f..4772d50e 100644 --- a/yage/core/glslprogram.cpp +++ b/yage/core/glslprogram.cpp @@ -159,4 +159,8 @@ void GlslProgram::unuse() glUseProgram(0); } +void GlslProgram::defaultSetup() +{ +} + } // namespace yage 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 diff --git a/yage/math/matrix.h b/yage/math/matrix.h index e7e82651..90a763cf 100644 --- a/yage/math/matrix.h +++ b/yage/math/matrix.h @@ -388,7 +388,7 @@ public: Vector4(Type x_in, Type y_in, Type z_in, Type w_in) : Vector<4, Type>({x_in, y_in, z_in, w_in}), x(this->data_[0]), - y(this->data_[1]), z(this->data_[2]), w(this->data[3]) + y(this->data_[1]), z(this->data_[2]), w(this->data_[3]) { } }; -- cgit