Enable Retina (HiDPI) support on OSX wxGLCanvas

Closes #15700.

Closes https://github.com/wxWidgets/wxWidgets/pull/1485
This commit is contained in:
Scott Talbert 2019-08-13 23:27:57 -04:00 committed by Vadim Zeitlin
parent b134589cbb
commit f5d02e6808

View File

@ -167,6 +167,7 @@ bool wxGLCanvas::DoCreate(wxWindow *parent,
NSRect r = wxOSXGetFrameForControl( this, pos , size ) ;
wxNSCustomOpenGLView* v = [[wxNSCustomOpenGLView alloc] initWithFrame:r];
[v setWantsBestResolutionOpenGLSurface:YES];
wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( this, v, wxWidgetImpl::Widget_UserKeyEvents | wxWidgetImpl::Widget_UserMouseEvents );
SetPeer(c);