Mail Archives: djgpp/2000/05/26/10:17:16
Robert Boles <zingen AT prodigy DOT net> wrote:
> How it works is that each thread (running at the same time) blits to the
> back buffer, under certain conditions. Sometimes alot, sometimes not at all.
> Then the main thread freezes the muli-threads. Blits the back buffer to the
> screen, and then starts the threads. Works great, if I can get it depth
> sorted.
You cannot depth-sort, in your current setup. To sort, you'ld have to
stop blitting everything to the back buffer directly. Instead, each of
the 'source' threads would have to supply a bitmap image of its own,
plus depth ordering information for it.
Then, the routine that currently freezes the threads and blits to the
frame buffer would have to freeze, sort all those bitmaps by z, draw
them to the back buffer (front-to-back with avoidance of already
drawn-to pixels, or straight back-to-front with overpainting), and
blit the result to the frame buffer.
Or you really need a z-buffering method, instead of z-sorting.
This is drifting away from the topic of this newsgroup. You should ask
this again in comp.graphics.algorithms, I think.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -