Version 2 (modified by martin, 7 years ago)


Visual Studio Plugins

back to Visual Studio

!! VRML plugin

The VRML plugin uses OpenVRML. Under Windows, it can only be compiled using version 0.14.3 of OpenVRML, because later versions depend on boost and had incompatible code changes. Note also that these instructions were tested with Visual C++ Express 2005, and some parts may differ if you are using a different version.

Download this package. Note that it contains precompiled libraries, but we cannot use those and must recompile them.



The OSG VRML plugin does not need [=OpenVRML=]'s openvrml-gl library, nor the lookat application. Just delete those projects from the solution.

Then, select Debug mode, and change the Librarian - General - Output File property of each one of the 3 projects to add a 'd' at the end of the name, before the period. So openvrml.lib becomes openvrmld.lib and so on. Release mode will not be changed. That way, the debug and release libs can coexist in the same directory.

Pressing F7, apart from loads of warnings, you will get some errors:

Token.hpp line 76: replace this line

inline operator<(RefToken l,RefToken r); //{return true;}

with this

inline bool operator<(RefToken l,RefToken r); //{return true;}

AST.hpp line 151: same thing - replace this line

inline operator<(RefAST l,RefAST r); // {return true;}

with this

inline bool operator<(RefAST l,RefAST r); // {return true;}

And finally, in regerror.c, we have an old-style C function definition:

regerror(errcode, preg, errbuf, errbuf_size)
int errcode;
const regex_t *preg;
char *errbuf;
size_t errbuf_size;

replace it with

regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)\\

And then all should compile correctly (though with quite a few warnings). Change to Release mode and press F7 again to compile the libs in release mode.

Once that's done, create a directory under the main [=OpenVRML=] directory (for example, ...\OpenVRML\home-built ), copy the ...\OpenVRML\include directory into it, and copy the three libraries you just compiled into a lib subdirectory (...\OpenVRML\home-built\lib for example):


Then, the OSG part. Rerun CMakeSetup with the top-level CMakeLists.txt, specifying the ...\OpenVRML\home-built\include directory in OPENVRML_INCLUDE_DIR and ...\OpenVRML\home-built\lib\openvrml.lib library in OPENVRML_LIBRARY. Configure, then Generate as usual.

Finally, build using the newly generated solution and project files. All should go well in both Release and Debug modes (though again, many warnings will be issued, courtesy of OpenVRML's header files).

Note: 2007/07/06 - The CMake files have not yet been updated to link to the debug OpenVRML libs when compiling OSG in debug mode. For now, in the debug configuration, manually change the lib names in "Plug 3d vrml" project Properties - Linker - Input - Additional Dependencies (replace antlr.lib with antlrd.lib, regex.lib with regexd.lib and openvrml.lib with openvrmld.lib). This should be fixed shortly.

Note: the VRML plugin only supports geometry with geometry nodes, so for instance Box or Sphere nodes will not display anything. You can use this file to test that it works. If you see a plane, a sphere, a pyramid, a rectangular prism, a cone and a teapot, it works.

QuickTime plugin

Download this package (or the QuickTime SDK from this page). Install it wherever you want, and then in !CMakeSetup specify the [...\QuickTime? SDK\CIncludes] directory in QUICKTIME_INCLUDE_DIR, and ...\QuickTime SDK\Libraries\QTMLClient.lib in QUICKTIME_LIBRARY. Configure, Generate and build.

!! wxWidgets (for osgviewerwx)

Download this installer or the zip version. Install or unzip wherever you want. Open ...\wxWidgets-2.8.4\build\msw\wx.dsw, converting the project files when asked. Press F7 to build, then switch to the Debug configuration and press F7 to build it too.

In CMakeSetup, specify the ...\wxWidgets-2.8.4\ directory in wxWidgets_ROOT_DIR, ...\wxWidgets-2.8.4\lib\vc_lib in wxWidgets_LIB_DIR and set wxWidgets_CONFIGURATION as "msw" and wxWidgets_USE_REL_AND_DEBUG to "ON". Configure, Generate and build.

!! TODO: Instructions for other plugins go here

In particular, if someone could contribute instructions for the COLLADA DAE plugin, that would be nice.