Les Elkins (lelkins++at++zeus.lnk.com)
Wed, 2 Sep 1998 15:15:32 -0400 (EDT)
I'm having some odd behaviour with a draw callback, in that for some of
my objects I'm getting the draw callback called twice per frame.
I'm running an extended version of the C++ Perfly from performer 2.1.
I have a C++ class, instances of which correspond to particular nodes
in the scene graph. For these nodes, I set the user data to the
'this' pointer for the instance, and set the draw callback to a
static function which in turn invokes the draw callback code in the
class.
I'm running in APPCULLDRAW mode (-m0), and in the PreFrame routine
print a line out indicating that the program is in the pre frame phase.
In each one of the instances of my class, I also print out a line
indicating which ones were called. In between the per-frame stuff,
the draw callbacks get called in order: object 1, object 2, object 3,
object 4. Then they get called in inverse order: object 4, ... object 1.
I've verified that there scene graph is appropriate by looking at a
text dump of a traversal of the scene graph (the draw callback is
set at the appropriate nodes, with only one set for each instance,
and the user data pointer is correct). Also, there's only one instance
of the class created per object. And when I run dbx, set appropriate
breakpoints, and look at the call stack when the draw callback is
invoked each time, it appears to be invoked by the correct node in the
Performer scene graph, it just happens twice per frame.
I have several other object created in this system in the same
way, and things seem to work fine for them (i.e., they don't get
called twice).
I've been running on a two-CPU Octane, and have also tried this on
a one-CPU Max Impact and get the same results. Thinking that perhaps
the draw was running freely, I've also tried running with PFPHASE_LOCK
set (-P1), but again have the same problem.
I'm pretty much stumped at this point. Any suggestions from pfFolks
about where to look next would be appreciated....
Thanks,
Les Elkins
-----------------------------------------------------------------------
Les Elkins
LNK Corporation, Inc
Riverdale, MD
(301) 927-3223
lelkins++at++lnk.com
This archive was generated by hypermail 2.0b2 on Wed Sep 02 1998 - 13:39:19 PDT