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

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to