Re: Variable chan updates

New Message Reply Date view Thread view Subject view Author view

Jean-Luc Dery (dery++at++discreet.com)
Thu, 30 Apr 1998 10:28:20 -0400


On Apr 30, 12:06pm, Roy Ruddle wrote:
> Subject: Variable chan updates
>
> Hi there,
>
> I'm writing an application in which the 2 channels on a single pipe
> should each have a different update rate. I've tried to implement this by
> toggleing the DRAW traversal mode (PF_ON/OFF) according to whether or not
> a particular channel should be drawn in a frame but I get the channels
> have a black flash.
>
> I've replicated the problem with a 1-channel test program. The channel
> covers the whole of the pipe viewport (VP bounds 0 .. 1 in X and Y). The
> channel is drawn (correctly) once every 10 frames but it flashes black on
> the other frames. This happens whether or not the channel draw traversal
> function calls clear(), and whether or not I use a channel draw traversal
> function.
>
> My guess is that the black flashing is being caused by a pipe-based
> "clear" function.
>
> Can anyone tell me how I can overcome this black flashing (what have I
> done wrong?).
>
> System:
> MaximumIMPACT
> pf2.2, compiled n32 (OGL)
> Irix 6.2
>
> Test program is attached.
>
>
> many thanks
>
> roy

Hi Roy,

This is most probably due to the fact that you drawing only one buffer in
double buffer mode but still swapping buffers. You can conrol the swap buffer
through a Performer callback.

pfPipe::setSwapFunc( pfPipe* p, pfPipeWindow* pw);
pfPipeWindow::swapBuffers();

In a two channels setup were you want to have different update rates, you have
to have one pipe window for each channel and manage the pipe window swap buffer
from the pfPipe swap callback (anybody correct me if I'm wrong??).

You can use a setUserData() (or anything you can think of to pass this
information to the swap callback) in your pfChannel draw callback to set wether
or not a swap is needed. You can then use this in the pipe swap function
callback to call the pfPipeWindow::swapBuffers().

Hope this helps,

Jean-Luc

-- 
_____________________________________________________________________________

Jean-Luc Dery Discreet Logic System Engineer 10 Duke Street 3-D Graphics Technology Montreal (Quebec), Canada, H3C 2L7 Tel: (514) 954-7239 Email: jean-lucD++at++discreet.com Fax: (514) 393-0110 _____________________________________________________________________________ ======================================================================= 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:57:19 PDT

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