Skip to content

Commit

Permalink
Try to fix macro definition order problem with OpenGL code
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Apr 15, 2024
1 parent 13e271c commit 38cacfa
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions irr/src/COGLESCommon.h
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions irr/src/COpenGLCommon.h
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions irr/src/COpenGLDriver.h
Expand Up @@ -22,8 +22,6 @@ class CIrrDeviceMacOSX;
#include "COpenGLExtensionHandler.h"
#include "IContextManager.h"

#define TEST_GL_ERROR(cls) (cls)->testGLError(__LINE__)

namespace irr
{

Expand Down
1 change: 0 additions & 1 deletion irr/src/CSDLManager.cpp
Expand Up @@ -7,7 +7,6 @@
#if defined(_IRR_COMPILE_WITH_SDL_DEVICE_)

#include "CIrrDeviceSDL.h"
#include "COpenGLCommon.h"

namespace irr
{
Expand Down
3 changes: 3 additions & 0 deletions irr/src/OpenGL/Common.h
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions irr/src/OpenGL/Driver.h
Expand Up @@ -16,8 +16,6 @@
#include "ExtensionHandler.h"
#include "IContextManager.h"

#define TEST_GL_ERROR(cls) (cls)->testGLError(__FILE__, __LINE__)

namespace irr
{
namespace video
Expand Down

0 comments on commit 38cacfa

Please sign in to comment.