Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Rauch <christian.rauch>2020-01-28 12:32:29 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2020-01-28 12:59:42 +0300
commitbb65f49005ed17806bce2b048d37903cc1342d27 (patch)
treed99a28664d9569ef153e0534de7d48d9c9d2e3a9 /CMakeLists.txt
parentacb576c762d46d945e1bafe85d3f166c6c07955b (diff)
Linux: update EGL context code to fully work, including offscreen rendering
This is a step towards Wayland and headless rendering support, using EGL instead of GLX. The EGL backend is not enabled by default, it can be tested using WITH_GL_EGL=ON. Differential Revision: https://developer.blender.org/D6585
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt17
1 files changed, 6 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bbb528607c8..17e4ec23ed9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -978,7 +978,7 @@ if(WITH_GL_PROFILE_ES20)
)
endif()
- list(APPEND BLENDER_GL_LIBRARIES OPENGLES_LIBRARY)
+ list(APPEND BLENDER_GL_LIBRARIES "${OPENGLES_LIBRARY}")
else()
set(OPENGLES_LIBRARY "" CACHE FILEPATH "OpenGL ES 2.0 library file")
@@ -1038,7 +1038,10 @@ else()
endif()
if(WITH_GL_EGL)
- list(APPEND GL_DEFINITIONS -DWITH_GL_EGL)
+ find_package(OpenGL REQUIRED EGL)
+ list(APPEND BLENDER_GL_LIBRARIES OpenGL::EGL)
+
+ list(APPEND GL_DEFINITIONS -DWITH_GL_EGL -DGLEW_EGL -DGLEW_INC_EGL)
if(WITH_SYSTEM_GLES)
if(NOT OPENGLES_EGL_LIBRARY)
@@ -1048,7 +1051,7 @@ if(WITH_GL_EGL)
)
endif()
- list(APPEND BLENDER_GL_LIBRARIES OPENGLES_EGL_LIBRARY)
+ list(APPEND BLENDER_GL_LIBRARIES ${OPENGLES_EGL_LIBRARY})
else()
set(OPENGLES_EGL_LIBRARY "" CACHE FILEPATH "EGL library file")
@@ -1088,10 +1091,6 @@ else()
list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_CORE)
endif()
-if(WITH_GL_EGL)
- list(APPEND GL_DEFINITIONS -DWITH_EGL)
-endif()
-
#-----------------------------------------------------------------------------
# Configure OpenMP.
if(WITH_OPENMP)
@@ -1163,10 +1162,6 @@ else()
list(APPEND GL_DEFINITIONS -DGL_ES_VERSION_1_0=0 -DGL_ES_VERSION_CL_1_1=0 -DGL_ES_VERSION_CM_1_1=0)
endif()
- if(WITH_GL_EGL)
- list(APPEND GL_DEFINITIONS -DGLEW_INC_EGL)
- endif()
-
set(BLENDER_GLEW_LIBRARIES extern_glew_es bf_intern_glew_mx)
else()