= Getting Started = [[TracNav(TracNav/SupportTOC)]] Follows is a quick step by step guide to helping new !OpenSceneGraph users get up to speed on how to use the software in their own application development work. == 1. Downloading the !OpenSceneGraph == You may download the !OpenSceneGraph as a set of binaries or source code tarballs for the current release which can be found on the [wiki:Downloads Downloads] page, or use [wiki:Downloads/SVN SVN] or [wiki:Downloads/DeveloperReleases Developer Releases] to check out the development version of the !OpenSceneGraph to get latest additions, revisions and bug fixes. For beginners we'd recommend using the binaries or the source tarballs. == 2. Obtaining the pre-requisites tools/dependencies == If you plan to compile the !OpenSceneGraph you'll also need to the build system generator tool [http://www.cmake.org CMake 2.6.x] (CMake 2.4.2+ may be used on older Linux/Unix systems) and an appropriate compiler suite for your platform, i.e. !VisualStudio, g++ etc. For modern linux distributions you'll be able to pull down cmake, g++ and other dependencies directly from central repositories. You will need to download the dependencies which are listed in the [wiki:Downloads/Dependencies Dependencies]. You don't need all the dependencies for the plugins as this are all options libraries, so don't worry about trying to get all the dependencies installed, you can always add further dependencies later if it turns out you need them for your project. When running the examples its is useful to install the [wiki:Downloads/SampleDatasets Sample Dataset] so that the examples have some data to load. == 3. Compiling == For Linux/Unix/OSX/Mingw/Cygwin the build and install is straight forward: {{{ cd OpenSceneGraph ./configure make sudo make install }}} If you have a multi-processor/core system then you can use make -j to tell the build system to multiple cores. For Windows you'll need to generate !VisualStudio project files, for a full guide see the [wiki:Support/PlatformSpecifics/VisualStudio VisualStudio] page. There are more details on platform specific build issues/dependencies see the [wiki:Support/PlatformSpecifics] == 4. Running the example applications == To run the applications you need to set up the path to the applications, and its recommend that you add these environmental settings to you login setup such as autoexec.bat under Windows, or .tcshrc, or .bashrc under Unix. The binaries paths to set up are: Unix, tcsh: '''`setenv PATH {$PATH}:/usr/local/share/OpenSceneGraph/bin`'''[[BR]] Unix, bash: '''`export PATH={$PATH}:/usr/local/share/OpenSceneGraph/bin`'''[[BR]] Windows : '''`set PATH=Mypath;where\I\put\my\OpenSceneGraph\bin`'''[[BR]] Windows Vista : '''`setx PATH "%PATH;c:\apps\OpenSceneGraph\bin"`''' (one-time command)[[BR]] Then set the !OpenSceneGraph file path up, so that the examples can find the data: Unix, tcsh: '''`setenv OSG_FILE_PATH /home/myaccount/MyData/OpenSceneGraph-Data`'''[[BR]] Unix, bash: '''`export OSG_FILE_PATH=/home/myaccount/MyData/OpenSceneGraph-Data`'''[[BR]] OSX, use the above expressions plus : '''`setenv DYLD_BIND_AT_LAUNCH`'''[[BR]] Windows: '''`set OSG_FILE_PATH=where\I\put\my\OpenSceneGraph-Data`'''[[BR]] Windows Vista : '''`setx OSG_FILE_PATH c:\apps\OpenSceneGraph-Data`''' (one-time command)[[BR]] Then to run a single application type in a console: '''`osgviewer cow.osg`''' To run all the examples, first you have to build the example applications. You can do this by {{{ cmake -DBUILD_OSG_EXAMPLES=1 make }}} Then, to run all the examples one after the other: '''`cd OpenSceneGraph`'''/ '''`./runexamples.bat`''' To advance to the next example simple press Escape, to print out help just press 'h'. If you want to have a quick look at what you should expect to see on screen browse through the Screenshots/OSGExamples. For further information of the examples also read through the [wiki:Support/UserGuides/Examples Examples] in the User Guides section. == 5. Writing your first application == Take one of the existing examples such as osgviewer as a base and modify it. == 6. Further resources == The key resources are collected together on the [wiki:Support Support] page, particular ones of interest are: * [wiki:Support/ProgrammingGuides Programming Guides] - programming with !OpenSceneGraph * [wiki:Support/ReferenceGuides Reference Guides] - !OpenSceneGraph API reference documentation * [wiki:Support/FAQ FAQ] - Frequently Asked Questions * [wiki:Support/Tutorials Tutorials] - programming tutorials/howtos. * [wiki:Support/TipsAndTricks Tips And Tricks] - quick snippets of informtation that can help you along * [wiki:Support/KnowledgeBase Knowledge Base] - Useful background knowledge