PureBasic's Point() and Plot() commands now operate directly on the image buffer, resulting in a huge speed gain. They aren't bulletproof anymore in the sense that you used to be able to plot to points off the image and now it'll generate an error, but this is a small price to pay imho. Try this test in 4.31 and again in 4.40 and see the difference:
http://www.purebasic.fr/english/viewtop ... 10&start=2
Also, DrawingBuffer() etc. now works for images, so gone is the need for GetObject_() on Windows. All the needed information is provided natively by PureBasic.
v4.40: Important graphic change
- netmaestro
- PureBasic Bullfrog

- Posts: 8453
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
v4.40: Important graphic change
BERESHEIT
Not sure if this is something newbies would like... perhaps a check in the debugger to indicate plotting goes out of bounds, or a command that turns safe plotting on, or something like PlotSafe() might be in order to help newbies (and those that are not looking for the cutting edge plot speed
)...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
I decided to put some numbers behind the changes.
The code referenced by netmaestro used two methods to measure speed: A. point/plot, and B. structured memory access.
I measured a 44x improvement in speed in method A. This made it less than 1/5 as fast as method B, compared with its former rank of 1/5000 as fast.
The code referenced by netmaestro used two methods to measure speed: A. point/plot, and B. structured memory access.
I measured a 44x improvement in speed in method A. This made it less than 1/5 as fast as method B, compared with its former rank of 1/5000 as fast.
