views:

516

answers:

3
+3  Q: 

opengl_error_break

I'm developing a game for iPhone and is pretty far along, but one thing bugs me when using Instrument a see that something called opengl_error_break is taking LOTS of valueable time. The caller seems to be MBXGLEngine which is a part of the OpenGLES framework but I have no idea of what it does or how to debug it.

Does any one here have a clue about this? Here's a screen dump that can be of help.

A: 

Are you running on OS 3.0?

I saw the same behaviour when briefly testing on an old iPhone with OS 3.0.

I didn't come up with an explanation, although I suspected that perhaps
the GL ES implementation was spewing errors at me. It wasn't.

I was trying to optimize my framerate so in the end I ignored this
and just concentrated on lowering the "renderer utilization".
Now I'm hitting my framerate and all's well that end's well.

Still curious about opengl_error_break. I never see it on my iPodTouch/2.x.

Rhythmic Fistman
You're right in that it's targeted for OS 3.0. But it's actually not required. I'll try with 2.x and see what happens.
Mattias Akerman
A: 

Not an answer, but this page suggests it's a symbol useful for getting a breakpoint on an OpenGL ES error. This of course contradicts posts like this that claim their code runs without reporting any errors from OpenGL ES, yet spends time in that function. Weird.

unwind
I've read those to, but as you said they doent give much of an answer.
Mattias Akerman
A: 

It's a red herring. The time is actually spent in other OpenGL functions, but Instruments is confused.

In some OS/SDK versions, all OpenGL symbols are hidden except for opengl_error_break (which allows you to continue to set a breakpoint on it). This confuses Instruments (and Shark). Basically, Instruments knows the execution is in an OpenGL library, but since the only symbol it can find is opengl_error_break, it guesses (incorrectly) that opengl_error_break is executing.

This is explained by an Apple developer on the Apple Developer forums. A later reply goes into more detail.

Jon-Eric