summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-12 21:35:44 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-12 21:35:44 +0300
commitd9be27bba8941260500066cdd43ebb016356bc67 (patch)
tree884fa01ee78e6ed9a1c5ea526b1b5cd9e37df24b /src/utils
parent18b2da68d0ae157778bab38d6a90f71e5bb95da2 (diff)
downloadplus-d9be27bba8941260500066cdd43ebb016356bc67.tar.gz
plus-d9be27bba8941260500066cdd43ebb016356bc67.tar.bz2
plus-d9be27bba8941260500066cdd43ebb016356bc67.tar.xz
plus-d9be27bba8941260500066cdd43ebb016356bc67.zip
Add macro for checking OpenGL function is it null or not null.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/glxhelper.cpp7
1 files changed, 4 insertions, 3 deletions
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");