     }
 
     override func viewDidEndLiveResize() {
+        viewBounds = self.bounds
         self.needsReset = true
     }
 

    var numCells:Int = 1024
    var cpuCellsBuffer: [UInt8] = []
    var needsReset: Bool = false

    required init?(coder: NSCoder) {
        if let defaultDev = MTLCreateSystemDefaultDevice() {


        super.init(frame: frame)
        self.wantsLayer = true
        
        viewBounds = self.bounds
    }

    deinit {
