Page 1 of 1

v4.40: Important graphic change

Posted: Fri Aug 14, 2009 11:14 am
by netmaestro
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.

Posted: Fri Aug 14, 2009 11:58 am
by nco2k
great improvement!

c ya,
nco2k

Posted: Fri Aug 14, 2009 2:23 pm
by blueznl
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 :-))...

Posted: Fri Aug 14, 2009 2:54 pm
by freak
There is now OutputWidth() and OutputHeight(), so doing the clipping yourself if needed is not a problem.

A debugger check will be added or course. I just forgot that :)

Posted: Fri Aug 14, 2009 5:01 pm
by Demivec
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. 8)