fix(poc): un-rot the OpenGL renderer (ADR-0039) + headless GL CI gate#31
Merged
Conversation
The out-of-SDK PoC OpenGL renderer named the value types (SFVec3f, SFColor, SFImage, SFColorRGBA, ...) and node types (X3DNode) unqualified, from before ADR-0039 moved them into x3d::core / x3d::nodes. It hadn't compiled since. Like the cpuraster fix, pull both namespaces in (scoped) rather than qualify 69 call sites. Also corrects a stale comment that documented the pre-ADR-0039 global-namespace layout. Neither example consumer is built by 'mise run ci', so both silently rotted on the namespace move. Verified headless: --headless probe (32 items) and the GL --screenshot path under 'xvfb-run' both exit 0 and render the NURBS teapot.
The two out-of-SDK consumers (cpu_raster, poc_renderer) are OFF by default and never built by 'mise run ci', so ADR-0039's namespace move silently rotted both. Close the blind spot: - scripts/validate-examples.sh: single source of truth — builds BOTH examples, runs their --headless probes, and exercises the poc OpenGL pipeline headlessly via --screenshot under xvfb-run + mesa software GL (llvmpipe), asserting exit 0 and a non-empty frame. Mirrors sibling ../x3d-render's offscreen-GL approach. - mise.toml: 'mise run validate-examples' runs the script. - .github/workflows/ci.yml: new unconditional 'examples-gate' job (every PR) installs xvfb + mesa-dri + GLFW's X11/Wayland build deps and runs the script. - poc README + main.cpp header: document the headless GL validation; drop the now-false 'never executed headless in CI' claim. __GLX_VENDOR_LIBRARY_NAME=mesa forces software GL where a GPU GLX driver is also present (NVIDIA ignores LIBGL_ALWAYS_SOFTWARE); GPU-less CI lands on llvmpipe.
--animate <dir> --fps <n> --duration <s>: drive the event graph at a FIXED dt (frame/fps, starting at +dt so it is strictly increasing past the bring-up tick(0)) and dump every frame as <dir>/frame_NNNN.ppm, then exit. Deterministic, loop-seamless capture of the realtime GL loop (interpolators/sequencers/ROUTEs) for headless demo reels — the testbed used to find SW-DELTA-1 by diffing the PoC's incremental delta() output against cpuraster's full-snapshot output.
51882b4 to
6699de1
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.
Why
The OpenGL example consumer (
examples/poc_renderer/) hadn't compiled since ADR-0039 moved the value types intox3d::coreand node types intox3d::nodes: it namedSFVec3f/SFColor/SFImage/SFColorRGBA/X3DNode&c. 69 times unqualified, with nousing namespace. It went unnoticed because neither renderer consumer (cpu_raster,poc_renderer) is built bymise run ci— the exact same blind spot that rotted cpuraster (#28). Onemain.cppcomment even still documented the pre-ADR-0039 global namespace.What
Fix the drift — pull both namespaces in (scoped), mirroring the cpuraster fix, rather than qualifying 69 sites. Fix the stale comment in
input.cpp.Close the blind spot with a real headless gate. A new unconditional CI job
examples-gate(every PR) andmise run validate-examplesboth callscripts/validate-examples.sh, which:--headlessprobe (no GL),poc --screenshotunderxvfb-run+ mesa software GL (llvmpipe), asserting exit 0 + a non-empty frame.This mirrors the sibling
../x3d-rendervalidation path (GLFW offscreen +glReadPixels).__GLX_VENDOR_LIBRARY_NAME=mesaforces software GL where a GPU GLX driver is also present (NVIDIA ignoresLIBGL_ALWAYS_SOFTWARE); a GPU-less CI runner lands on llvmpipe automatically.Verified locally
Both examples build; both
--headlessprobes report 5 render items onraster_smoke.x3d; the Xvfb--screenshotpath renders a 1280×720 frame, exit 0. As an extra check, the same OpenGL pipeline rendered the NURBS teapot patch-for-patch identically to the CPU rasterizer — two independent consumers of the extraction seam, both correct, both headless.Renderer-side breaks in either consumer can no longer hide from CI.