[fpc-pascal] Implementing AggPas with PtcGraph

James Richters james at productionautomation.net
Mon Jul 24 21:45:34 CEST 2017


>I am also wondering if it would be beneficial to accelerate other procedures in the same way especially getimage()

I went ahead and tried it and I've got getimage() to about 18x faster on my system.  I changed how it works a little, the original was checking every single pixel if it was in the viewport or not, instead of doing that, I just fixed the nested loop to only operate within the range included in the viewport.  I also added a section to only include items that are actually on the screen as well.  I've updated my github repository, the changes I've made are on the 'zaaphod_custom' branch.  Here's a link

https://github.com/Zaaphod/ptcpas/blob/Zaaphod_Custom/ptcgraph/ptcgraph.pp
 

I'm wondering if I should take the default procedures out of graph.inc and replace them with just an error and halt as many of the other procedures have done.

I thought I would include the i386-win32 and x86_64-win64 compiled units of ptcpas with the accelerated versions of putimage() and getimage() in my repository if anyone wants to give them a try.   They are in a 'units' directory on the 'compiled' branch Here's the link:

https://github.com/Zaaphod/ptcpas/commit/b96f7208f079d4e2fe208ba5ac464f8f6808d79b

https://github.com/Zaaphod/ptcpas/tree/Compiled


James




More information about the fpc-pascal mailing list