source: trunk/README.txt @ 277

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