Problem using OpenGL in Qt Embedded Linux

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

Problem using OpenGL in Qt Embedded Linux

9,326 Views
bonil
Contributor I

Hi guys

After successfully building Qt Embedded Linux on my i.MX51 EVK board with LTIB, I got the following error:

 

root@freescale /usr/local/Trolltech/demos/embedded/fluidlauncher$ ./fluidlaunche
r -qws
QProcess::start: Process is already running
QGLContext::chooseContext(): The screen is not a QGLScreen
QEglContext::chooseConfig(): Could not find a suitable EGL configuration
Requested: "type=es2 rgba=1,1,1,0 surface-type=window"
Available:
"id=1 type=es1,es2,vg rgba=5,6,5,0 surface-type=window,pbuffer,vg-colorspace-linear,1061
    caveat=none max-pbuffer-size=2048x2048 native-renderable=false
    visual-id=0 visual-type=0 bind-texture=no-rgb,no-rgba
    min-swap-interval=1 max-swap-interval=1 alpha-mask=8
    conformant=true"

....

QGLContext::makeCurrent(): Cannot make invalid context current
QGLContext::makeCurrent(): Cannot make invalid context current
QGLShader: could not create shader
QGLShader: could not create shader
QGLShaderProgram: could not create shader program
Errors linking simple shader: ""
QGLShader: could not create shader
QGLShader: could not create shader
QGLShaderProgram: could not create shader program
Errors linking blit shader: ""
QGLContext::makeCurrent(): Cannot make invalid context current
QGLShader: could not create shader
QGLShader: could not create shader
QGLShaderProgram: could not create shader program
"Shader program failed to link,  Error Log:
    "
Process error:  1

 

I used the qt demos Fluidlaucher and enabled OpenGL

 

Is there something wrong with my framebuffer settings?

root@freescale /usr/local/Trolltech/demos/embedded/fluidlauncher$ fbset
mode "800x480-58"
    # D: 27.000 MHz, H: 29.348 kHz, V: 57.545 Hz
    geometry 800 480 800 1440 16
    timings 37037 40 60 10 10 20 10
    rgba 5/11,6/5,5/0,0/0
endmode

 

Can somebody help me?

 

Thanks in advance

Luca

Tags (2)
0 Kudos
11 Replies

2,677 Views
micken
Contributor I

I will make a attempt! I need this as well..

Eric Nelson said:

Hi Pierre,

We'd like to support this effort and get an open source implementation available and will offer $500 and an i.MX6 Sabre Lite or Nitrogen6X to the first to implement and publish a Qt5 Embedded+OpenGL for i.MX5x or i.MX6x.

We can't let RPI have a lead on this front...

        http://labs.qt.nokia.com/2011/10/03/chasing-the-raspberry-pi-dragon...

Contact us at mailto:info@boundarydevices.com if you need hardware or software support.

0 Kudos

2,677 Views
EricNelson
Senior Contributor II

Hi Pierre,

We'd like to support this effort and get an open source implementation available and will offer $500 and an i.MX6 Sabre Lite or Nitrogen6X to the first to implement and publish a Qt5 Embedded+OpenGL for i.MX5x or i.MX6x.

We can't let RPI have a lead on this front...

        http://labs.qt.nokia.com/2011/10/03/chasing-the-raspberry-pi-dragon-opengl-es2-accelerated-qt-pi/#co...

Contact us at mailto:info@boundarydevices.com if you need hardware or software support.

0 Kudos

2,677 Views
PierreVorhagen
Contributor I

In Qt 4.X with QWS, simplegl plugin should give some basic results, but don't expect much. Same applies for the EglFS platform plugin, if you're using QPA. Check the Qt documentaiton for more details.

Ideally though, you need a plugin written specifically for your hardware.

0 Kudos

2,677 Views
lipeng1z
Contributor I

which kind of plugin ? its name and version? please give us an answer in detail , thank you  all the time .

Michael Grunditz said:

Look at previous answers in tis group. But in short , you need a plugin to qt for doing qtgl
0 Kudos

2,677 Views
PierreVorhagen
Contributor I

Hi,

I am having the same problem. I decided to go with Qt5 instead, its QPA platforms system allows for somewhat easier OpenGL integration (at least theoretically).

I am working on achieving exactly what you are trying to do, use Qt with accelerated OpenGL on the i.MX51, without X. This is the thread I started about my current issue with this: http://imxcommunity.org/forum/topics/sharing-graphics-buffers-between-processes

Regards,

Pierre Vorhagen

0 Kudos

2,677 Views
KrishnaPavan
Contributor II

Its not EGL 2.0 actually, its EGL 1.4

0 Kudos

2,677 Views
KrishnaPavan
Contributor II

Hi Harald,

We will just need the X11 libraries in the Worst Case.

Don't know, if we will need EGL 1.3/EGL 2.0

Regards :: Krishna Pavan

0 Kudos

2,677 Views
harald_krapfenb
Contributor III

As I found out, the problem is related to the Linux-FB not being a QGLScreen for Qt. Therefore, one would need a QGLScreen implementation for i.MX5x's GPU, which is not implemented (Actually, there is just 1 reference implementation).

If you want to use OpenGL nevertheless, install X11 and use the Qt/X11 version. There, you can enable OpenGL.

Regards,
Harald

0 Kudos

2,677 Views
harald_krapfenb
Contributor III

Same problem here.

Did you solve this puzzle yet?

Greetings,

Harald

0 Kudos

2,677 Views
bonil
Contributor I

Should already be done. Here my Qt configuration output and attached the qt-embedded.spec file used from LTIB (I did a few modification to enable OpenGL) and the generated qmake.conf file.

 

Qt configuration

Qt Embedded Linux WITH OpenGL / OpenVG

Building on:   qws/linux-x86-g++
Building for:  qws/linux-g++-mx
Architecture:  arm
Host architecture: i386

qmake vars .......... cat: .qmake.vars: No such file or directory
qmake switches ......
Build ............... libs examples demos docs translations
Configuration .......  cross_compile release shared dll embedded largefile stl precompile_header exceptions_off  minimal-config small-config medium-config large-config full-config phonon phonon-backend accessibility egl openvg opengl opengles2 embedded reduce_exports ipv6 clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname getifaddrs inotify system-jpeg system-png png system-tiff system-freetype system-zlib nis glib gstreamer alsa multimedia svg webkit script scripttools release
Debug ............... no
Qt 3 compatibility .. no
QtDBus module ....... no
QtConcurrent code.... yes
QtScript module ..... yes
QtScriptTools module  yes
QtXmlPatterns module  no
Phonon module ....... yes
Multimedia module ... yes
SVG module .......... yes
WebKit module ....... yes
JavaScriptCore JIT .. To be decided by JavaScriptCore
Declarative module .. no
STL support ......... yes
PCH support ......... yes
MMX/3DNOW/SSE/SSE2..  no/no/no/no
iWMMXt support ...... no
IPv6 support ........ yes
IPv6 ifname support . yes
getaddrinfo support . yes
getifaddrs support .. yes
Accessibility ....... yes
NIS support ......... yes
CUPS support ........ no
Iconv support ....... no
Glib support ........ yes
GStreamer support ... yes
Large File support .. yes
GIF support ......... plugin
TIFF support ........ plugin (system)
JPEG support ........ plugin (system)
PNG support ......... yes (system)
MNG support ......... plugin (qt)
zlib support ........ system
Session management .. no
Embedded support .... arm
Freetype2 support ... auto (system)
Graphics (qt) ....... linuxfb multiscreen linuxfb
Graphics (plugin) ...
Decorations (qt) .... styled windows default
Decorations (plugin) 
Keyboard driver (qt). tty tty
Keyboard driver (plugin)
Mouse driver (qt) ... pc linuxtp tslib
Mouse driver (plugin)
OpenGL support ...... yes (OpenGL ES 2.x)
EGL support ......... yes <EGL/egl.h>
OpenVG support ...... yes
SQLite support ...... plugin (qt)
OpenSSL support ..... no
alsa support ........ yes

 

Do you see here an error? Or is there some varaible that I have to set on my board?

0 Kudos

2,677 Views
micken
Contributor I
Look at previous answers in tis group. But in short , you need a plugin to qt for doing qtgl
0 Kudos