Test App
The repository includes a small OpenGL test app under:
test/Vergeo2D.Mesh.TestApp/It is useful when checking whether mesh generation, deformation, extraction, picking, validation, serialization, and rendering are wired together correctly.
From the Vergeo2D.Mesh repository:
dotnet run --project test/Vergeo2D.Mesh.TestApp/Vergeo2D.Mesh.TestApp.csprojBy default the app loads:
test/Vergeo2D.Mesh.TestApp/assets/character-base.pngPass a custom image path as the first argument:
dotnet run --project test/Vergeo2D.Mesh.TestApp/Vergeo2D.Mesh.TestApp.csproj -- /path/to/image.pngRun smoke checks without opening the interactive preview:
dotnet run --project test/Vergeo2D.Mesh.TestApp/Vergeo2D.Mesh.TestApp.csproj -- --backend all --smokeWhat It Exercises
Section titled “What It Exercises”The test app covers the common end-to-end path:
- loads image dimensions through
Texture2D.LoadFromFile() - adapts image alpha to
IMeshMask2D - adapts decoded alpha bytes through
MeshMask2D.FromAlphaMap()in smoke tests - generates a masked contour mesh from the alpha silhouette
- validates generated meshes through
Mesh2D.Validate()and shows validation status in the panel - generates a connected grid for deformation preview
- highlights nearest vertices and edges through
MeshPicking2D - shows interpolated hover UVs through
MeshPicking2D.TryGetFaceUV() - generates UVs from mesh positions
- round-trips mesh JSON through
Mesh2DSerializerin smoke tests - extracts render buffers with
MeshRenderExtractor - uploads vertices and indices to OpenGL
- uses
RadialDragDeformer2D - commits deformation with
Mesh2D.ApplyDeformer()
Why It Matters
Section titled “Why It Matters”Use the test app as a smoke test after changing:
- grid generation
- mask behavior
- validation diagnostics
- picking helpers
- serializer behavior
- deformer code
MeshRenderExtractor- render buffer layout
- texture loading
If the app can load an image, build the mesh, validate it, pick vertices/edges, draw it, and drag-deform the result, the core path is still connected.