diff options
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); } }; |