aboutsummaryrefslogtreecommitdiff
path: root/src/graphic_shader.h
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-05-21 21:16:56 +0200
committerAdrian Kummerlaender2018-05-21 21:20:08 +0200
commit617fec827652d216e2d1e5015f816c4400655d73 (patch)
treec2bdce2d375bebc4b7c9907543d57aeb642f7f82 /src/graphic_shader.h
parenta8feed9d7951c9a947562ed687c704851a31ea9b (diff)
downloadcomputicle-617fec827652d216e2d1e5015f816c4400655d73.tar
computicle-617fec827652d216e2d1e5015f816c4400655d73.tar.gz
computicle-617fec827652d216e2d1e5015f816c4400655d73.tar.bz2
computicle-617fec827652d216e2d1e5015f816c4400655d73.tar.lz
computicle-617fec827652d216e2d1e5015f816c4400655d73.tar.xz
computicle-617fec827652d216e2d1e5015f816c4400655d73.tar.zst
computicle-617fec827652d216e2d1e5015f816c4400655d73.zip
Abstract texture display buffer, shader
Diffstat (limited to 'src/graphic_shader.h')
-rw-r--r--src/graphic_shader.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/graphic_shader.h b/src/graphic_shader.h
index 0422ec9..c93e61b 100644
--- a/src/graphic_shader.h
+++ b/src/graphic_shader.h
@@ -18,7 +18,7 @@ public:
}
};
- Guard use() {
+ Guard use() const {
return Guard(_id);
}
@@ -32,13 +32,13 @@ public:
glDeleteProgram(_id);
}
- GLuint setUniform(const std::string& name, int value) {
+ GLuint setUniform(const std::string& name, int value) const {
GLuint id = util::getUniform(_id, name);
glUniform1i(id, value);
return id;
}
- GLuint setUniform(const std::string& name, glm::mat4& M) {
+ GLuint setUniform(const std::string& name, glm::mat4& M) const {
GLuint id = util::getUniform(_id, name);
glUniformMatrix4fv(id, 1, GL_FALSE, &M[0][0]);
return id;