[Gambas-user] New soft at the farm
Benoît Minisini
gambas at ...1...
Tue Nov 24 15:44:08 CET 2015
Le 24/11/2015 14:36, Moviga Technologies a écrit :
>
>
> I have tried both the old and the new version now on a different machine
> with i5 processor. It still lags treribly, processor is 25%. Perhaps it
> has something to do with the GL library and the intel video drivers...
Antialias painting is slow, but this is not the reason why this program
is unusable even on a powerful computer.
The reason is that mouse move events are never ignored. If your mouse
cursor moves 20 pixels in one direction (for example) between two
occurences of the event loop, you will receive 20 MouseMove events, not
one. And so the rendering will be done 20 times for nothing.
The solution is to add a timer to the form, and instead of calling
"graph_draw" at each mouse move event, you trigger the timer instead,
and it's the timer event handler that will call "graph_draw". That way,
the rendering will be done once by event loop, and not once for each
mouse move events.
Another bug in the application: don't mix the cube if you have partially
move one of its face. All faces will display incorrectly.
Regards,
--
Benoît Minisini
More information about the User
mailing list