pfdRegisterUserFunc and so

New Message Reply Date view Thread view Subject view Author view

From: Jean-Christophe Ulysse (Jean-Christophe.Ulysse++at++loria.fr)
Date: 03/30/2001 05:30:32


hi,

It seems that the pfdRegisterUserFunc and its mechanism don't work
correctly.

I want use custom PFTRAV_DRAW and PFTRAV_APP callbacks in perfly.
So, I wrote a program which loads a scene, attaches callbacks on some
nodes, registers them with pfdRegisterUserFunc, and then saves the scene
in pfa format.
At this point, this is working. A "more" on the generated file shows all
registered callbacks, and little changes in the attributes of the nodes
with callbacks.

Problems begin when I load the file with perfly.
All nodes with a PFTRAV_DRAW registered callback call the same callback,
this defined in first position in the pfa file, regardless of the callback
they have to call. According to my tests, as callbacks are saved in the same
order they're encounter in the scene graph, the callback called is the one
of the first node which have a PFTRAV_DRAW callback.

Moreover, a node with only a PFTRAV_APP callback calls either its PFTRAV_APP
callback, and this PFTRAV_DRAW callback.
Deactivating the PFTRAV_APP callback of this node make it not call anymore
the PFTRAV_DRAW callback (nor the PFTRAV_APP one !).

Did somebody, using pfdRegisterUserFunc, encounter this problem, and
find a solution so that the nodes call only the callback which they should
call ?

-- 
  Jean-Christophe Ulysse
  PhD student in Computer Science
  ISA Team
  Laboratoire Lorrain de Recherche en Informatique et ses Applications


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Mar 30 2001 - 05:31:35 PST

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