From 68e647ae911cc5d34a8b443c9c115bcf0336bd3a Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 11 Jan 2011 14:31:15 -0700 Subject: [PATCH] win32: no multisample for offscreen gl because it interferes with multisample setup for canvases and seems unlikely to be supported or useful --- collects/mred/private/wx/win32/gl-context.rkt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/collects/mred/private/wx/win32/gl-context.rkt b/collects/mred/private/wx/win32/gl-context.rkt index 56a6e23f23..3da5c6e3f1 100644 --- a/collects/mred/private/wx/win32/gl-context.rkt +++ b/collects/mred/private/wx/win32/gl-context.rkt @@ -82,7 +82,7 @@ (dynamic-wind (lambda () (wglMakeCurrent hdc hglrc)) - t + t (lambda () (wglMakeCurrent #f #f)))) @@ -117,7 +117,7 @@ (define PFD_MAIN_PLANE 0) (define (create-gl-context hdc config offscreen? - #:try-ms? [try-ms? #t]) + #:try-ms? [try-ms? (not offscreen?)]) (when try-ms? (unless tried-multisample? (init-multisample! config))) (let* ([config (or config (new gl-config%))] [accum (send config get-accum-size)] @@ -152,7 +152,8 @@ )] [ms (send config get-multisample-size)] [pixelFormat (or - (and wglChoosePixelFormatARB + (and try-ms? + wglChoosePixelFormatARB (or (choose-multisample hdc config offscreen? ms) (choose-multisample hdc config offscreen? 2))) (ChoosePixelFormat hdc pfd))])