Commit badac240 by Philipp Adolf

Move shader release call

parent 20946860
......@@ -315,6 +315,8 @@ void Subdivision::runShader(Input input, Tables &tables) {
f->glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 1, 0);
f->glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 2, 0);
edgeShader->release();
// Map the output buffer so we can read the results
f->glBindBuffer(GL_SHADER_STORAGE_BUFFER, output_handle);
Vertex *ptr;
......@@ -327,6 +329,4 @@ void Subdivision::runShader(Input input, Tables &tables) {
// Delete the buffers the free the resources
f->glDeleteBuffers(1, &edge_indices_handle);
f->glDeleteBuffers(1, &output_handle);
edgeShader->release();
}
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