Repository navigation
Conversation
Julian-MW
reviewed
Nov 12, 2026
Julian-MW
left a comment
There was a problem hiding this comment.
Found one rendering-order regression in the OpenGL path. See the inline comment.
There was a problem hiding this comment.
🟡 Changes recommended
Drawing all fills before outlines exposes earlier polygon boundaries over later overlapping fills, regressing the previous OpenGL and GDI rendering order.
1 open issue
What changed in this PR
This PR connects the OpenGL backend to the Core triangulation introduced in #66, enabling GPU rendering of concave polygons, holes, and multipart geometry without COM interface changes.
Changes:
- Replaces
GL_POLYGONfills with indexed triangles and draws outlines from original rings. - Validates meshes and falls back to GDI when any polygon lacks a usable mesh.
- Adds geometry-support and rendering tests, including sampled GDI/OpenGL comparisons.
Builds and tests were not run during this review.
| File | Description |
|---|---|
tests/MapWinGIS.ActiveX.Tests/VectorLayerRendererTests.cpp |
Adds mesh preparation, rendering checks, and fallback coverage. |
tests/MapWinGIS.ActiveX.Tests/OpenGlVectorLayerRendererTestAccess.h |
Exposes scene-support checks without an OpenGL context. |
src/MapWinGIS.ActiveX/OpenGlVectorLayerRenderer.h |
Documents mesh-based rendering and declares the support hook. |
src/MapWinGIS.ActiveX/OpenGlVectorLayerRenderer.cpp |
Validates meshes, renders indexed fills, and outlines original rings. |
.ai/memory/architecture/activex.md |
Updates the documented OpenGL support contract. |
Review effort: Balanced
pmeems
added a commit
that referenced
this pull request
Nov 13, 2026
…s unavailable OpenGlRendersPolygonWithInteriorRing is the only OpenGL pixel test that draws through the auto-selecting VectorLayerRenderer. On runners without an OpenGL context it silently fell back to GDI, which leaves the host background untouched and strokes the ring outline, so the OpenGL-specific pixel assertions failed (PR #68 CI). Skip when the coordinator did not select OpenGL, matching how the other OpenGL rendering tests behave.
pmeems
force-pushed
the
polygon-triangulation-opengl
branch
2 times, most recently
from
November 13, 2026 16:14
f584a11 to
c061c7e
Compare
- Fill polygons with indexed triangle meshes via glVertexPointer and glDrawElements - Draw outlines from the original rings instead of triangle edges - Accept concave, holed and multipart scenes; drop the convexity checks - Reject scenes whose polygons lack a usable fill mesh so the coordinator falls back to GDI - Extend renderer tests with concave, holed, multipart and GDI-equivalence coverage - Update the ActiveX architecture memory to the mesh-based rendering model
…s unavailable OpenGlRendersPolygonWithInteriorRing is the only OpenGL pixel test that draws through the auto-selecting VectorLayerRenderer. On runners without an OpenGL context it silently fell back to GDI, which leaves the host background untouched and strokes the ring outline, so the OpenGL-specific pixel assertions failed (PR #68 CI). Skip when the coordinator did not select OpenGL, matching how the other OpenGL rendering tests behave.
- Fill and outline each polygon before advancing to the next one so overlapping polygons in one layer match the GDI backend's painter order - Add a GDI/OpenGL parity test for overlapping polygons in one layer
- Record that Viewport::MapToScreen flips the y axis, so renderer pixel tests must convert map coordinates to device pixels before sampling
pmeems
force-pushed
the
polygon-triangulation-opengl
branch
from
November 13, 2026 20:04
c061c7e to
03f0582
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Phase 2 of the polygon triangulation plan: the OpenGL backend now consumes the Core-prepared triangle meshes instead of
GL_POLYGON, so concave polygons, interior rings and multipart geometries render on the GPU.Depends on #66 (stacked; base branch is
polygon-triangulation-core).What changed
glVertexPointer,glDrawElements,glEnableClientState); noGL_POLYGONremains.VectorRenderScene, so exterior, hole and multipart boundaries are preserved and internal triangle edges are never outlined.GL_POLYGONapproximation.Tests
Debug | x64builds with no new Level 4 warnings;MapWinGIS.Core.Tests: 311 passed (1 pre-existing network skip);MapWinGIS.ActiveX.Tests: 65 passed (2 pre-existing skips).Memory
.ai/memory/architecture/activex.md: replaced the "convex single-ring only" limit with the mesh-based backend contract. No new memory files.