-
9 #ifndef YAGE_RENDER_SHADER_H
-
10 #define YAGE_RENDER_SHADER_H
-
-
12 #include <glad/glad.h>
-
13 #include <glm/glm.hpp>
-
-
-
-
-
-
-
-
-
-
23 Shader(
const std::string &vertex_path,
const std::string &fragment_path);
-
-
-
-
-
-
-
-
-
-
35 void setUniform(
const std::string &name,
int value)
const;
-
36 void setUniform(
const std::string &name,
float value)
const;
-
37 void setUniform(
const std::string &name,
const glm::mat4 &matrix)
const;
-
-
-
41 GLuint program_id_ = 0;
-
-
43 GLint getUniformLocation(
const std::string &uniform_name)
const;
-
44 void errorCheck(GLuint shader,
const std::string &shader_type)
const;
-
-
-
-
-
+
+
+
11 #include <glad/glad.h>
+
12 #include <glm/glm.hpp>
+
+
+
+
+
+
+
+
+
+
22 Shader(
const std::string &vertex_path,
const std::string &fragment_path);
+
+
+
+
+
+
+
+
+
+
34 void setUniform(
const std::string &name,
int value)
const;
+
35 void setUniform(
const std::string &name,
float value)
const;
+
36 void setUniform(
const std::string &name,
const glm::mat4 &matrix)
const;
+
+
+
40 GLuint program_id_ = 0;
+
+
42 GLint getUniformLocation(
const std::string &uniform_name)
const;
+
43 void errorCheck(GLuint shader,
const std::string &shader_type)
const;
+
+
+
Shader & operator=(const Shader &)=delete
Shader(const std::string &vertex_path, const std::string &fragment_path)
Definition: shader.cpp:22
void setUniform(const std::string &name, int value) const
set uniforms of different type
Definition: shader.cpp:87
-
+
~Shader()
Definition: shader.cpp:74
void use() const
compiles vertex and fragment shader
Definition: shader.cpp:82