Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QQuickFramebufferObject and offscreen rendering
Qt 6.11 is out! See what's new in the release blog

QQuickFramebufferObject and offscreen rendering

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 1.5k 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.
  • M Offline
    M Offline
    middlecsharp
    wrote on last edited by middlecsharp
    #1

    I'm working with a project that uses QQuickFramebufferObject and QQuickFrambufferObject::Renderer classes to render to the screen. I'm wondering if there are any examples which show how to do offscreen rendering using QQuickFramebufferObject?

    I've tried a few approaches -- either a manually-created FBO or a QT-abstracted FBO (like creating a separate QQuickFramebufferObject or a QOpenGLFrameBufferObject), and I run into a problem when I unbind that offscreen FBO (so that I can render to the normal frame buffer). Specifically, I get a solid blue framebuffer on-screen that shows nothing else.

    Since I'm not allowed to share this code I was wondering if anyone has done offscreen rendering with QQuickFramebufferObject. The examples I find use the QOpenGLWidget pattern instead.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      middlecsharp
      wrote on last edited by
      #2

      Here's an attempt of me trying to do so (using the fboinsgrenderer example):
      https://github.com/sohailshafii/textureinsgnode_offscreen/blob/master/fboinsgrenderer.cpp

      There is a section of the code where I try to use an offscreen buffer, commented out because it causes the normal frame buffer to render as blue:
      // uncomment this block of code to see an incorrect rendering
      /m_fbo->bind();
      logo.render();
      update();
      m_fbo->release();
      m_fbo->bindDefault();
      /
      logo.render();
      update();

      I don't know why I can't seem to use an offscreen fbo with a QtQuickFramebufferObject renderer.

      1 Reply Last reply
      0

      • Login

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