Profiling an OpenGL ES Application on iOS

I am looking at a game I am working on in the "OpenGL ES Driver" template under "Tools". The sampler shows that I spend almost all of my time on a function named gfxODataGetNewSurface

with a call tree that looks like this:

  • gfxIODataGetNewSurface

  • gliGetNewIOSurfaceES

  • _ZL29native_window_begin_iosurfaceP23_EAGLNativeWindowObject

  • usleep

  • __semwait_signal

(sorry for the weird formatting, safari or stack overflow have my line breaks)

The game only has about 40 FPS (on iPhone 4), I don't think it's a heavy workload that makes me think I am doing something pathological with my OpenGL code.

Does anyone know what gliGetNewIOSurfaceES

/ does gfxIODataGetNewSurface

? And what it indicates is happening in my application. Is a new render or something else constantly being created?

EDIT: New information ...

I found that with the following pixel shader:

varying vec2 texcoord;

uniform sampler2D sampler ; 
const vec4 color = vec4(...);

void main()                 
{                           
    gl_FragColor = color*texture2D(sampler,texcoord);               
}

      

(once again my formatting is getting garbled!)

If I change the const 'color' to #define, the Renderer usage drops from 75% to 35% when drawing fullscreen (960x640) sprites to the screen. Indeed, I want this color to be an interpolated "changing" amount from the vertex shader, but if we make it a global constant, then I can't imagine there is any hope that the "changing" version will be better.

+3
ios xcode opengl-es instruments glsl


source to share


No one has answered this question yet

See similar questions:

12
optimizing OpenGL ES loading on iPhone

or similar:

958
How do I change the name of an iOS app?
497
Codesign error: Provisioning profile cannot be found after deleting expired profile
five
OpenGL ATI and NVIDIA GLSL issues
4
OpenGL ES 2.0 Texturing
2
Texture doesn't seem to load in OpenGL ES. What am I doing wrong?
1
glTexGen in OpenGL ES 2.0
0
GLSL - variable variable gets value for garbage - GL_POINTS
0
strengthening GLSL syntax parsing
0
OpenGL Delayed Rendering: Implementing Point Light
-1
Explaining how openGL works



All Articles
Loading...
X
Show
Funny
Dev
Pics