Pass the device around

This commit is contained in:
Eryn Wells 2018-11-03 10:50:43 -04:00
parent 2361199267
commit 8a664fff70
2 changed files with 16 additions and 3 deletions

View file

@ -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)")
}