Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QML Rendering Engine: frame refresh event

Tags:

c++

qt

qml

Performance Considerations And Suggestions article says:

As an application developer, you must strive to allow the rendering engine to achieve a consistent 60 frames-per-second refresh rate. 60 FPS means that there is approximately 16 milliseconds between each frame in which processing can be done, which includes the processing required to upload the draw primitives to the graphics hardware.

Is there an event or signal or any form of callback to make the code be called with that refresh?

The goal is to eliminate the need for handling the signal from the rendering thread in the UI thread slot. If the new data arrived then it will be drawn or marked for the next refresh to be drawn (with update() call).

like image 480
Alexander V Avatar asked Oct 15 '25 03:10

Alexander V


1 Answers

QQuickWindow has a bunch of signals for the purpose of synchronization - beforeRendering(), afterRendering(), beforeSynchronizing(), afterSynchronizing(), frameSwapped(). Take your pick.

like image 140
dtech Avatar answered Oct 17 '25 02:10

dtech



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!