I d'like to draw as many frames as possible with OpenGL on Mac OS X to measure the performance on different scenes. What I've tried so far:

  1. Using a CVDisplayLink that has NSOpenGLCPSwapInterval set to 0, so it does not sync with the Display. But with that it's still stuck at max 60FPS

  2. Using normal -drawRect: with a timer that fires 1/1000sec and calls -setNeedsDisplay: Still not more than 60FPS

  3. Same as 2. but I call -display in the timer callback. With that I get the FPS above 60, but it still stops at 100-110 FPS. Although the frame rate should easily be at 10times more.

Andy idea how I can really draw as many frames as possible?

  • 3
    \$\begingroup\$ Note that accurately measuring render performance is generally more involved than just counting frames-per-second (see this, which is D3D-focused, but still has merit). FPS is also a generally poor metric, because it isn't linear. \$\endgroup\$
    – user1430
    May 7, 2012 at 15:19
  • \$\begingroup\$ @V1ru8: I asked a very similar question a few months ago and still haven't gotten a very good answer. I'd love to know how to do this too. \$\endgroup\$
    – Kyle
    May 7, 2012 at 20:39
  • 1
    \$\begingroup\$ If you really want to know how fast you are rendering you don't necessarily have to let it render at an unlimited rate. You could just time how long your draw calls take to complete, take the inverse of that and that should give you a rough estimate of "how many fps could I be doing right now?". @josh-petrie It might not be the best metric, but at least it can indicate to you when something has gone horribly wrong and you need to do some actual profiling. \$\endgroup\$
    – user13213
    May 8, 2012 at 9:41

1 Answer 1


This stack overflow answer has some calls you can use to disable vsync..


..not sure if that changes anything though. One API should work just as well as another.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .