OpenSceneGraph 3.0: Beginner's Guide
上QQ阅读APP看书,第一时间看更新

Time for action—creating your solution with one click

At present, the project wizard can only work with Visual Studio 7 (2003), 8 (2005), 9 (2008), and 10 (2010) under Windows. If you have any problems using it, contact the author directly.

  1. Open your Visual Studio IDE and start a new project. You will find a new project template named OSG Wizard in the Visual C++ project types, which is illustrated as follows:
    Time for action—creating your solution with one click
  2. Enter the project name, click on OK, and create your solution with the OSG wizard in one step! After that, you will have a ready-to-use working environment.

What just happened?

So far you have created your solution with the OSG wizard and also established a ready-to-use working environment. Try programming and debugging the example code, then open the project property page, and have a look at the pre-configured items in C/C++ | General | Additional Include Directories, Linker | General | Additional Library Directories, and Linker | Input | Additional Dependencies, which will be useful for constructing your own project in the next chapter.

A non-Windows or non-Visual Studio developer will never see the wizard interface and thus is not necessary to have the related installer option selected.

Have a go hero—constructing "Hello World" with the wizard

Do you still have problems compiling the "Hello World" example In Chapter 1, The Journey into OpenSceneGraph? Now it is time to finish this work with the help of the Visual Studio wizard. You may also compare your own project's properties with the ones in the generated project, and try to point out problems, if any.