v4.40: Important graphic change

Everything else that doesn't fall into one of the other PB categories.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8453
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

v4.40: Important graphic change

Post 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.
BERESHEIT
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

great improvement!

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6175
Joined: Sat May 17, 2003 11:31 am
Contact:

Post 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 :-))...
( 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... )
freak
PureBasic Team
PureBasic Team
Posts: 5962
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post 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 :)
quidquid Latine dictum sit altum videtur
User avatar
Demivec
Addict
Addict
Posts: 4283
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Post 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)
Post Reply