Mercurial > mxe-octave
comparison doc/index.html @ 673:cd4bb34b43a2
improvements for package openscenegraph (by Martin Lambers)
* Add -DOSG_LIBRARY_STATIC to openscenegraph-osg.pc Cflags
* Update the documentation
* Update the openscenegraph-2-static.patch to a more general version
that is now submitted to upstream
* Add openscenegraph-4-png.patch from upstream SVN which fixes
compilation with libpng-1.4. Remove openscenegraph-4-disable-png.patch
and reenable the PNG plugin.
author | Volker Grabsch <vog@notjusthosting.com> |
---|---|
date | Wed, 27 Jan 2010 00:12:53 +0100 |
parents | e62e7f0d2650 |
children | ad3600b7be3a |
comparison
equal
deleted
inserted
replaced
672:48864a041c62 | 673:cd4bb34b43a2 |
---|---|
362 </p> | 362 </p> |
363 | 363 |
364 <h3>Step 5d: Cross compile your Project (OSG)</h3> | 364 <h3>Step 5d: Cross compile your Project (OSG)</h3> |
365 | 365 |
366 <p> | 366 <p> |
367 Using static OpenSceneGraph libraries requires a few changes to your source: | 367 Using static OpenSceneGraph libraries requires a few changes to your source. |
368 </p> | 368 The graphics subsystem and all plugins required by your application must be |
369 <ul> | 369 referenced explicitly. Use a code block like the following: |
370 <li> | 370 </p> |
371 Define <code>OSG_LIBRARY_STATIC</code> | 371 <pre>#ifdef OSG_LIBRARY_STATIC |
372 </li> | 372 USE_GRAPHICSWINDOW() |
373 <li> | 373 USE_OSGPLUGIN(<plugin1>) |
374 Use the macro | 374 USE_OSGPLUGIN(<plugin2>) |
375 <code>USE_GRAPHICSWINDOW()</code> | 375 ... |
376 to explicitly reference your graphics system | 376 #endif</pre> |
377 </li> | |
378 <li> | |
379 Use the macro | |
380 <code>USE_OSGPLUGIN(<plugin>)</code> | |
381 to explicitly reference any plugin you might want to use | |
382 </li> | |
383 </ul> | |
384 <p> | 377 <p> |
385 Look at <code>examples/osgstaticviewer/osgstaticviewer.cpp</code> in the | 378 Look at <code>examples/osgstaticviewer/osgstaticviewer.cpp</code> in the |
386 OpenSceneGraph source distribution for an example. This example can be | 379 OpenSceneGraph source distribution for an example. This example can be |
387 compiled with | 380 compiled with the following command: |
388 </p> | 381 </p> |
389 <pre>i686-pc-mingw32-g++ -DOSG_LIBRARY_STATIC \ | 382 <pre>i686-pc-mingw32-g++ \ |
390 -o osgstaticviewer.exe examples/osgstaticviewer/osgstaticviewer.cpp \ | 383 -o osgstaticviewer.exe examples/osgstaticviewer/osgstaticviewer.cpp \ |
391 `i686-pc-mingw32-pkg-config --cflags openscenegraph-osgViewer openscenegraph-osgPlugins` \ | 384 `i686-pc-mingw32-pkg-config --cflags openscenegraph-osgViewer openscenegraph-osgPlugins` \ |
392 `i686-pc-mingw32-pkg-config --static --libs openscenegraph-osgViewer openscenegraph-osgPlugins`</pre> | 385 `i686-pc-mingw32-pkg-config --static --libs openscenegraph-osgViewer openscenegraph-osgPlugins`</pre> |
386 <p> | |
387 The <code>i686-pc-mingw32-pkg-config</code> command from mingw-cross-env will | |
388 automatically add <code>-DOSG_LIBRARY_STATIC</code> to your compiler flags. | |
389 </p> | |
393 | 390 |
394 <h3>Further Steps</h3> | 391 <h3>Further Steps</h3> |
395 | 392 |
396 <p> | 393 <p> |
397 If you need further assistance, | 394 If you need further assistance, |