www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/28/00:01:15

From: "Adrian Francis" <adrian DOT francis AT cableinet DOT co DOT uk>
Subject: Re: 16 or 32 bit transfers
Newsgroups: comp.os.msdos.djgpp
References: <351C0324 DOT 8389DF42 AT lr DOT net>
Organization: Adrian Francis
Message-ID: <01bd59c9$481cfdc0$949175c2@ctx>
MIME-Version: 1.0
NNTP-Posting-Host: usr138-wol.cableinet.co.uk
Date: 27 Mar 98 21:53:39 GMT
Lines: 21
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

You can use a pointer but you will have to enable near pointers first, and add the conventional base to your pointer.  See the DJGPP help files (__djgpp_nearptr_enable) on how to do that. 

You can use 32 bit fills if you use a pointer, just make the pointer a long* type and shift and add your pixel values like this...

	c32=c1+(c2<<8)+(c3<<16)+(c4<<24);

Or just take 32bits at a time from your buffer.

But make sure you get c1,c2,c3,c4 in the correct order!

On the other hand, I am not sure if all video cards allow you to do this.

-ADRIAN-

Isaac Waldron <waldroni AT lr DOT net> wrote in article <351C0324 DOT 8389DF42 AT lr DOT net>...
> Is it possible to transfer data from a drawbuffer to video memory
> without using memcpy, which uses 8 bit transfers?  I would like to
> transfer it in 16 or even 32 bit chunks if possible.  Also, can I fill a
> drawbuffer using 16 or 32 bit fills instead of the 8 bits that memset
> uses?
> 
> Any help would be appreciated,
> -- 
> Isaac Waldron <waldroni AT lr DOT net>
> http://www.geocities.com/SiliconValley/Lakes/3574/index.html
> 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019