[vlc-commits] glx: make context current before setting swap interval (fixes #8738)

Rémi Denis-Courmont git at videolan.org
Tue Jun 4 20:05:20 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu May 30 18:42:53 2013 +0300| [d79244f3275768353f1c963a74b8290494e03745] | committer: Rémi Denis-Courmont

glx: make context current before setting swap interval (fixes #8738)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d79244f3275768353f1c963a74b8290494e03745
---

 modules/video_output/glx.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/video_output/glx.c b/modules/video_output/glx.c
index e62014f..a1ff22d 100644
--- a/modules/video_output/glx.c
+++ b/modules/video_output/glx.c
@@ -196,6 +196,8 @@ static int Open (vlc_object_t *obj)
 
 #ifdef GLX_ARB_get_proc_address
     bool is_swap_interval_set = false;
+
+    MakeCurrent (gl);
 # ifdef GLX_SGI_swap_control
     if (!is_swap_interval_set
      && CheckGLXext (dpy, snum, "GLX_SGI_swap_control"))
@@ -217,6 +219,7 @@ static int Open (vlc_object_t *obj)
         is_swap_interval_set = true;
     }
 # endif
+    ReleaseCurrent (gl);
 #endif
 
     return VLC_SUCCESS;



More information about the vlc-commits mailing list