   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() {

                                   AVCaptureVideoDataOutputSampleBufferDelegate {
  public func captureOutput(_ captureOutput: AVCaptureOutput!, didOutputSampleBuffer sampleBuffer: CMSampleBuffer!, from connection: AVCaptureConnection!) {
    // to be implemented
    if captureOutput is AVCaptureVideoDataOutput {
      //print("capture", captureOutput)
      render()
    } else {
      print("capture", captureOutput)
    }
  }
}

