Check for glXSwapInterval as well.

This commit is contained in:
Themaister 2012-09-29 12:35:26 +02:00
parent e58bdc4811
commit 9747a594e8
2 changed files with 4 additions and 0 deletions

View File

@ -292,6 +292,8 @@ static bool gfx_ctx_set_video_mode(
g_is_double = val;
if (g_is_double)
{
if (!g_pglSwapInterval)
g_pglSwapInterval = (int (*)(int))glXGetProcAddress((const GLubyte*)"glXSwapInterval");
if (!g_pglSwapInterval)
g_pglSwapInterval = (int (*)(int))glXGetProcAddress((const GLubyte*)"glXSwapIntervalMESA");
if (!g_pglSwapInterval)

View File

@ -64,6 +64,8 @@ static void gfx_ctx_swap_interval(unsigned interval)
success = CGLSetParameter(CGLGetCurrentContext(), kCGLCPSwapInterval, &val) == 0;
#else
static int (*glx_swap_interval)(int) = NULL;
if (!glx_swap_interval)
GL_SYM_WRAP(glx_swap_interval, "glXSwapInterval");
if (!glx_swap_interval)
GL_SYM_WRAP(glx_swap_interval, "glXSwapIntervalMESA");
if (!glx_swap_interval)