diff options
author | Campbell Barton <campbell@blender.org> | 2022-07-15 15:14:04 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-07-15 15:16:44 +0300 |
commit | 00dc7477022acdd969e4d709a235c0be819efa6c (patch) | |
tree | b6bd65095c8ce50520a638cddf2d843963369fc1 /CMakeLists.txt | |
parent | 180db0f752c88d3bbd47774a0f7c9a31de5a3864 (diff) |
Fix T99706: Crash rendering with headless builds
When rendering with headless builds, show an error instead of crashing.
Previously GPU_backend_init was called indirectly from
DRW_opengl_context_create, a new function is now called from the window
manager (GPU_backend_init_once), so it's possible to check if the GPU
has a back-end.
This also disables the `bgl` Python module when building WITH_HEADLESS.
Reviewed By: fclem
Ref D15463
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 33064864be6..c998919622e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -574,6 +574,10 @@ mark_as_advanced( WITH_GPU_BUILDTIME_SHADER_BUILDER ) +if(WITH_HEADLESS) + set(WITH_OPENGL OFF) +endif() + # Metal if (APPLE) |