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. QTimer events not handled when started from QSGRenderThread
Forum Updated to NodeBB v4.3 + New Features

QTimer events not handled when started from QSGRenderThread

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 177 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.
  • O Offline
    O Offline
    Oxyde
    wrote on last edited by Oxyde
    #1

    Hi there, I use QQuickFramebufferObject to integrate my 3D render engine to QtQuick (taking into account the multi-threaded rendering architecture of QtQuick).
    It works well on some aspects, when I want to update the window I ask for an update (repaint) and then the synchronize and render functions are called and I can do whatever I want to render my scene and display it inside my QtQuick GUI.

    But sometimes, I want to keep track of operations executed on the GPU and I would like to use GLsync fence system to do so. I place fences on the gpu command queue and I use a QTimer with a 0 interval to check their status and react to them being signaled as soon as possible.

    It works well on my Mac because it uses a single-threaded render loop but it does not work on Linux where a multi-threaded render loop is used. It seems my QTimer events are not always taken into account, the render thread is waiting for something (a renderSync request ?) in order to wake and proceed with the events. But when there is no renderSync request, none of this events originated from this thread seems to be handled.

    Is this behaviour intended or is it bug ? Is there a way to workaround it ? The only way I found was to do something like this from the main thread: window->scheduleRenderJob(job, QQuickWindow::RenderStage::NoStage); but the main thread should not be aware it has to do so only to make the fence polling works and it is not efficient.

    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