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 752745 - glfiltercube: the cube does not look like a cube
glfiltercube: the cube does not look like a cube
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-07-22 22:21 UTC by Julien Isorce
Modified: 2018-11-03 11:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glfiltercube: properly compute model view projection matrix (11.10 KB, patch)
2015-07-22 22:24 UTC, Julien Isorce
none Details | Review

Description Julien Isorce 2015-07-22 22:21:18 UTC
glfiltercube does not output a cube :)

Instead of properly computing the Model-View-Projection matrixes, we currently provide this fixed matrix: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/ext/gl/gstglfiltercube.c#n454

The cube was showing ok when not using shaders but since we moved to use shaders not only on gles2 I realize the cube was already wrong with gles2+GstGL-0.10 (see http://cgit.freedesktop.org/gstreamer/attic/gst-plugins-gl/commit/gst/gl/gstglfiltercube.c?id=e12532c6c5bb0fcbbf94abb6aa8e98757e536d1d)

But it requires to manually do some maths. See http://cgit.freedesktop.org/gstreamer/gst-omx/tree/examples/egl/testegl.c#n123
Maybe we can add gst_gl_matrix_load_identity/gst_gl_matrix_multiply/gst_gl_matrix_translate/gst_gl_matrix_frustum/gst_gl_matrix_perspective

It seems to me to be "a small piece of library API there" (from "master feature freeze email") but not sure.
Otherwise we keep these functions locally in glfiltercube and move them to GstGL after 1.6, see following patch.
Comment 1 Julien Isorce 2015-07-22 22:24:53 UTC
Created attachment 307936 [details] [review]
glfiltercube: properly compute model view projection matrix
Comment 2 Matthew Waters (ystreet00) 2015-07-23 04:04:45 UTC
For the matrix math, it probably makes more sense to use graphene rather then rolling our own.

Isn't it just the aspect ratio that wrong?  That can be fixed with a simpler scaling matrix rather than doing the full model view projection dance.  See gltransformation for all of this.
Comment 3 Julien Isorce 2015-07-28 07:23:37 UTC
(In reply to Matthew Waters from comment #2)
> For the matrix math, it probably makes more sense to use graphene rather
> then rolling our own.
> Isn't it just the aspect ratio that wrong? 
> That can be fixed with a simpler
> scaling matrix rather than doing the full model view projection dance.  See
> gltransformation for all of this.

Great, I haven't really noticed existence of graphene and gltransformation. That's nice.
Maybe we can move most of gltransformation features to a new base class that inherit from gstglbasefilter. Then let sub elements just defines shapes.

We should use the navigation interface also to do some fancy animations :)
Comment 4 Tim-Philipp Müller 2016-05-28 18:22:13 UTC
Julien, are you still working on this?
Comment 5 Julien Isorce 2016-05-29 09:46:28 UTC
No I made only the existing attached patch. It works but a generic solution could be done. If one interested, have a look to #2 and #3.
Comment 6 GStreamer system administrator 2018-11-03 11:39:25 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/207.