2 #include "OSGSceneFileHandler.h"
3 #include "OSGFieldContainerFactory.h"
6 int main (int argc
, char **argv
)
8 OSG::osgInit(argc
,argv
);
11 std::vector
<OSG::NodeRecPtr
> vFile
;
13 #ifdef OSG_MT_FIELDCONTAINERPTR
15 OSG::FieldContainerFactory::the()->getNumContainers();
17 fprintf(stderr
, "FCs pre : %d\n", iPre
);
22 for(OSG::UInt32 i
= 0; i
< 2; ++i
)
24 file
= OSG::SceneFileHandler::the()->read(argv
[1], NULL
);
26 vFile
.push_back(file
);
32 OSG::UInt32 iPostLoad
=
33 OSG::FieldContainerFactory::the()->getContainerStore().size();
35 for(OSG::UInt32 i
= iPre
; i
< iPostLoad
; ++i
)
37 fprintf(stderr
, "[%d] : ", i
);
39 if(OSG::FieldContainerFactory::the()->getContainerStore()[i
] !=
42 fprintf(stderr
, "%s\n",
43 OSG::FieldContainerFactory::the()->
44 getContainerStore()[i
]->getType().getCName());
48 fprintf(stderr
, "NULL\n");
55 for(OSG::UInt32 i
= 0; i
< vFile
.size(); ++i
)
61 #ifdef OSG_MT_FIELDCONTAINERPTR
63 OSG::FieldContainerFactory::the()->getNumContainers();
65 fprintf(stderr
, "FCs post : %d\n", iPost
);
67 for(OSG::UInt32 i
= iPre
; i
< iPost
; ++i
)
69 fprintf(stderr
, "[%d] : ", i
);
71 if(OSG::FieldContainerFactory::the()->getContainer(i
) != OSGNULL
)
73 fprintf(stderr
, "%s\n",
74 OSG::FieldContainerFactory::the()->
75 getContainer(i
)->getType().getCName());
79 fprintf(stderr
, "NULL\n");