X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=util.cpp;h=3f59edfbce359e752eaa7786fdd6e10636052c36;hb=67a7863f5f060d4396b27a39ea8b495498197e45;hp=c2ac59301778906894410cb27971ea4956289e56;hpb=236a0ad8b604d5b3bff53f40b600991168f76800;p=movit diff --git a/util.cpp b/util.cpp index c2ac593..3f59edf 100644 --- a/util.cpp +++ b/util.cpp @@ -19,6 +19,7 @@ #include #else #include +#include #endif using namespace std; @@ -331,7 +332,11 @@ void *get_gl_context_identifier() #elif defined(WIN32) return (void *)wglGetCurrentContext(); #else - return (void *)glXGetCurrentContext(); + void *ret = (void *)glXGetCurrentContext(); + if (ret != NULL) { + return ret; + } + return (void *)eglGetCurrentContext(); #endif }