Skip to content
  • QQuickFramebufferObject with external OpenGL in Qt6

    Unsolved QML and Qt Quick qt6 fbo opengl
    7
    0 Votes
    7 Posts
    2k Views
    D
    I'm currently working on getting on of my older applications to work with PyQt6 on Wayland. The python-mpv library has classically used an X window ID for telling mpv where to render, but that obviously won't work on Wayland. There are several examples of using OpenGL rendering with python-mpv: https://github.com/trin94/qtquick-mpv The PySide6 example does work, but my entire application is written in PyQt6: https://gitlab.com/djsumdog/mediahug/ I've been playing around with the code trying to figure out what's happening. All the mpv output looks identical between the different API examples. Creating another window and commenting out the setSource/show for the quickview prevents it from crashing out. I guess there might be an issue with the PyQt6 bindings? I'd really rather not trade out everything in my code for PySide.
  • 0 Votes
    2 Posts
    570 Views
    S
    I did in fact have to call glDrawBuffers myself. I assumed this was handled by the FBO binding, but apparently not. QOpenGLExtraFunctions* f = QOpenGLContext::currentContext()->extraFunctions(); GLenum bufs[2] = { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1 }; f->glDrawBuffers(2, bufs); This seems strange to me that the FBO abstraction supports color attachments, but requires extra functions to use them.
  • 0 Votes
    1 Posts
    544 Views
    No one has replied