diff options
author | Johannes Schickel | 2015-12-11 23:58:11 +0100 |
---|---|---|
committer | Johannes Schickel | 2016-03-16 20:29:24 +0100 |
commit | b3b3d37e3b8231ec345a2d4172279373d53a0c79 (patch) | |
tree | 8675e6d2f5782656be8a28541058bcca8d4fe3c8 /backends | |
parent | 8f3783da0994703e9fe6fcfc666d194c9eb00865 (diff) | |
download | scummvm-rg350-b3b3d37e3b8231ec345a2d4172279373d53a0c79.tar.gz scummvm-rg350-b3b3d37e3b8231ec345a2d4172279373d53a0c79.tar.bz2 scummvm-rg350-b3b3d37e3b8231ec345a2d4172279373d53a0c79.zip |
OPENGL: Define GLCALL in opengl-sys.h.
debug.h is now always included and all calls should be made through GLCALL.
Diffstat (limited to 'backends')
-rw-r--r-- | backends/graphics/opengl/debug.h | 4 | ||||
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.cpp | 1 | ||||
-rw-r--r-- | backends/graphics/opengl/opengl-sys.h | 4 | ||||
-rw-r--r-- | backends/graphics/opengl/texture.cpp | 2 |
4 files changed, 7 insertions, 4 deletions
diff --git a/backends/graphics/opengl/debug.h b/backends/graphics/opengl/debug.h index ff6b678870..abaa6544dc 100644 --- a/backends/graphics/opengl/debug.h +++ b/backends/graphics/opengl/debug.h @@ -31,9 +31,9 @@ namespace OpenGL { void checkGLError(const char *expr, const char *file, int line); } // End of namespace OpenGL -#define GLCALL(x) do { (x); OpenGL::checkGLError(#x, __FILE__, __LINE__); } while (false) +#define GL_WRAP_DEBUG(call, name) do { (call); OpenGL::checkGLError(#name, __FILE__, __LINE__); } while (false) #else -#define GLCALL(x) do { (x); } while (false) +#define GL_WRAP_DEBUG(call, name) do { (call); } while (false) #endif #endif diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index d738f31a37..54c4906413 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -23,7 +23,6 @@ #include "backends/graphics/opengl/opengl-graphics.h" #include "backends/graphics/opengl/texture.h" -#include "backends/graphics/opengl/debug.h" #include "backends/graphics/opengl/extensions.h" #include "common/textconsole.h" diff --git a/backends/graphics/opengl/opengl-sys.h b/backends/graphics/opengl/opengl-sys.h index f4d8488259..8d8fecf5d6 100644 --- a/backends/graphics/opengl/opengl-sys.h +++ b/backends/graphics/opengl/opengl-sys.h @@ -28,6 +28,8 @@ #include "common/scummsys.h" +#include "backends/graphics/opengl/debug.h" + #ifdef WIN32 #if defined(ARRAYSIZE) && !defined(_WINDOWS_) #undef ARRAYSIZE @@ -60,4 +62,6 @@ using namespace Tizen::Graphics::Opengl; #define GLCALLCONV #endif +#define GLCALL(x) GL_WRAP_DEBUG(x, x) + #endif diff --git a/backends/graphics/opengl/texture.cpp b/backends/graphics/opengl/texture.cpp index 36fe5ab744..696e1e6252 100644 --- a/backends/graphics/opengl/texture.cpp +++ b/backends/graphics/opengl/texture.cpp @@ -22,7 +22,7 @@ #include "backends/graphics/opengl/texture.h" #include "backends/graphics/opengl/extensions.h" -#include "backends/graphics/opengl/debug.h" +#include "backends/graphics/opengl/opengl-graphics.h" #include "common/rect.h" #include "common/textconsole.h" |