From ff82e192635a70c78bcd24593ce465f2e1eccae6 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Sat, 2 Jan 2016 13:29:30 +0000 Subject: [PATCH] Improve Using as an Addon section in readme --- README.md | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index ccfc6d3..59c5506 100644 --- a/README.md +++ b/README.md @@ -56,41 +56,16 @@ make Using as an Addon --- -The following is the minimal openFrameworks application code needed for a basic ofxPiMapper application. - -**ofApp.h** -```c++ -#include "ofMain.h" -#include "ofxPiMapper.h" -#include "CustomSource.h" - -class ofApp : public ofBaseApp { - public: - void setup(); - void draw(); - - ofxPiMapper * mapper; -}; -``` - -**ofApp.cpp** -```c++ -#include "ofApp.h" +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. -void ofApp::setup(){ - mapper = new ofxPiMapper(); - CustomSource * source = new CustomSource(); - mapper.registerFboSource(*source); - mapper.setup(); // Setup must be run after adding the FBO source -} +Reuse the `example` app by copying it to your `apps` directory. -void ofApp::draw(){ - mapper->draw(); -} +```bash +cp -R openFrameworks/addons/ofxPiMapper/example openFrameworks/apps/myApps/ +cd openFrameworks/apps/myApps +mv example myOfxPiMapperApp ``` -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. - Consult the [Installation](#installation) section if you are using ofxPiMapper the first time. Some of the most frequently asked questions and answers can be found in the [FAQ](/FAQ.md) document.