I've long known that openFrameworks was a really strong platform for my type of work. But my friend and collaborator Gene Kogan has now convinced me that the community is really a great place to be too, so I've decided to invest a little time.

An openframeworks logo
An openframeworks logo

Along with SuperCollider these are now the platforms I'm seriously considering in preparation for the I-Park residency.

Having used neither openFrameworks nor C++ before, there are some hurdles to jump. In this post I want to present my experience installing and getting started with the platform, so that it might help others who are starting out.

Which IDE to use?
The first choice you have to make is which IDE to use - in Windows this means choosing between Visual Studio and CodeBlocks.

Given that I already use Visual Studio for web application development, it seemed the natural choice. But after a couple of frustrating hours scanning scant support information online, I backtracked on that decision. CodeBlocks is the openFrameworks "preferred" IDE for Windows, articles are usually written with reference to it (when they are not written about XCode), and being new to C++ and openFrameworks I realised that I need those kinds of articles. Once I backtracked and switched to CodeBlocks, things became easier.

So that's the reason this article is written about CodeBlocks!

Step 1: Install CodeBlocks
So as discussed, step 1 becomes install CodeBlocks.

Step 2: Download openFrameworks for CodeBlocks
Download the appropriate (CodeBlocks) zip file from the openFrameworks download page. You can extract it to any directory you like. This will also become your working directory (you will build your apps inside here, it will be discussed in the tutorial below), so it's best to keep it somewhere easy to get to and easy to back up. For now, I just extracted it to a new directory 'C:\ofx\'.

Step 3: Set up CodeBlocks to work with openFrameworks
Follow the instructions on this page to set up CodeBlocks for openFrameworks. I found these to be simple and self-explanatory.

Step 4: Follow the openFrameworks tutorial
The openFrameworks guys have written a tutorial. If you're not sure yet what openFrameworks is, or what C++ is (and so on), you might appreciate the general introduction, but either way you should get going as quickly as possible with the tutorial.

Depending on your previous experience these links may seem overly basic or a little bit daunting. The tutorial goes through orientation, preferred practice (in terms of working directories and default project layout), right through to a fairly detailed discussion of basic programming constructs (the usual: sequence, selection, iteration, types and arrays etc. which are the subjects of so many programming books).

It also discusses how this applies in openFrameworks, and in media programming in general - all in one really long page! This is why it could seem a little daunting, although as an experienced programmer I was able to skip most of the material.

When you are done with that, you can zoom out to the main tutorials section and pick more topics from the left nav. I've included a couple of useful links from this section at the bottom of this post.

A bias to XCode
Unhelpfully, the IDE examples in the tutorial are all for XCode - for CodeBlocks all you get is 'Coming soon!' However if you read the XCode examples it's pretty easy to figure out how it applies to CodeBlocks.

Addons
The power of openFrameworks is in mixing and matching various community-contributed addons. In my case, to begin with, I'm interested in using my openFrameworks project for projection-mapping and real-time generative graphics, and talking to SuperCollider to achieve a Synesthetic effect.

I'll talk more about my experience with addons in the next post. In the meantime though, it's worth pointing out a few useful resources that may help:

If you are trying to get started, good luck!