openFrameworks — Open-Source C++ Toolkit for Creative Coding
openFrameworks (oF) is a C++ toolkit for creative coding: interactive installations, generative art, computer vision, real-time video. Used by artists, researchers, and production studios worldwide for the past two decades.
What it is
openFrameworks (oF) is an open-source C++ toolkit designed for creative coding. It wraps low-level libraries for graphics (OpenGL), audio (rtAudio, FMOD), video, networking, and computer vision into a consistent API.
openFrameworks targets artists, researchers, and creative technologists building interactive installations, generative art, real-time video processing, and computer vision projects. It has been used in production studios and galleries for over two decades.
How it saves time or tokens
openFrameworks provides a setup-draw loop abstraction similar to Processing but in C++, giving access to native performance without the boilerplate of raw OpenGL or SDL. The addon system (ofx) lets you drop in community modules for Kinect, OSC, GPU shaders, and machine learning without writing integration code from scratch.
How to use
- Download openFrameworks from the official site and unzip it.
- Use the Project Generator to scaffold a new project for your platform (Xcode, Visual Studio, or Makefile).
- Edit
ofApp.cppwith your setup and draw logic, then build and run.
Example
// ofApp.cpp -- particle system sketch
#include "ofApp.h"
void ofApp::setup() {
ofBackground(20);
ofSetFrameRate(60);
}
void ofApp::draw() {
for (int i = 0; i < 200; i++) {
float x = ofNoise(i * 0.1, ofGetElapsedTimef()) * ofGetWidth();
float y = ofNoise(i * 0.1 + 100, ofGetElapsedTimef()) * ofGetHeight();
float r = ofNoise(i * 0.1 + 200, ofGetElapsedTimef()) * 20;
ofSetColor(255, 150);
ofDrawCircle(x, y, r);
}
}
Related on TokRepo
- Coding Tools -- Development frameworks and libraries
- Design Tools -- Creative and visual design tooling
Common pitfalls
- openFrameworks projects are platform-specific. Use the Project Generator to create or update projects when switching between macOS, Windows, or Linux.
- The addon ecosystem (ofx) varies in maintenance quality. Check the last commit date and oF version compatibility before adding an addon.
- openFrameworks uses its own build system and project structure. Integrating with CMake or other build tools requires manual configuration.
Frequently Asked Questions
Processing uses Java and prioritizes simplicity for beginners. openFrameworks uses C++ and provides native performance with direct access to OpenGL, system APIs, and hardware. Both share the setup-draw loop paradigm but oF is better suited for performance-critical installations.
openFrameworks supports macOS, Windows, Linux, iOS, Android, and Emscripten (web). Each platform has a specific project template generated by the Project Generator tool.
ofx addons are community-contributed modules that extend openFrameworks. They cover Kinect input, OSC networking, GPU compute shaders, machine learning, and more. Addons are typically GitHub repositories that you clone into the addons directory.
Yes. openFrameworks is released under the MIT license, allowing commercial use without restrictions. Many production studios and agencies use it for client installations and products.
Yes. openFrameworks provides ofShader for loading and running GLSL vertex and fragment shaders. It integrates with the OpenGL pipeline and supports compute shaders on platforms where OpenGL 4.3+ is available.
Citations (3)
- openFrameworks GitHub— openFrameworks is an open-source C++ toolkit for creative coding
- openFrameworks Official Site— openFrameworks documentation and setup guides
- OpenGL Registry— OpenGL specification for graphics rendering
Related on TokRepo
Discussion
Related Assets
Conda — Cross-Platform Package and Environment Manager
Install, update, and manage packages and isolated environments for Python, R, C/C++, and hundreds of other languages from a single tool.
Sphinx — Python Documentation Generator
Generate professional documentation from reStructuredText and Markdown with cross-references, API autodoc, and multiple output formats.
Neutralinojs — Lightweight Cross-Platform Desktop Apps
Build desktop applications with HTML, CSS, and JavaScript using a tiny native runtime instead of bundling Chromium.