Creative Coding

Getting Started With Cinder: C++ Creative Coding at Full Speed

A first-project walkthrough of Cinder, the open-source C++ framework that trades openFrameworks' broader add-on ecosystem for a tighter, more opinionated core built around a chainable drawing API.

This site already has a getting-started guide for openFrameworks — C++ creative coding’s other major open-source option. Cinder is the sibling project worth knowing about next: a community-developed, Apache-licensed framework with a smaller add-on ecosystem but a more cohesive, modern core, and a quick-start guide written by Robert Hodgin, one of the field’s best-known generative artists, who built much of his early flocking and particle work directly in it.

Setting up a project

Cinder ships project templates (Tinderbox on macOS, or CMake on any platform) that scaffold a runnable app with the build system already configured — the fastest path to a blank window rather than hand-assembling a build from scratch. A minimal Cinder app overrides three methods on App:

#include "cinder/app/App.h"
#include "cinder/gl/gl.h"

using namespace ci;
using namespace ci::app;

class BasicApp : public App {
  public:
    void setup() override;
    void draw() override;
};

void BasicApp::setup() {
}

void BasicApp::draw() {
    gl::clear( Color( 0, 0, 0 ) );
    gl::drawSolidCircle( getWindowCenter(), 100.0f );
}

CINDER_APP( BasicApp, RendererGl )

setup() runs once; draw() runs every frame — the same split p5.js uses with setup()/draw(), which makes the mental model transferable even though the syntax is pure C++.

A chainable drawing API, not just a procedural one

What distinguishes Cinder day to day is that most of its drawing and math types support method chaining rather than requiring a sequence of separate calls — closer to how a modern JavaScript or Swift API reads than classic C++ graphics code. Building up a shape’s transform, color, and position often reads as one fluent expression rather than four statements. Combined with Cinder’s gl:: namespace wrapping OpenGL directly, that chaining is what lets Hodgin’s own tutorial go from “blank project” to a working particle engine with local and global forces inside its first chapter — and from there, over five more chapters, into a full 3D flocking simulation with a controllable camera and a live-tunable GUI for the flocking rules.

Where it sits next to openFrameworks

Cinder and openFrameworks solve overlapping problems with different trade-offs: openFrameworks leans on a much larger community add-on library (ofxAddons) covering everything from computer vision to specific sensor hardware, while Cinder favors a tighter, more consistent core and leaves more of that breadth to be assembled by hand. Neither is strictly “better” — a project that needs a specific obscure sensor library will likely reach for openFrameworks’ add-on ecosystem first, while a project that wants a cleaner, more modern C++ foundation to build its own tooling on top of tends to reach for Cinder. Both compile to native code and both outrun p5.js or Processing on anything CPU- or GPU-bound, which is the real reason to leave the browser-based tools behind in the first place.