From 232e5f34e14adeb8aa1d8765ef1d08abe00f6800 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Sat, 31 Mar 2018 00:43:18 +0200 Subject: [PATCH] Rename CustomSource to ScanlineSource --- .../ScanlineSource.cpp} | 12 ++++++------ .../ScanlineSource.h} | 4 ++-- example_fbo-sources/src/ofApp.h | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) rename example_fbo-sources/src/{CustomSource.cpp => ScanLineSource/ScanlineSource.cpp} (87%) rename example_fbo-sources/src/{CustomSource.h => ScanLineSource/ScanlineSource.h} (75%) diff --git a/example_fbo-sources/src/CustomSource.cpp b/example_fbo-sources/src/ScanLineSource/ScanlineSource.cpp similarity index 87% rename from example_fbo-sources/src/CustomSource.cpp rename to example_fbo-sources/src/ScanLineSource/ScanlineSource.cpp index fe0a7d4..edd68fb 100644 --- a/example_fbo-sources/src/CustomSource.cpp +++ b/example_fbo-sources/src/ScanLineSource/ScanlineSource.cpp @@ -1,8 +1,8 @@ -#include "CustomSource.h" +#include "ScanlineSource.h" -void CustomSource::setup(){ +void ScanlineSource::setup(){ // Give our source a decent name - name = "Custom FBO Source"; + name = "Scanline Source"; // Allocate our FBO source, decide how big it should be allocate(500, 500); @@ -19,7 +19,7 @@ void CustomSource::setup(){ } // Don't do any drawing here -void CustomSource::update(){ +void ScanlineSource::update(){ // Move rects for(int i = 0; i < rects.size(); i++){ rects[i].y += rectSpeeds[i]; @@ -31,7 +31,7 @@ void CustomSource::update(){ // No need to take care of fbo.begin() and fbo.end() here. // All within draw() is being rendered into fbo; -void CustomSource::draw(){ +void ScanlineSource::draw(){ // Fill FBO with our rects ofClear(0); //ofBackground(0); @@ -45,4 +45,4 @@ void CustomSource::draw(){ ofRect(rects[i]); } #endif -} \ No newline at end of file +} diff --git a/example_fbo-sources/src/CustomSource.h b/example_fbo-sources/src/ScanLineSource/ScanlineSource.h similarity index 75% rename from example_fbo-sources/src/CustomSource.h rename to example_fbo-sources/src/ScanLineSource/ScanlineSource.h index a473d73..255aead 100644 --- a/example_fbo-sources/src/CustomSource.h +++ b/example_fbo-sources/src/ScanLineSource/ScanlineSource.h @@ -3,7 +3,7 @@ #include "ofMain.h" #include "FboSource.h" -class CustomSource : public ofx::piMapper::FboSource { +class ScanlineSource : public ofx::piMapper::FboSource { public: void setup(); void update(); @@ -11,4 +11,4 @@ class CustomSource : public ofx::piMapper::FboSource { std::vector rects; std::vector rectSpeeds; -}; \ No newline at end of file +}; diff --git a/example_fbo-sources/src/ofApp.h b/example_fbo-sources/src/ofApp.h index d89c8bd..956e3d3 100644 --- a/example_fbo-sources/src/ofApp.h +++ b/example_fbo-sources/src/ofApp.h @@ -2,8 +2,8 @@ #include "ofMain.h" #include "ofxPiMapper.h" -#include "CustomSource.h" #include "VideoSource.h" +#include "ScanlineSource.h" #include "magSlideShowSource.h" class ofApp : public ofBaseApp{ @@ -23,7 +23,7 @@ public: // By using a custom source that is derived from FboSource // you will be able to see the source listed in sources editor - CustomSource customSource; + ScanlineSource customSource; magSlideShowSource slideShowSource; };