   let vertexData:[Float] = [ 0.0, 1.0, 0.0, -1.0, -1.0, 0.0, 1.0, -1.0, 0.0 ]
   var pipelineState: MTLRenderPipelineState?
   var commandQueue: MTLCommandQueue?
-  var timer: CADisplayLink?
 
   override func viewDidLoad() {
     super.viewDidLoad()

    
    commandBuffer.present(drawable)
    commandBuffer.commit()
  }
  
  func gameloop() {
    autoreleasepool {
      self.render()
    }
  }
  
  override func viewDidLayoutSubviews() {

    // 3
    pipelineState = try! device.makeRenderPipelineState(descriptor: pipelineStateDescriptor)
    commandQueue = device.makeCommandQueue()
    
    startVideoCaptureSession()
  }
