Commit 665fef3c by Philipp Adolf

Increase size of output vertex buffer

parent 5212054f
......@@ -726,7 +726,7 @@ Subdivision::Result Subdivision::runShader(Input input, Tables &tables) {
GLuint output_handle;
f->glGenBuffers(1, &output_handle);
f->glBindBuffer(GL_SHADER_STORAGE_BUFFER, output_handle);
f->glBufferData(GL_SHADER_STORAGE_BUFFER, (input.vertex_buffer.size() + tables.edge_indices.size() / 4) * sizeof(Vertex), NULL, GL_DYNAMIC_DRAW);
f->glBufferData(GL_SHADER_STORAGE_BUFFER, (input.vertex_buffer.size() + tables.edge_indices.size() / 4 + (tables.vertex_offsets.size() - 1)) * sizeof(Vertex), NULL, GL_DYNAMIC_DRAW);
result.vb_handle = output_handle;
f->glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0);
......
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