Hi Hartmut,
I'm afraid I can't help much, I'm not a Windows developer so don't
know all the caveats that come with that - the best I can do is
suggest looking at the existing plugins that are known to work. Also
try to output as much debug info as you can get to see if that help -
try:
set OSG_NOTIFY_LEVEL=DEBUG
osgviewer mymodel.osg
Robert.
On 1/22/07, Hartmut Seichter <[EMAIL PROTECTED]> wrote:
Thanks Robert,
Robert Osfield wrote:
> Hi Hartmut,
>
> On 1/22/07, Hartmut Seichter <[EMAIL PROTECTED]> wrote:
>> I am currently reworking our osgART project to be more OSG conform. One
>> path I would like to pursue is to let it load and save AR scenes like
>> osgSim and/or osgFX. However, I am a bit stuck with getting osgDB
>> loading my osgdb_osgART.dll part (emptied parts of osgSim in there). It
>> finds the dll but log messages tell (running osgviewer with a osgART::*
>> node):
>>
>> FindFileInPath() : trying C:\Program
>> Files\OpenSceneGraph\bin/osgdb_osgART.dll ...
>> FindFileInPath() : USING C:\Program
>> Files\OpenSceneGraph\bin/osgdb_osgART.dll
>> DynamicLibrary::failed loading "osgdb_osgART.dll"
>
> The fact that its looking for osgdb_osgART is a good thing, that does
> at least suggest the naming is correct. I can't say what it might
> have failed though. Best guess would be to check the compile settings
> to ensure that they are the same as the OSG's i.e. multi-threaded
> dll's etc.
>
I now also copied the project file from osgSim (converted to VS 2003
.NET) but still same result. The compile setting are the same.
>> One thing I was wondering is that the DLLs don' t have a DLL entry point
>> (DLLmain). so how does osgFX or osgSim get loaded through LoadLibrary
>> when there is no entry point?
>
> The plugins have a global proxy object that is automatically
> constructed when the library is loaded, this proxy object registers
> the custom ReaderWriter* class with the osgDB::Registry.
>
Mhh, I am still stuck. Thats what I do (or think I am doing) ... the
only source file in the project:
#include <osgART/GenericVideo>
#include <osgART/VideoManager>
#include <osgDB/Registry>
#include <osgDB/Input>
#include <osgDB/Output>
// forward declare functions to use later.
bool GenericVideo_readLocalData(osg::Object& obj, osgDB::Input& fr);
bool GenericVideo_writeLocalData(const osg::Object& obj, osgDB::Output& fw);
// register the read and write functions with the osgDB::Registry.
osgDB::RegisterDotOsgWrapperProxy VideoContainer_Proxy
(
new osgART::VideoContainer,
"VideoContainer",
"Object VideoContainer",
&GenericVideo_readLocalData,
&GenericVideo_writeLocalData,
osgDB::DotOsgWrapper::READ_AND_WRITE
);
bool GenericVideo_readLocalData(osg::Object& obj, osgDB::Input& fr)
{
bool iteratorAdvanced = false;
/*
load things here
*/
return iteratorAdvanced;
}
bool GenericVideo_writeLocalData(const osg::Object& obj, osgDB::Output& fw)
{
/* implement stuff here :) */
return true;
}
I try to load a .osg file with following content:
Group {
DataVariance DYNAMIC
nodeMask 0xffffffff
cullingActive TRUE
num_children 1
osgART::VideoContainer {
Source "osgart_artoolkit"
}
}
Thanks for any hint in advance,
Hartmut
> Robert,
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/