From 65b5013da0b9800829b9cc08ac2a1018b63dc7cc Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 15 Feb 2020 17:23:21 +0900 Subject: [PATCH] Qt: Work around indirect include of glext.h by QOpenGLContext on macOS Hacky, but aside from not using glad I'm not sure what else to do. --- src/duckstation-qt/opengldisplaywindow.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/duckstation-qt/opengldisplaywindow.h b/src/duckstation-qt/opengldisplaywindow.h index 5feeafb12..a4d35e205 100644 --- a/src/duckstation-qt/opengldisplaywindow.h +++ b/src/duckstation-qt/opengldisplaywindow.h @@ -1,6 +1,13 @@ #pragma once + +// GLAD has to come first so that Qt doesn't pull in the system GL headers, which are incompatible with glad. #include +// Hack to prevent Apple's glext.h headers from getting included via qopengl.h, since we still want to use glad. +#ifdef __APPLE__ +#define __glext_h_ +#endif + #include "common/gl/program.h" #include "common/gl/texture.h" #include "core/host_display.h"