Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

meeshoo

OpenGL refresh rate in opengl fullscreen mode

This topic is 5575 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi.I have a real problem with opengl.every time i run my opengl windows in fullscreen the refresh rate drops to 60 Hz.I mention here that i use Win 2k Professional with riva tnt2 m64 on a monitor on 1024x768@70 Hz. The problem appears event when i try to run in 640x480, wich normally runs at 85 Hz or higer. please help me!

Share this post


Link to post
Share on other sites
Advertisement
It seems that your operating system doesn''t use the best possible refresh rate it can in that particular screen mode.

When you say that applications in 640x480 normally run at 85Hz or higher, but don''t in your application, then the two may be using different colour depths (which are difference screen-modes, and hence have different refresh rates associated with them).

If you''re using windows, go to display properties, then the Settings tab, click advanced, and under one of those tabs (Monitor or Adapter, I think), there''ll be an option for the refresh rate that windows will try to use. Make sure it''s set to optimal. If it already is, try setting it to optimal again. If that doesn''t work, kick the computer.

HTH,


========
Smidge
========

Share this post


Link to post
Share on other sites
when you set the resolutiuon you should set the frequency as well.. and you can enumrate the modes in order to get teh highest supported frequency, or just ask the user to choose.

Share this post


Link to post
Share on other sites
See the WGL_swap_control extension :

http://oss.sgi.com/projects/ogl-sample/registry/EXT/wgl_swap_control.txt

This will turn v-sync on/off.


[edited by - mputters on June 17, 2003 1:40:08 PM]

Share this post


Link to post
Share on other sites
turning vsync off doesnt fix the problem of having a 60hz refresh rate still.. the method MazyNoc outlines is the correct way to do things

Share this post


Link to post
Share on other sites
Oddly enough I''m having the same problem ... after changing resolution XP seems to default to 60Hz ... enumerating modes only results in values of 0 or 1 for the frequency parameter associated with DevMode. It seems unwise to give the user the responsibility to assign the refresh rate as it can damage some monitors and it''s a fairly technical parameter for some users to understand. Other games don''t seem to have this problem and I downloaded the Quake source code to see how they do it ... there''s some nice stuff in there to control fullscreen mode but they only use the width/height/color depth settings associated with the API ChangeDisplaySettings ...

So what''s the solution ?

Andrew

Share this post


Link to post
Share on other sites
Oddly enough I''m having the same problem ... after changing resolution XP seems to default to 60Hz ... enumerating modes only results in values of 0 or 1 for the frequency parameter associated with DevMode.

Do you initiate your monitorinfo structure properly? The following seems to work for me:

POINT point; point.x = 0; point.y = 0;
MONITORINFOEX monitorinfo; monitorinfo.cbSize = sizeof( MONITORINFOEX );
::GetMonitorInfo( ::MonitorFromPoint( point, MONITOR_DEFAULTTOPRIMARY ), &monitorinfo );

and then you run your ::EnumDisplaySettings() routine in a loop while it returns true, cycling through available modes...

Share this post


Link to post
Share on other sites
right, a quick investigation points to the following

- you need to create a temp window
- then use EnumDisplaySettings to get all the avaible screen details
- kill the window

This should give you a sane device details listing, then use something like the following code to setup the dmScreenSetting structure :


memset(&(Wndinfo.dmScreenSettings), 0, sizeof(dmScreenSettings)); // Makes Sure Memory's Cleared

Wndinfo.dmScreenSettings.dmSize = sizeof(dmScreenSettings); // Size Of The Devmode Structure

Wndinfo.dmScreenSettings.dmPelsWidth = mode->lWidth; // Selected Screen Width

Wndinfo.dmScreenSettings.dmPelsHeight = mode->lHeight; // Selected Screen Height

Wndinfo.dmScreenSettings.dmBitsPerPel = mode->BitsPerPixel; // Selected Bits Per Pixel

Wndinfo.dmScreenSettings.dmDisplayFrequency = mode->RefreshRate; // set refresh rate (0 for default)

Wndinfo.dmScreenSettings.dmFields = DM_BITSPERPEL|DM_PELSWIDTH|DM_PELSHEIGHT|DM_DISPLAYFREQUENCY;


Note the dmFields flags, DM_DISPLAYFREQUENCY allows for the display to be set, otherwise it must select some kinda default display rate thus 60hz

(Note: this code is basicaly ripped from my WindowFrameWork i'm working on, mode is a struct of my own making and the fields should be realitively easy to work out, Wndinfo is a structure containing details about the window, including the dmScreenSettings structure)

[edited by - _the_phantom_ on June 17, 2003 2:26:33 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by meeshoo
Hi.I have a real problem with opengl.every time i run my opengl windows in fullscreen the refresh rate drops to 60 Hz.I mention here that i use Win 2k Professional with riva tnt2 m64 on a monitor on 1024x768@70 Hz. The problem appears event when i try to run in 640x480, wich normally runs at 85 Hz or higer.
please help me!



This is an NVidia driver issue that inexplicably persists in release after release of Detonator drivers. Luckily there is a free thrid-party tool for configuring OpenGL refresh rates for NVidia drivers: NVRefreshTool (www.nvrt.org)

Share this post


Link to post
Share on other sites
yes, you''re right. the only solution is a third party tool that i''ve found on the net and it''s a nvidia problem and it''s not all u guys said before.the thing with dm... it''s for direct x.dx has an override option from driver so u can run in every resolution what refresh rate u want.this is not the same with opengl, but the tool works and now the program is running at 85 Hz.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!