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/utils/glxhelper.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/utils') diff --git a/src/utils/glxhelper.cpp b/src/utils/glxhelper.cpp index e27124325..240e4b8d5 100644 --- a/src/utils/glxhelper.cpp +++ b/src/utils/glxhelper.cpp @@ -24,6 +24,7 @@ #include "logger.h" +#include "render/mglcheck.h" #include "render/mglx.h" #include "render/mglxtypes.h" @@ -46,9 +47,9 @@ void *GlxHelper::createContext(const unsigned long window, XSync(display, false); int (*handler) (Display *, XErrorEvent *) = XSetErrorHandler(ErrorHandler); void *context = mglXGetCurrentContext(); - if (!mglXGetCurrentContext - || !mglXCreateContextAttribs - || !mglXChooseFBConfig) + if (isGLNull(mglXGetCurrentContext) + || isGLNull(mglXCreateContextAttribs) + || isGLNull(mglXChooseFBConfig)) { logger->log("Cant change context, functions in driver " "not implimented"); -- cgit v1.2.3-70-g09d2