File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ option(PROFILING "Set to ON to enable profiling" ${PROFILING})
1111option (USE_MESA_GLES "Set to ON to select the MESA OpenGL ES driver" ${USE_MESA_GLES} )
1212option (USE_GLES1 "Set to ON to force usage of the OpenGLES v1 renderer" ${USE_GLES1} )
1313
14+ # GL implementation overrides
15+ option (USE_GL21 "Set to ON to force usage of the OpenGL v2.1 renderer" ${USE_GL21} )
16+
1417# OpenGL library preference (https://cmake.org/cmake/help/git-stage/policy/CMP0072.html)
1518# Set it to OLD to appease older proprietary drivers without libglvnd support
1619if (POLICY CMP0072)
@@ -73,7 +76,11 @@ set_property(CACHE GLSystem PROPERTY STRINGS "Desktop OpenGL" "Embedded OpenGL")
7376
7477if (${GLSystem} MATCHES "Desktop OpenGL" )
7578 find_package (OpenGL REQUIRED )
76- add_definitions (-DUSE_OPENGL_14 )
79+ if (NOT USE_GL21)
80+ add_definitions (-DUSE_OPENGL_14 )
81+ else ()
82+ add_definitions (-DUSE_OPENGL_21 )
83+ endif ()
7784else ()
7885 if (NOT USE_GLES1)
7986 find_package (OpenGLES2 QUIET REQUIRED )
You can’t perform that action at this time.
0 commit comments