Skills2026年4月15日·1 分钟阅读

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.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
step-1.md
直接安装命令
npx -y tokrepo@latest install a933602f-3862-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

TL;DR
openFrameworks is a C++ creative coding toolkit for interactive art, computer vision, and real-time graphics.
§01

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.

§02

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.

§03

How to use

  1. Download openFrameworks from the official site and unzip it.
  1. Use the Project Generator to scaffold a new project for your platform (Xcode, Visual Studio, or Makefile).
  1. Edit ofApp.cpp with your setup and draw logic, then build and run.
§04

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);
    }
}
§05

Related on TokRepo

§06

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.

常见问题

How does openFrameworks compare to Processing?+

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.

What platforms does openFrameworks support?+

openFrameworks supports macOS, Windows, Linux, iOS, Android, and Emscripten (web). Each platform has a specific project template generated by the Project Generator tool.

What is the ofx addon system?+

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.

Can openFrameworks be used for commercial projects?+

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.

Does openFrameworks support GPU shaders?+

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.

引用来源 (3)

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产