Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid GLSurfaceView ~56fps - How to control swap?
    text
    copied!<p>When running the basic sample: <a href="http://android-developers.blogspot.com/2009/04/introducing-glsurfaceview.html" rel="nofollow">http://android-developers.blogspot.com/2009/04/introducing-glsurfaceview.html</a></p> <p>Add some basic timing using System.currentTimeMillis() or dropping to native code and using clock_gettime(CLOCK_REALTIME_HR, &amp;res) both yield the same results it appears. I tested with both separately.</p> <p>I always calculate a frame rate of ~56. That is a rough average of 18ms between frames. I realize the timing of frames is not a perfect science (timer accuracy, device doing stuff in the background). I simply let it run doing absolutely nothing, not even a glClear. After an hour this is the results I got which is about the same as letting it run for 1 minutes.</p> <p>I've tried many things to achieve a true 59/60fps. I'm beginning to wonder if it is my device (HTC Incredible S). Although I have tried Samsung Galaxy S and Nexus S both with the same results. Tablets do not exhibit this behavior at all. On my EEE Transformer and Xoom I get ~16ms a frame consistently.</p> <p>This leads me to believe VSYNC is the issue and that the vsync on that generation of Android phones is slow. Really VSYNC should be ~16ms. Achieving a true 60fps is unlikely but 59fps should be common.</p> <p>Has anyone else experienced this? Any tips for disabling vsync? I don't think that is possible. Any tips for gaining control of controlling the "swap" step of rendering?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload