Create a Renderer and copy over the Math library
This commit is contained in:
parent
75f23a94a4
commit
bb9507e3ec
4 changed files with 156 additions and 0 deletions
|
@ -11,6 +11,8 @@ import MetalKit
|
|||
|
||||
class TerrainViewController: NSViewController {
|
||||
|
||||
let renderer = Renderer()
|
||||
|
||||
private var metalView: MTKView! {
|
||||
return view as? MTKView
|
||||
}
|
||||
|
@ -23,6 +25,7 @@ class TerrainViewController: NSViewController {
|
|||
v.translatesAutoresizingMaskIntoConstraints = false
|
||||
v.widthAnchor.constraint(greaterThanOrEqualToConstant: 640).isActive = true
|
||||
v.heightAnchor.constraint(greaterThanOrEqualToConstant: 480).isActive = true
|
||||
v.delegate = renderer
|
||||
view = v
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue