[TheGreatCube] Start and stop the rendering loop in view lifecycle
This commit is contained in:
		
							parent
							
								
									eddb49a4a8
								
							
						
					
					
						commit
						660f7290a0
					
				
					 1 changed files with 10 additions and 0 deletions
				
			
		|  | @ -17,6 +17,16 @@ class ViewController: NSViewController { | |||
|         super.viewDidLoad() | ||||
|         glView.renderer = renderer | ||||
|     } | ||||
| 
 | ||||
|     override func viewWillAppear() { | ||||
|         super.viewWillAppear() | ||||
|         glView.start() | ||||
|     } | ||||
| 
 | ||||
|     override func viewDidDisappear() { | ||||
|         super.viewDidDisappear() | ||||
|         glView.stop() | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue