CNA-PLAT-003: EasyGL on GLES/WebGL contexts without GL_NV_polygon_mode or WEBGL_polygon_mode refuses most wireframe triangle draws
Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit c1c316b9; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.
Without a polygon-mode extension EasyGL draws only two bounded stock routes as line loops (non-indexed PositionColor and indexed PositionNormal TriangleLists); every other FillMode::WireFrame triangle draw throws NotSupportedException.
- Identifier
CNA-PLAT-003- Category
- Platform limitation
- Subsystem
- Graphics & renderers
- Status
- Narrowed (partially fixed; describes only what survives)
- Verified against
- CNA
c1c316b9(c1c316b9c7a846ce8002809c151fcd1af14942c9) - Evidence basis
- Source-verified: read at TARGET, not executed
- Tests touching this area
- Yes: see Current tests
- Affected contract
- RasterizerState.FillMode = WireFrame on the GLES and WebGL EasyGL profiles
Expected behaviour
XNA HiDef supports wireframe fill; OpenGL ES and WebGL have no polygon mode unless an extension provides it.
Actual behaviour at TARGET
EasyGLRenderer.cpp's RequireSupportedFillModeEXT throws NotSupportedException for TriangleList/TriangleStrip draws when wireframe is requested and neither extension is present, with a message pointing at SupportsCapability(GraphicsCapability::WireFrame), unless the draw qualifies for one of two bounded stock routes that draw each triangle as a line loop. CanDrawStockWireframeAsLineLoops takes a single-stream, non-indexed VertexPositionColor TriangleList drawn with the stock effect, clipped in homogeneous space, with no culling, depth, stencil, scissor, bias, multisampling or render target. CanDrawStockIndexedWireframeAsLineLoops takes an indexed 24-byte VertexPositionNormal TriangleList with the stock lit program, keeping face culling and the depth test. TriangleStrip, other vertex layouts, custom, compiled, skinned or PBR effects, render targets, multisampling, scissor, stencil and depth bias still throw, and GraphicsCapability::WireFrame remains false.
Fixed since first recorded: the two line-loop routes (SAMPLE-048, 251bf6c98 and 96b5038de; SAMPLE-055, cefe6c83b).
Source locations
modules/renderers/easygl/src/EasyGLRenderer.cpp— EasyGLRenderer::RequireSupportedFillModeEXT, CanDrawStockWireframeAsLineLoops and CanDrawStockIndexedWireframeAsLineLoopsmodules/renderers/easygl/tests/CNA/Internal/Renderers/EasyGL/EasyGLWireFrameContractTests.cpp— EasyGLUnsupportedWireFrameTest: both line-loop routes and the refusals
Evidence
Checked by reading the named sources at c1c316b9; nothing was built or executed for this entry.
Independent re-verification: Checked by reading the named sources at c1c316b9; nothing was built or executed for this entry. The shared WireFrame tests (GraphicsDeviceCapabilityTests.cpp) assert that the reported capability matches the actual draw, so both the positive and the refusal arm exist. In CI they run only in the unfiltered general job, which builds the OPENGLES3 identity (an ES context); platform-ci's OPENGL33 leg runs smoke games rather than these fixtures, so no CI job runs them on desktop GL, and which arm the CI ES context takes depends on whether it exposes GL_NV_polygon_mode.
Re-verified at b0e97bb1: 251bf6c98 and 96b5038de (SAMPLE-048) added the non-indexed PositionColor line-loop route and cefe6c83b (SAMPLE-055) the indexed PositionNormal route; RequireSupportedFillModeEXT still throws for every other wireframe triangle draw. Not executed.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
EasyGLUnsupportedWireFrameTest (EasyGLWireFrameContractTests.cpp) covers both line-loop routes and the refusals (multi-stream, instanced and SpriteBatch triangle routes; cull, bias, clipping, multisampling and two-sided stencil state).
Regression test
A GLES/WebGL context test that asserts the capability is false and the draw throws.
Blast radius
Debug wireframe views and wireframe art styles on mobile and browser builds.
Workaround
Check the WireFrame capability and fall back to Solid, or draw line lists.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- Deep dives
- EasyGL semantics: wireframe
- Known issues
- Platform limitation index