summaryrefslogtreecommitdiffstats
path: root/platform/macos/gl_manager_macos_legacy.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/macos/gl_manager_macos_legacy.mm')
-rw-r--r--platform/macos/gl_manager_macos_legacy.mm12
1 files changed, 5 insertions, 7 deletions
diff --git a/platform/macos/gl_manager_macos_legacy.mm b/platform/macos/gl_manager_macos_legacy.mm
index 65e978bfe6..550e2d5c59 100644
--- a/platform/macos/gl_manager_macos_legacy.mm
+++ b/platform/macos/gl_manager_macos_legacy.mm
@@ -30,15 +30,14 @@
#include "gl_manager_macos_legacy.h"
-#ifdef MACOS_ENABLED
-#ifdef GLES3_ENABLED
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations" // OpenGL is deprecated in macOS 10.14
+#if defined(MACOS_ENABLED) && defined(GLES3_ENABLED)
#include <stdio.h>
#include <stdlib.h>
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations" // OpenGL is deprecated in macOS 10.14
+
Error GLManager_MacOS::create_context(GLWindow &win) {
NSOpenGLPixelFormatAttribute attributes[] = {
NSOpenGLPFADoubleBuffer,
@@ -237,5 +236,4 @@ GLManager_MacOS::~GLManager_MacOS() {
#pragma clang diagnostic pop
-#endif // GLES3_ENABLED
-#endif // MACOS_ENABLED
+#endif // MACOS_ENABLED && GLES3_ENABLED