Gregory Jaegy wrote:
> Hi,
> I am trying to use the OSG OpenFlight plugin. I have build and linked 
> everything statically.
> Like in the osgstaticviewer example, I have added the 
> Code:
> USE_OSGPLUGIN(OpenFlight);
> line, in order to for the symbols to be included.
> However, when I try to import a .flt file, I get a lot of "unknown record" 
> error messages. This appends with the example too.
> I have noticed that in "PrimaryRecords.cpp" file, there are a lot of records 
> being registered using a similar mechanism as the plugin one, using static 
> variable instanciation.
> I guess those get lost when linking statically, any idea how I can solve this 
> ?

  I think you're correct, this would happen in those circumstances. Perhaps no 
one has
used the OpenFlight loader statically.

  You will probably need to dissect the USE_OSGPLUGIN mechanism, and see how it 
does its
magic (I think it's a codification of the technique I originally came up with 
for static
linking OSG in 2004). Then, you will need to employ it to reference the various
PrimaryRecords. It may be that you need to adapt USE_OSGPLUGIN directive, and 
it may also
be that you need to make some changes in the PrimaryRecords. It may be 
necessary to make a
method in the OpenFlight plugin that does all this for you and you call from 
your code
where you call USE_OSGPLUGIN.

> Thank you!
> Cheers,
> Greg

-- 
Chris 'Xenon' Hanson, omo sanza lettere                  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to