Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QtQuick App with underlying EGL returns a 0x300d (EGL_BAD_SURFACE) when swapping buffers



  • Hi all,

    I'm just trying to exchange an EGL stream from a producer to a consumer.
    The basic streaming is running so far, but as soon as the buffers are swapped, I get a 0x300d thrown.

    According to the docs this is caused by:

    EGL_BAD_SURFACE is generated if surface is not an EGL drawing surface.
    

    My EGL is initialized with:

    m_display = (EGLDisplay*)eglGetDisplay(EGL_DEFAULT_DISPLAY);
    
    // snip find m_config via eglGetConfigAttrib until a suitable is found
    
    Display* xDisp = QX11Info::display();
    m_window = DefaultRootWindow(xDisp);
    m_surface = eglCreateWindowSurface(m_display, m_config, m_window, NULL);
    

    I'm re-setting the context upfront aquiring the frame and even re-bind the textures and stuff.
    But I can't get rid of this problem. The whole setup and streaming process is not complaining about a surface problem, until I start swapping.

    While crawling for this problem I came upon Qt Platform Abstraction and EGLFS.
    Has anyone experience here if this would be the way to go?

    The big problem I'm reading in EGLFS is:

    As of Qt 5.3, eglfs supports a single fullscreen GL window: such as an OpenGL-based QWindow, a QQuickView, or a QOpenGLWidget.
    

    This would be a show stopper as I'd like to handle and display multiple EGL streams in different QuickViews. Definitively not fullscreen.

    Any hints or tips in this issue are highly appreciated,

    Thanks + Best,
    Bodo



  • Ok, got this solved meanwhile. This was a thread/contexting problem.


Log in to reply