openFrameworks' folders
Till now we have installed openFrameworks and checked its working. Let's explore the contents of its folder. It consists of a number of folders, including addons
, apps
, examples
, libs
, projectGenerator
, and text files such as license.md
and readme.txt
.
Note
It is a good idea to read the license file license.md
carefully before using openFrameworks.
Let's consider some of the most important folders in detail.
The examples folder
This folder contains simple examples covering almost all the aspects of openFrameworks, sorted by the following topics:
3d
: This folder demonstrates the basics of 3D graphics and 3D math (see Chapter 7, Drawing in 3D, for more information on the topic)addons
: This folder contains examples of using various addons, which are extensions of openFrameworks' core (see Appendix A, Working with Addons, for more information on the topic)communication
: This folder contains examples of communicating with peripherals using serial port (most often via USB), for example, for connecting with Arduinoempty
: This folder containsemptyExample
, the simplest project for openFrameworks, which we will use as a starting point for developing most of the examples across the bookevents
: This folder demonstrates built-in openFrameworks' event system usage, like key pressing and timing, and also working with custom event objectsgl
: This folder contains advanced examples on 2D and 3D graphics, including FBO, VBO, and shaders (see Chapter 2, Drawing in 2D, Chapter 7, Drawing in 3D, and Chapter 8, Using Shaders, for detailed information on these topics)graphics
: This folder demonstrates basic 2D graphics capabilities and working with images (see Chapter 2, Drawing in 2D, and Chapter 4, Images and Textures, for more information on these topics)gui
: This folder exposes how to add graphical user interface, containing buttons, sliders, and checkboxes to an openFrameworks projectmath
: This folder has examples on working with Perlin noise, simple particle system, and also with vector mathematics (see Appendix B, Perlin noise, and Chapter 3, Building a Simple Particle System, for more information on these topics)sound
: This folder contains examples that demonstrate how to play, generate at low-level, and record sounds (see Chapter 6, Working with Sounds, for more information on the topic)utils
: This folder demonstrates working with small but important topics such as converting values between different types (for example, converting int to string), working with directories, and using threadsvideo
: This folder demonstrates how to play videos, process video frames, and grab live video from camera (see Chapter 5, Working with Videos, for more information on the topic)
Though most of the topics will be covered in this book, we highly recommend that you run and see as many examples of the code as you can. It is very helpful for dipping into the openFrameworks world.
The apps folder
This is a folder, in which all your projects should live. More specifically, you should place the projects inside some subfolder of the apps
folder. By now this folder contains the myApps
folder, and you can use it for your projects. Also you can create new folders, like Performances2014
, and place corresponding projects there.
Note, if you will try to compile a project placed outside a subfolder of the apps
folder, the compiler can give an error that it can not find the openFrameworks library.
The addons folder
This folder contains addons. These are the extensions of the basic openFrameworks capabilities. When you need to add some extension to openFrameworks, you will install it into this folder. We discuss the addons in detail in Appendix A, Working with Addons.