From 9388a5c7575161b2d4888fd806ce8ec2fcda2372 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Wed, 5 Nov 2014 20:57:49 +0100 Subject: [PATCH 1/4] Update default surfaces (add video and fbo sources to surfaces) --- example/bin/data/defaultSurfaces.xml | 152 +++++++++++++++++---------- 1 file changed, 97 insertions(+), 55 deletions(-) diff --git a/example/bin/data/defaultSurfaces.xml b/example/bin/data/defaultSurfaces.xml index 4bcc56a..6c1ae48 100755 --- a/example/bin/data/defaultSurfaces.xml +++ b/example/bin/data/defaultSurfaces.xml @@ -2,137 +2,179 @@ - 250.000000000 - 34.000000000 + 26.396118164 + 223.170288086 - 374.000000000 - 201.000000000 + 241.000000000 + 118.000000000 - 535.000000000 - 35.000000000 + 213.630920410 + 352.926849365 - 0.101999998 - 0.335999995 + 0.251666665 + 0.090000004 - 0.328000009 - 0.689999998 + 0.449999988 + 0.696666658 - 0.705999970 - 0.393999994 + 0.870000005 + 0.173333332 image - image1.jpg + image5.jpg - 24.396121979 - 259.170288086 + 84.709846497 + 462.636596680 - 250.000000000 - 34.000000000 + 293.630920410 + 228.926849365 - 214.630920410 - 282.926849365 + 33.396121979 + 271.170288086 - 0.251666665 - 0.090000004 + 0.981523871 + 0.471785098 - 0.449999988 - 0.696666658 + 0.245601788 + 0.110941604 - 0.870000005 - 0.173333332 + 0.662217021 + 0.714698017 - image - image5.jpg + fbo + Custom FBO Source - 75.709846497 - 450.636596680 + 510.148498535 + 97.815002441 - 214.630920410 - 282.926849365 + 372.000000000 + 434.000000000 - 24.396121979 - 259.170288086 + 159.000000000 + 158.000000000 - 0.981523871 - 0.471785098 + 0.331067860 + 0.732035518 - 0.245601788 - 0.110941604 + 0.782209992 + 0.181442097 - 0.662217021 - 0.714698017 + 0.877761841 + 0.894570410 - image - image4.jpg + video + test.mov - 527.148498535 - 277.815002441 + 152.000000000 + 343.000000000 + + + 377.000000000 + 246.000000000 - 320.170959473 - 461.102355957 + 538.000000000 + 490.000000000 - 285.250427246 - 209.424682617 + 160.000000000 + 551.000000000 - 0.031067841 - 0.511202157 + 0.172656253 + 0.134333342 - 0.450178742 - 0.116164304 + 0.480374992 + 0.134333342 - 0.543386877 - 0.609848201 + 0.480374992 + 0.570833325 + + + 0.172656253 + 0.570833325 - image - none + video + test.mov + + + + + + 509.000000000 + 50.000000000 + + + 629.000000000 + 383.000000000 + + + 276.000000000 + 358.000000000 + + + + + 0.500000000 + 0.000000000 + + + 1.000000000 + 1.000000000 + + + 0.000000000 + 1.000000000 + + + + fbo + Custom FBO Source From 5c2ac7ce8828c86bee1bc858082c489ce9bee987 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Wed, 5 Nov 2014 20:58:34 +0100 Subject: [PATCH 2/4] Hide info on startup, but leave commented code --- example/src/ofApp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/src/ofApp.cpp b/example/src/ofApp.cpp index 6ca4ba8..45d6c8a 100755 --- a/example/src/ofApp.cpp +++ b/example/src/ofApp.cpp @@ -11,7 +11,7 @@ void ofApp::setup() { piMapper.setup(); // The info layer is hidden by default, press to toggle - piMapper.showInfo(); + // piMapper.showInfo(); } void ofApp::draw() { From dde58195761e930cee31a7feea063bae9613187a Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Wed, 5 Nov 2014 21:12:59 +0100 Subject: [PATCH 3/4] Add -f flag option to RPi version of he example --- example/src/main.cpp | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/example/src/main.cpp b/example/src/main.cpp index 0e0278d..c8a3c90 100644 --- a/example/src/main.cpp +++ b/example/src/main.cpp @@ -1,12 +1,34 @@ #include "ofMain.h" #include "ofApp.h" +#include -int main() -{ #ifdef TARGET_RASPBERRY_PI - ofSetupOpenGL(600, 500, OF_FULLSCREEN); +// Accept arguments in the Pi version +int main(int argc, char* argv[]) { + + bool fullscreen = false; + + if (argc > 0) { + std::string fullscreenFlag = "-f"; + for (int i = 0; i < argc; i++) { + if (strcmp(argv[i], fullscreenFlag.c_str()) == 0) { + fullscreen = true; + break; + } + } + } + + if (fullscreen) { + ofSetupOpenGL(600, 500, OF_FULLSCREEN); + } else { + ofSetupOpenGL(800, 450, OF_WINDOW); + } + + ofRunApp(new ofApp()); +} #else - ofSetupOpenGL(600, 500, OF_WINDOW); +int main() { + ofSetupOpenGL(800, 600, OF_WINDOW); + ofRunApp(new ofApp()); +} #endif - ofRunApp(new ofApp()); -} \ No newline at end of file From c20e9c45a798c3abba711ca5f6fc925799f5a563 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Wed, 5 Nov 2014 22:05:20 +0100 Subject: [PATCH 4/4] Update readme with version relevant info --- README.md | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 54ef901..ace762a 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,18 @@ ofxPiMapper This project is an attempt to create optimized version of an openFrameworks projection mapping addon for the Raspberry Pi. It is also my master thesis project at Aalto University, School of Arts, Design and Architecture (Helsinki Media Lab). -ofxPiMapper is mainly for people who want to use the Raspberry Pi as a cheaper way to create standalone mapping installations. Let's say someone has 10 generative mapping pieces and gets an offer to exhibit them in an art gallery, museum or any other kind of place. 10 Mac computers? No! PiMapper is here to save you! +ofxPiMapper is mainly for people who want to use the Raspberry Pi as a cheaper way to create standalone mapping installations. Let's say someone has 10 generative mapping pieces and gets an offer to exhibit them in an art gallery, museum or any other kind of place. 10 expensive computers? No! PiMapper is here to save you! -The addon itself is intended to be flexible as the separate components of it can be reusable. The main example of the addon can be used as a standalone application for experimenting, testing as well as production state of a project. If you need to save memory and processing power, reusing ofxPiMapper classes without adding the GUI layer can help you. +ofxPiMapper features FBO sources that allow you to create generative openFrameworks patches to be used with ofxPiMapper. Extend the `FboSource` class, override `setup()`, `update()` and `draw()` methods and then create an instance of your custom source to add it to your ofxPiMapper object. -As ofxPiMapper is optimized for the Pi, there is no doubt that it will run smoothly on other machines. It has been tested on OS X so far. +``` +ofxPiMapper* mapper = new ofxPiMapper(); +CustomSource* source = new CustomSource(); +mapper.addFboSource(source); +mapper.setup(); // Setup must be run after adding the FBO source +``` + +Since version 0.2.0 ofxPiMapper supports video sources. Development ----------- @@ -107,10 +114,7 @@ Dependencies To install dependencies, `cd` into `openFrameworks/addons` directory and execute the following: ``` -git clone https://github.com/jvcleave/ofxOMXPlayer.git -... many lines inbetween -git clone https://github.com/bakercp/ofxIO.git -... many lines here as well +git clone https://github.com/jvcleave/ofxOMXPlayer.git && git clone https://github.com/bakercp/ofxIO.git ``` And you are good to go! @@ -157,7 +161,17 @@ A short wishlist for the next releases: - Refined directoryWatcher mechanism, source lists should react on added and removed files - OSC remote control module + - Webserver with simple interface for remote mapping + - Syphon source for Mac + - Spout source for Win + - Streaming source for RPi (fb sharing, network streams...) - Even better structure + +### Version 0.2.1 (2014-11-05): + - Added single instance feature. Now you can use ofxPiMapper as single object for your project. + - Added FBO source. You can create a custom openFrameworks application for piMapper by extending the FboSource class. Add/register your custom object as source in piMapper and you will be able to select it in the source editor. Source is saved and loaded from the settings as well. + - Fixed issue #15 + - Added -f (fullscreen) flag for the Raspberry Pi version. Use `./yourApp -f` to launch it fullscreen on start. ### Version 0.2.0 (2014-10-18): - Added logo (thanks [Irina Spicaka](http://irina.spicaka.info/)) @@ -171,7 +185,7 @@ A short wishlist for the next releases: ### Version 0.1.4 (2014-07-10): - Added fbo texture example - Replaced the main example with the fbo texture one - - Added simple quad surface + - Added simple quad surface (thanks [sebllll](https://github.com/sebllll)) - Fixed a couple of bugs - Introduced new branching model - Added joint snapping