X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=context.cpp;h=eb62183a3b3a8c9c7c9065f6d212a21b92e8257e;hb=c094b73565559282001764edfbf0f4926d3197fb;hp=36fa2ea7221c8a971541e43d944bbd966f8b7eeb;hpb=cf7b9ee186d4ef8e5da0531b75854c97b821be44;p=nageru diff --git a/context.cpp b/context.cpp index 36fa2ea..eb62183 100644 --- a/context.cpp +++ b/context.cpp @@ -1,5 +1,7 @@ #include +#include + #include #include #include @@ -7,16 +9,18 @@ #include 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; }