Forum

Possible "Easy" VSYNC???

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Possible "Easy" VSYNC???

Postby Stroggos » Mon Aug 17, 2009 7:49 am

I want to add vsync from FitzQuake but im not that great with OpenGL. Can anyone add a tutorial or advice on how to add it?
Stroggos
 
Posts: 50
Joined: Tue Apr 14, 2009 11:40 am
Location: Australia

Postby Team Xlink » Tue Aug 18, 2009 11:50 pm

Well, what engine are you adding it to?

First thing you should do is download the FitzQuake source and find out what is required for Vsync and basically add that to your engine, that is the explanation in its easiest forum, it is often times harder then this.
Team Xlink
 
Posts: 368
Joined: Thu Jun 25, 2009 4:45 am
Location: Michigan

Postby mh » Wed Aug 19, 2009 12:15 am

Look for wglSwapInterval, it's very straightforward after that.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Spike » Wed Aug 19, 2009 12:27 am

Docs:
win: [ur]http://www.opengl.org/registry/specs/EXT/wgl_swap_control.txt[/url]

I'm not sure about glx... this one seems to be similar
glx: http://www.opengl.org/registry/specs/SGI/swap_control.txt
however, 0 is an error, and will not disable vsync again.

But yeah, use wglGetProcAddress to get the function name you want, then pass it a 0 to disable vsync, or 1 to enable vsync, or 2 to sync each frame with every 2nd refresh.

If nothing else, this should give you a bit of a clue what to search for.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Stroggos » Wed Aug 19, 2009 9:56 pm

thanks guys!!!!
Stroggos
 
Posts: 50
Joined: Tue Apr 14, 2009 11:40 am
Location: Australia


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest