Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
607349c
build: vendor Khronos core OpenGL headers
tritao Aug 11, 2026
5d4f98f
build: establish profile-aware OpenGL configuration
tritao Aug 11, 2026
f4b4b51
tests: validate profile-aware OpenGL packaging
tritao Aug 11, 2026
7f323fd
egl: preserve caller state and support surfaceless contexts
tritao Aug 11, 2026
a9c9ce6
tests: cover EGL context preservation
tritao Aug 11, 2026
b9baafc
gl: add profile-neutral GLSL dispatch
tritao Aug 11, 2026
81b26f1
shaders: migrate GLSL to profile-neutral dispatch
tritao Aug 11, 2026
6942d47
tests: validate GLSL on core EGL
tritao Aug 11, 2026
3f183a0
shaders: improve GLSL diagnostics and source attribution
tritao Aug 11, 2026
6340ef5
tests: cover GLSL diagnostics
tritao Aug 11, 2026
e0e3523
gl: separate shared context helpers from legacy drawing
tritao Aug 11, 2026
1c6f2d5
gl: make shared OpenGL infrastructure profile-safe
tritao Aug 11, 2026
bb5d5ec
tests: cover core-profile shared GL infrastructure
tritao Aug 11, 2026
30fa67a
rendering: make LegacyGL traversal optional
tritao Aug 11, 2026
74cace5
tests: preserve core traversal without LegacyGL
tritao Aug 11, 2026
37715d4
rendering: decouple scene managers from LegacyGL
tritao Aug 11, 2026
383604a
build: isolate LegacyGL implementation and public API
tritao Aug 11, 2026
1a9ddc8
tests: validate installed LegacyGL capability boundary
tritao Aug 11, 2026
3fad477
legacygl: preserve separate blending state
tritao Aug 11, 2026
ca94f7b
tests: cover separate alpha blending
tritao Aug 11, 2026
f77da0b
rendering: add device-pixel-ratio traversal state
tritao Aug 11, 2026
9e46dcf
tests: cover manager DPR state
tritao Aug 11, 2026
29a5db4
rendering: add backend-neutral retained IR
tritao Aug 11, 2026
c4f829e
rendering: add retained scene traversal action
tritao Aug 11, 2026
01c0daa
rendering: route generic shapes through retained primitive collection
tritao Aug 11, 2026
e06129a
tests: cover retained IR fundamentals
tritao Aug 11, 2026
1799113
rendering: add render backend abstraction
tritao Aug 11, 2026
58960de
gl: add DrawList core-profile dispatch
tritao Aug 11, 2026
6096839
rendering: implement core OpenGL visual backend
tritao Aug 11, 2026
6f0595c
tests: validate core OpenGL DrawList rendering
tritao Aug 11, 2026
2c5f48e
tests: cover retained scene traversal
tritao Aug 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
push:
branches: [ "master", "freecad-master" ]
pull_request:
branches: [ "master", "freecad-master" ]
schedule:
- cron: '21 10 * * 4'

Expand Down
112 changes: 90 additions & 22 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Continuous Integration Build
on:
workflow_dispatch: # Allow manual triggers
pull_request:
branches: [ master, freecad-master ]
#push:
# branches: [ master ]

Expand All @@ -20,77 +19,146 @@ jobs:
uses: docker://rhysd/actionlint:1.7.12

ubuntu-build:
name: Ubuntu Build
name: Ubuntu CI (Legacy renderer ${{ matrix.renderer_state }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- renderer_state: enabled
legacy_gl_renderer: ON
artifact: Ubuntu-Artifacts-LegacyGL-ON
- renderer_state: disabled
legacy_gl_renderer: OFF
artifact: Ubuntu-Artifacts-LegacyGL-OFF
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: recursive
- name: Create build directory and run CMake
- name: Configure
run: |
sudo apt-get -y update
sudo apt-get -y install freeglut3-dev
cmake -S . -B cmake_build_dir -G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=cmake_install_dir \
-DCOIN_BUILD_LEGACY_GL_RENDERER=${{ matrix.legacy_gl_renderer }} \
-DCOIN_BUILD_TESTS=ON \
-DCOIN_BUILD_EXAMPLES=OFF \
-DCOIN_BUILD_DOCUMENTATION=OFF \
-DCOIN_STRICT_WARNINGS=ON
- name: Build project
- name: Build and install
run: cmake --build cmake_build_dir --target install --config Release -- -j4
- name: Check installed package
run: |
cmake -S testsuite/installed-package-smoke -B installed-package-smoke \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/cmake_install_dir"
cmake --build installed-package-smoke --config Release -- -j4
- name: Run tests
run: ctest -C Release -VV
run: ctest -C Release -VV
working-directory: cmake_build_dir
- name: Run core-profile OpenGL tests
if: matrix.renderer_state == 'disabled'
run: ctest -C Release -R '^(EGLBindingTest|GLSLRuntimeTest|OffscreenReadbackTest)$' --output-on-failure
working-directory: cmake_build_dir
- name: Create Artifacts
env:
COIN_EGL: 1
EGL_PLATFORM: surfaceless
COIN_EGL_CORE_PROFILE: 1
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: Ubuntu-Artifacts
name: ${{ matrix.artifact }}
path: cmake_install_dir/
if: always()

windows-build:
name: Windows Build
name: Windows CI (Legacy renderer ${{ matrix.renderer_state }})
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
include:
- renderer_state: enabled
legacy_gl_renderer: ON
artifact: Windows-Artifacts-LegacyGL-ON
- renderer_state: disabled
legacy_gl_renderer: OFF
artifact: Windows-Artifacts-LegacyGL-OFF
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: recursive
- name: Create build directory and run CMake
- name: Configure
shell: cmd
run: |
cmake -S . -B cmake_build_dir -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=cmake_install_dir
- name: Build project
cmake -S . -B cmake_build_dir -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=cmake_install_dir -DCOIN_BUILD_LEGACY_GL_RENDERER=${{ matrix.legacy_gl_renderer }} -DCOIN_BUILD_TESTS=ON
- name: Build and install
run: cmake --build cmake_build_dir --target INSTALL --config Release -- /nologo /verbosity:minimal /maxcpucount:2 /property:MultiProcessorCompilation=true
- name: Check installed package
shell: pwsh
run: |
$smokeSource = Join-Path $env:GITHUB_WORKSPACE "testsuite/installed-package-smoke"
$smokeBuild = Join-Path $env:RUNNER_TEMP "coin-installed-package-smoke"
$installedPrefix = (Join-Path $env:GITHUB_WORKSPACE "cmake_install_dir").Replace('\', '/')
cmake -S $smokeSource -B $smokeBuild -G "Visual Studio 17 2022" -A x64 -DCMAKE_PREFIX_PATH="$installedPrefix"
cmake --build $smokeBuild --config Release
- name: Run tests
run: ctest -C Release -VV
run: ctest -C Release -VV
working-directory: cmake_build_dir
- name: Create Artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: Windows-Artifacts
name: ${{ matrix.artifact }}
path: cmake_install_dir/
if: always()

macos-build:
name: MacOS Build
name: macOS CI (Legacy renderer ${{ matrix.renderer_state }})
runs-on: macos-14
strategy:
fail-fast: false
matrix:
include:
- renderer_state: enabled
legacy_gl_renderer: ON
artifact: macOS-Artifacts-LegacyGL-ON
- renderer_state: disabled
legacy_gl_renderer: OFF
artifact: macOS-Artifacts-LegacyGL-OFF
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: recursive
- name: Create build directory and run CMake
- name: Configure
run: |
cmake -S . -B cmake_build_dir -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=cmake_install_dir -DCMAKE_CXX_STANDARD=11 -DCOIN_STRICT_WARNINGS=ON
- name: Build project
cmake -S . -B cmake_build_dir -G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=cmake_install_dir \
-DCMAKE_CXX_STANDARD=11 \
-DCOIN_STRICT_WARNINGS=ON \
-DCOIN_BUILD_LEGACY_GL_RENDERER=${{ matrix.legacy_gl_renderer }} \
-DCOIN_BUILD_TESTS=ON
- name: Build and install
run: cmake --build cmake_build_dir --target install --config Release -- -j4
- name: Check installed package
run: |
cmake -S testsuite/installed-package-smoke -B installed-package-smoke \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/cmake_install_dir"
cmake --build installed-package-smoke --config Release -- -j4
- name: Run tests
run: ctest -C Release -VV
run: ctest -C Release -VV
working-directory: cmake_build_dir
- name: Create Artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: MacOS-Artifacts
name: ${{ matrix.artifact }}
path: cmake_install_dir/
if: always()

166 changes: 122 additions & 44 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,19 @@ if(COIN_STRICT_WARNINGS)
endif()
endif()

option(COIN_BUILD_LEGACY_GL_RENDERER
"Build Coin's legacy fixed-function OpenGL renderer."
ON)

# Make the renderer selection explicit for every Coin translation unit and
# generated public header. This keeps core-only declarations and definitions
# in sync even when the build uses separate object-library targets.
if(COIN_BUILD_LEGACY_GL_RENDERER)
set(COIN_BUILD_LEGACY_GL_RENDERER_VALUE 1)
else()
set(COIN_BUILD_LEGACY_GL_RENDERER_VALUE 0)
endif()

check_include_file_cxx(thread HAVE_STD_THREAD)
cmake_dependent_option(COIN_DEBUG_CHECK_THREAD "Enable thread check in several central Coin functions." OFF "HAVE_STD_THREAD" OFF)

Expand Down Expand Up @@ -675,7 +688,11 @@ check_include_file(ieeefp.h HAVE_IEEEFP_H)
check_include_file(time.h HAVE_TIME_H)
check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)

check_include_file(windows.h HAVE_WINDOWS_H)
if(WIN32)
check_include_file(windows.h HAVE_WINDOWS_H)
else()
set(HAVE_WINDOWS_H 0)
endif()
if(HAVE_WINDOWS_H)
check_include_file(direct.h HAVE_DIRECT_H)
check_include_files("windows.h;tlhelp32.h" HAVE_TLHELP32_H)
Expand Down Expand Up @@ -759,53 +776,110 @@ if(UNIX AND NOT APPLE AND COIN_BUILD_GLX)
" HAVE_GLX)
endif()

# Helpers to keep GL header logic in one place.
macro(coin_check_gl_headers)
if(COIN_BUILD_LEGACY_GL_RENDERER)
message(STATUS "Legacy GL renderer build enabled; using compatibility headers")
if(HAVE_WINDOWS_H)
check_include_files("windows.h;GL/gl.h" HAVE_GL_GL_H)
check_include_files("windows.h;GL/glu.h" HAVE_GL_GLU_H)
elseif(APPLE AND NOT COIN_BUILD_MAC_X11)
check_include_file(OpenGL/gl.h HAVE_OPENGL_GL_H)
check_include_file(OpenGL/glu.h HAVE_OPENGL_GLU_H)
check_include_file(OpenGL/glext.h HAVE_OPENGL_GLEXT_H)
else()
check_include_files("GL/gl.h" HAVE_GL_GL_H)
check_include_files("GL/glu.h" HAVE_GL_GLU_H)
check_include_files("GL/gl.h;GL/glext.h" HAVE_GL_GLEXT_H)
endif()
else()
message(STATUS "Legacy GL renderer build disabled; using core profile headers")
if(APPLE AND NOT COIN_BUILD_MAC_X11)
check_include_file(OpenGL/gl3.h HAVE_OPENGL_GL3_H)
check_include_file(OpenGL/gl3ext.h HAVE_OPENGL_GL3EXT_H)
else()
if(HAVE_WINDOWS_H)
# Coin uses its private Khronos snapshot for internal Windows builds.
# Do not make configuration depend on modern headers from the SDK.
else()
check_include_file(GL/glcorearb.h HAVE_GL_GLCOREARB_H)
check_include_file(GL/glext.h HAVE_GL_GLEXT_H)
endif()
endif()
endif()
endmacro()

macro(coin_configure_gl_include_strings)
set(CMAKE_REQUIRED_INCLUDES)
set(CMAKE_REQUIRED_LIBRARIES)

if(HAVE_WINDOWS_H)
set(SIM_INCLUDE_WINDOWS_H "#include <windows.h>")
else()
set(SIM_INCLUDE_WINDOWS_H "/* #include <windows.h> - not needed on system */")
endif()

if(COIN_BUILD_LEGACY_GL_RENDERER)
if(HAVE_GL_GL_H)
set(SIM_INCLUDE_GL_H "#include <GL/gl.h>")
elseif(HAVE_OPENGL_GL_H)
set(SIM_INCLUDE_GL_H "#include <OpenGL/gl.h>")
else()
set(SIM_INCLUDE_GL_H "#error \"don't know how to include gl.h header\"")
endif()
if(HAVE_SUPERGLU)
set(SIM_INCLUDE_GLU_H "/* #include <GL/glu.h> - not used, Coin linked with embedded SuperGLU */")
elseif(HAVE_GL_GLU_H)
set(SIM_INCLUDE_GLU_H "#include <GL/glu.h>")
elseif(HAVE_OPENGL_GLU_H)
set(SIM_INCLUDE_GLU_H "#include <OpenGL/glu.h>")
else()
set(SIM_INCLUDE_GLU_H "/* #include <GL/glu.h> - not found on system */")
endif()
if(HAVE_GL_GLEXT_H)
set(SIM_INCLUDE_GLEXT_H "#include <GL/glext.h>")
elseif(HAVE_OPENGL_GLEXT_H)
set(SIM_INCLUDE_GLEXT_H "#include <OpenGL/glext.h>")
else()
set(SIM_INCLUDE_GLEXT_H "/* #include <GL/glext.h> - not found on system */")
endif()
else()
if(APPLE AND NOT COIN_BUILD_MAC_X11)
if(HAVE_OPENGL_GL3_H)
set(SIM_INCLUDE_GL_H "#include <OpenGL/gl3.h>")
else()
set(SIM_INCLUDE_GL_H "#error \"OpenGL/gl3.h is required for core profile\"")
endif()
if(HAVE_OPENGL_GL3EXT_H)
set(SIM_INCLUDE_GLEXT_H "#include <OpenGL/gl3ext.h>")
else()
set(SIM_INCLUDE_GLEXT_H "/* #include <OpenGL/gl3ext.h> - not found on system */")
endif()
elseif(HAVE_WINDOWS_H)
# This is only the public-header fallback. Internal Coin compilation
# selects the private Khronos glcorearb.h in gl-headers.h.cmake.in.
set(SIM_INCLUDE_GL_H "#include <GL/glcorearb.h>")
set(SIM_INCLUDE_GLEXT_H "/* glcorearb.h provides the core-profile declarations */")
else()
if(HAVE_GL_GLCOREARB_H)
set(SIM_INCLUDE_GL_H "#include <GL/glcorearb.h>")
else()
set(SIM_INCLUDE_GL_H "#error \"GL/glcorearb.h is required for core profile\"")
endif()
set(SIM_INCLUDE_GLEXT_H "/* glcorearb.h provides the core-profile declarations */")
endif()
set(SIM_INCLUDE_GLU_H "/* #include <GL/glu.h> - not used with core profile */")
endif()
endmacro()

# Checks specific OpenGL configurations
if(HAVE_WINDOWS_H)
check_include_files("windows.h;GL/gl.h" HAVE_GL_GL_H)
check_include_files("windows.h;GL/glu.h" HAVE_GL_GLU_H)
check_include_files("windows.h;GL/gl.h;GL/glext.h" HAVE_GL_GLEXT_H)
elseif(APPLE AND NOT COIN_BUILD_MAC_X11)
check_include_file(OpenGL/gl.h HAVE_OPENGL_GL_H)
check_include_file(OpenGL/glu.h HAVE_OPENGL_GLU_H)
check_include_file(OpenGL/glext.h HAVE_OPENGL_GLEXT_H)
coin_check_gl_headers()

if(APPLE AND NOT COIN_BUILD_MAC_X11)
check_include_file(OpenGL/CGLCurrent.h HAVE_OPENGL_CGLCURRENT_H)
else()
check_include_files("GL/gl.h" HAVE_GL_GL_H)
check_include_files("GL/glu.h" HAVE_GL_GLU_H)
check_include_files("GL/gl.h;GL/glext.h" HAVE_GL_GLEXT_H)
endif()

set(CMAKE_REQUIRED_INCLUDES)
set(CMAKE_REQUIRED_LIBRARIES)

if(HAVE_WINDOWS_H)
set(SIM_INCLUDE_WINDOWS_H "#include <windows.h>")
else()
set(SIM_INCLUDE_WINDOWS_H "/* #include <windows.h> - not needed on system */")
endif()
if(HAVE_GL_GL_H)
set(SIM_INCLUDE_GL_H "#include <GL/gl.h>")
elseif(HAVE_OPENGL_GL_H)
set(SIM_INCLUDE_GL_H "#include <OpenGL/gl.h>")
else()
set(SIM_INCLUDE_GL_H "#error \"don't know how to include gl.h header\"")
endif()
if(HAVE_SUPERGLU)
set(SIM_INCLUDE_GLU_H "/* #include <GL/glu.h> - not used, Coin linked with embedded SuperGLU */")
elseif(HAVE_GL_GLU_H)
set(SIM_INCLUDE_GLU_H "#include <GL/glu.h>")
elseif(HAVE_OPENGL_GLU_H)
set(SIM_INCLUDE_GLU_H "#include <OpenGL/glu.h>")
else()
set(SIM_INCLUDE_GLU_H "/* #include <GL/glu.h> - not found on system */")
endif()
if(HAVE_GL_GLEXT_H)
set(SIM_INCLUDE_GLEXT_H "#include <GL/glext.h>")
elseif(HAVE_OPENGL_GLEXT_H)
set(SIM_INCLUDE_GLEXT_H "#include <OpenGL/glext.h>")
else()
set(SIM_INCLUDE_GLEXT_H "/* #include <GL/glext.h> - not found on system */")
endif()
coin_configure_gl_include_strings()

check_symbol_exists(va_copy stdarg.h HAVE_VA_COPY_MACRO)
check_symbol_exists(strncasecmp string.h HAVE_STRNCASECMP)
Expand Down Expand Up @@ -939,6 +1013,10 @@ else()
set(FEAT_HAVE_SAFETHREAD 0)
endif()

add_compile_definitions(
COIN_BUILD_LEGACY_GL_RENDERER=${COIN_BUILD_LEGACY_GL_RENDERER_VALUE}
)

# ############################################################################
# Setup targets in subdirectories
# ############################################################################
Expand Down
Loading
Loading