Sylvain Mayer (mayer++at++poster.cae.ca)
Tue, 14 Apr 1998 14:41:57 -0400
Hi,
all you need to do is create a new channel with different parameters
from your main channel (the rear channel can be attached to your main
channel and they will share attributes like scene and so on). They have
to have different viewport and of course you want to have an offset to
look behind.
This should be something like your starting point:
// create both channels
chans[MAIN_CHANNEL] = new pfChannel(pipe);
chans[REAR_CHANNEL] = new pfChannel(pipe);
chans[MAIN_CHANNEL]->attach(chans[REAR_CHANNEL]);
// you don't want to share the view
uint share = chans[MAIN_CHANNEL]->getShare();
share &= ~PFCHAN_VIEW;
chans[MAIN_CHANNEL]->setShare(share);
// attach the scene only to the first channel
chans[MAIN_CHANNEL]->setScene(scene);
// rear channel will look behind and be drawn in the upper right corner
offset.xyz.set(0.0f, 0.0f, 0.0f);
offset.hpr.set(180.0f, 0.0f, 0.0f);
chans[REAR_CHANNEL]->setViewOffsets(offset.xyz, offset.hpr);
chans[REAR_CHANNEL]->setViewport(0.65f, 1.0f, 0.65f, 1.0f);
--Sylvain Mayer, 3D Graphics Developer Visual Database Tools CAE Electronics Ltd. (http://www.cae.ca) ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:14 PDT