Skip to content

REFAC: Adds dynamic flag, avoiding GPU vertex buffer upload & CPU normal...

Andrew Wilson requested to merge andrew.wilson/iMSTK:DynamicMeshToggle into master

Adds the dynamic flag which can be used to avoid GPU vertex buffer upload & CPU normal recomputation which may incur large costs depending on the rendering. This is similar to "MarkDynamic" in Unity. However the underlying GPU buffer is not marked as static and read only, not sure if that's possible to do in VTK but would be an improvement as well.

By default everything is dynamic. As that how iMSTK currently operates (prior to this MR). In the future (with ECS specifically) we should explore defaulting dynamic off & automatically turning it on when models are present.

This MR also applies it in a few examples.

Edited by Andrew Wilson

Merge request reports