Skip to content

Commit

Permalink
Improve EGL build (f3d-app#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwestphal authored May 14, 2023
1 parent 2e2ef8b commit 2c6e858
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
-DF3D_LINUX_GENERATE_MAN=ON
-DF3D_LINUX_INSTALL_DEFAULT_CONFIGURATION_FILE_IN_PREFIX=ON
-DF3D_MACOS_BUNDLE=${{ matrix.bundle_label == 'bundle' && 'ON' || 'OFF' }}
-DF3D_MODULE_EXTERNAL_RENDERING=${{ matrix.egl_label == 'egl' && 'OFF' || 'ON' }}
-DF3D_MODULE_EXTERNAL_RENDERING=ON
-DF3D_MODULE_RAYTRACING=${{ matrix.raytracing_label == 'raytracing' && 'ON' || 'OFF' }}
-DF3D_PLUGINS_STATIC_BUILD=${{ matrix.bundle_label == 'bundle' && 'ON' || 'OFF' }}
-DF3D_PLUGIN_BUILD_ALEMBIC=ON
Expand Down
5 changes: 5 additions & 0 deletions application/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ set(f3d_compile_options_private "")
set(f3d_compile_options_public "")
set(f3d_link_options_public "")

# Headless EGL build
if (VTK_OPENGL_HAS_EGL)
target_compile_definitions(f3d PRIVATE F3D_HEADLESS_BUILD)
endif ()

# F3D_STRICT_BUILD
list(APPEND f3d_compile_options_private ${f3d_strict_build_compile_options})
if(F3D_STRICT_BUILD)
Expand Down
4 changes: 4 additions & 0 deletions application/F3DStarter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,12 @@ int F3DStarter::Start(int argc, char** argv)
// Start interaction
else
{
#ifdef F3D_HEADLESS_BUILD
f3d::log::error("This is a headless build of F3D, interactive rendering is not supported");
#else
window.render();
interactor.start();
#endif
}
}

Expand Down
2 changes: 1 addition & 1 deletion library/testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ configure_file("${CMAKE_SOURCE_DIR}/testing/recordings/TestSDKInteractorDropFull
"${CMAKE_BINARY_DIR}/TestSDKInteractorDropFullScene.log") # world.obj; S

# External window tests
if(F3D_MODULE_EXTERNAL_RENDERING AND VTK_VERSION VERSION_GREATER 9.0.1)
if(F3D_MODULE_EXTERNAL_RENDERING AND NOT VTK_OPENGL_HAS_EGL AND VTK_VERSION VERSION_GREATER 9.0.1)
find_package(glfw3 QUIET)
if(glfw3_FOUND)
list(APPEND libf3dSDKTests_list
Expand Down

0 comments on commit 2c6e858

Please sign in to comment.