iDevGames Forums
Low-level control of refresh rate - Printable Version

+- iDevGames Forums (
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: Low-level control of refresh rate (/thread-3659.html)

Low-level control of refresh rate - nfunit - Dec 6, 2006 08:58 AM


I am currently trying to gain low-level control of my lcd screen's refresh rate. I would like to be able to modulate the rate via some form of code (OpenGL, etc...) Essentially I want to place the stop or start time of various animations on either the on or off time of the screen.

Anybody have a clue what language or environment is best suited for this application? Beginning tips on how to accomplish this? Seems (perhaps ignorantly) like this shouldn't be very difficult to impliment...

Thanks much.


Low-level control of refresh rate - ThemsAllTook - Dec 6, 2006 11:10 AM

If you enable VBL sync on an OpenGL context, buffer swaps will occur between screen refreshes. How to do this varies depending on which API (AGL, CGL, NSOpenGL, etc.) you're using.

Low-level control of refresh rate - OneSadCookie - Dec 6, 2006 12:10 PM

I don't really understand the question, maybe vsync is what you're after.


* you can't vary the screen's refresh rate except by changing the display mode. Look at CGDirectDisplay to get a list of available modes.

* For some screens you can get the refresh rate and even the current "beam position" for the screen. Again, look at CGDirectDisplay. Not all screens support this information (I believe Apple LCDs always return 0 for the refresh rate and 0 for the beam position).

In other words, if vsync isn't what you want, you're outta luck.

Low-level control of refresh rate - nfunit - Dec 7, 2006 07:20 PM

Ok, I think I can clarify now. I believe that I want to be able to control the framebuffer of my videocard (ATI Mobility Radeon 9000). I've read that the refresh rate can be controlled by the framebuffer. Do the above suggestions still hold?

Low-level control of refresh rate - OneSadCookie - Dec 7, 2006 07:34 PM

As I said, you cannot control the refresh rate other than by choosing between the available modes (which may or may not include more than one refresh rate, and may or may not tell you what that refresh rate is).