diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-01-25 10:58:47 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-01-25 14:46:43 +0100 |
commit | 332e5bcc52058b9772fe7b4a4be28b2cff213380 (patch) | |
tree | c11e68320dbe74d04fb0e105aadbc5d1f76c4beb /platform/darwin | |
parent | b5bc4fd8b470cfe4198206e75c713dd71a22ffaa (diff) | |
download | qtlocation-mapboxgl-332e5bcc52058b9772fe7b4a4be28b2cff213380.tar.gz |
[macos] align HeadlessDisplay with SDK OpenGL context creation options
Diffstat (limited to 'platform/darwin')
-rw-r--r-- | platform/darwin/src/headless_display_cgl.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/platform/darwin/src/headless_display_cgl.cpp b/platform/darwin/src/headless_display_cgl.cpp index b38eb6b62c..5b7a1f2bac 100644 --- a/platform/darwin/src/headless_display_cgl.cpp +++ b/platform/darwin/src/headless_display_cgl.cpp @@ -18,8 +18,14 @@ HeadlessDisplay::Impl::Impl() { // TODO: test if OpenGL 4.1 with GL_ARB_ES2_compatibility is supported // If it is, use kCGLOGLPVersion_3_2_Core and enable that extension. CGLPixelFormatAttribute attributes[] = { - kCGLPFAOpenGLProfile, - static_cast<CGLPixelFormatAttribute>(kCGLOGLPVersion_Legacy), + kCGLPFAOpenGLProfile, static_cast<CGLPixelFormatAttribute>(kCGLOGLPVersion_Legacy), + // Not adding kCGLPFAAccelerated, as this will make headless rendering impossible when running in VMs. + kCGLPFAClosestPolicy, + kCGLPFAAccumSize, static_cast<CGLPixelFormatAttribute>(32), + kCGLPFAColorSize, static_cast<CGLPixelFormatAttribute>(24), + kCGLPFAAlphaSize, static_cast<CGLPixelFormatAttribute>(8), + kCGLPFADepthSize, static_cast<CGLPixelFormatAttribute>(16), + kCGLPFAStencilSize, static_cast<CGLPixelFormatAttribute>(8), kCGLPFASupportsAutomaticGraphicsSwitching, kCGLPFAAllowOfflineRenderers, // Allows using the integrated GPU static_cast<CGLPixelFormatAttribute>(0) |