Profiling OpenGL ES App
Frank C. Wrote:If you're using an NSTimer to drive frames you'll want to crank up the interval. Running a timer at 60Hz won't necessarily give you 60 FPS due to VBL syncing and other blocking event updates. Some folks recommend using a separate thread for rendering but I've never run into any problems with NSTimer - you just gotta crank it up - but note that you'll never exceed 60FPS on the iPhone since that's the hard-coded VBL rate.
What I do is run my frame timer at 120Hz and de-couple the logic/physics steps from the graphics updates using the technique described here. But I also cap the graphics updates, so I run physics at 60Hz, and draw at 30Hz. The timer might spin needlessly at times in this scenario but that 120Hz ensures you have some breathing room to catch up on updates when things are bogging down.
And yes - set your CAEAGLLayer to opaque (check the OpenGL ES project template).
Franc, if your game repaints every 33 miliseconds, why you update it every 16 miliseconds? Why do you update it 2 times if player will see only one?
|Messages In This Thread|
Profiling OpenGL ES App - riruilo - Jan 19, 2010 07:52 AM
Possibly Related Threads...
|Profiling the non-OpenGL parts of my game||monteboyd||10||2,742||
Oct 25, 2012 04:03 PM
Last Post: monteboyd