Jump to content
  • Advertisement
Sign in to follow this  
Martin Perry

OpenGL App bottleneck - frame drops

This topic is 1853 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am newbie to OpenGL ES (so far, I used mainly DX11). Now for my scene, I have about 100 draw calls. I can use instancing, but only about half of objects can be instanced, so draw calls count would be about 50 - 60 / frame. Every object is max. 700 triangles (I use low-poly models)

What is some kind of limit of drawcalls per scene (targeting iPhone 4 like performance devices) ? So far I am running my code via NVidia GLES (http://developer.download.nvidia.com/tegra/docs/win_es2emu_pack_v100.pdf) on Windows, but there is a lot of power from my CPU and GPU, so I can tell, how it will behave on mobile device.

 

Or is there a way, how to find bottleneck of my application ? I know gDebugger is for OpenGL, but with ES version it behave sometimes weird (a lot of warnings in calls I dont have in my code, so I suspect them to be from GLES layer code).

Edited by Martin Perry

Share this post


Link to post
Share on other sites
Advertisement

The only way to find out what the bottleneck is, is by running your game on a target device and profiling. You're just not going to get a good answer running GLES on Windows, or even the iOS simulator on a Mac.

 

The iOS development tools include profilers which will help you identify where your CPU time is going and whether you are bound by fill-rate, vertex processing time or by CPU.

 

But I imagine you want some rule of thumb, so here's my guestimate. Earlier iOS devices had a pretty severe CPU cost per draw call, and I have spent a lot of time rearranging things to absolutely minimize draw calls for apps that targeted 3GS and earlier. Since then, Apple have improved the drivers a lot, and the CPUs have improved greatly too. Given you are targeting only iPhone 4 and onwards, draw calls should not be such a big issue for you, especially if you are using vertex buffer objects. 100 draw calls is probably enough to make a mark on your CPU profile, but is unlikely IMO to be a dominating factor in stopping you from hitting 60fps. To pluck a figure out of the air, I'd imagine it'll eat about 20% of your frame time.

 

Often, the trickier problem if you're targeting iPhone4 and iPad1 is that they have a lot of pixels, and not enough GPU power to cope, so fill-rate is usually a big problem. Hopefully your product doesn't require a lot of transparency, and your pixel shaders are super simple. If you're doing per-pixel lighitng, then you'd better implemenet a per-vertex alternative to use on Phone4/iPad1. You'll also need to make good use of the GLES shader precision in your shaders to squeeze out the most from your pixel shaders.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!