ios - GLKView - Updating from UI thread -


i setting opengl ios application using glkview. workflow such:

  1. initialize glkview in viewdidload() - shaders, textures, arrays, etc.
  2. wait touch input on glkview surface.
  3. once touch input received update opengl interal scene - glviewport, glclear, gldrawelements, etc etc..
  4. call glkview.sceneneedsdisplay()

is correct way of doing it? can call opengl stuff main ui thread? or there way run on opengl thread?

for android setup opengl calls so:

this.queueevent(new runnable() {       @override       public void run() {             // opengl calls go here. glviewport, glclear, gldrawelements, etc etc..                                    surfaceview.requestrender(); // ios equivelant - glkview.setneedsdisplay()       } }); 

thanks in advance.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -