Commit 143894a1 by Philipp Adolf

Just reuse vertices and indices if all regular

parent 182c5e2e
......@@ -71,6 +71,9 @@ void Subdivision::subdivide(Mesh *mesh, int level) {
input.vertex_buffer = entry->vertices;
input.index_buffer = entry->indices;
if (input.index_buffer.isEmpty()) {
current_mesh->update(input.vb_handle, input.vertex_buffer, input.index_buffer, entry->indicesRegular);
} else {
Tables tables = precomputeTables(input);
Result result = runShader(input, tables);
......@@ -86,8 +89,7 @@ void Subdivision::subdivide(Mesh *mesh, int level) {
qDebug() << "patches" << patches.length();
current_mesh->update(result.vb_handle, result.vertex_buffer, irregular, patches);
//return new Mesh(f, mesh, result.vertex_buffer, tables.index_buffer);
}
}
/**
......
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