Commit 20946860 by Philipp Adolf

Move shader bind call

parent fdf3d862
...@@ -284,8 +284,6 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) { ...@@ -284,8 +284,6 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
void Subdivision::runShader(Input input, Tables &tables) { void Subdivision::runShader(Input input, Tables &tables) {
qDebug()<<"Running compute shader"; qDebug()<<"Running compute shader";
edgeShader->bind();
// Create an input buffer and set it to the value of offset // Create an input buffer and set it to the value of offset
GLuint edge_indices_handle; GLuint edge_indices_handle;
f->glGenBuffers(1, &edge_indices_handle); f->glGenBuffers(1, &edge_indices_handle);
...@@ -300,6 +298,8 @@ void Subdivision::runShader(Input input, Tables &tables) { ...@@ -300,6 +298,8 @@ void Subdivision::runShader(Input input, Tables &tables) {
f->glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0); f->glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0);
edgeShader->bind();
f->glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 0, input.vb_handle); f->glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 0, input.vb_handle);
f->glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 1, edge_indices_handle); f->glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 1, edge_indices_handle);
f->glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 2, output_handle); f->glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 2, output_handle);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment