Re:About CAD and Double Buffer
On 1 Apr 2003 09:24:25 -0800, "Tanju ?zgr" <tanjuoz...@yahoo.com>
wrote:
Quote
>Hi !
> I 'm trying to make CAD - like program ,but whatever I have tried to
>improve my program (in the name of fastness) so far , doesn't satisfy me
I have made a 'CAD' program for building with virtual Lego bricks, and
have no big speed problems although I do all the painting in the
.OnPaint event of a TPaintBox. Models containing 3000-4000 3D blocks can
still be rotated in 'real time', and so on.
I draw everything to a bitmap (DIB) first, and then just blt it to the
paintbox canvas.
I did get a speedup by replacing Canvas .line, .polyline, .polygon with
code of my own (or rather Graphical Gems :-), drawing directly into the
DIB.
The source is available if you are interested, URL in sig.
--
Anders Isaksson, Sweden
BlockCAD: http://user.tninet.se/~hbh828t/proglego.htm
Gallery: http://user.tninet.se/~hbh828t/gallery/index.htm