Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question
3  
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. –  Josh Petrie May 7 '12 at 15:19
    
@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. –  Kyle May 7 '12 at 20:39
1  
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. –  melak47 May 8 '12 at 9:41
add comment

1 Answer 1

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

http://stackoverflow.com/questions/10866561/cocoa-opengl-unlocked-framerate/10881400#10881400

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.