Yocto/Qt5.6: QXcbIntegration: Cannot create platform OpenGL context



  • 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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.