How to handle Qt Asynchronous calls when calling update() ?
-
Actually I need immediate calling of paintGL() for rendering image in window.
While I am calling update(), It internally calls paintEvent() function asynchronously then this paintEvent() calls immediate paintGL().
Update() does not cause an immediate repaint; instead it schedules a paint event for processing when Qt returns to the main event loop. Calling update() several times normally results in just one paintEvent() call. -
Actually I need immediate calling of paintGL() for rendering image in window.
While I am calling update(), It internally calls paintEvent() function asynchronously then this paintEvent() calls immediate paintGL().
Update() does not cause an immediate repaint; instead it schedules a paint event for processing when Qt returns to the main event loop. Calling update() several times normally results in just one paintEvent() call.@jaggusri12 said in How to handle Qt Asynchronous calls when calling update() ?:
Calling update() several times normally results in just one paintEvent() call.
So what's the problem with this? That's a normal window manager behavior... if something is that fast that it gets merged noone will ever see it visually on the screen.
-
@jaggusri12 said in How to handle Qt Asynchronous calls when calling update() ?:
Calling update() several times normally results in just one paintEvent() call.
So what's the problem with this? That's a normal window manager behavior... if something is that fast that it gets merged noone will ever see it visually on the screen.
I have a yuv buf data that can be displayed into a qt window continuously. and I implemented a paintGL() that performs all rendering (Shader,Textures and Binding) operations. Here that yuv buf data was taken from different thread so I used Signal-Slot mechanism to communicate between two threads. (1)This signal-slot was added some delay to the next frame and this was added to main event loop(I think so).
When I call update()/repaint(), (2)It call paintEvent() and that paintEvent() also added to main event loop . Buzz of these two delay operations I get some frame drops.
So could please give me any suggestion to handle those two things in better way?