diff options
Diffstat (limited to 'src/compute_shader.h')
-rw-r--r-- | src/compute_shader.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compute_shader.h b/src/compute_shader.h index 298a454..a7e997a 100644 --- a/src/compute_shader.h +++ b/src/compute_shader.h @@ -1,3 +1,5 @@ +#pragma once + #include "util.h" class ComputeShader { @@ -35,6 +37,10 @@ public: return id; } + void workOn(GLuint buffer) { + glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 1, buffer); + } + void dispatch(std::size_t dimX) { glDispatchCompute(dimX, 1, 1); } |