Marcus Barnes (marcus++at++multigen.com)
Tue, 13 Feb 1996 10:47:44 -0800
This global is now private to the 2.0 loader. I've been cleaning out global
variables from the loader for a while, partly to improve DSO linkage. This
function pointer is now a loader attribute in the 2.0 Converter API. One of
the examples given in the readme file is:
#include <Performer/pf.h>
#include <Performer/pfdb/pfflt.h>
extern void myCallBack
( pfNode* node, int mgOp, int* cbs, COMMENTcb* cbcom, void* userData );
int main ()
{
fltRegisterNodeT pFunc = myCallBack;
void* hFunc = & pFunc;
/* NOTE: do not attempt "& myCallback" here !!!
* the C language will ignore the "&".
*/
pfdConverterAttr_flt ( PFFLT_REGISTER_NODE, hFunc );
pfdLoadFile_flt ( "a_data_base.flt" );
}
> My question: what is the purpose of the function pointed at and
> how can I emmulate it's function with the
> performer 2.0 flight loader?
The function is referred to as the "Loader Callback" in the readme file. In
the example above, the loader indirectly calls myCallBack() each time an
OpenFlight record is translated into a Performer node. This allows you to do
extra work near the time of construction like: saving the pfNode for later
reference, changing initial values (based on the comment record), replacing the
given pfNode (type), or attaching user/traversal data and functions to the
pfNode. Also, not all record types have a callback.
The function is not "gone" in the 2.0 loader. It's just not a global variable
anymore.
Please see /usr/share/Performer/src/lib/libpfdb/libpfflt/README.FLT.R14_2
for a complete discussion of all loader features (and known bugs ;-) and more
examples.
> Thanks in advance
> Mario Veraart
>-- End of excerpt from (Mario Veraart)
You're welcome!
... and thanks to Lance Marrou for his helpfull response :-)
Regards.
--
__ ___ ____ _ ______ Marcus Barnes, Member Tech. Staff
/ |/ /_ __/ / /_( ) ____/__ ____ MultiGen Inc, 550 S. Winchester
/ /|_/ / / / / / __/ / / __/ _ \/ __ \ Blvd. STE 500, San Jose CA 95128
/ / / / /_/ / / / / / /_/ / __/ / / / PH:1-408-556-2654 FX:1-408-261-4102
/_/ /_/\__,_/_/\_\/_/\____/\___/_/ /_/ EMAIL: marcus++at++multigen.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:24 PDT