Board index » delphi » Clearing 640x480x16C screen fast ?

Clearing 640x480x16C screen fast ?

you could use fillchar

e.g.

in 320x200x256 mode

use

fillchar(ptr($a000,0),64000,0);

Quote
Martijn v.d. Horst wrote:
> Hello,

> What is the fastest way to clear a 640x480, 16 color screen in TP 6.0 ?
> I usually use the 'Cleardevice' command, but I find it quite slow.
> I mean if my program works more than six times faster if I leave the command
> out, I think it can be called slow :)
> (I have to confess that I have a rather slow Video Card)

> Should I use a bit of assembler code to clear it ? Something like MOV
> $A000:0000+t,0 ?
> I don't use assembler very often, but I do know a little bit about it.

> Or is there some interrupt that I can call ? If so, is this universal for all
> graphics cards ?

> Or is there some other way ?

> Thanks in advance,

> --
> Martijn v.d. Horst

 

Re:Clearing 640x480x16C screen fast ?


Quote
>Subject: Re: Clearing 640x480x16C screen fast ?
>From: Jaspie <rf192...@stmail.staffs.ac.uk>
>Date: Wed, Nov 19, 1997 09:41 EST
>Message-id: <3472FA99.83B86...@stmail.staffs.ac.uk>

>you could use fillchar

>e.g.

>in 320x200x256 mode

please reread the title...
Quote
>use

>fillchar(ptr($a000,0),64000,0);

>Martijn v.d. Horst wrote:

>> Hello,

>> What is the fastest way to clear a 640x480, 16 color screen in TP 6.0 ?
>> I usually use the 'Cleardevice' command, but I find it quite slow.
>> I mean if my program works more than six times faster if I leave the
>command
>> out, I think it can be called slow :)
>> (I have to confess that I have a rather slow Video Card)

>> Should I use a bit of assembler code to clear it ? Something like MOV
>> $A000:0000+t,0 ?
>> I don't use assembler very often, but I do know a little bit about it.

>> Or is there some interrupt that I can call ? If so, is this universal for
>all
>> graphics cards ?

>> Or is there some other way ?

>> Thanks in advance,

>> --
>> Martijn v.d. Horst

Re:Clearing 640x480x16C screen fast ?


Quote
>Subject: Clearing 640x480x16C screen fast ?
>From: venho...@worldaccess.nl (Martijn v.d. Horst)
>Date: Mon, Nov 17, 1997 12:32 EST
>Message-id: <N.111797.183203...@ehv2-16.worldaccess.nl>

>Hello,

>What is the fastest way to clear a 640x480, 16 color screen in TP 6.0 ?
>I usually use the 'Cleardevice' command, but I find it quite slow.
>I mean if my program works more than six times faster if I leave the command
>out, I think it can be called slow :)

6 times?  Are you having the clearscreen in a loop?  If so then you're
guarantee to have a major performance problem.  (If you're trying to do
animation, for example, you should just update the part of the screen that has
actually changed, as successive frames in animation usually doesn't differ
much.)

<snip>

Quote
>Martijn v.d. Horst

Other Threads