Mail Archives: djgpp/1997/04/03/20:32:31
In article <33419DA2 DOT 544FE8A1 AT caldera DOT com>, Tim Bird <tbird AT caldera DOT com> 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.
- Raw text -