Thanks Leonardo,
BTW, I'm about to bail on the combination of Qt4/glimagesink 0.10.
The "client-draw-callback" property callbacks work pretty well, and
I was thinking that we could use that to write into Qt's EGL context
(if we could get one), but it seems that there's more to the picture.
In particular:
-- This call to get the display is essentially hardcoded for
/dev/FB0:
https://bitbucket.org/Freescale/gstreamer-gst-plugins-gl/src/3554c07ead40c48620ac8e4864d81988d0b9476b/gst-libs/gst/gl/gstglwindow_fbES2.c?at=0.10#cl-314
-- This call to eglSetCurrent() sets the display to black:
https://bitbucket.org/Freescale/gstreamer-gst-plugins-gl/src/3554c07ead40c48620ac8e4864d81988d0b9476b/gst-libs/gst/gl/gstglwindow_fbES2.c?at=0.10#cl-372
And all of this appears to have been re-structured in upstream
master:
http://cgit.freedesktop.org/gstreamer/gst-plugins-gl/tree/gst-libs/gst/gl
That said, if the OpenGL context in Qt4 isn't accessible, there's
no reason to compile it in.
On 08/01/2013 09:19 AM, Sandoval Gonzalez Leonardo-B42214 wrote:
> I think Francisco did not get last email.>> Francisco,> please mention the testing you did.>> Leo> ________________________________________> From: otavio.salvador@gmail.com [otavio.salvador@gmail.com] on behalf of Otavio Salvador [otavio@ossystems.com.br]> Sent: Wednesday, July 31, 2013 10:03 PM> To: Eric Nelson> Cc: meta-freescale Mailing List; Sandoval Gonzalez Leonardo-B42214; Carrillodominguez Francisco Alberto-B35153> Subject: Re: [meta-freescale] [meta-fsl-arm PATCH 8/8] qt4: Enable OpenGL ES2 support for i.MX6>> On Tue, Jul 30, 2013 at 3:20 PM, Eric Nelson> <eric.nelson@boundarydevices.com> wrote:>> Hi all,>>>>>> On 07/17/2013 11:17 AM, Otavio Salvador wrote:>>>>>> The Vivante libraries need some special linking as it has a more>>> modular design which thus require a specific set of mkspec changes to>>> make it to work. This change makes the linking to work when building>>> against Vivante libraries for i.MX6 SoCs.>>>>>>>>> <snip>>>>>>>>>>>> diff --git a/recipes-qt/qt4/qt4-x11-free_4.8.5.bbappend>>> b/recipes-qt/qt4/qt4-x11-free_4.8.5.bbappend>>> index 74bfb31..4c4d0c9 100644>>> --- a/recipes-qt/qt4/qt4-x11-free_4.8.5.bbappend>>> +++ b/recipes-qt/qt4/qt4-x11-free_4.8.5.bbappend>>> @@ -9,6 +9,7 @@ PACKAGE_ARCH_mx5 = "${MACHINE_ARCH}">>> QT_GLFLAGS_mx5 = "-opengl es2 -openvg">>> QT_CONFIG_FLAGS_append_mx5 = " -I${STAGING_KERNEL_DIR}/include/">>>>>> -DEPENDS_append_mx6 = " virtual/kernel">>> +DEPENDS_append_mx6 = " virtual/kernel virtual/libgles2">>> PACKAGE_ARCH_mx6 = "${MACHINE_ARCH}">>> -QT_CONFIG_FLAGS_append_mx6 = " -I${STAGING_KERNEL_DIR}/include/">>> +QT_GLFLAGS_mx6 = "-opengl es2 -openvg">>> +QT_CONFIG_FLAGS_append_mx6 = " -I${STAGING_KERNEL_DIR}/include/ -DLINUX=1>>> -DEGL_API_FB=1">>> diff --git a/recipes-qt/qt4/qt4/mx6/g++.conf>>> b/recipes-qt/qt4/qt4/mx6/g++.conf>>>>>> This patch seems to work perfectly for me, but I'm a bit confused>> about what it actually enables in Qt.>>>> Neither the QGLWidget examples like hellogl_es2 or the QML-based>> shadereffects demos seem to run.>>>> Is there a sample program that shows how to access OpenGL/ES from Qt?>>>> I'm trying to grok what the glue between glimagesink and a Qt>> application should look like.>> I am adding Leonardo and Francisco, who did the tests on this, so they comment.>> --> Otavio Salvador O.S. Systems> http://www.ossystems.com.br http://projetos.ossystems.com.br> Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750>>

I have tested Opengl ES2 in Qt5, but not over a Yocto made image.
The image I used is still created with Ltib.
I executed these demos successfully:
Hellowindow
Scenegraph/*
Shadereffects
And other qml demos.
The key during Qt installation is that OpenGL is detected when calling the configure script. Normally during a manual installation you will see the summary of detected features. I ignore if this list is presented during a Yocto baking process.
Francisco C.
-----Original Message-----
From: Eric Nelson [mailto:eric.nelson@boundarydevices.com]
Sent: Thursday, August 01, 2013 12:41 PM
To: Sandoval Gonzalez Leonardo-B42214
Cc: Otavio Salvador; meta-freescale Mailing List; Carrillodominguez Francisco Alberto-B35153
Subject: Re: [meta-freescale] [meta-fsl-arm PATCH 8/8] qt4: Enable OpenGL ES2 support for i.MX6
Thanks Leonardo,
BTW, I'm about to bail on the combination of Qt4/glimagesink 0.10.
The "client-draw-callback" property callbacks work pretty well, and I was thinking that we could use that to write into Qt's EGL context (if we could get one), but it seems that there's more to the picture.
In particular:
-- This call to get the display is essentially hardcoded for
/dev/FB0:
https://bitbucket.org/Freescale/gstreamer-gst-plugins-gl/src/3554c07ead40c48620ac8e4864d81988d0b9476b/gst-libs/gst/gl/gstglwindow_fbES2.c?at=0.10#cl-314
-- This call to eglSetCurrent() sets the display to black:
https://bitbucket.org/Freescale/gstreamer-gst-plugins-gl/src/3554c07ead40c48620ac8e4864d81988d0b9476b/gst-libs/gst/gl/gstglwindow_fbES2.c?at=0.10#cl-372
And all of this appears to have been re-structured in upstream
master:
http://cgit.freedesktop.org/gstreamer/gst-plugins-gl/tree/gst-libs/gst/gl
That said, if the OpenGL context in Qt4 isn't accessible, there's no reason to compile it in.
On 08/01/2013 09:19 AM, Sandoval Gonzalez Leonardo-B42214 wrote:
> I think Francisco did not get last email.>> Francisco,> please mention the testing you did.>> Leo> ________________________________________> From: otavio.salvador@gmail.com [otavio.salvador@gmail.com] on behalf > of Otavio Salvador [otavio@ossystems.com.br]> Sent: Wednesday, July 31, 2013 10:03 PM> To: Eric Nelson> Cc: meta-freescale Mailing List; Sandoval Gonzalez Leonardo-B42214; > Carrillodominguez Francisco Alberto-B35153> Subject: Re: [meta-freescale] [meta-fsl-arm PATCH 8/8] qt4: Enable > OpenGL ES2 support for i.MX6>> On Tue, Jul 30, 2013 at 3:20 PM, Eric Nelson > <eric.nelson@boundarydevices.com> wrote:>> Hi all,>>>>>> On 07/17/2013 11:17 AM, Otavio Salvador wrote:>>>>>> The Vivante libraries need some special linking as it has a more >>> modular design which thus require a specific set of mkspec changes >>> to make it to work. This change makes the linking to work when >>> building against Vivante libraries for i.MX6 SoCs.>>>>>>>>> <snip>>>>>>>>>>>> diff --git a/recipes-qt/qt4/qt4-x11-free_4.8.5.bbappend>>> b/recipes-qt/qt4/qt4-x11-free_4.8.5.bbappend>>> index 74bfb31..4c4d0c9 100644>>> --- a/recipes-qt/qt4/qt4-x11-free_4.8.5.bbappend>>> +++ b/recipes-qt/qt4/qt4-x11-free_4.8.5.bbappend>>> @@ -9,6 +9,7 @@ PACKAGE_ARCH_mx5 = "${MACHINE_ARCH}">>> QT_GLFLAGS_mx5 = "-opengl es2 -openvg">>> QT_CONFIG_FLAGS_append_mx5 = " -I${STAGING_KERNEL_DIR}/include/">>>>>> -DEPENDS_append_mx6 = " virtual/kernel">>> +DEPENDS_append_mx6 = " virtual/kernel virtual/libgles2">>> PACKAGE_ARCH_mx6 = "${MACHINE_ARCH}">>> -QT_CONFIG_FLAGS_append_mx6 = " -I${STAGING_KERNEL_DIR}/include/">>> +QT_GLFLAGS_mx6 = "-opengl es2 -openvg">>> +QT_CONFIG_FLAGS_append_mx6 = " -I${STAGING_KERNEL_DIR}/include/ >>> +-DLINUX=1>>> -DEGL_API_FB=1">>> diff --git a/recipes-qt/qt4/qt4/mx6/g++.conf >>> b/recipes-qt/qt4/qt4/mx6/g++.conf>>>>>> This patch seems to work perfectly for me, but I'm a bit confused >> about what it actually enables in Qt.>>>> Neither the QGLWidget examples like hellogl_es2 or the QML-based >> shadereffects demos seem to run.>>>> Is there a sample program that shows how to access OpenGL/ES from Qt?>>>> I'm trying to grok what the glue between glimagesink and a Qt >> application should look like.>> I am adding Leonardo and Francisco, who did the tests on this, so they comment.>> --> Otavio Salvador O.S. Systems> http://www.ossystems.com.br http://projetos.ossystems.com.br> Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750>>

Thanks Francisco,
I've been able to do the same using a Yocto-based image and meta-qt5,
but it was quite the ordeal to wrangle packaging.
My question was related to Qt4. We're including patches to enable
OpenGL, and I've been unable to see it function.
Regards,
Eric
On 08/01/2013 11:10 AM, Carrillodominguez Francisco Alberto-B35153 wrote:
> I have tested Opengl ES2 in Qt5, but not over a Yocto made image.>> The image I used is still created with Ltib.>> I executed these demos successfully:>> Hellowindow> Scenegraph/*> Shadereffects> And other qml demos.>>> The key during Qt installation is that OpenGL is detected when calling the configure script. Normally during a manual installation you will see the summary of detected features. I ignore if this list is presented during a Yocto baking process.>>> Francisco C.>>> -----Original Message-----> From: Eric Nelson [mailto:eric.nelson@boundarydevices.com]> Sent: Thursday, August 01, 2013 12:41 PM> To: Sandoval Gonzalez Leonardo-B42214> Cc: Otavio Salvador; meta-freescale Mailing List; Carrillodominguez Francisco Alberto-B35153> Subject: Re: [meta-freescale] [meta-fsl-arm PATCH 8/8] qt4: Enable OpenGL ES2 support for i.MX6>> Thanks Leonardo,>> BTW, I'm about to bail on the combination of Qt4/glimagesink 0.10.>> The "client-draw-callback" property callbacks work pretty well, and I was thinking that we could use that to write into Qt's EGL context (if we could get one), but it seems that there's more to the picture.>> In particular:> -- This call to get the display is essentially hardcoded for> /dev/FB0:> > https://bitbucket.org/Freescale/gstreamer-gst-plugins-gl/src/3554c07ead40c48620ac8e4864d81988d0b9476b/gst-libs/gst/gl/gstglwindow_fbES2.c?at=0.10#cl-314>> -- This call to eglSetCurrent() sets the display to black:> https://bitbucket.org/Freescale/gstreamer-gst-plugins-gl/src/3554c07ead40c48620ac8e4864d81988d0b9476b/gst-libs/gst/gl/gstglwindow_fbES2.c?at=0.10#cl-372>> And all of this appears to have been re-structured in upstream> master:> http://cgit.freedesktop.org/gstreamer/gst-plugins-gl/tree/gst-libs/gst/gl>> That said, if the OpenGL context in Qt4 isn't accessible, there's no reason to compile it in.>> On 08/01/2013 09:19 AM, Sandoval Gonzalez Leonardo-B42214 wrote:>> I think Francisco did not get last email.>>>> Francisco,>> please mention the testing you did.>>>> Leo>> ________________________________________>> From: otavio.salvador@gmail.com [otavio.salvador@gmail.com] on behalf>> of Otavio Salvador [otavio@ossystems.com.br]>> Sent: Wednesday, July 31, 2013 10:03 PM>> To: Eric Nelson>> Cc: meta-freescale Mailing List; Sandoval Gonzalez Leonardo-B42214;>> Carrillodominguez Francisco Alberto-B35153>> Subject: Re: [meta-freescale] [meta-fsl-arm PATCH 8/8] qt4: Enable>> OpenGL ES2 support for i.MX6>>>> On Tue, Jul 30, 2013 at 3:20 PM, Eric Nelson>> <eric.nelson@boundarydevices.com> wrote:>>> Hi all,>>>>>>>>> On 07/17/2013 11:17 AM, Otavio Salvador wrote:>>>>>>>> The Vivante libraries need some special linking as it has a more>>>> modular design which thus require a specific set of mkspec changes>>>> to make it to work. This change makes the linking to work when>>>> building against Vivante libraries for i.MX6 SoCs.>>>>>>>>>>>> <snip>>>>>>>>>>>>>>>> diff --git a/recipes-qt/qt4/qt4-x11-free_4.8.5.bbappend>>>> b/recipes-qt/qt4/qt4-x11-free_4.8.5.bbappend>>>> index 74bfb31..4c4d0c9 100644>>>> --- a/recipes-qt/qt4/qt4-x11-free_4.8.5.bbappend>>>> +++ b/recipes-qt/qt4/qt4-x11-free_4.8.5.bbappend>>>> @@ -9,6 +9,7 @@ PACKAGE_ARCH_mx5 = "${MACHINE_ARCH}">>>> QT_GLFLAGS_mx5 = "-opengl es2 -openvg">>>> QT_CONFIG_FLAGS_append_mx5 = " -I${STAGING_KERNEL_DIR}/include/">>>>>>>> -DEPENDS_append_mx6 = " virtual/kernel">>>> +DEPENDS_append_mx6 = " virtual/kernel virtual/libgles2">>>> PACKAGE_ARCH_mx6 = "${MACHINE_ARCH}">>>> -QT_CONFIG_FLAGS_append_mx6 = " -I${STAGING_KERNEL_DIR}/include/">>>> +QT_GLFLAGS_mx6 = "-opengl es2 -openvg">>>> +QT_CONFIG_FLAGS_append_mx6 = " -I${STAGING_KERNEL_DIR}/include/>>>> +-DLINUX=1>>>> -DEGL_API_FB=1">>>> diff --git a/recipes-qt/qt4/qt4/mx6/g++.conf>>>> b/recipes-qt/qt4/qt4/mx6/g++.conf>>>>>>>>> This patch seems to work perfectly for me, but I'm a bit confused>>> about what it actually enables in Qt.>>>>>> Neither the QGLWidget examples like hellogl_es2 or the QML-based>>> shadereffects demos seem to run.>>>>>> Is there a sample program that shows how to access OpenGL/ES from Qt?>>>>>> I'm trying to grok what the glue between glimagesink and a Qt>>> application should look like.>>>> I am adding Leonardo and Francisco, who did the tests on this, so they comment.>>>> -->> Otavio Salvador O.S. Systems>> http://www.ossystems.com.br http://projetos.ossystems.com.br>> Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750>>>>>>

It seems I did not understand what patch you were talking about.
I tested Otavio's patch to make qt4 work with gpu.
The generated Yocto image, starts and application once you boot the board.
I limited my test just to measure how much cpu was being used by this application. To validate graphics were accelerated.
Here is a video of the test, at the end you can see 5% of cpu used only.
http://www.youtube.com/watch?v=dUd8A6CtSi0
I did not executed any of the other demos.
Francisco C.
-----Original Message-----
From: meta-freescale-bounces@yoctoproject.org [mailto:meta-freescale-bounces@yoctoproject.org] On Behalf Of Carrillodominguez Francisco Alberto-B35153
Sent: Thursday, August 01, 2013 1:10 PM
To: Eric Nelson; Sandoval Gonzalez Leonardo-B42214
Cc: meta-freescale Mailing List; Otavio Salvador
Subject: Re: [meta-freescale] [meta-fsl-arm PATCH 8/8] qt4: Enable OpenGL ES2 support for i.MX6
I have tested Opengl ES2 in Qt5, but not over a Yocto made image.
The image I used is still created with Ltib.
I executed these demos successfully:
Hellowindow
Scenegraph/*
Shadereffects
And other qml demos.
The key during Qt installation is that OpenGL is detected when calling the configure script. Normally during a manual installation you will see the summary of detected features. I ignore if this list is presented during a Yocto baking process.
Francisco C.
-----Original Message-----
From: Eric Nelson [mailto:eric.nelson@boundarydevices.com]
Sent: Thursday, August 01, 2013 12:41 PM
To: Sandoval Gonzalez Leonardo-B42214
Cc: Otavio Salvador; meta-freescale Mailing List; Carrillodominguez Francisco Alberto-B35153
Subject: Re: [meta-freescale] [meta-fsl-arm PATCH 8/8] qt4: Enable OpenGL ES2 support for i.MX6
Thanks Leonardo,
BTW, I'm about to bail on the combination of Qt4/glimagesink 0.10.
The "client-draw-callback" property callbacks work pretty well, and I was thinking that we could use that to write into Qt's EGL context (if we could get one), but it seems that there's more to the picture.
In particular:
-- This call to get the display is essentially hardcoded for
/dev/FB0:
https://bitbucket.org/Freescale/gstreamer-gst-plugins-gl/src/3554c07ead40c48620ac8e4864d81988d0b9476b/gst-libs/gst/gl/gstglwindow_fbES2.c?at=0.10#cl-314
-- This call to eglSetCurrent() sets the display to black:
https://bitbucket.org/Freescale/gstreamer-gst-plugins-gl/src/3554c07ead40c48620ac8e4864d81988d0b9476b/gst-libs/gst/gl/gstglwindow_fbES2.c?at=0.10#cl-372
And all of this appears to have been re-structured in upstream
master:
http://cgit.freedesktop.org/gstreamer/gst-plugins-gl/tree/gst-libs/gst/gl
That said, if the OpenGL context in Qt4 isn't accessible, there's no reason to compile it in.
On 08/01/2013 09:19 AM, Sandoval Gonzalez Leonardo-B42214 wrote:
> I think Francisco did not get last email.>> Francisco,> please mention the testing you did.>> Leo> ________________________________________> From: otavio.salvador@gmail.com [otavio.salvador@gmail.com] on behalf > of Otavio Salvador [otavio@ossystems.com.br]> Sent: Wednesday, July 31, 2013 10:03 PM> To: Eric Nelson> Cc: meta-freescale Mailing List; Sandoval Gonzalez Leonardo-B42214; > Carrillodominguez Francisco Alberto-B35153> Subject: Re: [meta-freescale] [meta-fsl-arm PATCH 8/8] qt4: Enable > OpenGL ES2 support for i.MX6>> On Tue, Jul 30, 2013 at 3:20 PM, Eric Nelson > <eric.nelson@boundarydevices.com> wrote:>> Hi all,>>>>>> On 07/17/2013 11:17 AM, Otavio Salvador wrote:>>>>>> The Vivante libraries need some special linking as it has a more >>> modular design which thus require a specific set of mkspec changes >>> to make it to work. This change makes the linking to work when >>> building against Vivante libraries for i.MX6 SoCs.>>>>>>>>> <snip>>>>>>>>>>>> diff --git a/recipes-qt/qt4/qt4-x11-free_4.8.5.bbappend>>> b/recipes-qt/qt4/qt4-x11-free_4.8.5.bbappend>>> index 74bfb31..4c4d0c9 100644>>> --- a/recipes-qt/qt4/qt4-x11-free_4.8.5.bbappend>>> +++ b/recipes-qt/qt4/qt4-x11-free_4.8.5.bbappend>>> @@ -9,6 +9,7 @@ PACKAGE_ARCH_mx5 = "${MACHINE_ARCH}">>> QT_GLFLAGS_mx5 = "-opengl es2 -openvg">>> QT_CONFIG_FLAGS_append_mx5 = " -I${STAGING_KERNEL_DIR}/include/">>>>>> -DEPENDS_append_mx6 = " virtual/kernel">>> +DEPENDS_append_mx6 = " virtual/kernel virtual/libgles2">>> PACKAGE_ARCH_mx6 = "${MACHINE_ARCH}">>> -QT_CONFIG_FLAGS_append_mx6 = " -I${STAGING_KERNEL_DIR}/include/">>> +QT_GLFLAGS_mx6 = "-opengl es2 -openvg">>> +QT_CONFIG_FLAGS_append_mx6 = " -I${STAGING_KERNEL_DIR}/include/>>> +-DLINUX=1>>> -DEGL_API_FB=1">>> diff --git a/recipes-qt/qt4/qt4/mx6/g++.conf >>> b/recipes-qt/qt4/qt4/mx6/g++.conf>>>>>> This patch seems to work perfectly for me, but I'm a bit confused >> about what it actually enables in Qt.>>>> Neither the QGLWidget examples like hellogl_es2 or the QML-based >> shadereffects demos seem to run.>>>> Is there a sample program that shows how to access OpenGL/ES from Qt?>>>> I'm trying to grok what the glue between glimagesink and a Qt >> application should look like.>> I am adding Leonardo and Francisco, who did the tests on this, so they comment.>> --> Otavio Salvador O.S. Systems> http://www.ossystems.com.br http://projetos.ossystems.com.br> Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750>>

On 08/05/2013 02:32 PM, Carrillodominguez Francisco Alberto-B35153 wrote:
> It seems I did not understand what patch you were talking about.>> I tested Otavio's patch to make qt4 work with gpu.>> The generated Yocto image, starts and application once you boot the board.>> I limited my test just to measure how much cpu was being used by this application. To validate graphics were accelerated.>> Here is a video of the test, at the end you can see 5% of cpu used only.>> http://www.youtube.com/watch?v=dUd8A6CtSi0>> I did not executed any of the other demos.>
Thanks Francisco,
I hadn't seen the "Qt in use" demo before and it looks pretty nice.
Which patch were you referring to of Otavio's? He's a hard guy to keep
up with ;)
Was this build against dylan, master, or master-next?
Also, can you confirm that this was Qt4?
Please advise,
Eric

Hi Eric,
I can answer your questions:
* the patch we were interested to test is the one mentioned in the subject.
* all branches were master except meta-fsl-arm, this one was master-next (at that time the patch was already there)
* QT4. Image and machine were qt-in-use-demo and imx6qsabresd, respectively.
Leo

On 08/06/2013 06:58 AM, Sandoval Gonzalez Leonardo-B42214 wrote:
> Hi Eric,>> I can answer your questions:>> * the patch we were interested to test is the one mentioned in the subject.
Doh!
> * all branches were master except meta-fsl-arm, this one was master-next (at that time the patch was already there)> * QT4. Image and machine were qt-in-use-demo and imx6qsabresd, respectively.>
Thanks Leo.