aboutsummaryrefslogtreecommitdiff
path: root/src/shader/wrap
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader/wrap')
-rw-r--r--src/shader/wrap/graphic_shader.cc6
-rw-r--r--src/shader/wrap/graphic_shader.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/shader/wrap/graphic_shader.cc b/src/shader/wrap/graphic_shader.cc
index c891730..20fc222 100644
--- a/src/shader/wrap/graphic_shader.cc
+++ b/src/shader/wrap/graphic_shader.cc
@@ -42,6 +42,12 @@ GLuint GraphicShader::setUniform(const std::string& name, int value) const {
return id;
}
+GLuint GraphicShader::setUniform(const std::string& name, GLuint value) const {
+ GLuint id = util::getUniform(_id, name);
+ glUniform1ui(id, value);
+ return id;
+}
+
GLuint GraphicShader::setUniform(const std::string& name, const std::vector<GLuint>& v) const {
GLuint id = util::getUniform(_id, name);
glUniform1iv(id, v.size(), reinterpret_cast<const GLint*>(v.data()));
diff --git a/src/shader/wrap/graphic_shader.h b/src/shader/wrap/graphic_shader.h
index dcae6db..83fca34 100644
--- a/src/shader/wrap/graphic_shader.h
+++ b/src/shader/wrap/graphic_shader.h
@@ -25,6 +25,7 @@ public:
~GraphicShader();
GLuint setUniform(const std::string& name, int value) const;
+ GLuint setUniform(const std::string& name, GLuint value) const;
GLuint setUniform(const std::string& name, const std::vector<GLuint>& v) const;
GLuint setUniform(const std::string& name, glm::mat4& M) const;
};