Pass the device around
This commit is contained in:
parent
2361199267
commit
8a664fff70
2 changed files with 16 additions and 3 deletions
|
@ -12,6 +12,12 @@ import MetalKit
|
|||
|
||||
class Renderer: NSObject, MTKViewDelegate {
|
||||
|
||||
let device: MTLDevice
|
||||
|
||||
init(device: MTLDevice) {
|
||||
self.device = device
|
||||
}
|
||||
|
||||
func mtkView(_ view: MTKView, drawableSizeWillChange size: CGSize) {
|
||||
print("Size of \(view.debugDescription) will change to \(size)")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue