Skip to content

pepc84/processing-cpp-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProcessingGL

A Processing-style creative coding framework & IDE — written in C++ with OpenGL

License: MIT Platform Language Built with Claude


What is this?

ProcessingGL brings the simplicity of Processing to native C++. Write setup() and draw() functions and get a real-time OpenGL window — no boilerplate, no engine overhead. It ships with a built-in live-coding IDE so you can edit and run sketches without leaving the app.

Key features:

  • setup() / draw() loop just like Processing
  • Real-time OpenGL rendering via GLFW + GLEW
  • Built-in IDE for live sketch editing
  • Image loading (stb_image)
  • TrueType font rendering (stb_truetype)
  • Keyboard, mouse, and window event callbacks
  • One-command install on Windows, macOS, and Linux

Setup & Install

Windows

Requires MSYS2 — open the MSYS2 MinGW64 terminal, then:

bash setup.sh

Or double-click setup.bat for instructions.

macOS

Requires Homebrew — install it first if you don't have it.

bash setup.sh

Linux

bash setup.sh

Supports: Arch, Ubuntu/Debian, Fedora, openSUSE


Build & Run

The IDE (recommended)

Platform Build Run
Windows buildIDE.bat ide.exe
macOS / Linux bash buildIDE.sh ./ide

Open the IDE, write your sketch, and hit run.

Build a Sketch directly

Edit src/MySketch_gen.cpp with your setup() and draw() code, then:

Platform Build Run
Windows build.bat SketchApp.exe
macOS / Linux bash build.sh ./SketchApp

Writing a Sketch

#include "Processing.h"

namespace Processing {

void setup() {
    size(800, 600);
    background(30);
}

void draw() {
    fill(255, 100, 50);
    ellipse(mouseX, mouseY, 40, 40);
}

} // namespace Processing

Project Structure

ProcessingGL/
├── src/
│   ├── Processing.h        # API header — include this in your sketch
│   ├── Processing.cpp      # Framework implementation
│   ├── IDE.cpp             # Built-in live-coding IDE
│   ├── MySketch_gen.cpp    # Your sketch goes here
│   ├── main.cpp            # Entry point
│   ├── stb_image.h         # Image loading (auto-downloaded by setup)
│   └── stb_truetype.h      # Font rendering (auto-downloaded by setup)
├── default.ttf             # Default font (auto-found/copied by setup)
├── config.json             # Default window/fps config
├── setup.sh                # macOS + Linux + Windows (MSYS2) installer
├── setup.bat               # Windows installer helper
├── build.sh / build.bat    # Build a sketch
├── buildIDE.sh / buildIDE.bat  # Build the IDE
└── run.sh                  # Build + run a sketch (Linux/macOS)

Troubleshooting

GL/glew.h not found (macOS)

brew install glew glfw

Then use bash buildIDE.sh — it handles the Homebrew paths automatically.

Linker errors: missing mouseMoved / mouseClicked / etc. These stubs are already in src/IDE.cpp. If you see them on a fresh clone, make sure you pulled the latest version.

-lGL not found on macOS macOS uses -framework OpenGL instead of -lGL. The build scripts handle this automatically.

Windows: g++ not found Run setup.sh from the MSYS2 MinGW64 terminal, or run setup.bat for guidance.


Credits


License

MIT — free to use, modify, and distribute.

About

dev tools for processing-cpp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors