Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add annotations to OpenGL ES frame capture data in Xcode?

The "Capture OpenGL ES Frame" feature in Xcode 4 is marvelous. It lists out every OpenGL-related call made during a single rendering frame. But there's an additional feature that would help me connect these calls to my code and search for significant data more easily. I just don't know if this feature is already available.

Is it possible to add my own "annotations"--or call them "markers", "pseudo-calls", "labels", whatever you will--to the captured call listing. For example, could I add an entry that says, "Here's where I start rendering the HUD", and have it appear right above the calls that actually render the HUD?

The PIX tool from DirectX has similar functionality, and that's what I'm hoping for.

like image 988
OldPeculier Avatar asked Dec 30 '11 16:12

OldPeculier


1 Answers

You can add labels to Xcode's debug navigator by using the EXT_debug_marker extension. Call the functions glPushGroupMarkerEXT() and glPopGroupMarkerEXT() in your code. Call glPushGroupMarkerEXT() before the OpenGL ES calls you want to annotate.

glPushGroupMarkerEXT(0, "Marker Name");

Call glPopGroupMarkerEXT() after those calls.

glPopGroupMarkerEXT();
like image 120
Swift Dev Journal Avatar answered Nov 13 '22 04:11

Swift Dev Journal