From: kgv Date: Mon, 29 Apr 2019 15:43:14 +0000 (+0300) Subject: 0030681: Configuration - suppress OpenGL deprecation warning on macOS 10.14 X-Git-Tag: V7_4_0_beta~162 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=42451ec057a3653302b4a61ebf7f833ca2dcf381;p=occt-copy.git 0030681: Configuration - suppress OpenGL deprecation warning on macOS 10.14 Define GL_SILENCE_DEPRECATION to suppress warnings. --- diff --git a/src/OpenGl/OpenGl_Context_1.mm b/src/OpenGl/OpenGl_Context_1.mm index 5f43c4f309..c8300d9591 100644 --- a/src/OpenGl/OpenGl_Context_1.mm +++ b/src/OpenGl/OpenGl_Context_1.mm @@ -19,6 +19,9 @@ #define GL_GLEXT_LEGACY // To prevent inclusion of system glext.h on Mac OS X 10.6.8 #endif +// macOS 10.4 deprecated OpenGL framework - suppress useless warnings +#define GL_SILENCE_DEPRECATION + #import #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE diff --git a/src/OpenGl/OpenGl_GlFunctions.hxx b/src/OpenGl/OpenGl_GlFunctions.hxx index f39015e87a..34f950d327 100644 --- a/src/OpenGl/OpenGl_GlFunctions.hxx +++ b/src/OpenGl/OpenGl_GlFunctions.hxx @@ -46,6 +46,8 @@ // include main OpenGL header provided with system #if defined(__APPLE__) #import + // macOS 10.4 deprecated OpenGL framework - suppress useless warnings + #define GL_SILENCE_DEPRECATION #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE #include #else diff --git a/src/OpenGl/OpenGl_Window_1.mm b/src/OpenGl/OpenGl_Window_1.mm index 1b29a2d421..d9e0afad5d 100644 --- a/src/OpenGl/OpenGl_Window_1.mm +++ b/src/OpenGl/OpenGl_Window_1.mm @@ -19,6 +19,9 @@ #define GL_GLEXT_LEGACY // To prevent inclusion of system glext.h on Mac OS X 10.6.8 #endif +// macOS 10.4 deprecated OpenGL framework - suppress useless warnings +#define GL_SILENCE_DEPRECATION + #import #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE