4

I have a game in Xcode 6.1.1 using OpenGL ES 3.0, targeting iPad Air. When I capture OpenGL ES frame, the FPS number and shader program time always show 0.

I have enabled "GPU Frame Capture" option in project scheme. Frame rendering is called by CADisplayLink in a non-main thread.

How can I get the correct FPS nubmer and program time?

Sheepy
  • 17,324
  • 4
  • 45
  • 69
user3239388
  • 41
  • 1
  • 2

2 Answers2

6

Next to the Run Button click on your project and then > Edit Scheme ... > Run Configuration > Options > GPU Frame Capture > choose OpenGL ES.

Xcode > Edit Scheme > Run Configuration > Options > GPU Frame Capture > OpenGL ES

JeanLuc
  • 4,783
  • 1
  • 33
  • 47
2

I came across similar issue. If you implement UIViewController for setting EAGLContext Layer Xcode would not display any measurements except memory and cpu performance,instead of that you should use GLKViewController for implementation.

For example:

Replace below line

   @interface MyRenderingView : UIViewController <...>{...}

with

   @interface MyRenderingView : GLKViewController <...>{...}

this makes the difference.

Another way:

Use "Xcode->OpenDeveloperTool->Instruments->GPU Driver" to run your app, this tool displays the FPS and other GPU information you needed.

VivekParamasivam
  • 1,086
  • 2
  • 13
  • 23
  • Thanks for your reply GoodnezEverywer. But I'm not intent to use GLKViewController, cause I need to call the render API in a non-main thread. In addition, I also checked cocos2d-x and unity3d's exporting project, they also did not use GLKViewContoller, but using UIViewController, and they both can get the correct Shader Program Time in Frame Capture. So I think it's possible to use UIViewController and get the correct shader program time. But i can't find the way. :( – user3239388 Apr 27 '15 at 01:34