OpenGL ES2 EGL Context Setup i.MX53 Qt 4.7.1 QWS + QGLWidget (NO X11)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

OpenGL ES2 EGL Context Setup i.MX53 Qt 4.7.1 QWS + QGLWidget (NO X11)

Jump to solution
2,452 Views
adowdy
Contributor II

I am looking for some assistance with setting up my Qt Application to recognize a valid device context on the i.MX53 ARM platform.  My configuration:

iMX53 chip and bsp

Qt embedded application running v 4.7.1 compiled against the driver provided with the bsp (with all the right ES2 info and flags needed)

Extremely simple Qt app with only a single QGLWidget

I am compiling, linking, and running my simple app, but at runtime when I instantiate my QGLWidget, it returns as 'invalid' and does not call any OpenGL functions (likely cause being that my OpenGL context is not configured correctly by default, since OpenGL ES2 is supported, and linking properly).

I have tried manipulating the context information via the Qt API (QGLFormat) but to no avail.  On app startup, I can query the application for OpenGL support via QGLFormat::defaultFormat().hasOpenGL(); (returns true, though hasOpenGLOverlays() returns false)

Querying with:

qDebug() << "Format OGL Versions flags" << QGLFormat::openGLVersionFlags();

I get:

Format OGL Versions flags QFlags(0x1|0x2|0x4|0x8|0x10|0x20|0x40|0x1000|0x2000|0x4000|0x8000|0x10000)

Which tells me that ES2 is among the supported revisions seen by Qt (according to the Qt 4.7 docs for QGLFormat).  This brings me further away from the likelyhood of an issue in which I have messed up the dependencies somehow, and appears even more likely that my context information is not correct in my QGLFormat object that I pass to my QGLWidget on initialization.

I have no preconception of how the context needs to be configured on the device (buffer sizes, etc.  really everything that can be set in QGLFormat) - Provided with the BSP files i recieved were some OpenGL demos that work correctly, but I do not appear to have the source for those demos.  Can anyone direct me to either the source for the working ES2 demo (the simple_draw demo for instance) or direct me to an otherwise sufficient source of the proper context information for the i.MX53 platform?  Note - I do not have X Server running on my target distro, so it must be QWS compatible (which ulimately accesses the linux framebuffer, I think?).

Demos I'm talking about (where is the source code?) -

~/amd-gpu-bin-mx51-11.09.01/usr/bin$ ls

2dblt_perf           es11ex                       resclient_multitask_test  tiger      vg11sanity

c2d_sanity_app_z160  gsl_sanity_app               resclient_test            tiger_ri   wakeuplcd

c2d_sanity_app_z430  resclient_multiprocess_test  simple_draw               torusknot

Any and all help is tremendously appreciated!

Labels (3)
0 Kudos
Reply
1 Solution
1,457 Views
adowdy
Contributor II

I have solved this problem using a Qt plugin known as QScreenSimpleGL

This post had described it:

Hitching Qt/Embedded to a framebuffer OpenGL ES (2) abstraction |  Qt Blog

Link to repository + README with good information about usage, and is where the plugin source can be grabbed:

https://qt.gitorious.org/qt-labs/simplegl/source/4973452ca330ef09bf050393e43e25c8a25998f5:README

The plugin creates a valid OpenGL context for my setup, solving the invalid context problem under QWS.

- AD

View solution in original post

0 Kudos
Reply
2 Replies
1,458 Views
adowdy
Contributor II

I have solved this problem using a Qt plugin known as QScreenSimpleGL

This post had described it:

Hitching Qt/Embedded to a framebuffer OpenGL ES (2) abstraction |  Qt Blog

Link to repository + README with good information about usage, and is where the plugin source can be grabbed:

https://qt.gitorious.org/qt-labs/simplegl/source/4973452ca330ef09bf050393e43e25c8a25998f5:README

The plugin creates a valid OpenGL context for my setup, solving the invalid context problem under QWS.

- AD

0 Kudos
Reply
1,457 Views
maxmustermann
Contributor I

WARNING !

DO NOT use the proprietary kgsl stuff - it's *horribly* insecure.

Broken by design - unfixable !

[imx53] WARNING! Do NOT use the proprietary GPU drivers / KGSL stuff - MAJOR RISK!

0 Kudos
Reply