[Bf-blender-cvs] [fe559d06593] blender2.8: OpenGL: do not support legacy matrix when using core profile

Dalai Felinto noreply at git.blender.org
Thu Apr 13 18:45:33 CEST 2017


Commit: fe559d06593da143e036cf154e36c5d51ec7324c
Author: Dalai Felinto
Date:   Thu Apr 13 16:49:39 2017 +0200
Branches: blender2.8
https://developer.blender.org/rBfe559d06593da143e036cf154e36c5d51ec7324c

OpenGL: do not support legacy matrix when using core profile

===================================================================

M	CMakeLists.txt
M	source/blender/gpu/GPU_matrix.h

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7b05bcb11bb..19e13612baa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -464,7 +464,7 @@ option(WITH_GLEW_MX             "Support multiple GLEW contexts (experimental)"
 option(WITH_GLEW_ES             "Switches to experimental copy of GLEW that has support for OpenGL ES. (temporary option for development purposes)" OFF)
 option(WITH_GL_EGL              "Use the EGL OpenGL system library instead of the platform specific OpenGL system library (CGL, glX, or WGL)"       OFF)
 option(WITH_GL_PROFILE_COMPAT   "Support using the OpenGL 'compatibility' profile. (deprecated)"                                                    ON )
-option(WITH_GL_PROFILE_CORE     "Support using the OpenGL 3.2+ 'core' profile."                                                                     OFF)
+option(WITH_GL_PROFILE_CORE     "Support using the OpenGL 3.3+ 'core' profile."                                                                     OFF)
 option(WITH_GL_PROFILE_ES20     "Support using OpenGL ES 2.0. (thru either EGL or the AGL/WGL/XGL 'es20' profile)"                                  OFF)
 
 mark_as_advanced(
diff --git a/source/blender/gpu/GPU_matrix.h b/source/blender/gpu/GPU_matrix.h
index 8643dee3408..62b5b7f8ba5 100644
--- a/source/blender/gpu/GPU_matrix.h
+++ b/source/blender/gpu/GPU_matrix.h
@@ -43,7 +43,11 @@ extern "C" {
 /* For now we support the legacy matrix stack in gpuGetMatrix functions.
  * Will remove this after switching to core profile, which can happen after
  * we convert all code to use the API in this file. */
-#define SUPPORT_LEGACY_MATRIX 1
+#ifdef WITH_GL_PROFILE_CORE
+	#define SUPPORT_LEGACY_MATRIX 0
+#else
+	#define SUPPORT_LEGACY_MATRIX 1
+#endif
 
 /* implement 2D parts with 4x4 matrices, even though 3x3 feels better
  * this is a compromise to get core profile up & running sooner




More information about the Bf-blender-cvs mailing list