[vlc-commits] glspectrum: bind GL context when needed

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:36:56 2014 +0200| [bc8f690a34299da32c3ded214176934746ef73ae] | committer: Rémi Denis-Courmont

glspectrum: bind GL context when needed

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

 modules/visualization/glspectrum.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/visualization/glspectrum.c b/modules/visualization/glspectrum.c
index 8d52233..d3b40cc 100644
--- a/modules/visualization/glspectrum.c
+++ b/modules/visualization/glspectrum.c
@@ -403,7 +403,9 @@ static void *Thread( void *p_data )
 
     vlc_sem_post(&p_sys->ready);
 
+    vlc_gl_MakeCurrent(gl);
     initOpenGLScene();
+    vlc_gl_ReleaseCurrent(gl);
 
     float height[NB_BANDS] = {0};
 
@@ -413,6 +415,7 @@ static void *Thread( void *p_data )
 
         int canc = vlc_savecancel();
 
+        vlc_gl_MakeCurrent(gl);
         /* Manage the events */
         vout_ManageDisplay(p_sys->p_vd, true);
         if (p_sys->p_vd->cfg->display.width != i_last_width ||
@@ -548,6 +551,7 @@ static void *Thread( void *p_data )
 release:
         window_close(&wind_ctx);
         fft_close(p_state);
+        vlc_gl_ReleaseCurrent(gl);
         block_Release(block);
         vlc_restorecancel(canc);
     }



More information about the vlc-commits mailing list