I am using the new Qt 3D API to render a 3D scene during computationally intensive computing. This scene changes only as a response to user input. However, the default behavior of Qt 3D by default blocks the frame rate of the scene to some high constant value, which in this case consumes an invalid amount of resources.
Is there a way to control frame rate in Qt 3D? Ideally, I would only like to visualize a new frame when changes were made to the scene, but also reduce it to a smaller fixed value. The Qt 3D documentation is sparse, and I could not find a way to do this.
Edit: I managed to find and apply QRenderSettings :: OnDemand to my root node and frame graph, but it does not seem to have an effect, although this implies that it should, since I am using Qt 5.7. Any additional contribution to this would be very welcome (even if it requires only comments).
Editing 2: after installing Fraps and directly measuring the frame rate, it seems that the scene, in fact, only presents frames if necessary using QRenderSettings :: OnDemand. Without this, the frame rate remains at 60 frames per second, which is my screen refresh rate. However , the program continues to consume a lot of CPU time when idling with Qt 3D turned on, regardless of whether a 3D window is displayed. I'm starting to think that this is a separate Qt 3D issue, not related to frame rate, and will probably open a new question accordingly.
c ++ qt 3d frame-rate qt3d
Ryan hilbert
source share