t++;
// Vertical Sync
- M_ItemPrint(16, video_cursor_table[t], " Vertical Sync", gl_videosyncavailable);
+ M_ItemPrint(16, video_cursor_table[t], " Vertical Sync", true);
M_DrawCheckbox(220, video_cursor_table[t], vid_vsync.integer);
t++;
extern qboolean isG200;
extern qboolean isRagePro;
-// LordHavoc: GLX_SGI_swap_control and WGL_EXT_swap_control
-extern int gl_videosyncavailable;
-
void *GL_GetProcAddress(const char *name);
int GL_CheckExtension(const char *minglver_or_ext, const dllfunction_t *funcs, const char *disableparm, int silent);
gl_platformextensions = "";
gl_platform = "AGL";
- gl_videosyncavailable = true;
multithreadedgl = false;
vid_isfullscreen = mode->fullscreen;
void VID_Finish (void)
{
- vid_usevsync = vid_vsync.integer && !cls.timedemo && gl_videosyncavailable;
- if (vid_usingvsync != vid_usevsync && gl_videosyncavailable)
+ vid_usevsync = vid_vsync.integer && !cls.timedemo && qglXSwapIntervalSGI;
+ if (vid_usingvsync != vid_usevsync)
{
vid_usingvsync = vid_usevsync;
if (qglXSwapIntervalSGI (vid_usevsync))
// 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);
+ GL_CheckExtension("GLX_SGI_swap_control", swapcontrolfuncs, "-novideosync", false);
vid_usingmousegrab = false;
vid_usingmouse = false;
gl_platform = "SDL";
gl_platformextensions = "";
- gl_videosyncavailable = true;
GL_Init();
int gl_combine_extension = false;
// GL_EXT_compiled_vertex_array
int gl_supportslockarrays = false;
-// GLX_SGI_swap_control or WGL_EXT_swap_control
-int gl_videosyncavailable = false;
// 3D textures available
int gl_texture3d = false;
// GL_ARB_texture_cubemap
void VID_Finish (void)
{
- vid_usevsync = vid_vsync.integer && !cls.timedemo && gl_videosyncavailable;
- if (vid_usingvsync != vid_usevsync && gl_videosyncavailable)
+ vid_usevsync = vid_vsync.integer && !cls.timedemo && qwglSwapIntervalEXT;
+ if (vid_usingvsync != vid_usevsync)
{
vid_usingvsync = vid_usevsync;
qwglSwapIntervalEXT (vid_usevsync);
ClearAllStates ();
// COMMANDLINEOPTION: Windows WGL: -novideosync disables WGL_EXT_swap_control
- gl_videosyncavailable = GL_CheckExtension("WGL_EXT_swap_control", wglswapintervalfuncs, "-novideosync", false);
+ GL_CheckExtension("WGL_EXT_swap_control", wglswapintervalfuncs, "-novideosync", false);
GL_Init ();
IN_StartupMouse ();
IN_StartupJoystick ();
- if (gl_videosyncavailable)
+ if (qwglSwapIntervalEXT)
{
vid_usevsync = vid_vsync.integer != 0;
vid_usingvsync = vid_vsync.integer != 0;