After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735131 - gltestsrc: Add new patterns
gltestsrc: Add new patterns
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
Other All
: Normal enhancement
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2014-08-21 00:21 UTC by Lubosz Sarnecki
Modified: 2014-09-23 14:55 UTC
See Also:
GNOME target: ---
GNOME version: ---

Implements snow pattern (7.47 KB, patch)
2014-08-21 00:21 UTC, Lubosz Sarnecki
needs-work Details | Review
Implements Mandelbrot pattern (3.41 KB, patch)
2014-08-21 00:23 UTC, Lubosz Sarnecki
committed Details | Review
Snow pattern patch without graphene and clearing. (7.16 KB, patch)
2014-09-23 12:25 UTC, Lubosz Sarnecki
committed Details | Review

Description Lubosz Sarnecki 2014-08-21 00:21:44 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.
Comment 1 Lubosz Sarnecki 2014-08-21 00:23:20 UTC
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
Comment 2 Matthew Waters (ystreet00) 2014-09-21 12:18:57 UTC
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);

Do we need the clear?

Especially if it is going to be overwritten later by DrawElements.
Comment 3 Matthew Waters (ystreet00) 2014-09-21 12:23:32 UTC
Review of attachment 284027 [details] [review]:

Looks good.
Comment 4 Lubosz Sarnecki 2014-09-23 12:25:43 UTC
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.
Comment 5 Matthew Waters (ystreet00) 2014-09-23 14:54:47 UTC
commit b2398e3fd1cd637918c3b29c8144b9449c2a047b
Author: Lubosz Sarnecki <>
Date:   Thu Aug 21 02:14:40 2014 +0200

    gltestsrc: add Mandelbrot fractal pattern.

commit 3736f944b5c86239e395e7751035716230e42005
Author: Lubosz Sarnecki <>
Date:   Thu Aug 21 02:13:58 2014 +0200

    gltestsrc: implement snow pattern with GLSL.