Repository navigation
Conversation
- Build polygon scenes without triangulation by default. - Add mesh-free GDI and OpenGL outline rendering. - Preserve explicit fill-mesh preparation and GDI fallback. Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Two regression tests can pass or skip without exercising OpenGL, leaving staging-buffer preservation and outline validation inadequately verified.
2 open issues
What changed in this PR
Implements Phase 2 of the rendering performance plan by making polygon triangulation optional during scene creation. This avoids unnecessary preparation work for GDI rendering and OpenGL outlines.
Changes:
- Makes fill meshes opt-in while preserving source rings and bounds.
- Adds outline-only rendering through both backends, retaining GDI fallback for OpenGL fills without usable meshes.
- Updates regression tests, benchmarks, documentation, and phase tracking.
Builds and tests were not run during this review.
| File | Description |
|---|---|
tests/MapWinGIS.Core.Tests/VectorRenderSceneTests.cpp |
Checks that default scenes contain no fill meshes. |
tests/MapWinGIS.Core.Tests/PolygonTriangulationTests.cpp |
Explicitly requests meshes for triangulation tests. |
tests/MapWinGIS.Core.Tests/PerformanceDiagnosticsTests.cpp |
Distinguishes default preparation from requested triangulation. |
tests/MapWinGIS.Core.Tests/MapViewTests.cpp |
Explicitly prepares meshes for viewport-reuse coverage. |
tests/MapWinGIS.Core.Tests/MapRenderSceneTests.cpp |
Checks mesh-free defaults across visible layers. |
tests/MapWinGIS.ActiveX.Tests/VectorLayerRendererTests.cpp |
Adds mesh-free outline and mode-specific support tests. |
tests/MapWinGIS.ActiveX.Tests/RenderingBaselineTests.cpp |
Measures OpenGL outlines and explicitly prepared fills. |
tests/MapWinGIS.ActiveX.Tests/OpenGlVectorLayerRendererTestAccess.h |
Exposes mode-aware support checks to tests. |
src/MapWinGIS.Core/src/rendering/VectorRenderScene.cpp |
Updates the file header to describe optional triangulation. |
src/MapWinGIS.Core/include/mapwingis/rendering/VectorRenderScene.h |
Disables mesh preparation by default and documents the contract. |
src/MapWinGIS.Core/include/mapwingis/rendering/MapRenderScene.h |
Documents mesh-free map scene defaults. |
src/MapWinGIS.ActiveX/VectorRenderBackend.h |
Defines fill and outline modes in the backend interface. |
src/MapWinGIS.ActiveX/VectorLayerRenderer.h |
Adds a render-mode argument to the coordinator. |
src/MapWinGIS.ActiveX/VectorLayerRenderer.cpp |
Forwards the requested mode to both backends. |
src/MapWinGIS.ActiveX/OpenGlVectorLayerRenderer.h |
Declares mode-aware validation and rendering. |
src/MapWinGIS.ActiveX/OpenGlVectorLayerRenderer.cpp |
Draws outlines without requiring or submitting fill meshes. |
src/MapWinGIS.ActiveX/GdiVectorLayerRenderer.h |
Accepts the render-mode argument. |
src/MapWinGIS.ActiveX/GdiVectorLayerRenderer.cpp |
Uses a null brush for outline-only drawing. |
docs/TESTING.md |
Updates benchmark behavior and historical context. |
docs/ARCHITECTURE.md |
Documents optional meshes and backend fallback behavior. |
.github/plans/Vector-Rendering-Performance-Improvement.md |
Marks Phase 2 complete and records deferred work. |
.ai/memory/architecture/activex.md |
Records mesh-free scenes and OpenGL outline support. |
Review effort: Balanced
pmeems
left a comment
There was a problem hiding this comment.
Automated review. Final decision is with the human reviewer.
No additional findings beyond the two existing open OpenGL test-coverage comments. Their line findings were not duplicated.
- Seed an explicitly triangulated layer for scaled-draw staging checks. - Require outline rendering after an OpenGL availability probe succeeds. Co-authored-by: Copilot <[email protected]>
Julian-MW
left a comment
There was a problem hiding this comment.
Automated review. Final decision is with the human reviewer.
I reviewed the changed files and the surrounding rendering paths, including the mesh-preparation default, GDI/OpenGL fill and outline behavior, backend fallback, and the tests added/updated for the new behavior. I found no new actionable issues.

Motivation
Polygon triangulation accounted for most scene-preparation time even when the initial rendering path only needed source geometry or outlines.
Context
Implements Phase 2 of the vector rendering performance plan on top of the Phase 1 diagnostics and benchmark coverage.
Key design decisions
.ai/memory/architecture/activex.mdto record the mesh-free scene and outline behavior.Dependencies and validation
Phase 3 will add lazy OpenGL fill triangulation, followed by cache work in Phase 4. CMake Debug x64 built successfully with no C++ warnings; CTest passed 451/451 non-interactive tests (four expected skips).