Drew Hess (dhess++at++vision.arc.nasa.gov)
Tue, 7 Jun 1994 16:56:56 -0700
I am hacking the perfly source in an attempt to read z-buffer values for the
currently displayed frame. At this point I'm a little overwhelmed by the
number of parameters that seemingly can have an effect on the z-buffer at any
given time in Performer. For starters, I know I've got to turn off
multisampling on an RE2 pipeline in the perfly window (thanks Allan Schaffer).
It also seems that pfESkyMode affects the z-buffer (PFES_SKY_GRND should set
the z-buffer to a known state, which is what I want, I think). Then there's
pfClear() to worry about.... (maybe?) According to the readsource() man page,
I should also make sure that drawmode() is NORMALDRAW, which shouldn't be a
problem as long as I don't try to read the z-buffer while any GUI elements are
being drawn.
Ideally, here's what I want to be able to do:
readsource(SRC_ZBUFFER);
n = lrectread(...., zbuf);
/* operate on values in zbuf */
I'd like to get the z-buffer that corresponds to the frame currently being
displayed in the viewport. If I'm viewing a runway with a jet and buildings
and mountains in the distance, I want to have the correct depth values for
these objects. I don't care about real-time performance, though it would be
nice to maintain it.
Can I lrectread from the z-bufer at any state in Performer, or should I only do
this immediately before/after pfDraw(), for example? I believe that on an MP
machine, Performer will render multiple frames on different processors to keep
up with the requested frame rate; does this mean that the z-buffer could be in
an inconsistent state?
Thanks for your patience and for any help,
-dwh-
dhess++at++vision.arc.nasa.gov
dhess++at++cs.stanford.edu
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:19 PDT