diff options
author | Mike Morris <michael.patrick.morris@gmail.com> | 2014-09-30 17:42:27 -0400 |
---|---|---|
committer | Mike Morris <michael.patrick.morris@gmail.com> | 2014-09-30 17:42:27 -0400 |
commit | c4c4b3318a89c0a7548040f7182fb043704e230f (patch) | |
tree | 4b53b0bbce0a301a8468490ef9bea203bafd41b0 /common | |
parent | 848dccbcae8eb3ddf61b0d9344e150b721a8cf75 (diff) | |
download | qtlocation-mapboxgl-c4c4b3318a89c0a7548040f7182fb043704e230f.tar.gz |
log CGLErrorString for CGLChoosePixelFormat, enable OpenGL
multithreading
https://developer.apple.com/library/mac/technotes/tn2085/_index.html
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 |