vbo: avoid including wingdi.h on win32

On Windows, main/glheader.h ends up including windows.h which in turn
includes wingdi.h unless the NOGDI macro is defined. And wingdi.h
defines a macro called "ERROR", which we end up redefining below.

To avoid a warning on the redefinition, we can define NOGDI to prevent
wingdi.h from implicitly being included.

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4577>
This commit is contained in:
Erik Faye-Lund 2020-04-15 22:48:46 +02:00 committed by Marge Bot
parent b55b033f76
commit 0752648a99

View file

@ -28,6 +28,9 @@
* GLvertexformat no-op functions. Used in out-of-memory situations.
*/
#ifdef _WIN32
#define NOGDI
#endif
#include "main/glheader.h"
#include "main/context.h"