Jeremy Friesner (jaf++at++chem.ucsd.edu)
Sat, 14 Sep 1996 04:05:35 GMT
We finally got our RE2 Onyx upgraded to IRIX6.2 and Performer 2.0.2, so
once again I'm trying to get scenery paging from the DBASE process to
work, via pfBuffer's and merge().
I can create objects in the DBASE process, in a separater pfBuffer,
and merge them into the main buffer, that works fine.
But--what I want to do is create a "library pfBuffer", in which
I keep reference copies of common objects, and then page in instances
of the copies as necessary.
In my setup, I have two pfBuffers (besides the default/main pfBuffer),
one that holds the "library" objects, and one paging pfBuffer to hold
objects that are about to be merged in to the main pfBuffer.
The pfBuffer man page gives two example techniques for library
paging. The second one, using bufferClone(), seems useless,
as bufferClone() still crashes whenever I try to use it to clone
across pfBuffers.
The first example, using bufferAddChild(), is the one I am trying
to get working. My problem is, after the merge() call, the main
pfBuffer contains all the nodes that were created in the paging
pfBuffer, but it does not contain any of the scenery that was
bufferAddChild()'d from the library pfBuffer.
My code is essentially the same as their example (which I'll
include at the bottom for reference), so does anyone know what
might be going on here? Or perhaps someone can show me some
example code of a working library-paging system?
Thanks in advance,
Jeremy
------pfBuffer example below-----------
libraryBuffer = new pfBuffer;
libraryBuffer->select();
loadLibraryObjects();
pagingBuffer = new pfBuffer;
pagingBuffer->select();
while (!done)
{
pfNode *newStuff;
pfSCS *treeLocation;
/* Load new terrain tile or whatever */
newStuff = loadStuff();
/* Create pfSCS which is location of tree */
treeLocation = new pfSCS(treeMatrix);
/* Add library model of a tree to treeLocation */
treeLocation->bufferAddChild(libraryTree); // libraryTree is in libraryBuffer?
// if so, how is it merged into the
// main pfBuffer if we only select()
// and merge on the pagingBuffer?
// does bufferAddChild() make a copy of it?
/* Add instanced tree to newly loaded stuff */
newStuff->addChild(treeLocation);
}
=======================================================================
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:53:32 PDT