Inside3D!
     

Possible "Easy" VSYNC???

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming
View previous topic :: View next topic  
Author Message
Stroggos



Joined: 14 Apr 2009
Posts: 43

PostPosted: Mon Aug 17, 2009 7:49 am    Post subject: Possible "Easy" VSYNC??? Reply with quote

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?
_________________
Dont even try to port Quake 4 to the ipod
Back to top
View user's profile Send private message
Team Xlink



Joined: 25 Jun 2009
Posts: 320

PostPosted: Tue Aug 18, 2009 11:50 pm    Post subject: Reply with quote

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.
_________________
Anonymous wrote:
if it works, it works. if it doesn't, HAHAHA!
Back to top
View user's profile Send private message
mh



Joined: 12 Jan 2008
Posts: 910

PostPosted: Wed Aug 19, 2009 12:15 am    Post subject: Reply with quote

Look for wglSwapInterval, it's very straightforward after that.
_________________
DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines
Back to top
View user's profile Send private message Visit poster's website
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Wed Aug 19, 2009 12:27 am    Post subject: Reply with quote

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.
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
Stroggos



Joined: 14 Apr 2009
Posts: 43

PostPosted: Wed Aug 19, 2009 9:56 pm    Post subject: Reply with quote

thanks guys!!!!
_________________
Dont even try to port Quake 4 to the ipod
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group