Chapter 3. Initial Setup – Creating the BaseApp

In this chapter, we are going to create a Hello World application from scratch. The application will be called BaseApp and we will use it's structure as a starting point in further chapters.

This chapter will cover the following:

  • Setting up a project with TinderBox
  • Setting up a project from scratch on Mac OS X (Xcode 3 and 4+)
  • Setting up a project from scratch on Windows

It does not have much in common with the BasicApp from the previous chapter except the basic structure, which will be common to all Cinder projects.

TinderBox

The easiest way to create a Cinder project is to use its integrated tool called TinderBox. You can find it in the cinder/tools/ directory. This will work with both Mac OS X and Windows.

Let's give it a try. Open TinderBox application. If you are doing it for the first time, you will have to point to your Cinder directory.

TinderBox

When you've done that, the TinderBox project setup window will appear. Choose Basic App from the Target and OpenGL from the Template drop-down lists. Enter BaseApp in the Project Name field. Make sure that you have Base in the Naming Prefix field.

Note

For those who use Cinder 0.8.5, there is no Target list in the new TinderBox. You have to choose the Basic OpenGL template. Also, there is no Naming Prefix field in the new TinderBox, so just ignore it.

Choose a directory where you will store your Cinder projects in the Location field. Mine is /Users/kr15h/Documents/CinderProjects/ (C:Userskr15hDocumentsCinderProjects on Windows).

Leave HEAD in the Cinder Version field and choose Xcode in the Compilers section. Choose Visual C++ 2010 if you're using Windows or both if you plan to develop using both operating systems.

Click on Create!

Your project is ready! Navigate to your Cinder project's folder that you specified in the Location field and you'll find a folder called BaseApp there. You will find an Xcode project file in the xcode directory (Visual C++ 2010 project file in the vc10 directory on Windows).

Open BaseApp.xcodeproj (BaseApp.sln on Windows).

Try to build and run it. You should see the output as shown in the following screenshot:

TinderBox

Nothing interesting is drawn in the window yet. We will make some changes a bit later, but if you are able to compile, run, and see this, you are the master!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.29.105