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.
This commit is contained in:
Connor McLaughlin 2020-02-15 17:23:21 +09:00
parent 15e49b9f61
commit 65b5013da0
1 changed files with 7 additions and 0 deletions

View File

@ -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 <glad.h>
// 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"