[vlc-commits] projectM: make GL context current

Rémi Denis-Courmont git at videolan.org
Fri Mar 7 20:40:49 CET 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Mar  7 21:40:20 2014 +0200| [307a8c17b02695d64e493ec8db0f3ada08c56e9a] | committer: Rémi Denis-Courmont

projectM: make GL context current

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

 modules/visualization/projectm.cpp |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/visualization/projectm.cpp b/modules/visualization/projectm.cpp
index 46e4565..d2ad20e 100644
--- a/modules/visualization/projectm.cpp
+++ b/modules/visualization/projectm.cpp
@@ -351,6 +351,8 @@ static void *Thread( void *p_data )
         goto error;
     }
 
+    vlc_gl_MakeCurrent( gl );
+
     /* Work-around the projectM locale bug */
     loc = newlocale (LC_NUMERIC_MASK, "C", NULL);
     oldloc = uselocale (loc);
@@ -446,6 +448,7 @@ static void *Thread( void *p_data )
                 uselocale (oldloc);
                 freelocale (loc);
             }
+            vlc_gl_ReleaseCurrent( gl );
             return NULL;
         }
         vlc_mutex_unlock( &p_sys->lock );
@@ -464,6 +467,7 @@ static void *Thread( void *p_data )
     assert(0);
 
 error:
+    vlc_gl_ReleaseCurrent( gl );
     p_sys->b_error = true;
     vlc_sem_post( &p_sys->ready );
     return NULL;



More information about the vlc-commits mailing list