From d9be27bba8941260500066cdd43ebb016356bc67 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 12 Jul 2014 21:35:44 +0300 Subject: Add macro for checking OpenGL function is it null or not null. --- src/resources/openglimagehelper.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/resources') diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp index 6187764e9..c830c6321 100644 --- a/src/resources/openglimagehelper.cpp +++ b/src/resources/openglimagehelper.cpp @@ -28,6 +28,7 @@ #include "logger.h" #include "render/mgl.h" +#include "render/mglcheck.h" #include "render/mobileopenglgraphics.h" #include "render/modernopenglgraphics.h" #include "render/normalopenglgraphics.h" @@ -276,7 +277,7 @@ Image *OpenGLImageHelper::glLoad(SDL_Surface *tmpImage, #ifdef DEBUG_OPENGL // disabled for now, because debugger cant show it -// if (mglLabelObject) +// if (isGLNotNull(mglLabelObject)) // { // const char *const text = "image text"; // mglLabelObject(GL_TEXTURE, texture, strlen(text), text); @@ -370,7 +371,7 @@ void OpenGLImageHelper::postInit() void OpenGLImageHelper::invalidate(const GLuint textureId) { - if (mglInvalidateTexImage) + if (isGLNotNull(mglInvalidateTexImage)) { logger->log("invalidate: %u", textureId); mglInvalidateTexImage(textureId, 0); -- cgit v1.2.3-70-g09d2