1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

Define GL_SILENCE_DEPRECATION on OSX.

This is gross and inexplicable, but Xcode now spews warnings whenever
you use any part of OpenGL on Mac.
https://www.reddit.com/r/opengl/comments/b44tyu/apple_is_deprecating_opengl/
https://www.reddit.com/r/opengl/comments/8okcf1/opengl_deprecated_in_macos_1014/
Fortunately the workaround for now is to just suppress the warnings.

    In file included from hyper.cpp:26:
    ./glhr.cpp:21:20: error: 'glGetError' is deprecated: first deprecated
          in macOS 10.14 - OpenGL API deprecated. (Define GL_SILENCE_DEPRECATION
          to silence these warnings) [-Werror,-Wdeprecated-declarations]
      GLenum errCode = glGetError();
                       ^
This commit is contained in:
Arthur O'Dwyer 2020-02-16 10:10:50 -05:00
parent 3b10c95a32
commit 3f129ff6e5

View File

@ -389,6 +389,7 @@ extern "C" {
#else
#define GL_GLEXT_PROTOTYPES 1
#if ISMAC
#define GL_SILENCE_DEPRECATION 1
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <OpenGL/glext.h>