iPhone OpenGL ES Debugging

I have about 4 half finished blog entries related to ArcNebula and I promise they'll all be online soon. At the moment my focus is getting the Combat Simulator out ASAP for you all. :-)

In the meantime here is an entry I have been meaning to publish for quite some time:

It's all about Gremedy's OpenGL / OpenGL ES Debugger for OS X & the iPhone / iPod.

Gremedy's OpenGL / OpenGL ES Debugger, called gDEBugger, is a development tool we are huge fans of here at Ginetix Games. Both for normal desktop OpenGL debugging on Mac OS X and also for OpenGL ES work on Apple's iPhone. (Although it should be noted it's also available for Linux and Windows users.) Yesterday Gremedy kindly gave us a sneak peak at an updated version of the iPhone version that in our opinion makes it an absolute must have development tool...

We have been lucky enough to be invited to take part in several of Gremedy's Beta tests, and each time it's been a joy. And each time they've ended up (indirectly) giving us just as much help as we hope we've given them. Because, as we tested their tools on our code base, we reaped performance rewards in respectable percentages from the results gDEBugger gave us. Recently Gremedy used some early internal versions of our Open GL ES 1.1 & Open GL ES 2.0 Virush engine builds running our current project (ArcNebula) to demonstrate gDEBugger iPhone at SIGGRAPH and various developer / game shows around the globe.

Apple do have a great OpenGL debugging tool as part of their various SDKs, but it doesn't boast many of the features of Gremedy's offering, and has no features directly related to iPhone OpenGL ES Development (as of the latest iPhone SDK offering).

I've tried to be a bit of an Evangelist in the past for gDEBugger and mention it often in many of the developer forums and mailing lists related to iPhone & iPod Development that I frequent. This is because I really think it's an indispensable development tool for people writing serious OpenGL ES Apps on the iPhone.

One of the oft voiced concerns about gDEBugger is that when debugging or profiling on the Simulator we are not really seeing what's going on on the device. Whilst this concern is valid, here at Ginetix we have managed to gain very significant performance improvements in our own iPhone engine (Virush) by working through the profiling and analyses output from runs in the iPhone Simulator with gDEBugger.

We've also been able to shed a lot of redundant calls from our core engine as well as from specific code bases in previous products, which have then been updated for our customers.

On the physical iPod and iPhone devices these optimisations developed in the Simulator do carry through in the final product. Particularly those which relate to vertex batches, and state change calls.

Virush Engine Logo

Live editing of shaders, the ability to drill down into textures (especially procedurally generated ones and those in FBOs), buffers and so forth, as well as analyse the geometry batches you are sending to the GPU and run code step by step while looking at the source are all great tools for mobile device Open GL application optimisation, as well as algorithmic bug finding. gDEBugger has enabled us to establish a solid and reusable OpenGL ES1.x / ES2.x engine for the iPhone in 'Virush' as of today.... But now Gremedy have gone one step further....

Live Debugging of Open GL ES on the iPhone & iPod.

This morning I was able to test an internal build of Gremedy's latest debugger which allowed me to build and run an OpenGL ES App. via Xcode and gDEBugger on both an original Apple iPhone and a new Apple iPod. All the features of gDEBugger are there, and for an internal build which is "still in development" it's actually remarkably easy to integrate into your workflow.

The version I got had a "70 step condensed into 26 step" guide for me to get things up and running. It was so clearly documented that I actually got it all to work the first time and it only took about 10 minutes! After that it's pretty close to seamless to debug on any device with your updated Xcode project. Quite frankly I could live with that setup process and plan to use this new version of gDEBugger daily from now on. However, the nice people at Gremedy assure me that it's only like that at the moment while I get a sneak peak, and that the final version will offer an almost completely seamless integration into the Xcode development work flow, as well as optimisations to some of the more resource intensive operations gDEBugger offers. This I believe 100% as the leaps and bounds they made in usability on the original iPhone version of gDEBugger over it's Beta period were astounding. By the end of that development cycle each and every one of my wish list checkboxes was well and truly ticked and we have today a point and click integration with the existing iPhone Simulator and Xcode SDK.

I have been able to spend the whole morning debugging, analysing and profiling ArcNebula on both my iPhone and my iPod. The data generated is already showing us some places where we can tighten Virush up further...

You can download a trial version of gDEBugger for iPhone right now as well as versions for other platforms on Gremedy's web site. And I am sure the update which allows debugging live on devices will be generally available sooner rather than later. It is already extremely stable overall.

If you're serious about iPhone and iPod OpenGL programming it's worth a look.