From 8235967dcca61fe867be15bda07ef1ba8131a0e9 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Wed, 11 Jan 2023 09:32:31 +0100 Subject: Fix "Compilation warning: 'NSOpenGLContext' on macOS 11" !#646) --- FL/gl.h | 1 + FL/mac.H | 3 +++ 2 files changed, 4 insertions(+) diff --git a/FL/gl.h b/FL/gl.h index 10eb05e05..e47c66e3c 100644 --- a/FL/gl.h +++ b/FL/gl.h @@ -55,6 +55,7 @@ # endif # ifdef __APPLE__ // PORTME: OpenGL path abstraction +# define GL_SILENCE_DEPRECATION 1 # if !defined(__gl3_h_) // make sure OpenGL/gl3.h was not included before # include # endif diff --git a/FL/mac.H b/FL/mac.H index 015b9ddda..f356730ca 100644 --- a/FL/mac.H +++ b/FL/mac.H @@ -25,6 +25,9 @@ #ifdef __OBJC__ @class NSOpenGLContext; +# ifndef GL_SILENCE_DEPRECATION +# define GL_SILENCE_DEPRECATION 1 +# endif #elif defined(__cplusplus) class NSOpenGLContext; #endif /* __OBJC__ */ -- cgit v1.2.3