Archived

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

glutSwapBuffers

This topic is 5805 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

Hello I''ve read that glutSwapBuffers waits until the screen refresh period is over before swapping the buffers. With my game (not yet a real game...) I made an other experience: Although my screen has a refresh rate of 113 Hz I can get frame rates over 200 (when drawing nearly nothing). Also there is a noticable tearing effect. any idear tho synchronize it? btw.: I''m developing for linux Thanx a lot Konstantin Schauwecker

Share this post


Link to post
Share on other sites
I am not completely sure in linux, but under win32, opengl''s refreshing options are display settings. The application generally has very little control. I imagine glut uses the default refresh rate, which for yours must be unlocked, so you are experiencing tearing. I have no idea where such a setting would be found, but look for the following names;

Verticial Refresh Sync
VSYNC

Share this post


Link to post
Share on other sites
One way is to calculate the framerate and to calculate then, how far you are relating to the moniteur refresh rate. Then if you''re really in advance, wait a little time.
And do so on each frame you draw.

This is only theoric, i''ve never tested it yet. But i think this could work, and is the only way to have a compatible rate with your monitor: ex: monitor 120Hz, so you can draw at 240Hz, 120Hz, 60Hz...

i hope this will help you.

Fratt

ps: good choice that Linux !! very more speed compared to Windows !

Share this post


Link to post
Share on other sites