Commandline options as of 2004-10-05:
BSD GLX: -gl_driver <drivername> selects a GL driver library, default is libGL.so.1, useful only for using fxmesa or similar, if you don't know what this is for, you don't need it
BSD GLX: -nogetprocaddress disables GLX_ARB_get_proc_address (not required, more formal method of getting extension functions)
-BSD GLX: -novideosync disables GLX_SGI_video_sync
+BSD GLX: -novideosync disables GLX_SGI_swap_control
BSD Sound: -cddev <devicepath> chooses which CD drive to use
Client: -benchmark <demoname> runs a timedemo and quits, results of any timedemo can be found in gamedir/benchmark.log (for example id1/benchmark.log)
Client: -forceqmenu disables menu.dat (same as +forceqmenu 1)
Linux ALSA Sound: -sndstereo sets sound output to stereo
Linux GLX: -gl_driver <drivername> selects a GL driver library, default is libGL.so.1, useful only for using fxmesa or similar, if you don't know what this is for, you don't need it
Linux GLX: -nogetprocaddress disables GLX_ARB_get_proc_address (not required, more formal method of getting extension functions)
-Linux GLX: -novideosync disables GLX_SGI_video_sync
+Linux GLX: -novideosync disables GLX_SGI_swap_control
Linux OSS Sound: -sndbits <bits> chooses 8 bit or 16 bit sound output
Linux OSS Sound: -sndmono sets sound output to mono
Linux OSS Sound: -sndspeed <hz> chooses 44100 hz, 22100 hz, or 11025 hz sound output rate
Linux OSS Sound: -sndstereo sets sound output to stereo
Linux Sound: -cddev <devicepath> chooses which CD drive to use
MacOSX GLX: -nogetprocaddress disables GLX_ARB_get_proc_address (not required, more formal method of getting extension functions)
-MacOSX GLX: -novideosync disables GLX_SGI_video_sync
+MacOSX GLX: -novideosync disables GLX_SGI_swap_control
SDL GL: -gl_driver <drivername> selects a GL driver library, default is libGL.so.1 (Linux/BSD) or opengl32.dll (windows) or OpenGL.framework (MacOSX), useful only for 3dfxogl.dll/3dfxvgl.dll or fxmesa or similar, if you don't know what this is for, you don't need it
SDL Sound: -sndspeed <hz> chooses 44100 hz, 22100 hz, or 11025 hz sound output rate
Server: -dedicated [playerlimit] starts a dedicated server (with a command console), default playerlimit is 8
{NULL, NULL}
};
-//GLX_SGI_video_sync
-GLint (GLAPIENTRY *qglXGetVideoSyncSGI)(GLuint *count);
-GLint (GLAPIENTRY *qglXWaitVideoSyncSGI)(GLint divisor, GLint remainder, GLuint *count);
+//GLX_SGI_swap_control
+GLint (GLAPIENTRY *qglXSwapIntervalSGI)(GLint interval);
-static dllfunction_t videosyncfuncs[] =
+static dllfunction_t swapcontrolfuncs[] =
{
- {"glXGetVideoSyncSGI", (void **) &qglXGetVideoSyncSGI},
- {"glXWaitVideoSyncSGI", (void **) &qglXWaitVideoSyncSGI},
+ {"glXSwapIntervalSGI", (void **) &qglXSwapIntervalSGI},
{NULL, NULL}
};
LeaveWindowMask)
-static qboolean mouse_avail = true;
-static qboolean mouse_active = false, usingmouse = false, ignoremousemove = false;
+static qboolean mouse_avail = true;
+static qboolean mouse_active = false;
+static qboolean vid_usingmouse = false;
+static qboolean vid_usemouse = false;
+static qboolean vid_usingvsync = false;
+static qboolean vid_usevsync = false;
+static qboolean ignoremousemove = false;
static float mouse_x, mouse_y;
static int p_mouse_x, p_mouse_y;
case MotionNotify:
// mouse moved
- if (usingmouse)
+ if (vid_usingmouse)
{
#ifndef __APPLE__
if (vid_dga.integer == 1)
return;
vid_hidden = true;
- usingmouse = false;
+ vid_usingmouse = false;
if (vidx11_display)
{
VID_RestoreSystemGamma();
void VID_Finish (void)
{
- int usemouse;
- if (r_render.integer)
+ vid_usevsync = vid_vsync.integer && !cls.timedemo && gl_videosyncavailable;
+ if (vid_usingvsync != vid_usevsync && gl_videosyncavailable)
{
- if (r_speeds.integer || gl_finish.integer)
- qglFinish();
- qglXSwapBuffers(vidx11_display, win);
+ vid_usingvsync = vid_usevsync;
+ qglXSwapIntervalSGI (vid_usevsync);
}
// handle the mouse state when windowed if that's changed
- usemouse = false;
+ vid_usemouse = false;
if (vid_mouse.integer && !key_consoleactive)
- usemouse = true;
+ vid_usemouse = true;
if (vidmode_active)
- usemouse = true;
- if (usemouse)
+ vid_usemouse = true;
+ if (vid_usemouse)
{
- if (!usingmouse)
+ if (!vid_usingmouse)
{
- usingmouse = true;
+ vid_usingmouse = true;
IN_ActivateMouse ();
}
}
else
{
- if (usingmouse)
+ if (vid_usingmouse)
{
- usingmouse = false;
+ vid_usingmouse = false;
IN_DeactivateMouse ();
}
}
+
+ if (r_render.integer)
+ {
+ if (r_speeds.integer || gl_finish.integer)
+ qglFinish();
+ qglXSwapBuffers(vidx11_display, win);
+ }
}
int VID_SetGamma(unsigned short *ramps)
// COMMANDLINEOPTION: BSD GLX: -nogetprocaddress disables GLX_ARB_get_proc_address (not required, more formal method of getting extension functions)
// COMMANDLINEOPTION: MacOSX GLX: -nogetprocaddress disables GLX_ARB_get_proc_address (not required, more formal method of getting extension functions)
GL_CheckExtension("GLX_ARB_get_proc_address", getprocaddressfuncs, "-nogetprocaddress", false);
-// COMMANDLINEOPTION: Linux GLX: -novideosync disables GLX_SGI_video_sync
-// COMMANDLINEOPTION: BSD GLX: -novideosync disables GLX_SGI_video_sync
-// COMMANDLINEOPTION: MacOSX GLX: -novideosync disables GLX_SGI_video_sync
- gl_videosyncavailable = GL_CheckExtension("GLX_SGI_video_sync", videosyncfuncs, "-novideosync", false);
+// COMMANDLINEOPTION: Linux GLX: -novideosync disables GLX_SGI_swap_control
+// COMMANDLINEOPTION: BSD GLX: -novideosync disables GLX_SGI_swap_control
+// COMMANDLINEOPTION: MacOSX GLX: -novideosync disables GLX_SGI_swap_control
+ gl_videosyncavailable = GL_CheckExtension("GLX_SGI_swap_control", swapcontrolfuncs, "-novideosync", false);
- usingmouse = false;
+ vid_usingmouse = false;
ignoremousemove = true;
vid_hidden = false;
vid_activewindow = true;