[149/906] same as previous commit
authorFilippo Argiolas <filippo.argiolas@gmail.com>
Mon, 11 Aug 2008 15:21:30 +0000 (17:21 +0200)
committerMatthew Waters <ystreet00@gmail.com>
Sat, 15 Mar 2014 17:36:23 +0000 (18:36 +0100)
gst-libs/gst/gl/gstgldisplay.c

index 846b76f..1c7f293 100644 (file)
@@ -1430,6 +1430,10 @@ gst_gl_display_thread_use_fbo (GstGLDisplay *display)
   glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
                            GL_TEXTURE_RECTANGLE_ARB, display->use_fbo_texture, 0);
 
+  if (GLEW_ARB_fragment_shader)
+    gst_gl_shader_use (NULL);
+
+
   glPushAttrib(GL_VIEWPORT_BIT);
 
   glMatrixMode(GL_PROJECTION);
@@ -1466,13 +1470,7 @@ gst_gl_display_thread_use_fbo (GstGLDisplay *display)
 
   glDrawBuffer(GL_NONE);
 
-  //in case of the developer forgot the de-init use of GLSL in the scene code
-  if (display->colorspace_conversion == GST_GL_DISPLAY_CONVERSION_GLSL)
-    glUseProgramObjectARB (0);
-
-  glDisable(GL_TEXTURE_RECTANGLE_ARB);
-
-  glMatrixMode(GL_PROJECTION);
+    glMatrixMode(GL_PROJECTION);
   glPopMatrix();
   glMatrixMode(GL_MODELVIEW);
   glPopMatrix();