diff options
author | Adrian Kummerlaender | 2018-05-21 21:16:56 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2018-05-21 21:20:08 +0200 |
commit | 617fec827652d216e2d1e5015f816c4400655d73 (patch) | |
tree | c2bdce2d375bebc4b7c9907543d57aeb642f7f82 /src/compute_shader.h | |
parent | a8feed9d7951c9a947562ed687c704851a31ea9b (diff) | |
download | computicle-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/compute_shader.h')
-rw-r--r-- | src/compute_shader.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compute_shader.h b/src/compute_shader.h index a7e997a..9f5c5cb 100644 --- a/src/compute_shader.h +++ b/src/compute_shader.h @@ -18,7 +18,7 @@ public: } }; - Guard use() { + Guard use() const { return Guard(_id); } @@ -31,17 +31,17 @@ public: glDeleteProgram(_id); } - GLuint setUniform(const std::string& name, float x, float y) { + GLuint setUniform(const std::string& name, float x, float y) const { GLuint id = util::getUniform(_id, name); glUniform2f(id, x, y); return id; } - void workOn(GLuint buffer) { + void workOn(GLuint buffer) const { glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 1, buffer); } - void dispatch(std::size_t dimX) { + void dispatch(std::size_t dimX) const { glDispatchCompute(dimX, 1, 1); } }; |