Creative Coding Framework for C++
Post-OpenGL Creative Coding.
Built on sokol.
One line of code, instant visuals. The magic remains.
#include "tcApp.h"
void tcApp::setup() {
// Set loop mode
setLoopMode(LoopMode::Game);
// Load an image
image = make_shared<Texture>("test.png");
}
void tcApp::update() {
angle += TAU * 0.005f;
}
void tcApp::draw() {
clear(0.1f, 0.1f, 0.1f);
pushMatrix();
translate(640, 360);
rotate(angle);
image->draw(-50, -50, 100, 100);
popMatrix();
}
#include "TrussC.h"
#include "tcApp.h"
// Define backend implementation
#define SOKOL_IMPL
#include "sokol_app.h"
// That's it!
TC_MAIN(tcApp)
Concrete choices, not abstract principles
sokol_gfx powers Metal, DX12, and Vulkan. No OpenGL dependency.
MIT / zlib / Public Domain only. No FFmpeg—video uses AVFoundation & Media Foundation.
macOS, Windows, Linux, and Web. iOS planned.
Tools and resources to help you get started
GUI tool to create new projects and manage addons. No command line required.
Got questions? Our AI assistant knows TrussC inside and out. Try it →
Graphics, sound, video, networking, and more. Run them in your browser →
A hybrid of custom implementations and high-quality lightweight libraries
Window, input & context management
zlibMetal / DX12 / Vulkan backend
zlibScene graph & event propagation
CustomVector & matrix operations
Public DomainImage loading & saving
Public DomainFont rendering
Public DomainAudio I/O & file playback
zlib / PDAVFoundation / Media Foundation
Custom