Hi Brad,

In your compile error reports:

cannot convert parameter 3 from 'bool (__cdecl *)(osgDB::InputStream
&,const osgTerrain::ImageLayer &)

Shouldn't it be:

bool readFunction(osgDB::InputStream&, osgTerrain::ImageLayer&)

'const' may not be used here. :-)

Wang Rui


2010/12/16 Christiansen, Brad <brad.christian...@thalesgroup.com.au>:
> Hi Rui,
>
> I have finally found some time to have a look at this issue, and would love 
> to get a fix implemented before 3.0, but I am not having much luck.
> I have previously managed to add a user serializer to VirtualPlanetBuilder 
> without issue to add support for some extra options, but am getting nowhere 
> with the ImageLyer serializer.
>
> I changed the code exactly as you suggested and have added the required check 
> / read and write functions. I am pretty sure I can implement these ok but I 
> cant get things compiling with simple stub implementations that simply return 
> true.
>
> The compile error I am getting is:
>
> 2>  ImageLayer.cpp
> 2>..\..\..\..\..\..\..\Source\src-osg\src\osgWrappers\serializers\osgTerrain\ImageLayer.cpp(52):
>  error C2664: 'osgDB::UserSerializer<C>::UserSerializer(const char *,bool 
> (__cdecl *)(const C &),bool (__cdecl *)(osgDB::InputStream &,C &),bool 
> (__cdecl *)(osgDB::OutputStream &,const C &))' : cannot convert parameter 3 
> from 'bool (__cdecl *)(osgDB::InputStream &,const osgTerrain::ImageLayer &)' 
> to 'bool (__cdecl *)(osgDB::InputStream &,C &)'
> 2>          with
> 2>          [
> 2>              C=MyClass
> 2>          ]
> 2>          This conversion requires a reinterpret_cast, a C-style cast or 
> function-style cast
>
> After examing the the VirtualPlanetBuilder code I modified for an earlier 
> submission, I think I need to register a lookup (or something like that) to 
> solve the issue but my C++ skills just arnt up to the job of figuring out 
> exactly what it is I need to do. Any suggestions or simple examples I could 
> look at would be greatly appreciated.
>
> Cheers,
> Brad
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to