-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMetalViewController.mm
More file actions
48 lines (34 loc) · 831 Bytes
/
MetalViewController.mm
File metadata and controls
48 lines (34 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// MetalViewAppDelegate.m
// MetalExample
//
// Created by Brent on 6/1/20.
// Copyright © 2020 James Hughes. All rights reserved.
//
#import "MetalViewController.h"
#import "MetalView.h"
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import <Foundation/Foundation.h>
MetalViewController* g_MetalViewController;
@implementation MetalViewController
@synthesize m_metalView;
- (instancetype)init
{
self = [super init];
if (!self)
return nil;
g_MetalViewController = self;
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Add in our metal view.
CGRect contentSize = self.view.bounds;
m_metalView = [[MetalView alloc] initWithFrame:contentSize];
m_metalView.bounds = self.view.bounds;
[self.view addSubview:m_metalView];
}
@end