From 19cc27e2c00ae8cb13154a1236e9e92e35c9c73b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 28 Mar 2013 12:57:42 +0100 Subject: [PATCH] Cleaned up OpenGL.h header. I didn't know that C preprocessor had `#elif` until now. Learning something new every day. --- src/OpenGL.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/OpenGL.h b/src/OpenGL.h index 463ad9d6f..c19973805 100644 --- a/src/OpenGL.h +++ b/src/OpenGL.h @@ -30,12 +30,22 @@ #include "magnumConfigure.h" +/* Desktop OpenGL */ #ifndef MAGNUM_TARGET_GLES #include #include -#else -#ifndef MAGNUM_TARGET_NACL +/* NaCl has its own gl2.h, the official one causes linker issues. Additionaly + to NaCl's gl2ext.h we are including our own to prevent undeclared symbol + errors with some recent extensions. */ +#elif defined(MAGNUM_TARGET_NACL) +#include +#include +#undef __gl2ext_h_ +#include + +/* Generic OpenGL ES */ +#else #include #ifndef MAGNUM_TARGET_GLES2 #include @@ -45,16 +55,6 @@ #include #include #endif - -/* NaCl has its own gl2.h, the official one causes linker issues. Additionaly - to NaCl's gl2ext.h we are including our own to prevent undeclared symbol - errors with some recent extensions. */ -#else -#include -#include -#undef __gl2ext_h_ -#include #endif #endif -#endif