background preloader

Tutorials

Facebook Twitter

OpenFrameworks | The choreography of color and code. After months of peeking curiosity, this past week I finally downloaded and starting playing with OpenFrameworks and taking my first steps to learning C++. If you have a Flash / AS3 background like me you’ll quickly find that the two languages are vastly different not just in their syntax but in the way you structure a project and setup its dependencies. With that in mind, this post will hopefully ease the process and help you sidestep some potentially confusing pitfalls especially if you are coming to OpenFrameworks from an AS3 background and have experience with Object Oriented Programming. Before you begin. Here is a fantastic example of the emitter created in this tutorial as extended by reader Silvio Paganini.

So first off, if you don’t already have oF download it from here and follow this guide to setting up your IDE and compiling an example test project to make sure everything works. Anatomy of an oF project. So first things first. Typical Document Class Constructor in AS3. Andrew McWilliams | Blog | Getting Started with OpenFrameworks. Posted Wednesday, 16 May 2012 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.

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? Given that I already use Visual Studio for web application development, it seemed the natural choice. So that's the reason this article is written about CodeBlocks! Step 1: Install CodeBlocks So as discussed, step 1 becomes install CodeBlocks . Step 4: Follow the openFrameworks tutorial The openFrameworks guys have written a tutorial . OpenFrameworks. OpenFrameworks is an open source C++ toolkit designed to assist the creative process by providing a simple and intuitive framework for experimentation.

The toolkit is designed to work as a general purpose glue, and wraps together several commonly used libraries. openFrameworks uses a few patterns so it's easy to understand how things work. Once you understand what these patterns are, it should be easier to use any of the functionality in openFrameworks. If you are a developer contributing to OF then this document will also be useful to you, to know how to code your classes so they behave in a consistent way with the rest of openFrameworks setup, update, draw Most functionality in openframeworks works using this pattern. Setup() The setup method is called only once at the beginning of the application and it's used to initialize other objects or variables usually declared in ofApp.h. ofApp.h ofApp.cpp In C++ it's super important to initialize variables since by default they are not initialized.

OpenFrameworks. This chapter will introduce openFrameworks and prepare you to start your first project. openFrameworks is an open source C++ toolkit designed to assist the creative process by providing a simple and intuitive framework for experimentation. The toolkit is designed to work as a general purpose glue, and wraps together several commonly used libraries, including:OpenGL, GLEW, GLUT, GLFW, libtess2 and cairo for graphics rtAudio, PortAudio or FMOD and Kiss FFT for audio input, output and analysis FreeType for fonts FreeImage for image saving and loading Quicktime and videoInput for video playback and grabbing Poco for a variety of utilities The code is written to be massively cross-compatible.

Right now we support five operating systems (Windows, OSX, Linux, iOS, Android) and four IDEs (XCode, Code::Blocks, and Visual Studio and Eclipse). The API is designed to be minimal and easy to grasp.Simply put, openFrameworks is a tool that makes it much easier to make things with code. 1.1. 1.2. 1.3. OpenFrameworks. OpenFrameworks. This chapter will help you get started with the basics of openFrameworks, such as the proper method for creating a project, setting window size, and basic drawing. But first… 1. Your First Look inside oF By this point, I assume that you’ve downloaded openFrameworks and followed the appropriate setup guide. So the first thing you’ll want to do is uncompress the openFrameworks archive and place the resulting folder somewhere you can easily access.

No matter where you put it, when you open up the folder, you should see a set of folders that looks basically like this: So what are these folders? Addons The "core" openFrameworks contains only the most essential functionality. Apps This is where the applications that you make will be stored, and where you will be working most of the time. Examples This folder contains example applications that illustrate some of the things that openFrameworks can do. libs This folder contains all the libraries that openFrameworks uses as well as the ofCore. 2. 2.1. 3. OpenFrameworks.