Text archives Help
- From: Hansong Zhang <hansong@sgi.com>
- To: "'manta@sci.utah.edu'" <manta@sci.utah.edu>
- Subject: Re: [MANTA] Manta output
- Date: Tue, 14 Jun 2005 17:11:14 -0700
Steven G. Parker wrote:
... The difficulty is that Manta is pipelined, so rendering a frame
and waiting for the result is not an appropriate model. The power of
it is that these operations occur in parallel, so for example you
could have a parallel compression of the image stream for handing to
vizserver.
Waiting is certainly not the right model. But I think this situation is
no more complex than other situations in which you don't want to wait,
for example hardware occlusion query. So, standard ways of handling this
should work, like cycled buffers with ready/consumed flags or a FIFO.
I believe that when other apps like Catia connects to Manta's
output, it would want to do so at the buffers level (i.e. data
protocols, not class inheritance).
class inheritance isn't the right word for it. The question is how
does the external application know that a buffer is ready. There are
two options:
1. The app says "render this frame", and waits for the result.
or
2. Manta makes a callback when the new frame is ready.
What about a third option: Manta exports a buffer with a ready flag, and
the downstream module checks the ready flag if/whenever it wants. If
Manta's ready to output again and finds that a buffer has not been
consumed by downstream, it uses another buffer/flag set (effectivelfy
forming a FIFO of buffers). When downstream fininshes using a buffer, it
sets the consumed flag on the buffer so that Manta can reuse it.
Such coupling is more flexible than a callback. If the downstream is a
separate process, the FIFO can still be done in the shared memory. If
the downstream is on the different machine, the FIFO can be easily
translated into a wire protocol.
So I don't think of this as class inheritance. The fact that
inheritance is used is merely to provide the callback, but a C API
could be made to work with this.
I agree. Let's call it procedural, tight coupling. I believe we need
more flexibility than this.
Hansong
Archive powered by MHonArc 2.6.16.