From aa9cdee46fea21ad50b70a4513aa39aebe280b7f Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Thu, 27 Jul 2017 23:21:23 +0100 Subject: Adding initial docs --- glslprogram_8hpp_source.html | 80 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 glslprogram_8hpp_source.html (limited to 'glslprogram_8hpp_source.html') diff --git a/glslprogram_8hpp_source.html b/glslprogram_8hpp_source.html new file mode 100644 index 00000000..76206cb1 --- /dev/null +++ b/glslprogram_8hpp_source.html @@ -0,0 +1,80 @@ + + + + + + + +YAGE: include/YAGE/glslprogram.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
YAGE +
+
Yet Another Game Engine
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
glslprogram.hpp
+
+
+
1 /* ----------------------------------------------------------------------------
2  * glslprogram.hpp
3  *
4  * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> -- MIT License
5  * See file LICENSE for more details
6  * ----------------------------------------------------------------------------
7  */
8 
9 #ifndef GLSL_PROGRAM_HPP
10 #define GLSL_PROGRAM_HPP
11 
12 #include <GL/glew.h>
13 
14 #include <string>
15 
16 namespace yage
17 {
18 
20 {
21 private:
22  // compiled shader program id
23  GLuint program_id_ = 0;
24  GLuint vertex_shader_id_ = 0;
25  GLuint fragment_shader_id_ = 0;
26  int attribute_index_ = 0;
27 
28  // compiles one shader
29  void compileShader(const GLuint &shader, const std::string &file_path);
30 public:
31  GlslProgram();
32  ~GlslProgram();
33 
34  // compiles vertex and fragment shader
35  void compileShaders(const std::string &vertex_shader_path, const std::string &fragment_shader_path);
36  void linkShaders();
37  void addAttribute(const std::string &attribute_name);
38  GLint getUniformLocation(const std::string &uniform_name);
39  void use();
40  void unuse();
41 };
42 
43 } // yage
44 
45 #endif
Definition: glslprogram.hpp:19
+
Definition: camera2d.hpp:17
+
+ + + + -- cgit