mirror of
https://github.com/fltk/fltk.git
synced 2026-06-01 14:52:46 +08:00
Fix "Compilation warning: 'NSOpenGLContext' on macOS 11" !#646)
This commit is contained in:
@@ -55,6 +55,7 @@
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef __APPLE__ // PORTME: OpenGL path abstraction
|
# ifdef __APPLE__ // PORTME: OpenGL path abstraction
|
||||||
|
# define GL_SILENCE_DEPRECATION 1
|
||||||
# if !defined(__gl3_h_) // make sure OpenGL/gl3.h was not included before
|
# if !defined(__gl3_h_) // make sure OpenGL/gl3.h was not included before
|
||||||
# include <OpenGL/gl.h>
|
# include <OpenGL/gl.h>
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@@ -25,6 +25,9 @@
|
|||||||
|
|
||||||
#ifdef __OBJC__
|
#ifdef __OBJC__
|
||||||
@class NSOpenGLContext;
|
@class NSOpenGLContext;
|
||||||
|
# ifndef GL_SILENCE_DEPRECATION
|
||||||
|
# define GL_SILENCE_DEPRECATION 1
|
||||||
|
# endif
|
||||||
#elif defined(__cplusplus)
|
#elif defined(__cplusplus)
|
||||||
class NSOpenGLContext;
|
class NSOpenGLContext;
|
||||||
#endif /* __OBJC__ */
|
#endif /* __OBJC__ */
|
||||||
|
|||||||
Reference in New Issue
Block a user