[osg-submissions] VPB in SVN on Windows

Jean-Sébastien Guay jean-sebastien.guay at polymtl.ca
Wed Jan 9 13:01:22 PST 2008


Hello Robert,

>> OK, I'll probably be able to help there in the coming weeks.
>
> Great, much appreciated.

Against my better judgement I just dove in and did it. Changed files attached.

Of course, there will probably be some things that don't work with  
just a straight port, and I haven't tested the multithreaded (or is it  
distributed?) database generation at all (will need instructions for  
that if you want me to test it out) but it all compiles and "osgdem  
--version" at least prints out

   VirtualPlanetBuilder/osgdem version 0.9.3

I will test a real database generation overnight, but that part hasn't  
changed much, has it?

If you want to give me instructions on how to test out the other  
things, I will gladly try them and report my results / submit fixes.

In a nutshell, my fixes are:

- Prefixed the members of the TaskFailureOperation enum with TFO_ because they
   caused name clashes with windows.h
- Prefixed the members of the SignalAction enum with SA_ for the same reason
- Wrapped the platform-specific functions used (like open(), fsync() etc) in
   include/vpb/Utils (implemented in include/vpb/Utils.cpp for WIN32 and not),
   each of which is prefixed with vpb_. I tried hard not to change anything for
   the non-WIN32 case, but if there are typos please don't kill me :-)
- Added osgViewer to link vpb.lib (all platforms - DataSet::run() creates an
   osgViewer::Viewer), as well as Ws2_32.lib for Win32 only (for  
gethostname()).
- Added osgGA to link vpbextrusion and vpbheightfieldmapping.
- Added osgGA to FindOSG.cmake so that the previous would work.

Some notes:

- Some of the signals do not exist on Windows, but I did not research  
thoroughly
   if there is a way to reproduce the semantics. So some things will not work
   right away and will have to be fixed.
- Some of the wrapped functions are special cases on Windows (fchmod() makes
   no sense, sync() doesn't exist and is hard to reproduce correctly without
   requiring that the executable be run with administrator privileges).
- I don't know if you'd prefer putting the contents of Utils.h/cpp  
into the vpb
   namespace. Since they're wrappers to standard functions, I didn't do it, but
   you could have a different opinion. I'll change it if you want.


*******

Also included is a patch I had to make to  
osgUtil::ReversePrimitiveFunctor which was missing OSGUTIL_EXPORT (and  
thus #include <osgUtil/Export>) for it to be found when linking VPB.

Let me know if there's anything else.

J-S
-- 
______________________________________________________
Jean-Sebastien Guay     jean-sebastien.guay at polymtl.ca
                         http://whitestar02.webhop.org/

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: VPB.zip
Type: application/zip
Size: 65131 bytes
Desc: not available
Url : http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080109/5165f484/attachment-0001.zip 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ReversePrimitiveFunctor
Type: text/x-c
Size: 2237 bytes
Desc: not available
Url : http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080109/5165f484/attachment-0001.bin 


More information about the osg-submissions mailing list