Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QQuickWidget - QOpenGLFramebufferObject::release() called from incompatible context

QQuickWidget - QOpenGLFramebufferObject::release() called from incompatible context

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 215 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aatwo
    wrote on 15 Feb 2021, 18:13 last edited by aatwo
    #1

    Hi all.

    I am trying to render a QQuickWidget (which contains a QML application) to an offscreen surface which I am rendering to a surface in my game. However I am encountering the following warning contantly and my application is leaking memory very quickly:

    QOpenGLFramebufferObject::release() called from incompatible context
    

    This is strange because if I swap the QQuickWidget for any normal QWidget derrived class (e.g. a QDial) I get absolutely no warnings / memory leakage.

    Does anyone have any idea why this is happening?

    My code looks roughly like this:

    // Variable types defined in header
    QOpenGLContext* openGLContext;
    QGraphicsScene* graphicsScene;
    QOpenGLFramebufferObject* openGLFrameBuffer;
    QOffscreenSurface* offscreenSurface ;
    
    // Render loop
    void Render()
    {
        openGLContext->makeCurrent( offscreenSurface );
        openGLFrameBuffer->bind();
    
        QOpenGLPaintDevice device( openGLFrameBuffer->size() );
        QPainter painter( &device );
        graphicsScene->render( &painter );
    
        openGLFrameBuffer->release();
    
        GLuint unTexture = openGLFrameBuffer->texture();
    
        ...
    
    1 Reply Last reply
    0

    1/1

    15 Feb 2021, 18:13

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved