Mesh Dynamic
App: apps/mesh_dynamic/
Demonstrates a dynamic mesh: a circle built as a trianglestrip whose vertices are updated every frame (radius and colors animated), then flush() is called so the GPU sees the changes.
Run from root
Section titled “Run from root”% ./plume3d mesh_dynamicor
Run from app directory
Section titled “Run from app directory”% ./../plume3d .What it does
Section titled “What it does”- Creates a trianglestrip with 50 vertices forming a circle (initial radius 0.5).
- Each frame: recomputes position (radius = 0.5 + wave) and color per vertex, then:
_mesh.setVertexAttribute(i, "px", x),"py","r","g","b"._mesh.flush()to upload changes to the GPU.
- Draw mode:
"trianglestrip".