Hello, I am a new swift developer. I am writing code using glkit. I have trouble in GLKViewController not calling update method. Please help me fix it. Thank You
import GLKit
class gameController: GLKViewController{
override func viewDidLoad() {
super.viewDidLoad()
let glkView: GLKView = view as! GLKView
glkView.context = EAGLContext(api: .openGLES2)!
EAGLContext.setCurrent(glkView.context)
}
func update(){
// not being called
}
override func glkView(_ view: GLKView, drawIn rect: CGRect) {
glClearColor(1, 1, 1, 1)
glClear(GLbitfield(GL_COLOR_BUFFER_BIT))
}
}