From 38cacfa577a14be0b7b8f42484970ef234d44e38 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 15 Apr 2024 19:27:05 +0200 Subject: [PATCH] Try to fix macro definition order problem with OpenGL code --- irr/src/COGLESCommon.h | 3 +++ irr/src/COpenGLCommon.h | 3 +++ irr/src/COpenGLDriver.h | 2 -- irr/src/CSDLManager.cpp | 1 - irr/src/OpenGL/Common.h | 3 +++ irr/src/OpenGL/Driver.h | 2 -- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/irr/src/COGLESCommon.h b/irr/src/COGLESCommon.h index 24c96d14a..1d439546a 100644 --- a/irr/src/COGLESCommon.h +++ b/irr/src/COGLESCommon.h @@ -90,6 +90,9 @@ typedef char GLchar; // to check if this header is in the current compile unit (different GL implementation used different "GLCommon" headers in Irrlicht #define IRR_COMPILE_GLES_COMMON +// macro used with COGLES1Driver +#define TEST_GL_ERROR(cls) (cls)->testGLError(__LINE__) + namespace irr { namespace video diff --git a/irr/src/COpenGLCommon.h b/irr/src/COpenGLCommon.h index 3b43b35a4..99bd69e11 100644 --- a/irr/src/COpenGLCommon.h +++ b/irr/src/COpenGLCommon.h @@ -19,6 +19,9 @@ // To check if this header is in the current compile unit (different GL driver implementations use different "GLCommon" headers in Irrlicht) #define IRR_COMPILE_GL_COMMON +// macro used with COpenGLDriver +#define TEST_GL_ERROR(cls) (cls)->testGLError(__LINE__) + namespace irr { namespace video diff --git a/irr/src/COpenGLDriver.h b/irr/src/COpenGLDriver.h index bca1055da..6fe8ac37d 100644 --- a/irr/src/COpenGLDriver.h +++ b/irr/src/COpenGLDriver.h @@ -22,8 +22,6 @@ class CIrrDeviceMacOSX; #include "COpenGLExtensionHandler.h" #include "IContextManager.h" -#define TEST_GL_ERROR(cls) (cls)->testGLError(__LINE__) - namespace irr { diff --git a/irr/src/CSDLManager.cpp b/irr/src/CSDLManager.cpp index c2b38e478..855c8c9e4 100644 --- a/irr/src/CSDLManager.cpp +++ b/irr/src/CSDLManager.cpp @@ -7,7 +7,6 @@ #if defined(_IRR_COMPILE_WITH_SDL_DEVICE_) #include "CIrrDeviceSDL.h" -#include "COpenGLCommon.h" namespace irr { diff --git a/irr/src/OpenGL/Common.h b/irr/src/OpenGL/Common.h index 92445cc34..84b2ec3e4 100644 --- a/irr/src/OpenGL/Common.h +++ b/irr/src/OpenGL/Common.h @@ -14,6 +14,9 @@ #include "vendor/gl.h" #endif +// macro used with COpenGL3DriverBase +#define TEST_GL_ERROR(cls) (cls)->testGLError(__FILE__, __LINE__) + namespace irr { namespace video diff --git a/irr/src/OpenGL/Driver.h b/irr/src/OpenGL/Driver.h index 3b2026611..80eeaf0da 100644 --- a/irr/src/OpenGL/Driver.h +++ b/irr/src/OpenGL/Driver.h @@ -16,8 +16,6 @@ #include "ExtensionHandler.h" #include "IContextManager.h" -#define TEST_GL_ERROR(cls) (cls)->testGLError(__FILE__, __LINE__) - namespace irr { namespace video