From 005a1964eebe4a6ebc787bce3745b1689bca61fc Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 2 May 2019 14:29:19 +0100 Subject: [PATCH] Check for GL profile on macos to determine if context is core or compat --- renderdoc/driver/gl/cgl_hooks.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/renderdoc/driver/gl/cgl_hooks.cpp b/renderdoc/driver/gl/cgl_hooks.cpp index beaf47839..a906f03dd 100644 --- a/renderdoc/driver/gl/cgl_hooks.cpp +++ b/renderdoc/driver/gl/cgl_hooks.cpp @@ -77,6 +77,9 @@ CGLError GL_EXPORT_NAME(CGLCreateContext)(CGLPixelFormatObj pix, CGLContextObj s CGL.CGLDescribePixelFormat(pix, 0, kCGLPFASamples, &value); init.multiSamples = RDCMAX(1, value); + CGL.CGLDescribePixelFormat(pix, 0, kCGLPFAOpenGLProfile, &value); + bool isCore = (value >= kCGLOGLPVersion_3_2_Core); + GLWindowingData data; data.wnd = NULL; data.ctx = *ctx; @@ -84,7 +87,7 @@ CGLError GL_EXPORT_NAME(CGLCreateContext)(CGLPixelFormatObj pix, CGLContextObj s { SCOPED_LOCK(glLock); - cglhook.driver.CreateContext(data, share, init, true, true); + cglhook.driver.CreateContext(data, share, init, isCore, isCore); } return ret;