Rendering 2 channels at different update rates

New Message Reply Date view Thread view Subject view Author view

Bernard Leclerc (bleclerc++at++cae.ca)
Wed, 11 Dec 1996 10:30:38 -0500


Hello all,

Suppose you need to render multiple pfChannels on the same pfPipeWindow.
Let's say you want 2 channels, one running at 30 Hz, the other running at,
say, 10 Hz.

First, the application must be running at 30 Hz in this case since it's
the fastest update rate required. Ideally, you would render channel 0 (the
one at 30 Hz) every frame, while you render channel 1 once every three
frames to obtain the desired 10 Hz update rate. Since we're using a double
buffer, the scene in channel 1 must be drawn in the back buffer and then
copied into the front buffer in order to have the same image displayed for
several frames when the pfPipe will swap buffers.

Now the question is what's the fastest way to copy the back buffer into
the front buffer?

I've tried two methods. One is to send the back buffer image into the
accumulation buffer then activate the front buffer and recall the image
from the accumulation buffer. The other method I've tried is to use a
rectcopy() while the readsource() is set to the backbuffer and the
destination set to the frontbuffer. Both methods seem to work although the
acbuf operation seems to be faster than the rectcopy.

I started to observe strange behavior on channel 1 (the one at 10 Hz) when
channel 0 is overloaded. That is when the overall update rate of 30 Hz
cannot be maintained. It looks to me as if only one buffer was updated
while the other buffer keeps its old content. You can imagine the effect:
swapping buffer with two different images in each buffer can be very
distracting.

Because I'm not sure how to solve the problem, I'm asking you for advice,
comments or ideas. If there's someone else out there who already
experienced the same problem, who already implemented that kind of
functionality, I'd would appreciate if you could share your experience
with us.

Thanks for reading so far...

--
Bernard Leclerc			CAE Electronics Ltd., 8585 Cote De Liesse
Technical Leader		Saint-Laurent, Quebec, Canada, H4L-4X4
3-D Graphics Applications	tel: +1 514 341 2000 extension 2275
bleclerc++at++cae.ca			fax: +1 514 340 5496
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:54:08 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.