What MrChaz said. Use time-based animation and then if you want to smooth out the rough spots, you can tick using a running average.
On Feb 1, 1:02 pm, MrChaz <mrchazmob...@googlemail.com> wrote: > The easiest way to achieve a smooth rotation is to multiply the > rotation amount by the time difference between the current frame and > the last frame - that way the amount moved is constant over time. > > On Feb 1, 5:18 pm, "tomei.ninge...@gmail.com" > > > > <tomei.ninge...@gmail.com> wrote: > > Hello Android OpenGL/real-time gurus, > > > I am drawing a pretty simple scene, with one large texture the about > > size of the screen (two triangles). I notice that the frame-rate is > > irregular: in most of cases, a frame finishes in 17 ms. However, in > > about 1 of 10 times, the frame finishes in 33ms. > > > My guess is probably some background services need to run. However, > > the Linux scheduler is biased towards my FG app, so the BG services > > are usually starved, until they can't take it anymore and they grab > > the CPU from my app .... > > > I am seeing stuttering in the animation. Is this due to the irregular > > frame rate? Should I delay each frame so that all frames are rendered > > with 33ms frame time? If so, what's the best technique of achieving > > this? > > > Is there an API that I can call to guarantee CPU resources for the > > render thread .... I really hope Android runs on some sort of real > > time kernel ... > > > Thanks! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en