Installing openFrameworks
To develop projects with openFrameworks, you need to install an Integrated Development Environment (IDE) with the C++ compiler and openFrameworks.
To install them, perform the following steps:
- Go to openFrameworks' download page at openframeworks.cc/download.
- Find your platform on the page (OS X, Linux, Windows, iOS, Android, or Linux ARM) and select the desired IDE (Xcode, Code::Blocks, Eclipse, or Visual Studio). For developing with iOS, an OS X computer is required. Development on a Linux ARM device is done using the C++ compiler directly, without an IDE.
Note
All the IDEs mentioned are free. But, to run your project on an iOS device, you must buy an iOS Developer License from Apple for $99 per year.
- Download the openFrameworks archive by clicking on the corresponding link and unzip it.
- Click on the corresponding setup guide link and follow the instructions shown for installing and configuring the IDE and openFrameworks. Now you can develop and run your projects in openFrameworks.
Tip
Running openFrameworks projects on desktops (Mac OS X, Windows, or Linux) is simpler than on mobiles. So, if you are a novice in C++ or openFrameworks, we recommend that you start to develop your very first openFrameworks project for a desktop OS rather than a mobile one.
After a while, when you are a little more comfortable with C++ and openFrameworks, you can easily port your project to mobiles, if needed. You will learn how to deploy openFrameworks projects on mobiles and Raspberry Pi in Chapter 8, Deploying the Project on iOS, Android, and Raspberry Pi.
The openFrameworks folder structure
It's time to look inside openFrameworks, so open the openFrameworks folder. It consists of a number of folders and files, as shown in the following screenshot (the screenshot is for OS X, but the folder structure is similar for all other platforms):
The most important folders for us now are apps
and examples
. The apps
folder is the place where your own projects will be stored. The examples
folder contains a collection of examples, demonstrating all the aspects of openFrameworks programming. The examples are categorized by topics, including 3D, graphics, sound, and video.
Now, let's run one of the examples.