delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/24/17:00:27

From: "Alexei A. Frounze" <alex DOT fru AT mtu-net DOT ru>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Z-Buffered Bitmaps
Date: Thu, 25 May 2000 00:55:08 +0400
Organization: MTU-Intel ISP
Lines: 37
Message-ID: <392C41AC.B5D4B0E0@mtu-net.ru>
References: <8gfm6n$51g6$1 AT newssvr04-int DOT news DOT prodigy DOT com>
NNTP-Posting-Host: ppp109-213.dialup.mtu-net.ru
Mime-Version: 1.0
X-Trace: gavrilo.mtu.ru 959201951 97707 212.188.109.213 (24 May 2000 20:59:11 GMT)
X-Complaints-To: usenet-abuse AT mtu DOT ru
NNTP-Posting-Date: 24 May 2000 20:59:11 GMT
X-Mailer: Mozilla 4.72 [en] (Win95; I)
X-Accept-Language: ru,en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

You don't really need any Z-buffers. At least Z-buffer is a computer gfx
term usually used in 3d gfx. 

What you need is a list of all your bitmaps (pointers to the images) plus a
Z(depth) coordinate. Then you just use painter algorithm, i.e. back to front
bitblitting to the screen buffer. It's recommended to make all these blits
in a virtual screen and flip it to your display only when you have finished
back to fron drawings.

This is a basic idea. For modern fast computers (any Pentium) this should
not be a problem. Old ones are slow for such a simple approach. Some extra
stuff is needed for speeding up your code for those computers.

Best regards.
Alexei A. Frounze
-----------------------------------------
Homepage: http://alexfru.chat.ru
Mirror:   http://members.xoom.com/alexfru

Robert Boles wrote:
> 
> Hello,
> Is there any way to to make Z-Buffered bitmaps in Allegro.
> 
> For example: I wish to blit several bitmaps to a back buffer, and then blit
> this buffer to the screen.
> 
> Typical double buffered graphics. However, I have no way of easily bliting
> the bitmaps in the right order (it is a muli-threaded application). Each
> thread blits to the back buffer. I do have a depth assigned to each of the
> bitmaps, so a Z-Buffered blit to the back buffer would make my life easy.
> 
> Any libraries would be great.
> 
> Any help is greatly appreciated.


- Raw text -


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