Page 1 of 1

I just wondered about...

Posted: Tue Aug 05, 2003 1:01 am
by LCD
Everyone says that PB is optimised, but I encountered a strange problem: For a zoom function I made a routine that uses Box command to draw zoomed area (I know, resize Image is faster, but it does not allow to add a grid). The same function in DarkBasic Pro works in Real-Time with bigger zoomed area (56x56 boxes, 7x7 or 8x8 pixel each), the area is zoomed in 20 ms on AMD K6 2 500, but in PB the same routine (56x48 boxes) is jerky and needs 150 ms, not fast enough for a art program. What´s wrong? I found out that the Box command is slower than I expected.
The operation are performed on windowed screen in both cases. Even if I use 64 PLOT´s (8x8) to create each box, it is much faster... So what is slowing it down so much?
On the other hand most of PB´s function are faster than Dark Basic´s Pro.

Posted: Tue Aug 05, 2003 11:53 am
by Fred
a part of Plot(), all other 2D drawing functions use the regular API which are not optimized for DirectX and are a bit slow. But it will probably change, when I got the time to optimize this. You can do it with the Plot() for now.

Posted: Tue Aug 05, 2003 2:57 pm
by LCD
Thanks, I understand now. Okay, until Box is faster, I will use PLOT function, which is REALLY fast, and makes me curious how fast the Direct-X optimised BOX will be.