iphone - How can I keep drawing my GLView while messing around with other views (like scrolling a picker wheel) -
There are two views of my app, that holds an OpenGL context that is constantly reproducing itself (a NSTimer) and the second picker wheel while I'm spinning wheel, it seems that the timer firing stops. Can there be any way I override to see the picker so that it is attracted manually? Or any way to keep timer firing?
Thank you, -s
Your timer is not firing because it's main Built on the thread. There are user interface interactions on that main thread too, so when you are working with picker or any other processing touch event, your timer will be blocked from firing.
One way to handle this is to create a thread that acts as a timer, an example of which you can use it for
- ( Zero) OpenGL UpdateDetrait; {While (IsOpenGLUpdateCancelled) {{Self Update OpenGLView}; // do it at 30 fps [nstead sof forte interval: (1.0 f / 30.0f)]; }}
You can then
I believe that you can update the OpenGL layer's performance on a background thread without any problem, unless it can be accessed from another thread , But if you run in Crash, you can only use performance updates on the main thread
[self display selector onmine Red: Object with the @Selector (updated OpenGLV): zero waitUNNET don: no];
Call directly to the above thread method - instead of the OpenGLV.
To kill the thread, just set your isOpenGLUpdateCancelled instance variable and wait for some of it, of course, all the methods and example variables here are just examples and to complete your application. Will have to change.
Comments
Post a Comment