Jump to content
  • Advertisement

Archived

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

XBTC

OpenGL Retrace Sync in OpenGl?

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

How to activate the V-Sync in OpenGl? I thaugt it is enough to activate the V-Sync in the Driver of the Graphics Card,but it doesn´t seem so,´cause in my Opengl-3D-Engine(running with about 100FPS,so that low speed cannot be the cause) the are a lot of jaggies if I turn arround or switch on\off fog or a light in short time intervals.It looks like if you didn´t do Retrace syncing in old mode 13h Programs.

Share this post


Link to post
Share on other sites
Advertisement
Hi XBTC,
Sorry if this sounds painfully stupid, but are you using double buffering or just drawing to the front (screen) buffer each frame?

If you are just drawing straight to the front buffer, then this is your problem. The easy way to fix it is to enable double buffering (varies depending on what windowing system/OS you''re using), draw each frame to the back buffer, and make a call to swap the buffers at the end of drawing the frame (where you would normally call glFlush() ).

Double buffering is the only way to go for anything involving movement/animation. The call to SwapBuffers will automatically sync to the screen refresh (i think).

Again, apologies if this is not the case

-------------
squirrels are a remarkable source of protein...

Share this post


Link to post
Share on other sites
Since wglSwapBuffers (or any similarly function) is not part of the OpenGL API, it''s completely implementation-dependent. So it can work differently on each and every OS. Worse, exactly what happens seems to be driver-dependent as well. A lot of the more recent OpenGL drivers either will automatically provide retrace synchronization or allow you to decide whether or not you want it. But there''s really no standard way to do it. There''s an extension that''s supposed to do it, wglSwapControl, but it doesn''t seem to work on some drivers. That''s going to be your best bet, I think.

Share this post


Link to post
Share on other sites
Yes I also heard about such a extension but I don´t belief that it is necessary to use a Ogl Extension for simple Retrace-Syncing!
I althoug think Ogl-extension only refer to special Hardware Features(all extensions I´ve ever used,maybe there are Exceptions).
So how to do Retrace-Syncing in Software-Mode if you had to use an extension?

To Bad Monkey:I´m not THAT stupid.(But It could really have been the problem).
Thanks Anyway!!!!!!!!!


Edited by - XBTC on 4/3/00 4:46:22 PM

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!