diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-08-19 09:31:02 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-08-19 09:31:02 +0000 |
commit | 0a194447967ddccfc82163bf9ba08034fc2aa95f (patch) | |
tree | c32254c5786b67dbe26c4cb4c26fb1cce5a5f6ae /libvo/gl_common.c | |
parent | 872024d3fed1c0ebfb1de57e773615ab207ff005 (diff) | |
download | mpv-0a194447967ddccfc82163bf9ba08034fc2aa95f.tar.bz2 mpv-0a194447967ddccfc82163bf9ba08034fc2aa95f.tar.xz |
automatic vsync enabling for vo_gl.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16269 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/gl_common.c')
-rw-r--r-- | libvo/gl_common.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c index 4139bd9de0..2ea61d7079 100644 --- a/libvo/gl_common.c +++ b/libvo/gl_common.c @@ -22,6 +22,7 @@ void (APIENTRY *BindProgram)(GLenum, GLuint); void (APIENTRY *ProgramString)(GLenum, GLenum, GLsizei, const GLvoid *); void (APIENTRY *ProgramEnvParameter4f)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); +int (*SwapInterval)(int); /** * \brief adjusts the GL_UNPACK_ALGNMENT to fit the stride. @@ -259,6 +260,17 @@ static void getFunctions() { ProgramEnvParameter4f = getProcAddress("glProgramEnvParameter4fARB"); if (!ProgramEnvParameter4f) ProgramEnvParameter4f = getProcAddress("glProgramEnvParameter4fNV"); + SwapInterval = getProcAddress("glXSwapInterval"); + if (!SwapInterval) + SwapInterval = getProcAddress("glXSwapIntervalEXT"); + if (!SwapInterval) + SwapInterval = getProcAddress("glXSwapIntervalSGI"); + if (!SwapInterval) + SwapInterval = getProcAddress("wglSwapInterval"); + if (!SwapInterval) + SwapInterval = getProcAddress("wglSwapIntervalEXT"); + if (!SwapInterval) + SwapInterval = getProcAddress("wglSwapIntervalSGI"); } /** |