Skip to content

Commit

Permalink
Build for mac platform #777
Browse files Browse the repository at this point in the history
  • Loading branch information
timi-liuliang committed Oct 10, 2020
1 parent 5d83813 commit b97501e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/mac/GameViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ - (void)viewDidLoad
[super viewDidLoad];

_view = (MTKView *)self.view;

_view.device = MTLCreateSystemDefaultDevice();
_view.colorPixelFormat = MTLPixelFormatBGRA8Unorm;
_view.depthStencilPixelFormat = MTLPixelFormatDepth32Float;

if(!_view.device)
{
Expand All @@ -24,7 +25,6 @@ - (void)viewDidLoad
}

_renderer = [[Renderer alloc] initWithMetalKitView:_view];

[_renderer mtkView:_view drawableSizeWillChange:_view.bounds.size];

_view.delegate = _renderer;
Expand Down

0 comments on commit b97501e

Please # to comment.