[comp.windows.ms.programmer] Fast linedrawing in Windows

rujo@ulrik.uio.no (Rune J|rgensen) (05/14/91)

With advanced graphics adapters, you may download an entire
displayfile with vectors. Then you send commands to the adapter,
asking it to perform a local zoom or redraw. This may be a 100
or a 1000 times faster than sending vectors one by one.

Is there any way you may utilize smart graphics adapters with
MS Windows? Or is MoveTTo/LineTo the only way? They PlayMetaFile()
call should in theory allow intelligent graphics cards to
process blocks of a metafile at a time, but I suspect Windows
handles the metafile it self an sends basic commands to
the card one by one. Does anyone know the answer to this?
(I asked Microsoft Scandinava, but their answer showed that
they did not understand the question!)

Any other hints for fast linedrawing (zoom/redraw) would be
welcomed as well. You may mail me directly:

rujo@ulrik.uio.no

Rune Jorgensen
Data Design System
Oslo, Norway

 

risto@tuura.UUCP (Risto Lankinen) (05/16/91)

rujo@ulrik.uio.no (Rune J|rgensen) writes:

>Is there any way you may utilize smart graphics adapters with
>MS Windows? Or is MoveTTo/LineTo the only way? They PlayMetaFile()
>call should in theory allow intelligent graphics cards to
>process blocks of a metafile at a time, but I suspect Windows
>handles the metafile it self an sends basic commands to
>the card one by one.

Hi!

Tinkering with the EXEHDR utility, one can find out, that the PlayMetaFile()
is not a function of the display driver (which it should be, because from
the question I realized that it would make sense).  However, the display
driver is what you'll replace along with the more intelligent display unit.

It seems, that the net gain would be limited to letting the new graphics
processor do the line/circle et al. calculations.

Terveisin: Risto Lankinen
-- 
Risto Lankinen / product specialist ***************************************
Nokia Data Systems, Technology Dept *  2                              3   *
THIS SPACE INTENTIONALLY LEFT BLANK * 2 +1 is PRIME!  Now working on 2 -1 *
replies: risto@yj.data.nokia.fi     ***************************************

kensy@microsoft.UUCP (Ken SYKES) (05/20/91)

In article <RUJO.91May14173029@ulrik.uio.no> rujo@ulrik.uio.no (Rune J|rgensen) writes:
>With advanced graphics adapters, you may download an entire
>displayfile with vectors. Then you send commands to the adapter,
>asking it to perform a local zoom or redraw. This may be a 100
>or a 1000 times faster than sending vectors one by one.
>
>Is there any way you may utilize smart graphics adapters with
>MS Windows? Or is MoveTTo/LineTo the only way? They PlayMetaFile()

The general answer to this is "Write a display driver."  Windows will
still pass the commands one at a time but instead of setting all the
individual pixels it will send the smart command.  This alone buys
reasonable speedup.

It is also possible to make the display driver deal with a Coprocesser
by queuing up the commands as they come in and executing them in chunks.
This requires a fair amount of Windows display driver knowledge to get
working correctly since Windows deals with things in a serial manner,
but it can be done.

Applications should not depend on the display driver they use if at all
possible.

Ken Sykes
Disclaimer: The above opinions are solely my own.