diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/headless_view.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/common/headless_view.cpp b/common/headless_view.cpp index 61531bfd65..10888f7a76 100644 --- a/common/headless_view.cpp +++ b/common/headless_view.cpp @@ -20,7 +20,7 @@ HeadlessView::HeadlessView() { GLint num; CGLError error = CGLChoosePixelFormat(attributes, &pixelFormat, &num); if (error) { - fprintf(stderr, "Error pixel format\n"); + fprintf(stderr, "Error pixel format: %s\n", CGLErrorString(error)); return; } @@ -30,6 +30,12 @@ HeadlessView::HeadlessView() { fprintf(stderr, "Error creating GL context object\n"); return; } + + error = CGLEnable(gl_context, kCGLCEMPEngine); + if (error != kCGLNoError ) { + fprintf(stderr, "Error enabling OpenGL multithreading\n"); + return; + } #endif #if MBGL_USE_GLX |