Sign in to follow this  
teche

Mechanism to configure display timings ?

Recommended Posts

teche    100
Hi All,

Can I measure th refresh rate?
Is there any mechanism to configure display timings (HSync, VSync, H/V front and back porches, blank time)

Thanks in Advance

Share this post


Link to post
Share on other sites
haegarr    7372
Display settings is not part of OpenGL but the underlying OS. Every OS supports display settings, but ... HSync, VSync, H/V front and back porches, blank time ... configuring the display at such a low level is cumbersome and somewhat dangerous. That kind of settings has to be done in the ranges allowed by the specific monitor hardware, the possibilities of the graphics head, and parameter interdependent tuning. Some of the parameters you've mentioned are even meaningless when dealing with LCDs (and finding CRTs these days becomes more and more less probable). May I ask why you need to do so in conjunction with an OpenGL project?

Share this post


Link to post
Share on other sites
teche    100
[quote name='haegarr' timestamp='1305789410' post='4812903']
Display settings is not part of OpenGL but the underlying OS. Every OS supports display settings, but ... HSync, VSync, H/V front and back porches, blank time ... configuring the display at such a low level is cumbersome and somewhat dangerous. That kind of settings has to be done in the ranges allowed by the specific monitor hardware, the possibilities of the graphics head, and parameter interdependent tuning. Some of the parameters you've mentioned are even meaningless when dealing with LCDs (and finding CRTs these days becomes more and more less probable). May I ask why you need to do so in conjunction with an OpenGL project?
[/quote]

Hi haegarr,
Thanks for your reply.I too thought the same but just in doubt i posted my question to know is there any possibilities are there in openGL to configure the mention parameters,I got this doubt because i hope you aware that there is an option in openGL to turn ON or OFF vSync... So similar manner there could be an option to configure these parameters,
From your reply i am pretty clear with my answer now

Thank you so much

Share this post


Link to post
Share on other sites
haegarr    7372
The VSync stuff you've mentioned is not part of OpenGL but the OS's windowing system supporting OpenGL. E.g. under windows there is wglSwapInterval(...), under Mac OS X there is CGLSetParameter(context, kCGLCPSwapInterval, ...), under linux there is (perhaps) glXSwapIntervalSGI(...), and so on. Notice that the prefixes are all different and also differ from OpenGL's "gl" prefix, hinting at that none of the aforementioned routines is part of the OpenGL core.

Besides that, those routines do not configure any display settings. They configure OpenGL, namely to synchronize the back-to-front buffer swapping with the display hardware vertical timing. That is something different.

That said, you usually [i]can[/i] of course change display settings by using OS routines. But you're usually restricted (and that not without reason) to high-level parameter sets like horizontal and vertical pixel count, frame rate, and color depth. You can of course also read out those parameters for the current setting to determine e.g. the current refresh rate (just to catch up a missed answer to your OP).

However, switching display settings should ever be thoughtful. Some OS'es explicitly demand careful usage, just to avoid negative user experience e.g. due to disturbing the arrangement of icons on the desktop or to really ensure that the display settings are reset accordingly when your application exits. E.g. change the display settings if and only if your application occupies the entire screen.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this