From a74928552b53bdde18406fc342de0bf023996052 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Tue, 22 Jul 2014 19:45:47 -0400 Subject: [PATCH] Adding legacy/core decision in gl-config/canvas original commit: 31001f3484c3d379a2c85b5c5974283d3f909d61 --- pkgs/gui-pkgs/gui-lib/mred/private/wx/cocoa/canvas.rkt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/gui-pkgs/gui-lib/mred/private/wx/cocoa/canvas.rkt b/pkgs/gui-pkgs/gui-lib/mred/private/wx/cocoa/canvas.rkt index 044ca65c..f31c36e5 100644 --- a/pkgs/gui-pkgs/gui-lib/mred/private/wx/cocoa/canvas.rkt +++ b/pkgs/gui-pkgs/gui-lib/mred/private/wx/cocoa/canvas.rkt @@ -192,12 +192,22 @@ (define NSOpenGLPFASampleBuffers 55) (define NSOpenGLPFASamples 56) (define NSOpenGLPFAMultisample 59) +(define NSOpenGLPFAOpenGLProfile 99) + +(define NSOpenGLProfileVersionLegacy #x1000) +(define NSOpenGLProfileVersion3_2Core #x3200) (define (gl-config->pixel-format conf) (let ([conf (or conf (new gl-config%))]) (tell (tell NSOpenGLPixelFormat alloc) initWithAttributes: #:type (_list i _int) (append + (if (version-10.7-or-later?) + (list NSOpenGLPFAOpenGLProfile + (if (send conf get-legacy?) + NSOpenGLProfileVersionLegacy + NSOpenGLProfileVersion3_2Core)) + null) (if (send conf get-double-buffered) (list NSOpenGLPFADoubleBuffer) null) (if (send conf get-stereo) (list NSOpenGLPFAStereo) null) (list