From: Dieter Hennecke (DHennecke++at++esg.de)
Date: 02/27/2004 05:28:04
Hi,
I do not work with the Performer or other OpenGL applications at all. So my
experience
is limited :-(. What I have to do is to read the complete header record
(see opcode 1 of the spec)
of an OpenFlight File using the Performer API.
I found out how to get some data of the header record using the loader
callback.
(see structure HEADERcb and code at bottom of the page).
Many attributes mainly the geodetic information like Ellipsoid, etc. are
missing.
I would be grateful for every hint.
Thank you in advance.
Dieter.
#include "afx.h"
#include <iostream.h>
// Performer includes
#include <Performer/pf.h>
#include <Performer/pfdu.h>
#include <Performer/pf/pfNode.h>
#include "Performer/pfdb/pfflt.h"
void HeaderCallBack( pfNode *, int mgOp, int *cbs, COMMENTcb *, void* )
{
void* pTemp = NULL;
switch ( mgOp )
{
case CB_HEADER:
{
header = *((HEADERcb *)(cbs));
break;
}
default:
{
break;
}
}
}
int
main(int argc, char **argv)
{
pfNotifyLevel(PFNFY_DEBUG);
char cDatei[200];
strcpy (cDatei, "C:\\....flt");
pfNode *root;
pfInit();
// use default multiprocessing mode based on number of processors
pfMultiprocess(PFMP_DEFAULT);
pfdInitConverter("flt");
// configure multiprocessing mode and start parallel process
pfConfig();
fltRegisterNodeT pFunc = HeaderCallBack;
void *hFunc = &pFunc;
// NOTE: do not attempt "& myCallback" here !!!
// the C language will ignore the "&".
pfdConverterAttr_flt(PFFLT_REGISTER_NODE, hFunc);
root = pfdLoadFile_flt(cDatei);
return 0;
}
This archive was generated by hypermail 2b29 : Fri Feb 27 2004 - 05:35:41 PST