Double draw callbacks

New Message Reply Date view Thread view Subject view Author view

From: Stephen Maher (Stephen.Maher++at++gsfc.nasa.gov)
Date: 01/11/2000 14:25:03


Hi,

I've been on a "tangent of understanding" for the past several hours
after noticing (from printf statements) that my (pfChanTravFrunc'd)
DRAW callbacks are being called twice per frame - even though I'm
using only one channel, there's only one parent, etc. I'd like to
know what's going on.

Trying to whittle the problem down to it's simplest form, I registered
DRAW callbacks with the pfScene itself using vanilla perfly (C
version). I added to perfly.c:initSceneGraph() the following:

    pfNodeTravFuncs( scene, PFTRAV_DRAW, scenePreDraw, scenePostDraw);

and then created the functions scenePreDraw, scenePostDraw with
diagnostic output. For example, scenePreDraw contains the following:

  printf("scenePreDraw - %d (node=%p,chan=%p)\n", pfGetFrameCount(),
    pfGetTravChan(trav), pfGetTravNode(trav));

  return PFTRAV_CONT;

When run (e.g., perfly -m 0 enterprise.flt) the printf is executed
twice per frame - with identical node and channel pointers. E.g.,

    scenePreDraw - 61 (node=401dfdcb00,chan=401dd46990)
    scenePostDraw - 61
    scenePreDraw - 61 (node=401dfdcb00,chan=401dd46990)
    scenePostDraw - 61

This is identical to what is happening with my nodes deeper in the
scene graph.

One glimmer of hope was thinking that one iteration was during display
list compilation and the other during display list execution, but I
believe -m 0 eliminates display list generation (I also tried
CULLoDRAW).

I'm pretty sure my scene isn't being drawn twice ;), but I'm a little
concerned the code in my drawbacks is being executed twice.

(pf 2.2.3, 6.5.5m)

There must be a logical explanation for this ..

Any takers?

Steve

-- 
stephen.maher++at++gsfc.nasa.gov (301) 286-3368  fax:(301) 286-1776
http://holodeck.gsfc.nasa.gov/vr/vr.html
http://svs.gsfc.nasa.gov   http://www.digitalearth.gov
NASA Goddard Space Flight Center


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Jan 11 2000 - 14:25:57 PST

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