Skip to content

build: add platform GL header plumbing - #19

Closed
tritao wants to merge 31 commits into
stack/compatibility-boundaryfrom
stack/platform-build-plumbing
Closed

build: add platform GL header plumbing#19
tritao wants to merge 31 commits into
stack/compatibility-boundaryfrom
stack/platform-build-plumbing

Conversation

@tritao

@tritao tritao commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add the platform and installation support required by the profile-aware GL header model.

  • Make the vendored Khronos core headers available in the build tree under the Inventor namespace.
  • Install the namespaced glcorearb.h and khrplatform.h headers for core-profile consumers.
  • Route installed core headers through the namespaced Khronos snapshot while internal builds use the private copy.
  • Add fallback GL declarations needed by supported platform header combinations.
  • Run compatibility/core builds on Windows and macOS in addition to the inherited Linux matrix.

Scope

This layer contains platform/header/install plumbing and the cross-platform build matrix. Shared profile-safe GL infrastructure and LegacyGL semantics belong to PR #16; workflow modernization, installed-package consumers, and final test selection belong to PRs #25 and #17.

Warning cleanup and -Werror changes remain outside this stack in PR #10.

Stack

Layer 6/8, based on PR #16.

@tritao tritao changed the title stack/platform build plumbing build: port platform fixes for core configurations Aug 8, 2026
@tritao
tritao force-pushed the stack/platform-build-plumbing branch from 0f14f15 to 2d63c30 Compare August 8, 2026 00:17
@tritao
tritao force-pushed the stack/compatibility-boundary branch 2 times, most recently from 438c680 to 9d5aa7b Compare August 8, 2026 00:42
@tritao
tritao force-pushed the stack/platform-build-plumbing branch from 2d63c30 to 6b622cd Compare August 8, 2026 00:42
@tritao
tritao force-pushed the stack/compatibility-boundary branch from 9d5aa7b to 17f663a Compare August 8, 2026 01:07
@tritao
tritao force-pushed the stack/platform-build-plumbing branch from 6b622cd to 97b1525 Compare August 8, 2026 01:07
@tritao
tritao force-pushed the stack/compatibility-boundary branch from 17f663a to 5534301 Compare August 8, 2026 01:20
@tritao
tritao force-pushed the stack/platform-build-plumbing branch 3 times, most recently from b10e8ee to b606173 Compare August 8, 2026 01:24
@tritao
tritao force-pushed the stack/compatibility-boundary branch from 00e03cf to 32b1cf7 Compare August 8, 2026 01:30
@tritao
tritao force-pushed the stack/platform-build-plumbing branch from b606173 to e29f428 Compare August 8, 2026 01:30
@tritao
tritao force-pushed the stack/compatibility-boundary branch from 32b1cf7 to e850c17 Compare August 8, 2026 01:51
@tritao
tritao force-pushed the stack/platform-build-plumbing branch 2 times, most recently from 1b4f385 to 6802342 Compare August 8, 2026 01:57
@tritao
tritao force-pushed the stack/compatibility-boundary branch from e850c17 to 0503981 Compare August 8, 2026 01:57
@tritao
tritao force-pushed the stack/platform-build-plumbing branch from 6802342 to 5ee4e10 Compare August 8, 2026 02:04
@tritao
tritao force-pushed the stack/compatibility-boundary branch 2 times, most recently from 4b9f662 to 9e20664 Compare August 8, 2026 02:32
@tritao
tritao force-pushed the stack/platform-build-plumbing branch from 5ee4e10 to 5ae2276 Compare August 8, 2026 02:32
@tritao
tritao marked this pull request as ready for review August 8, 2026 02:36
@tritao
tritao force-pushed the stack/compatibility-boundary branch from 9e20664 to 654a702 Compare August 8, 2026 02:54
@tritao
tritao force-pushed the stack/platform-build-plumbing branch 2 times, most recently from 500fe2d to 36b0f70 Compare August 8, 2026 10:17
@tritao
tritao force-pushed the stack/compatibility-boundary branch from 0af09b0 to 96e1679 Compare August 8, 2026 10:27
@tritao
tritao force-pushed the stack/platform-build-plumbing branch from 36b0f70 to 274bf2e Compare August 8, 2026 10:27
@tritao
tritao force-pushed the stack/compatibility-boundary branch from 96e1679 to 9898668 Compare August 8, 2026 11:06
tritao added 23 commits August 9, 2026 03:01
Migrate GLSL shader objects, programs, and parameter updates from direct ARB calls to the private profile-neutral glue. Object creation, source submission, compilation, diagnostics, attachment, linking, program use, uniform lookup, and deletion now use one core-or-ARB implementation path.

Keep the existing shader diagnostic behavior and source handling unchanged in this layer. Compatible uniform operations call the resolved function pointers directly, while private adapters remain only for the object APIs whose core and ARB signatures differ.
Create a surfaceless core-profile context and exercise the profile-neutral shader path from creation through compilation, linking, program use, uniform lookup, uniform update, and cleanup.

Call the resolved glue pointers directly so the test covers the private dispatch table without depending on public shader wrapper symbols. Keep the test EGL-gated so unavailable offscreen contexts skip cleanly.
Enable vertex and fragment GLSL support when the active context provides OpenGL 2.0 or ARB_shader_objects, regardless of whether the context is core or compatibility profile.

Keep geometry shaders constrained to Coin's existing EXT_geometry_shader4 path instead of claiming generic OpenGL 3.2 support that the current implementation does not provide.
Track the originating shader file or a concise inline-source hint and include it in compiler and linker diagnostics. Report failed compilation and linking explicitly while preserving the existing private profile-neutral dispatch.

Keep source attribution independent from shader source rewriting so diagnostics can identify a source without modifying the submitted GLSL text.
Keep runtime profile detection and offscreen readback changes in the shared rendering layer. Select texture formats through the GL glue based on the active context, and preserve readback state without issuing compatibility-only pixel transfer operations in core contexts. Legacy texture and index-buffer helpers stay outside this layer so the compatibility boundary remains the owner of fixed-function resource behavior.
Purpose: keep compatibility-only GL helpers and display-list operations out of core-profile builds while preserving the public rendering interfaces.

Why: compile-time legacy support, active-context capability, and retained traversal must remain separate. Core builds must not reference fixed-function helpers, and compatibility resources must have a coherent lifetime boundary.

How: isolate ancillary material and texture-combine helpers, guard the legacy light-limit query, and keep display-list allocation, compilation, and teardown behind the compatibility build boundary.
Core-profile builds must not compile legacy GL element implementations that require fixed-function declarations. The generated OpenGL header is selected once for the configured renderer profile, so a per-target compatibility override cannot provide a valid core build.

Compile the GL element sources only when the legacy renderer is enabled, and include their object target only in compatibility libraries. Core-only builds intentionally omit the legacy GL element implementations and do not preserve ABI compatibility with legacy-renderer Coin builds.
Applications and public headers still depend on SoGLRenderAction even when rendering is routed through retained geometry.

Keep the action API and its state-management contract available in core builds while isolating legacy traversal and compatibility-only execution behind the established boundary.
Regular Coin and VRML nodes still contain legacy traversal code that uses fixed-function OpenGL operations. Core-profile translation units must not inherit those calls merely because the node interfaces remain shared.

Compile the compatibility-only node elements and traversal helpers behind the legacy renderer boundary while retaining the logical node and action interfaces needed by retained rendering. This keeps compatibility behavior intact and leaves core contexts on the retained path.
Build capability and active-context capability are different: a compatibility implementation may be compiled into the library even when a particular context cannot execute legacy traversal.

Enforce the runtime policy at the render-action and GL boundary, reject legacy traversal before fixed-function calls, and cover the behavior with LegacyBoundaryTests.cpp. Retained rendering remains available for core contexts.
The public action and render-manager interfaces remain available in core-only builds, but their legacy traversal and fixed-function execution paths must not be compiled or entered without compatibility support.

Keep the compatibility object wiring and manager stubs together so profile selection remains an explicit implementation boundary while existing APIs remain source-compatible.
Regular Coin and VRML nodes still expose the legacy traversal interfaces, but their fixed-function rendering code cannot be compiled into a core-profile translation unit.

Guard the traversal and primitive-cache implementations while retaining the logical node and action APIs required by the retained path. Core contexts therefore avoid compatibility-only operations without changing legacy rendering behavior.
SoGLImage remains part of the legacy resource path. In core-only builds, keep its public implementation compilable without referencing the removed GL_CLAMP enum, while preserving the existing compatibility-context behavior when the legacy renderer is enabled.
Build the legacy OpenGL action and highlight actions only when the legacy renderer is enabled, and remove the inert core-only action implementation. Guard action initialization and GL element registration with the configured renderer mode so a core-only build does not retain compatibility-only traversal dependencies.

Keep profile-neutral error diagnostics available in both configurations while compiling fixed-function rendering helpers only for LegacyGL. Make the generated renderer macro an explicit numeric value and remove the compatibility-header override that could silently change the configured build mode.
@tritao
tritao force-pushed the stack/compatibility-boundary branch from eb617ed to 7a2272e Compare August 9, 2026 02:03
Install Coin's vendored Khronos core headers under the Inventor namespace and make the same headers available to build-tree consumers. Keep internal compilation on the private snapshot while installed core-profile consumers use the namespaced path.

Add the Windows and macOS compatibility/core renderer matrix alongside the existing Linux jobs. Keep renderer-boundary semantics in the lower compatibility layer and limit this layer to platform headers, installation plumbing, and cross-platform validation.
@tritao
tritao force-pushed the stack/platform-build-plumbing branch from 7f056e2 to 4b48670 Compare August 9, 2026 02:05
@tritao
tritao force-pushed the stack/compatibility-boundary branch from 7a2272e to 4f38785 Compare August 9, 2026 02:35
@tritao

tritao commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by the rewritten stack: the Khronos/header/fallback/install changes now live in #11, and the cross-platform LegacyGL ON/OFF matrix now lives in #17. No platform-build-plumbing layer remains in the stack.

@tritao tritao closed this Aug 9, 2026
@tritao
tritao deleted the stack/platform-build-plumbing branch August 9, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant