From b3b3d37e3b8231ec345a2d4172279373d53a0c79 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 11 Dec 2015 23:58:11 +0100 Subject: OPENGL: Define GLCALL in opengl-sys.h. debug.h is now always included and all calls should be made through GLCALL. --- backends/graphics/opengl/debug.h | 4 ++-- backends/graphics/opengl/opengl-graphics.cpp | 1 - backends/graphics/opengl/opengl-sys.h | 4 ++++ backends/graphics/opengl/texture.cpp | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) (limited to 'backends') 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" -- cgit v1.2.3