| 1 | How to use examples |
|---|
| 2 | =============================== |
|---|
| 3 | |
|---|
| 4 | ATTENTION: |
|---|
| 5 | Examples do load .ppu and .glsl files out of the Data directory, which can |
|---|
| 6 | be found in the main direcotry of osgPPU. In order that this files are found |
|---|
| 7 | you have to setup the OSG_FILE_PATH environment variable accordingly. |
|---|
| 8 | Hence on Unix systems do following: |
|---|
| 9 | export OSG_FILE_PATH=$OSG_FILE_PATH:/path/were/osgPPU/is/installed/ |
|---|
| 10 | |
|---|
| 11 | Other solution would be just to copy the Data/ directory under your bin/ |
|---|
| 12 | directory to let examnple run |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | The Data/ irectory does contain some examples and tools coming together |
|---|
| 16 | witht the osgPPU package. Use them to see how all the things are setted up. |
|---|
| 17 | Use the viewer to see the .ppu files which you can find in the bin/Data/ |
|---|
| 18 | directory. |
|---|
| 19 | For example: |
|---|
| 20 | cd bin |
|---|
| 21 | ./viewer Data/motionblur.ppu |
|---|
| 22 | will show you how the motionblur effect can be realized with the osgPPU. |
|---|
| 23 | The corresponding .ppu file does contain a main setup for the correct |
|---|
| 24 | effect pipeline. |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | How to build the osgPPU |
|---|
| 30 | =============================== |
|---|
| 31 | |
|---|
| 32 | The osgPPU uses the CMake build system to generate a |
|---|
| 33 | platform-specific build environment. This build system |
|---|
| 34 | was choosen since OpenSceneGraph is also based on it. |
|---|
| 35 | |
|---|
| 36 | If you don't already have CMake installed on your system you can grab |
|---|
| 37 | it from http://www.cmake.org, use version 2.4.6 or later. Details on the |
|---|
| 38 | OpenSceneGraph's CMake build can be found at: |
|---|
| 39 | |
|---|
| 40 | http://www.openscenegraph.org/projects/osg/wiki/Build/CMake |
|---|
| 41 | |
|---|
| 42 | Under unices (i.e. Linux, IRIX, Solaris, Free-BSD, HP-Ux, AIX, OSX) |
|---|
| 43 | use the cmake or ccmake command-line utils. To compile osgPPU type following: |
|---|
| 44 | |
|---|
| 45 | cd osgPPU |
|---|
| 46 | cmake . -DCMAKE_BUILD_TYPE=Release |
|---|
| 47 | make |
|---|
| 48 | sudo make install |
|---|
| 49 | |
|---|
| 50 | Alternatively, you can create an out-of-source build directory and run |
|---|
| 51 | cmake or ccmake from there. The advantage to this approach is that the |
|---|
| 52 | temporary files created by CMake won't clutter the osgPPU |
|---|
| 53 | source directory, and also makes it possible to have multiple |
|---|
| 54 | independent build targets by creating multiple build directories. In a |
|---|
| 55 | directory alongside the OpenSceneGraph use: |
|---|
| 56 | |
|---|
| 57 | mkdir build |
|---|
| 58 | cd build |
|---|
| 59 | cmake ../ -DCMAKE_BUILD_TYPE=Release |
|---|
| 60 | make |
|---|
| 61 | sudo make install |
|---|
| 62 | |
|---|
| 63 | If you would like to install the library somehwere else than the default |
|---|
| 64 | install location, so type in the main directory of osgPPU the following: |
|---|
| 65 | |
|---|
| 66 | cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/path/to/install |
|---|
| 67 | make install |
|---|
| 68 | |
|---|
| 69 | Under Windows use the GUI tool CMakeSetup to build your VisualStudio |
|---|
| 70 | files. The following page on OpenSceneGraph's wiki dedicated to the CMake build |
|---|
| 71 | system should help guide you through the process: |
|---|
| 72 | |
|---|
| 73 | http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio |
|---|
| 74 | |
|---|
| 75 | |
|---|
| 76 | |
|---|
| 77 | |
|---|
| 78 | How to build osg plugin osgdb_ppu |
|---|
| 79 | =============================== |
|---|
| 80 | The plugin is build together with the complete library. |
|---|
| 81 | However to install the library file in correct plugin |
|---|
| 82 | directory you have to specify the version of osg with: |
|---|
| 83 | |
|---|
| 84 | cmake . -DOSG_VERSION=2.5.x |
|---|
| 85 | |
|---|
| 86 | The consecutive call of "make install" would install |
|---|
| 87 | the ppu plugin under PREFIX/lib/osgPlugins-2.5.x/. |
|---|
| 88 | If no version was specified then the installation path |
|---|
| 89 | is PREFIX/lib/osgPlugins-2.4.0/ |
|---|
| 90 | |
|---|
| 91 | |
|---|
| 92 | |
|---|
| 93 | |
|---|