Support GL windows on retina display when app does not set Fl::use_high_res_GL(1)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13078 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
e32b7e1fca
commit
ab51dfc636
@ -2202,6 +2202,7 @@ static CGContextRef prepare_bitmap_for_layer(int w, int h ) {
|
||||
|
||||
@implementation FLViewGL
|
||||
- (void)displayLayer:(CALayer *)layer {
|
||||
if (!Fl::use_high_res_GL()) layer.contentsScale = 1.;
|
||||
[self drawRect:[self frame]];
|
||||
Fl_Window *window = [(FLWindow*)[self window] getFl_Window];
|
||||
if (window->parent()) window->redraw(); // useful during resize of GL subwindow
|
||||
|
||||
Loading…
Reference in New Issue
Block a user