From 74526865c6ef2f82ddbced4c37e02e705331fd90 Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Thu, 22 Dec 2011 15:30:38 +0100 Subject: [PATCH] [486/906] libvisual-gl: add minimal support to libvisual plugins that uses Framebuffer objects Fix bug #310775 gst-launch audiotestsrc ! libvisual_gl_projectM ! glimagesink is working but for now you cannot append any other opengl filters between libvisual_gl_projectM and glimagesink because our FBO is turned OFF. It would require that libvisual allows to split rendering between pass1,2,3... and final rendering. In order to unbind our FBO before the passN, and then rebind it just before the final libvisual rendering. --- gst-libs/gst/gl/gstgldisplay.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c index ba6c50dab8..dd29f70e1a 100644 --- a/gst-libs/gst/gl/gstgldisplay.c +++ b/gst-libs/gst/gl/gstgldisplay.c @@ -1908,6 +1908,7 @@ gst_gl_display_on_draw (GstGLDisplay * display) glEnable (GL_TEXTURE_RECTANGLE_ARB); glBegin (GL_QUADS); + /* gst images are top-down while opengl plane is bottom-up */ glTexCoord2i (display->redisplay_texture_width, 0); glVertex2f (1.0f, 1.0f); glTexCoord2i (0, 0); @@ -1917,6 +1918,15 @@ gst_gl_display_on_draw (GstGLDisplay * display) glTexCoord2i (display->redisplay_texture_width, display->redisplay_texture_height); glVertex2f (1.0f, -1.0f); + /*glTexCoord2i (display->redisplay_texture_width, 0); + glVertex2i (1, -1); + glTexCoord2i (0, 0); + glVertex2f (-1.0f, -1.0f); + glTexCoord2i (0, display->redisplay_texture_height); + glVertex2f (-1.0f, 1.0f); + glTexCoord2i (display->redisplay_texture_width, + display->redisplay_texture_height); + glVertex2f (1.0f, 1.0f); */ glEnd (); glDisable (GL_TEXTURE_RECTANGLE_ARB);