archiv~1: SETI Re: Graphics Speed?

SETI Re: Graphics Speed?

MarcusJohn@aol.com
Thu, 26 Nov 1998 18:29:13 EST

In a message dated 11/26/98 3:11:45 PM Eastern Standard Time, hamradio@oz.net
writes:

> I have a question about software and graphics speed that I have
> wondered about for years. Maybe you have the simple answer. Right now
> I am talking about my PC, a fairly new 350-MHz Pentium II running
> Windows 98 and Microsoft Visual Basic 5.
> When I draw a line on the screen using the VB LINE command it seems
> almost instantaneous. So I assume the hardware is working fine. But
> when I draw a line pixel-by-pixel, using a series of PSET commands, in a
> loop, it must be 100 times slower. In fact, it seems to take about as
> long to plot, say, 500 points now as it did years ago with much "slower"
> machines. I need to do this when I want to plot data points, etc.
> Is there any way I can speed up the drawing of data using PSET,
> such as with a (relatively) expensive graphics accelerator card? Or is
> the problem totally in the software, in which case a video accelerator
> card probably would not do much good? I would buy a better card if I
> knew it would really help with this problem. Any opinion? Thanks!

Most likely the line draw command is executed on the video card. But the
pset command, of necessity, is executed on the CPU. When you add the effect of
the interpreted VB variable's (of the very slow variant type, no doubt) being
incremented in a loop, you are looking at maybe a one thousand fold decrease
in speed. The difference is in knowing which commands are executed on the card
and when.
Have you heard of DirectX? That is microsofts effort to speed up video
access by allowing high level languages direct access to the video hardware,
with high level commands. Unfortunately accessing pixels directly is going to
be slow, almost no matter what. You may increase speed some by going to a
compiled language.
I have a Delphi program (compiled) that uses the Delphi equivalent of a
pset, and it accesses maybe a couple thousand pixels per second in a bug
simulator program. Too fast to see for sure. On my 8088 when I first wrote it
in turbo pascal it would run all night on a CGA display. Now I can run it to
the equivalent place in about 15 seconds on my pII 300, in win98, using the
pset equivalent command. That is without hardware accelleration. So compiling
it might help. Also, the loop variable should be set to the type short, if you
can.

See you later.

John Marcus.
KE3SW