src/video/cocoa/SDL_cocoametalview.m
changeset 11388 16b174adc603
parent 11367 e8fc755a89e8
child 11402 d459d8934897
equal deleted inserted replaced
11387:0339b061eecd 11388:16b174adc603
    92     NSView *view = data->nswindow.contentView;
    92     NSView *view = data->nswindow.contentView;
    93 
    93 
    94     SDL_cocoametalview *metalview
    94     SDL_cocoametalview *metalview
    95         = [[SDL_cocoametalview alloc] initWithFrame:view.frame
    95         = [[SDL_cocoametalview alloc] initWithFrame:view.frame
    96                        useHighDPI:(window->flags & SDL_WINDOW_ALLOW_HIGHDPI)];
    96                        useHighDPI:(window->flags & SDL_WINDOW_ALLOW_HIGHDPI)];
       
    97     // Instantiate the CAMetalLayer
       
    98     metalview.wantsLayer = YES;
    97     [view addSubview:metalview];
    99     [view addSubview:metalview];
    98   
       
    99     return metalview;
   100     return metalview;
   100 }
   101 }
   101 
   102 
   102 void
   103 void
   103 Cocoa_Mtl_GetDrawableSize(SDL_Window * window, int * w, int * h)
   104 Cocoa_Mtl_GetDrawableSize(SDL_Window * window, int * w, int * h)