ios - GLKView - Updating from UI thread -
i setting opengl ios application using glkview. workflow such:
- initialize glkview in viewdidload() - shaders, textures, arrays, etc.
- wait touch input on glkview surface.
- once touch input received update opengl interal scene - glviewport, glclear, gldrawelements, etc etc..
- 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
Post a Comment