GNOME Bugzilla – Bug 735131
gltestsrc: Add new patterns
Last modified: 2014-09-23 14:55:10 UTC
Created attachment 284026 [details] [review] Implements snow pattern This patch adds a snow pattern to gltestsrc, written in GLSL. It adds a generic OpenGL shader pipeline for possible usage with other patterns. This pipeline uses modern OpenGL and should be usable on a OpenGL 3 and OpenGL ES context.
Created attachment 284027 [details] [review] Implements Mandelbrot pattern The Mandelbrot fractal is rapidly computable on the GPU. This pattern utilizes this ability. To test it run: gst-launch-1.0 gltestsrc pattern=13 ! video/x-raw, width=1920, height=1080 ! glimagesink
Review of attachment 284026 [details] [review]: This seems to use graphene without guards. ::: ext/gl/gltestsrc.c @@ +223,3 @@ + if (gst_gl_context_get_gl_api (v->context)) { + + graphene_matrix_init_ortho (&projection_matrix, -1, 1, -1, 1, -1, 1); This initializes to an identity matrix anyway and is not needed. @@ +230,3 @@ + + gl->ClearColor (0.f, 0.f, 0.f, 0.f); + gl->Clear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); Do we need the clear? Especially if it is going to be overwritten later by DrawElements.
Review of attachment 284027 [details] [review]: Looks good.
Created attachment 286866 [details] [review] Snow pattern patch without graphene and clearing. Graphene is indeed not needed, since I use only the identity matrix. I declared the matrix in C though, despite the multiplication could be just dropped in GLSL, since the shaders might need other transformations. The clear command is not needed, since we draw a full frame.
commit b2398e3fd1cd637918c3b29c8144b9449c2a047b Author: Lubosz Sarnecki <lubosz@gmail.com> Date: Thu Aug 21 02:14:40 2014 +0200 gltestsrc: add Mandelbrot fractal pattern. https://bugzilla.gnome.org/show_bug.cgi?id=735131 commit 3736f944b5c86239e395e7751035716230e42005 Author: Lubosz Sarnecki <lubosz@gmail.com> Date: Thu Aug 21 02:13:58 2014 +0200 gltestsrc: implement snow pattern with GLSL. https://bugzilla.gnome.org/show_bug.cgi?id=735131