FLTK logo

[master] 7d58e23 - macOS: add necessary setWantsBestResolutionOpenGLSurface:YES message.

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 7d58e23 - macOS: add necessary setWantsBestResolutionOpenGLSurface:YES message. "ManoloFLTK" Sep 27, 2022  
 
commit 7d58e2385452b8373448e3f91013a8cda39c7aa3
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Wed Sep 28 08:23:36 2022 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Wed Sep 28 08:23:36 2022 +0200

    macOS: add necessary setWantsBestResolutionOpenGLSurface:YES message.

 src/Fl_cocoa.mm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git src/Fl_cocoa.mm src/Fl_cocoa.mm
index 7832736..9cb302d 100644
--- src/Fl_cocoa.mm
+++ src/Fl_cocoa.mm
@@ -2953,6 +2953,11 @@ NSOpenGLContext *Fl_Cocoa_Window_Driver::gl1ctxt_create() {
                               initWithFormat:gl1pixelformat shareContext:nil];
   [gl1pixelformat release];
   remove_gl_context_opacity(gl1ctxt);
+#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_7
+  if (fl_mac_os_version >= 100700 && Fl::use_high_res_GL()) {
+    [gl1view setWantsBestResolutionOpenGLSurface:YES];
+  }
+#endif
   [gl1ctxt setView:gl1view];
   return gl1ctxt;
 }
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.