Skip to content

build: establish profile-aware OpenGL headers - #11

Merged
tritao merged 5 commits into
freecad-masterfrom
stack/gl-foundation
Aug 28, 2026
Merged

build: establish profile-aware OpenGL headers#11
tritao merged 5 commits into
freecad-masterfrom
stack/gl-foundation

Conversation

@tritao

@tritao tritao commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Establish the profile-aware OpenGL header and build-configuration foundation used by the rest of the renderer stack.

  • Vendor pristine Khronos core OpenGL and WGL headers privately, with exact upstream provenance.
  • Keep Inventor/system/gl.h as Coin's public OpenGL abstraction and isolate compatibility enum fallbacks in gl-fallbacks.h.
  • Select private core-profile headers only while compiling Coin; installed consumers continue to use normal platform OpenGL headers.
  • Add explicit LegacyGL build configuration while keeping compatibility rendering enabled by default.
  • Publish the installed COIN_HAVE_LEGACY_GL_RENDERER capability separately from the build option.
  • Validate the installed CMake package through a standalone external consumer.
  • Add initial LegacyGL-disabled core-header/glue coverage without claiming that the complete library is optional yet.
  • Allow CI and CodeQL to run on stacked pull requests.

This layer establishes header and configuration policy only. It does not yet make LegacyGL traversal or implementation units optional.

Stack position

Bottom layer of this stack, based on freecad-master.

@tritao tritao changed the title stack/gl foundation build: establish profile-aware OpenGL headers Aug 8, 2026
@tritao
tritao marked this pull request as ready for review August 8, 2026 00:05
@tritao
tritao force-pushed the stack/gl-foundation branch 4 times, most recently from eea9b79 to 43e186e Compare August 8, 2026 20:44
@tritao
tritao force-pushed the stack/gl-foundation branch 6 times, most recently from f4b4b51 to 55dabed Compare August 11, 2026 14:05
@tritao
tritao changed the base branch from freecad-master to master August 15, 2026 12:03
@Lgt2x

Lgt2x commented Aug 15, 2026

Copy link
Copy Markdown
Member

Was the target branch change intentional @tritao ? The diff is borked

@tritao
tritao force-pushed the stack/gl-foundation branch from 55dabed to 387719d Compare August 15, 2026 23:32
@tritao
tritao changed the base branch from master to freecad-master August 15, 2026 23:34
@tritao

tritao commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator Author

Was the target branch change intentional @tritao ? The diff is borked

Not intentional, it got screwed up somehow, fixed now.

@tritao
tritao force-pushed the stack/gl-foundation branch from 387719d to 3419c65 Compare August 16, 2026 00:25
@tritao
tritao changed the base branch from freecad-master to master August 16, 2026 10:58
@Lgt2x

Lgt2x commented Aug 17, 2026

Copy link
Copy Markdown
Member

it changed again @tritao :(

@tritao
tritao changed the base branch from master to freecad-master August 17, 2026 22:41
@tritao

tritao commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator Author

Fixed again.

@tritao
tritao force-pushed the stack/gl-foundation branch from 3419c65 to cb5f88d Compare August 18, 2026 14:40
Comment thread .github/workflows/codeql.yml
Comment thread .github/workflows/continuous-integration-workflow.yml Outdated
Comment thread .github/workflows/continuous-integration-workflow.yml Outdated
Comment thread include/Inventor/C/basic.h.cmake.in Outdated
Comment thread include/Inventor/C/basic.h.cmake.in
Comment thread src/CMakeLists.txt Outdated
Comment thread testsuite/installed-package-smoke/CMakeLists.txt
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
@tritao
tritao force-pushed the stack/gl-foundation branch 3 times, most recently from 055e2af to 81f03be Compare August 19, 2026 10:46
@tritao

tritao commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for the detailed review. I addressed the feedback as follows:

  • Kept the Khronos headers private and byte-for-byte identical to the recorded upstream revision.
  • Kept installed consumers on normal platform OpenGL headers.
  • Simplified the profile-aware header selection.
  • Left basic.h.in unchanged (we will remove it with that other Automake cleanup PR later).
  • Moved COIN_BUILDING_COIN to gl: add profile-neutral GLSL dispatch and core test support #65 (never intendeded for that change to end up here in the first place)
  • Switched CI to Ninja and parallel builds.
  • Kept pull_request: {} as the explicit unfiltered trigger.
  • Documented the standalone installed-package smoke test.
  • Simplified comments and corrected the PR description and base.

@tritao
tritao force-pushed the stack/gl-foundation branch 2 times, most recently from b3dd88a to 318d293 Compare August 22, 2026 09:49
@Lgt2x

Lgt2x commented Aug 28, 2026

Copy link
Copy Markdown
Member

we will remove it with that other Automake cleanup PR later

is this coin3d#641 or something else? I believe a merge of upstream master into freecad-master is in order

Comment on lines +6 to +7
* Copyright (c) Kongsberg Oil & Gas Technologies AS
* All rights reserved.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As specified by Volker, you can drop this copyright in new files (or those completely modified like this one) and assign yourself or "FreeCAD contributors". Can you do a sweeping change on the PR stack?

*/

/* This define is at least needed before inclusion of the header files
that are part of NVidia's Linux drivers v41.91. Without it, none of

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this driver version? Looks old, nowadays we're in the 5XX range

Comment thread src/glue/khronos/PROVENANCE.txt Outdated
Comment on lines +26 to +27
GL_GLEXT_VERSION: 20190326
WGL_WGLEXT_VERSION: 20190228

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why we use such an old commit. I was unable to find the exact commit hash where the files are imported from, 56a53de has a slightly different glcorearb.h. I think this is important for verification to easily match the imported headers' hashes against official headers.

Comment thread src/glue/khronos/PROVENANCE.txt Outdated
GL_GLEXT_VERSION: 20190326
WGL_WGLEXT_VERSION: 20190228
khrplatform.h semantic commit:
67a3e0864c2d75ea5287b9f3d2eb74a745936692

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a 2017 commit, and the file at this commit is not the same as the one imported, which looks like a more recent version. It would be best to document the actual commit where this is from rather than the one presented as the 'semantic' one

@Lgt2x

Lgt2x commented Aug 28, 2026

Copy link
Copy Markdown
Member

You can freely merge once the last comments are addressed, it's mostly details, only gl headers import traceability is important to me.

@tritao
tritao force-pushed the stack/gl-foundation branch from 318d293 to 0670f86 Compare August 28, 2026 19:10
@tritao
tritao merged commit b4e9f2a into freecad-master Aug 28, 2026
7 checks passed
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.

2 participants