opengl: Silence macOS OpenGL deprecations
authorDoug Nazar <nazard@nazar.ca>
Fri, 23 Apr 2021 18:05:45 +0000 (14:05 -0400)
committerDoug Nazar <nazard@nazar.ca>
Sun, 25 Apr 2021 02:26:36 +0000 (22:26 -0400)
As of macOS 10.14 the entire OpenGL system is deprecated. No need to
log the general warnings about it. Specific warnings are still enabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1123>

gst-libs/gst/gl/cocoa/gstglcaopengllayer.m
gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m
gst-libs/gst/gl/cocoa/gstgldisplay_cocoa.m
gst-libs/gst/gl/cocoa/gstglwindow_cocoa.m
gst-libs/gst/gl/gstglfuncs.h
gst-libs/gst/gl/meson.build
tests/examples/gl/cocoa/cocoa-videooverlay.m
tests/examples/gl/qt/qglwtextureshare/cocoa_utils.mm

index f8895fd68c93a5a2e3462552683f2f065fc47ea0..d32a59dae5c0e0ae9c36a8e4f711584674ed18bb 100644 (file)
 #include "config.h"
 #endif
 
+#if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1014
+# define GL_SILENCE_DEPRECATION
+#endif
+
 #include <Cocoa/Cocoa.h>
 
 #include "gstglcaopengllayer.h"
index a93baa335bfc7673d6fba5dd10afe8de23ea7f71..595ddc6fc7444f0f55a0c7b62095f73fa62d6286 100644 (file)
 #include "config.h"
 #endif
 
+#if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1014
+# define GL_SILENCE_DEPRECATION
+#endif
+
 #include <Cocoa/Cocoa.h>
 
 #include "gstglcontext_cocoa.h"
index 5b9205b454f2d1825a51812e56e5b2a63f312bc6..01126ebcaf874d31f98c2d702f715d522c1a731d 100644 (file)
 #include "config.h"
 #endif
 
+#if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1014
+# define GL_SILENCE_DEPRECATION
+#endif
+
 #include <Cocoa/Cocoa.h>
 
 #include <gst/gl/cocoa/gstgldisplay_cocoa.h>
index 0997b8d5399f42701659040947784ddab0df8bfd..63f2d92843945d7c6849b64432c7448f16835bea 100644 (file)
 #include "config.h"
 #endif
 
+#if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1014
+# define GL_SILENCE_DEPRECATION
+#endif
+
 #include <Cocoa/Cocoa.h>
 #include <QuartzCore/QuartzCore.h>
 
index e3bf8746d168449a113d3ee5fb8a180db182dd8b..0ec5c9f12d63e001cdc90788daa185841655714f 100644 (file)
@@ -55,6 +55,9 @@
 /* OpenGL for desktop systems */
 #if GST_GL_HAVE_OPENGL
 # ifdef __APPLE__
+#  if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1014
+#   define GL_SILENCE_DEPRECATION
+#  endif
 #  include <OpenGL/OpenGL.h>
 #  include <OpenGL/gl.h>
 #  if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
index 356e8681c8423da9a7d2d0c31280570941b9e2a3..66668644efe629adf0f7b9137b3452a41b98bcec 100644 (file)
@@ -351,6 +351,9 @@ if need_api_opengl != 'no' or need_platform_glx != 'no'
   opengl_includes = ''
   if host_system == 'darwin'
     opengl_includes += '''
+#if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1014
+# define GL_SILENCE_DEPRECATION
+#endif
 #include <OpenGL/OpenGL.h>
 #include <OpenGL/gl.h>
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
index 3151726bc0686fe69ca6fcd227d856016b8b1056..faddfc88ce7be39b8484d489e21c58f8d7df772a 100755 (executable)
  * Boston, MA 02110-1301, USA.
  */
 
+#if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1014
+# define GL_SILENCE_DEPRECATION
+#endif
+
 #include <Cocoa/Cocoa.h>
 #include <gst/gst.h>
 #include <gst/video/videooverlay.h>
index 245ec0fe449806e1a5c3127b1c67f0bd3114d3fe..518cb4a51598a127c0a5ab1c6680ef255dab1080 100644 (file)
  * Boston, MA 02110-1301, USA.
  */
 
+#if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1014
+# define GL_SILENCE_DEPRECATION
+#endif
+
 #import <Cocoa/Cocoa.h>
 void *qt_current_nsopengl_context()
 {