metal-examples-tutorials/ambient_occlusion/ao.playground/Contents.swift

10 lines
248 B
Swift

import MetalKit
import PlaygroundSupport
let frame = NSRect(x: 0, y: 0, width: 400, height: 400)
let delegate = MetalView()
let view = MTKView(frame: frame, device: delegate.device)
view.delegate = delegate
PlaygroundPage.current.liveView = view