X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=context.cpp;h=eb62183a3b3a8c9c7c9065f6d212a21b92e8257e;hb=7cd8d9079f89d091f3332de1cdfee46136d2d74f;hp=4736b82b8bbebcc0f6327d27acc132809af025f9;hpb=79e3f6d7dfe2528d38e84564fcaf181e8f1bf5a9;p=nageru diff --git a/context.cpp b/context.cpp index 4736b82..eb62183 100644 --- a/context.cpp +++ b/context.cpp @@ -1,23 +1,26 @@ #include +#include + #include #include #include +#include #include -class QSurface; - QGLWidget *global_share_widget = nullptr; +bool using_egl = false; + +using namespace std; QSurface *create_surface(const QSurfaceFormat &format) { QOffscreenSurface *surface = new QOffscreenSurface; surface->setFormat(format); -// QWindow *surface = new QWindow; surface->create(); if (!surface->isValid()) { - printf("ERROR: surface not valid!\n"); -// abort(); + fprintf(stderr, "ERROR: surface not valid!\n"); + exit(1); } return surface; }