aboutsummaryrefslogtreecommitdiff
path: root/src/compute_shader.h
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-05-21 14:35:43 +0200
committerAdrian Kummerlaender2018-05-21 14:35:43 +0200
commita8feed9d7951c9a947562ed687c704851a31ea9b (patch)
tree77fc9debb4e72ec9f72ba2cb992b164ae4e63b08 /src/compute_shader.h
parentffa662ec5acdaae36f0ffeaf0cee78a4200d897b (diff)
downloadcomputicle-a8feed9d7951c9a947562ed687c704851a31ea9b.tar
computicle-a8feed9d7951c9a947562ed687c704851a31ea9b.tar.gz
computicle-a8feed9d7951c9a947562ed687c704851a31ea9b.tar.bz2
computicle-a8feed9d7951c9a947562ed687c704851a31ea9b.tar.lz
computicle-a8feed9d7951c9a947562ed687c704851a31ea9b.tar.xz
computicle-a8feed9d7951c9a947562ed687c704851a31ea9b.tar.zst
computicle-a8feed9d7951c9a947562ed687c704851a31ea9b.zip
Fix VAO, VBO setup, compute shader coupling
Diffstat (limited to 'src/compute_shader.h')
-rw-r--r--src/compute_shader.h6
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);
}