GNOME Bugzilla – Bug 752745
glfiltercube: the cube does not look like a cube
Last modified: 2018-11-03 11:39:25 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.
Created attachment 307936 [details] [review] glfiltercube: properly compute model view projection matrix
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.
(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 :)
Julien, are you still working on this?
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.
-- 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.