From: ellman AT xs4all DOT nl () Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro 3D : Sorting Polygons Date: 3 Apr 1997 20:49:05 GMT Organization: XS4ALL Lines: 22 Message-ID: <5i1541$h1q$1@news0.xs4all.nl> References: <5hmmtt$5bg$1 AT news0 DOT xs4all DOT nl> <3341AAEF DOT 52E5 AT cam DOT org> <33419DA2 DOT 544FE8A1 AT caldera DOT com> NNTP-Posting-Host: xs2.xs4all.nl To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article <33419DA2 DOT 544FE8A1 AT caldera DOT com>, Tim Bird wrote: >Tudor wrote: >>ellman AT xs4all DOT nl wrote: >>> Alternative approaches are to use the Painter's algorithm or Z buffering. >>What is the Painter's algorithm, if you don't mind? > >Painting the items back-to-front. All you have to do is order >the things to be drawn by distance and draw everything. If >there are lots of overlaps, this gets wasteful, since you end >up drawing lots of pixels multiple times. But it's easy to >code. Actually, that's depth sorting. The painter's algorithm is to convert all the polygons into a set of polygons that consist of only what is to be displayed. It eliminates any hidden polygons, and breaks up any partially-hidden polygons. Several books tell you how to do this (such as Tricks of the Game Programming Gurus, Zen of Computer graphics), and the Zed3D tutorial on x2ftp.oulu.fi tells you about it as well. AE.