openFrameworks is a community-developed cross platform toolkit for creative coding in C++.

Overview

openFrameworks

openFrameworks is a C++ toolkit for creative coding. If you are new to OF, welcome!

Slack Status

Build status

  • The master branch contains the newest, most recently updated code. This code is packaged and available for download in the "Nightly Builds" section of openframeworks.cc/download.
  • The stable branch contains the code corresponding to the last stable openFrameworks release. This stable code is packaged and available for download at openframeworks.cc/download.
Platform Master branch Stable branch
Windows MSYS2 Build status Build status
Windows Visual Studio Build status Build status
Linux 64 & Arm Linux Build Status Linux Build Status
Emscripten Emscripten Build Status Emscripten Build Status
macos macos Build Status macos Build Status
iOS & iOS iOS tvOS Build Status iOS tvOS Build Status
Android Arm7 Android Build Status Android Build Status

folder structure

This release of OF comes with several folders:

  • addons
  • apps
  • docs
  • examples
  • export (on some systems)
  • libs
  • other
  • scripts
  • project generator

docs has some documentation around OF usage, per platform things to consider, etc. You should definitely take a look in there; for example, if you are on OSX, read the osx.md. apps and examples are where projects go -- examples contains a variety of projects that show you how to use OF, and apps is where your own projects will go. libs contains the libraries that OF uses, including the openframeworks core itself. addons are for additional functionality that's not part of the core. export is for DLLs and dylibs that need to be put in each compiled project. The scripts folder has the templates and small scripts for automating OF per platform. project generator is a GUI based tool for making new projects - this folder is only there in packaged releases.

One idea that's important is that OF releases are designed to be self-contained. You can put them anywhere on your hard drive, but it's not possible to mix different releases of OF together, so please keep each release (0.8.0, 0.8.1) separate. Projects may generally work from release to release, but this is not guaranteed. Because OF is self-contained, there's extensive use of local file paths (ie, ../../../) throughout OF. It's important to be aware of how directories are structured. A common error is to take a project and move it so that it's a level below or above where it used to be compared to the root of OF. This means that links such as ../../../libs will break.

Get involved

The openframeworks forum:

http://forum.openframeworks.cc/

is a warm and friendly place. Please ask or answer a question. The most important part of this project is that it's a community, more than just a tool, so please join us! Also, this is free software, and we learn so much about what is hard, what doesn't make sense, what is useful, etc. The most basic questions are acceptable here! Don't worry, just join the conversation. Learning in OF is social, it's hard to do it alone, but together we can get far!

Our GitHub site is active:

https://github.com/openframeworks/openFrameworks

if you have bugs or feature requests, consider opening an issue. If you are a developer and want to help, pull requests are warmly welcome. Please read the contributing guide for guidelines:

https://github.com/openframeworks/openFrameworks/blob/master/CONTRIBUTING.md

We also have a developer's mailing list, which is useful for discussing issues around the development and future of OF.

Developers

To grab a copy of openFrameworks for your platform, check the download page on the main site.

If you are working with the Git repository, the stable branch of the OF repository corresponds to the most recent release, with a few important differences:

  1. The release includes a simple openFrameworks project generator.
  2. This GitHub repository contains code and libs for all the platforms, but the releases are done on a per-platform basis.
  3. This GitHub repository has no project files for the different examples. They are generated automatically for each release using a tool in apps/projectGenerator/.
  4. There are no external dependencies in this repository, you can download them using the download_libs.sh script for each platform in the particular platform folder inside scripts.

If you want to work with the openFrameworks GitHub repository, you need to download the external dependencies and you should use the project generator to create project files for all the code in examples/. To generate the project files with the project generator enable the 'Advanced Options' in the settings tab, then use 'Update Multiple' to update the projects for the examples/ folder path in the repo.

To set up the project generator submodule within the OF repo, use the command git submodule init then git submodule update whilst inside the openFrameworks repo.

For more info on working with the Project Generator, for per-platform readmes, and more information, see the documentation.

Versioning

openFrameworks uses Semantic Versioning, although strict adherence will only come into effect at version 1.0.0.

Comments
  • ofDirectShowPlayer does not compile w/ mingw / codeblocks

    ofDirectShowPlayer does not compile w/ mingw / codeblocks

    Update: Core OF now compiles, but ofDirectShowPlayer is not the default player on MinGW/CB.

    Regression from d6d5c854109f

    The quickest solution is to leave it out, but it will require us to revert to a different default video player.

    @prisonerjohn your thoughts?

    Here is reference to past conversations:

    http://forum.openframeworks.cc/t/a-directshow-video-player-for-openframeworks/14154

    core codeblocks  windows section-video regression 
    opened by bakercp 135
  • oF in HTML5

    oF in HTML5

    Issue: openFrameworks does not run in the web browser.

    Solution: the emscripten backend for the LLVM compiler generates JavaScript, many C++ OpenGL projects have been demonstrated running in the browser with WebGL.

    Is anyone interested in this?

    feature development-strategy 
    opened by ddnn55 117
  • gstreamer 1.20.0 breaks video on Linux

    gstreamer 1.20.0 breaks video on Linux

    Hi,

    I just updated my system, and it seems gstreamer breaks any video playback. Getting this when running the videoPlayer example:

    [notice ] ofGstUtils: Got context from element 'vaapipostproc0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
    
    [notice ] ofGstUtils: Got context from element 'vaapipostproc0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayGLX\)\ vaapidisplayglx0", gst.vaapi.Display.GObject=(GstObject)"\(GstVaapiDisplayGLX\)\ vaapidisplayglx0";
    
    
    (videoPlayerExample:12633): GStreamer-Base-CRITICAL **: 16:43:43.970: basetransform: second attempt to fixate caps returned invalid (NULL) caps on pad vaapipostproc0:sink
    
    (videoPlayerExample:12633): GStreamer-Base-CRITICAL **: 16:43:43.970: basetransform: second attempt to fixate caps returned invalid (NULL) caps on pad vaapipostproc0:sink
    
    (videoPlayerExample:12633): GStreamer-Base-CRITICAL **: 16:43:43.971: basetransform: second attempt to fixate caps returned invalid (NULL) caps on pad vaapipostproc0:sink
    
    (videoPlayerExample:12633): GStreamer-Base-CRITICAL **: 16:43:43.971: basetransform: second attempt to fixate caps returned invalid (NULL) caps on pad vaapipostproc0:sink
    
    (videoPlayerExample:12633): GStreamer-Base-CRITICAL **: 16:43:43.971: basetransform: second attempt to fixate caps returned invalid (NULL) caps on pad vaapipostproc0:sink
    
    (videoPlayerExample:12633): GStreamer-Base-CRITICAL **: 16:43:43.971: basetransform: second attempt to fixate caps returned invalid (NULL) caps on pad vaapipostproc0:sink
    
    (videoPlayerExample:12633): GStreamer-Base-CRITICAL **: 16:43:43.972: basetransform: second attempt to fixate caps returned invalid (NULL) caps on pad vaapipostproc0:sink
    [ error ] ofGstUtils: startPipeline(): unable to pause pipeline after 5s[ error ]
    ofGstUtils: gstHandleMessage(): embedded video playback halted for plugin, module qtdemux0  reported: Internal data stream error.[warning] ofGstVideoUtils: update(): ofGstVideoUtils not loaded
    

    Needless to say, this is a HUGE bug. Please, please, please wait with upgrading gstreamer until this is fixed.

    Running this on Arch Linux, oF version 0.11.2. Tested on xorg (bspwm) and wayland (sway).

    EDIT: tested now with the latest nightly build, of_v20220210_linux64gcc6_nightly, and getting the same result.

    opened by kflak 103
  • Multiwindow using glfw

    Multiwindow using glfw

    This branch uses glfw as the window system and ditches glut. But ofAppGlutWindow can still be used by modifying main.cpp

    to use glfw:

    ofSetupOpenGL(ofGetWindowManager(), 640,480, OF_WINDOW);    
    

    to use glut:

    ofAppGlutWindow window;
    ofSetupOpenGL(&window, 1024,768, OF_WINDOW);
    

    I was using this branch for the last couple of weeks on ubuntu and think it is pretty stable. But it needs compiled libs for mac & windows. The glfw version I use is a fork of the official glfw repo https://github.com/underdoeg/glfw

    We should not merge this before those compiled libs are in there.

    I send this pull request mainly to have a place to get a discussion going. It'd be great if someone could try this and test if it works for them too :)

    opened by underdoeg 94
  • Feature : VS2015 x64 libs for 0.9.0 release

    Feature : VS2015 x64 libs for 0.9.0 release

    Bringing in:

    • @LeoColomb
    • @DomAmato
    • @liquidzym
    • @prisonerjohn

    Todo:

    • [ ] Build all libs for VS2015 x64 using repos pointed to by current apothecary scripts
    • [ ] Test Project Generator
    • [ ] Test addons (e.g. OpenCV)
    feature visual studio 
    opened by elliotwoods 89
  • ofVboMesh doesn't draw meshes on Mesa driver [1]

    ofVboMesh doesn't draw meshes on Mesa driver [1]

    #include <ofMain.h>
    #include "ofAppGLFWWindow.h"
    
    class ofApp : public ofBaseApp
    {
      public:
        void draw();
    };
    
    void ofApp::draw()
    {
      glClearColor(0.1, 0.1, 0.1, 1);
      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    
      ofSetColor(ofColor::tomato);
      ofDrawCircle(ofGetWindowRect().getCenter(), 80.0f);
    }
    
    int main()
    {
      ofGLFWWindowSettings settings;
      settings.setGLVersion(2, 1);
      ofCreateWindow(settings);
    
      return ofRunApp(new ofApp());
    }
    

    On OpenGL 2.1:

    1

    With settings.setGLVersion(3, 3);:

    2

    It's not just ofDrawCircle, every draw command is not working.

    This happened after multidraw branch merge, before that programmable renderer worked fine.

    ping @arturoc I guess :)

    core bug section-2D regression 
    opened by ghost 87
  • projectGenerator doesn't work with third-party frameworks

    projectGenerator doesn't work with third-party frameworks

    There are two long-standing issues with projectGenerator which prevent generated projects from building if an addon includes non-system frameworks on OS X. This has affected ofxSyphon for a long time and is a frequent support headache.

    The issues are ofZach/projectGeneratorSimple#56 and ofZach/projectGeneratorSimple#58.

    Assuming this projectGenerator is intended for OF 0.9, it would be tremendous to have those fixed before the release of 0.9.

    OS X all versions, Xcode all versions, OF 0.8.4 and git HEAD

    bug prelim-analysis project-generator 
    opened by bangnoise 70
  • AVFoundationPlayer: Overall Stability Issues with Recent Developments

    AVFoundationPlayer: Overall Stability Issues with Recent Developments

    Hello -

    I made an application which is asynchronously loading many short movie files (from 1 to 5 seconds a file) over a long period of time. This means countless loadAsync, play and pause commands.

    I used a recent git master version https://github.com/openframeworks/openFrameworks/commit/27b09aae8c2108cb78cd1b18140ba6ab1040a891 where @i-n-g-o made some changes and I tested them quite extensively (https://github.com/openframeworks/openFrameworks/pull/3736).

    Compiling the same application against current oF master creates certain instabilities and runtime crashes. I'll try to give some more details about the bugs, but I need some time to gather them. I just noticed that since the commit above some major changes were made to the AVFoundationPlayer.

    Best, Urs

    core bug macOS critical section-video 
    opened by urshofer 69
  • bugfix : c++11 on xcode

    bugfix : c++11 on xcode

    Hey all!

    [EDIT] It seems that we don't have c++11 support right now with on osx. The issue primarily is that we have to use libc++ with c++11, which does not support legacy tr1 namespace symbols. To fix this bug we need to write a c++11 version which does not use tr1 namespace.

    This could either involve:

    1. Writing a win/linux/mac C++11 implementation without tr1
    2. Writing a special implementation for libc++ without tr1 for osx

    I think the only difference between 1 and 2 is more testing is required for 1. (i.e. the code should look identical).

    [/EDIT]

    In ofTypes I edited:

    #if (_MSC_VER)
    #include <memory>
    #else
    #include <tr1/memory>
    // import smart pointers utils into std
    namespace std {
        using std::tr1::shared_ptr;
        using std::tr1::weak_ptr;
        using std::tr1::static_pointer_cast;
        using std::tr1::dynamic_pointer_cast;
        using std::tr1::const_pointer_cast;
        using std::tr1::enable_shared_from_this;
        using std::tr1::__dynamic_cast_tag;
    }
    #endif
    

    to:

    #if (_MSC_VER || true) // <----basically hacked here
    #include <memory>
    using std::shared_ptr;
    #else
    #include <tr1/memory>
    // import smart pointers utils into std
    namespace std {
        using std::tr1::shared_ptr;
        using std::tr1::weak_ptr;
        using std::tr1::static_pointer_cast;
        using std::tr1::dynamic_pointer_cast;
        using std::tr1::const_pointer_cast;
        using std::tr1::enable_shared_from_this;
        using std::tr1::__dynamic_cast_tag;
    }
    #endif
    

    now i get complaints on __dynamic_cast_tag. And ran out of google results. ideas?

    /Volumes/SHARED/openFrameworks/libs/openFrameworks/types/ofTypes.h:169:36: No type named '__dynamic_cast_tag' in namespace 'std'
    
    xcode feature development-strategy macOS 
    opened by elliotwoods 69
  • Android gradle builds

    Android gradle builds

    This adds support to build for Android using the Android Studio and the Gradle-Experimental plugin. It is based on the work @HalfdanJ did with the gradle build process in #5059 but starting with a fresh copy of the master branch. The PR also changes how data is handled in Android Studio and inside the app closing #2995. The PR adds support for creating and updating projects with the project generator. The PR makes android build faster the VS2015 builds 👍.

    This also depends on an apothecary update to build projects with opencv. I'll make that PR shortly to apothecary but I have the libs in a zip for people to test apps in my dropbox.

    This should remove a bunch of the weird android setup procedures with Eclipse and allow Android builds to be more easily maintained when the NDK is updated.

    cc: @arturoc

    android android-studio 
    opened by danzeeeman 61
  • ofQTKitPlayer and ofQTKitGrabber to compile for 10.7 10.8 SDK

    ofQTKitPlayer and ofQTKitGrabber to compile for 10.7 10.8 SDK

    This updates openFrameworks to compile for OS X 10.7 and 10.8 SDKs by bringing the ofxQTKit addons into the core.

    For Video Playback the default is now ofQTKitPlayer instead of ofQuicktimePlayer in all cases.

    Video Capture the new ofQTKitGrabber will be used in 10.7 and 10.8, while the legacy ofQuicktimeGrabber is used on 10.6 allowing access to the video settings dialog.

    The video settings dialog is not available if compiling against 10.7 or 10.8.

    Additionally there is an example "osxHighPerformanceVideoPlayerExample" that shows how to take advantage of some of the QTKit features (gpu decoding, fast scrubbing and alpha channel)

    opened by obviousjim 61
  •  add support to maintain/recall an init value within ofParameters

    add support to maintain/recall an init value within ofParameters

    i find myself merging this functionality in half my ofParameter-using projects: a T member value to store the init value, and a reInit() method to bring back the value.

    this adds some model power to ofParameters and lowers code duplication risks of having to store the "default values" in another structure that mirrors the ofParameter hierarchy. there is also a getInit() which is useful to perform scaling centred on the default value (which might not be in the geometric center of a given T range, but needs to be at the center of knob, for instance).

    the value is stored transparently and the reInit() method uses the parameter's set() to propagate the events (so for instance ofxGui responds as expected) -- it does the right thing with default-constructed and "not-setup" ofParameters (ex: a naked ofParameter will be set back to 0 and an ofColor to white). as far as i can tell it is fully backwards-compatible as it does not modify existing behavior, and only adds the footprint of one T.

    navigating ofParameter.h is not so explicit... I matched the setMax()/getMax() behavior, plus the assignments where a value is passed. I chose the label "Init" (over "default") as it's short and works as well as a noun (variable) and a verb (methods).

    ofParameter<float> zoom {"zoom", 1.0f, 0.1f, 10.0f}; // no difference from current usage
    // mess with the zoom, then:
    zoom.reInit();
    

    #changelog #types

    opened by artificiel 0
  • Emscripten audioDeviceSelect draft

    Emscripten audioDeviceSelect draft

    Here is an example: https://audioselect.handmadeproductions.de/ https://github.com/Jonathhhan/ofEmscriptenExamples/tree/main/audio_select_draft Audio out select does not work yet (maybe with a hack): https://guidou.github.io/setsinkid-demo.html But it is planned: https://github.com/w3ctag/design-reviews/issues/766

    opened by Jonathhhan 0
  • How to use Emscriptens audioProcess function for audioWorklets with ofSoundstreams buffer?

    How to use Emscriptens audioProcess function for audioWorklets with ofSoundstreams buffer?

    Right now I need to make some changes to Emscriptens audioWorklet branch, because I process the audio on the JS side, while the audioWorklet branch expects the audio to be processed on the c++ side. This is a simple Emscripten audioWorklet test / example: https://github.com/juj/emscripten/blob/audio_worklets/test/webaudio/tone_generator.c And this is how I implemented it: https://github.com/Jonathhhan/openFrameworks/blob/emscripten_3.1.9_audioWorklet/addons/ofxEmscripten/src/ofxEmscriptenSoundStream.cpp https://github.com/Jonathhhan/openFrameworks/blob/emscripten_3.1.9_audioWorklet/addons/ofxEmscripten/libs/html5audio/lib/emscripten/audio_worklet.js It would be nice to change the implementation in a way, that it runs without any modifications of the Emscripten source code.

    opened by Jonathhhan 1
  • Emscripten WebMidi draft

    Emscripten WebMidi draft

    Its quite minimalistic, but seems to work well. Here is an example patch: https://github.com/Jonathhhan/ofEmscriptenExamples/blob/main/webmidi_draft/src/ofApp.cpp https://mtest.handmadeproductions.de/

    opened by Jonathhhan 0
JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, RTAS and AAX audio plug-ins.

JUCE is an open-source cross-platform C++ application framework used for rapidly developing high quality desktop and mobile applications, including VS

JUCE 4.7k Jan 1, 2023
Kigs framework is a C++ modular multipurpose cross platform framework.

Kigs framework is a C++ modular multi-purpose cross-platform framework. It was used as a basis for many professionnal projects. The main goal was to b

null 74 Nov 28, 2022
A toolkit for making real world machine learning and data analysis applications in C++

dlib C++ library Dlib is a modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ to solve real worl

Davis E. King 11.6k Jan 5, 2023
? A glib-like multi-platform c library

A glib-like cross-platform C library Supporting the project Support this project by becoming a sponsor. Your logo will show up here with a link to you

TBOOX 4.2k Dec 29, 2022
Cinder is a community-developed, free and open source library for professional-quality creative coding in C++.

Cinder 0.9.3dev: libcinder.org Cinder is a peer-reviewed, free, open source C++ library for creative coding. Please note that Cinder depends on a few

Cinder 5k Jan 7, 2023
Polycode is a cross-platform framework for creative code.

Polycode is a cross-platform framework for creative code. You can use it as a C++ API or as a standalone scripting language to get easy and simple acc

Ivan Safrin 2.4k Jan 2, 2023
Insight Toolkit (ITK) is an open-source, cross-platform toolkit for N-dimensional scientific image processing, segmentation, and registration

ITK: The Insight Toolkit C++ Python Linux macOS Windows Linux (Code coverage) Links Homepage Download Discussion Software Guide Help Examples Issue tr

Insight Software Consortium 1.1k Dec 26, 2022
Arduino core for GD32 devices, community developed, based on original GigaDevice's core

GD32 Arduino Core (New) This is a Arduino core is based off of the original GigaDevice core that was provided by the company in early June 2021 (see h

null 46 Dec 24, 2022
KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.

KeePassXC KeePassXC is a modern, secure, and open-source password manager that stores and manages your most sensitive information. You can run KeePass

KeePassXC 14.7k Jan 2, 2023
This repo contains solutions to coding questions available online on coding platforms like - Codeforces, Codechef, URI Online Judge, and Hackerrank.

CPP_Soln This repo contains solutions to coding questions available online on coding platforms like - Codeforces, Codechef, URI Online Judge , LeetCod

Rijul Jain 4 Nov 3, 2022
TouchEngine wrapper for openFrameworks

ofxTouchEngine TouchEngine wrapper for openFrameworks Caution This repository is in very rough and experimental stage.

nariakiiwatani 9 Jan 22, 2022
Newton fractal in openframeworks, with shaders. (inspired by: 3b1b)

Newton-fractal Newton fractal in openframeworks, with shaders. (inspired by: 3b1b) Formula read more: Newton's method learn more: Newton's Fractal (wh

András Zoller 2 Nov 14, 2021
TRON Bike Game Remake in C++ openFrameworks

TRON Bike Game Remake in C++ openFrameworks Required openFrameworks Add-ons The only required add-on is ofxLight2D which can be found here. Build Inst

Bhavesh Manivannan 1 Oct 24, 2021
Seam is a pin-based node editor for OpenFrameworks that makes prototyping visual systems easier and faster.

seam Seam is a pin-based node editor for openFrameworks built using: openFrameworks Dear ImGui the node editor extension for ImGui It is heavily WIP,

Austin Clifton 2 Jan 2, 2022
Weather for openframeworks, current providers: openweathermap

ofxAbstractWeather Introduction OpenFrameworks Weather-Data addon. Usage/Examples Create an API-Key at OpenWeatherMap or weather.setHasLocalFile(true)

Patrick C. Engel 8 Jul 29, 2022
Fast and robust face tracking addon for openFrameworks based on YOLO5Face

ofxFaceTracker3 Working in progress Fast and robust face tracking addon for openFrameworks based on YOLO5Face and ONNX Runtime. Features Fast and robu

Yuya Hanai 13 Nov 6, 2022
Powerful, mature open-source cross-platform game engine for Python and C++, developed by Disney and CMU

Panda3D Panda3D is a game engine, a framework for 3D rendering and game development for Python and C++ programs. Panda3D is open-source and free for a

Panda3D 3.6k Dec 31, 2022
Mars is a cross-platform network component developed by WeChat.

Mars is a cross-platform infrastructure component developed by WeChat Mobile Team

Tencent 16.6k Jan 3, 2023
Flint++ is cross-platform, zero-dependency port of flint, a lint program for C++ developed and used at Facebook.

Flint++ A Cross Platform Port of Facebook's C++ Linter Flint++ is cross-platform, zero-dependency port of flint, a lint program for C++ developed and

Joss Whittle 255 Dec 10, 2022
A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs.

webview for golang and c/c++ A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. The goal of the project is to

polevpn 21 Dec 3, 2022