For openFrameworks Users

TrussC for
oF Users

If you love oF, you'll love TrussC.

TrussC deeply respects the "joy of creative coding" that openFrameworks pioneered.

But hardware and C++ have changed dramatically since oF was designed in the 2000s.
TrussC inherits oF's spirit while optimizing for modern environments—a new foundation for the next decade.

What Stays the Same

oF users will feel right at home

setup, update, draw

The fundamental rhythm of creative coding. This structure is unchanged.

ofApp tcApp

Familiar Method Names

We kept method names you know and love to minimize the learning curve.

ofDrawCircle(x, y, r) drawCircle(x, y, r)

XCode / VS / VSCode Support

Choose your favorite IDE. Works with Cursor too, of course.

CMake + clangd

Pain Points Solved

TrussC's answers to long-standing oF frustrations

The Problem

OpenGL Deprecated on macOS

Apple deprecated OpenGL in favor of Metal.
Future compatibility and performance optimization became uncertain.
The looming question: when will support be dropped?

TrussC's Solution

Native Backends via Sokol

Metal / DirectX 12 / Vulkan / WebGPU support.
Runs on OS-recommended native APIs for optimal speed and power efficiency.
WebAssembly + WebGPU provides excellent browser portability.

The Problem

License Concerns for Commercial Use

oF itself is MIT, but dependencies include GPL libraries.
Checking licenses for FFmpeg, FreeType, etc. is tedious.
Uncertainty when using for client work.

TrussC's Solution

MIT / zlib / Public Domain Only

Zero GPL contamination guaranteed.
All dependencies are commercial-use friendly.
Use with confidence for client projects.

The Problem

Manual Parent-Child Management

ofNode exists but parent-child relationships require manual management.
Memory management gets complex when adding/removing children.
Children can outlive their parents, causing issues.

TrussC's Solution

Automatic Management with shared_ptr

// Automatic management with shared_ptr
auto parent = Node::create();
auto child = Node::create();
parent->addChild(child);

// When parent is destroyed, children are automatically released
// Circular references safely avoided with weak_ptr
The Problem

No Safe Way to "Execute After 3 Seconds"

ofThread is prone to data races.
No standard way to safely "execute after N seconds".
Time-checking in update() leads to messy code.

TrussC's Solution

Safe Main-Thread Sync Timers

// Safe delayed execution on main thread
node->callAfter(3.0f, []() {
    // Runs on main thread after 3 seconds
    // No mutex needed, no data race worries
});

// Repeating execution is easy too
node->callEvery(1.0f, []() {
    // Runs every second
});
The Problem

Can't Draw Thick Lines

ofSetLineWidth() isn't guaranteed above 1px due to OpenGL limitations.
On macOS / Metal, it's completely ignored. Drawing thick lines meant generating meshes manually.

TrussC's Solution

Beautiful Thick Lines Built-in

Just use beginStroke() / endStroke().
Automatic line caps and joins, any thickness you want.

// Beautiful thick lines with beginStroke/endStroke
setStrokeWeight(5.0f);  // 5px thick line
beginStroke();
vertex(0, 0);
vertex(100, 50);
vertex(200, 0);
endStroke();  // Automatic caps and joins

Getting Started

oF users will feel right at home

Directory Structure

TrussC's directory structure is very similar to oF.
You'll find familiar folders like examples, addons, and more.

openFrameworks

of_v0.12.0/
├── addons/
├── apps/
│   └── myApps/
│       └── myProject/
├── examples/
├── libs/
├── projectGenerator/
└── scripts/

TrussC

TrussC/
├── addons/
├── apps/
│   └── myApps/
│       └── myProject/
├── examples/
├── trussc/
├── projectGenerator/
└── scripts/

projectGenerator

Just like oF, you create projects with projectGenerator.
It looks like classic oF, but the features are fully modern.

TrussC projectGenerator

Just Start Coding

Once your project is created, just write setup / update / draw as usual.
ofApp becomes tcApp, ofDrawCircle becomes drawCircle
the coding experience is almost identical.

void tcApp::setup() {
    // setup as usual
}

void tcApp::update() {
    // update as usual
}

void tcApp::draw() {
    clear(0.1, 0.1, 0.1);
    setColor(1, 0.5, 0);
    drawCircle(getWindowWidth()/2, getWindowHeight()/2, 100);
}

Pretty similar, right?
Your oF experience transfers directly to TrussC.

API Reference

oF functions → TrussC equivalents

Loading API reference...

Ready to Start?

Your oF experience translates directly.