0

I am working on Nitrogen6x board that runs on Yocto 2.1 with Qt 5.6.2 support. I am able to build a sample qt application Qt Quick Examples - Shader Effects present under Examples section of Qt Creator. Copied over the executable on my nitrogen board. Have set the required QT environment variables on the terminal where I launched the sample qt application and I am noticing this error:

./shadereffects

QXcbIntegration: cannot create platform OpenGL context, neither GLX nor EGL are enabled.

Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior 2, swapInterval 1, profile 0)

Aborted.

I tried running a sample application Analog Clock Example from Qt Creator Examples section, this program uses only QT Widgets and am able to run the application on Nitrogen6x board successfully.

In my packagegroup-qt5-toolchain-target.bb file I have removed the below lines (due to some GIT pull related errors).

${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '${USE_WAYLAND}', '', d)} \
${USE_RUBY} \

Does this change has any resemblance to the problem am facing with OpenGL. If I try to do sudo apt-get install libgl1-mesa-dev or equivalent on Yocto Terminal it shows apt-get: command not found. How do I need to resolve this OpenGL related errors. Any help on this is deeply appreciated. Thanks in advance.

Community
  • 1
  • 1
user12345
  • 661
  • 8
  • 34

1 Answers1

0

I assume that your image is x11 and has Wayland removed.

in your /conf/local.conf, try to add

DISTRO_FEATURES_append = " opengl "

This will add opengl to your distribution; See line 41 in the Qt Recipe

Charles C.
  • 3,725
  • 4
  • 28
  • 50
  • I will be needing just `eglfs` plugin to be supported. When I run my application with `-platform eflgs` I see this error `Available platform plugins are: minimal, offscreen, xcb`. I am reading some other [post](http://stackoverflow.com/questions/36760009/how-to-enable-eglfs-plugin-in-yocto-setup-using-yoctometa-qt5-for-riotboard) you answered. And I am planning to try your suggestions there and see if I can install EGLFS plugin successfully. – user12345 Mar 08 '17 at 07:00