Detritus Tutorial 1        
Print

NxOgre   This page is related to the newest unstable version of NxOgre, called Detritus   NxOgre

 
Disclaimer: This is not an official NxOgre tutorial. However, it has been revised and edited by the creator of NxOgre and Detritus, betajaen.

Info Help: For any problems you encounter while working on these tutorials, as well as for detailed questions and propositions, please visit the NxOgre OgreAddons-Forum.

NxOgreCube.png Introduction

In this tutorial you will learn where to obtain the latest version of NxOgre, Detritus, and how to set it up on your computer. This whole procedure is not that interesting, but like most SDK's and libraries it must be done. But, I can assure you, it won't take that long and you will soon enough be making full use of NxOgre. Let us begin.

NxOgreCube.png Downloading PhysX

As Detritus is based upon the nVidia PhysX physics engine, you will need to download the PhysX System Software along with the PhysX SDK.

The PhysX System Software is required to run any software that makes use of the PhysX physics engine as it contains the runtime DLL's. Anyone who uses an application using PhysX and NxOgre will have to install the System Software.

For those who have a recent nVidia graphics card: The System Software may already be installed on your computer. You can find out by checking if the directory "AGEIA Technologies" exists in your Program Files directory.

 
The PhysX SDK contains the header and linker files that are required for NxOgre to compile and work, along with the PhysX documentation, development tools, and samples. It is essential to install the PhysX SDK in order to develop with NxOgre.

Both the SDK and System Software (if required) can be downloaded from the links at the nVidia PhysX FAQ page(external link). It is recommended that you install the PhysX SDK to a path that does not contain spaces, such as c:/PhysXSDK/.

NxOgreCube.png Getting Detritus

In order to download the latest Detritus version, go to the NxOgre github.com repository(external link) and download the latest commit. Simply decompress the archive to a folder of your choice. It is again recommended that this folder not contain spaces, such as c:/NxOgre.

NxOgreCube.png Building Detritus

Once you have downloaded and installed the PhysX System Software and SDK, and decompressed Detritus, you can build NxOgre. There are several different build configurations available. The two most important ones are the Debug and Final DLL's, but you can also build them as static.

Detritus comes with pre-built Visual Studio 9 solutions (.sln file) in the build/ folder where you extracted Detritus. Within the solution file are three projects:

  • NxOgre
  • NxOgreCharacterController

The first is the core NxOgre project and the second one is the same as the first but with the CharacterController extensions. This requires the NxCharacterController.dll in your application directory to run. If your not planning to use the default PhysX Character controller or want to roll your own stick with the first NxOgre project.

To begin building NxOgre in Visual Studio simply go to Build->Build Solution or press F7 on your keyboard.

Once you have compiled the NxOgre projects, you should have the DLL's, libraries, and includes all required to use NxOgre in your /sdk subfolder from where you extracted Detritus. That means you are ready to actually start using Detritus. Congratulations!

NxOgreCube.png Setting Up Your IDE

To use NxOgre within a project you must tell your IDE where to locate the Detritus libraries and include files . To do this, point your IDE's include directories as well as its linker directories to the /sdk folder located where you extracted Detritus.

Depending on your mode, you will also need to add the following files to your IDE as linker dependencies (in addition to ones required by Ogre).

For debug mode:

  • NxOgreDebug.lib

For final/non-debug mode:

  • NxOgre.lib

 

NxOgreCube.png Conclusion

 
Well, that's it! You just set up everything on your computer in order to step in the great world of physics with Detritus and NxOgre. The only thing left for you to do is to go to the next tutorial and learn how to use NxOgre so you didn't go through this rather boring first tutorial for nothing!

 


Contributors to this page: jacmoe111451 points  .
Page last modified on Saturday 19 of June, 2010 07:15:16 GMT by jacmoe111451 points .


The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.