GL plugin generic example on RPI

Julien Isorce julien.isorce at gmail.com
Tue Nov 4 14:44:11 PST 2014


Indeed this example is not currently working on embedded.

You need to use gles version 2. So include headers from GLES2 dir and not
GLES. To match gstgl api version that gstgl will select (I can see gles2 in
your log).
Then in the reshape callback you will only need to call glViewport.
Then you will need to setup a vertex shader and a fragment shader in the
draw callback. Initializing it only for the first call. (To do it during
pipeline setup we would need to provide another callback triggered from the
gl thread as well)

Actually looking at glimagesink code I can see a possible improvement which
is to initialize the shader at setup time, instead of doing it in the first
call to show_frame.

Please open a bug if you wish to continue making this example working on
RPI.


On 4 November 2014 20:16, Arnaud Loonstra <arnaud at sphaero.org> wrote:

> Hi all,
>
> I'm trying to port the generic gl example:
>
> http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/
> tree/tests/examples/gl/generic/cube/main.cpp
>
> to the Raspberry Pi.
>
> I've managed to run it with a few adaptions
> - no GLU
> - changed the quad draw method
>
> It runs, it outputs the fps, I think it displays one (corrupt)frame before
> going black. But that's it. I thought I'd draw on red background to see if
> I at least have control over the display context using glClearColor(1.0f,
> 0.0f, 0.0f, 0.0f); (l122) But no red unfortunately.
>
> Are there any different other things I should do to control the GLES
> context? Or any tips?
>
> source:
> https://gist.github.com/sphaero/eac4d01013bd2b0e2205
>
> debug log:
> http://paste.debian.net/130308/
>
> Running latest (last weekend) gst from git.
>
> Rg,
>
> Arnaud
> --
> w: http://www.sphaero.org
> t: http://twitter.com/sphaero
> g: http://github.com/sphaero
> i: freenode: sphaero_z25
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20141104/8f1db009/attachment.html>


More information about the gstreamer-devel mailing list