OPENGL: Define GLCALL in opengl-sys.h.

debug.h is now always included and all calls should be made through GLCALL.
This commit is contained in:
Johannes Schickel 2015-12-11 23:58:11 +01:00
parent 8f3783da09
commit b3b3d37e3b
4 changed files with 7 additions and 4 deletions

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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"