Rename CustomSource to ScanlineSource

This commit is contained in:
Krisjanis Rijnieks
2018-03-31 00:43:18 +02:00
parent f1ad42d922
commit 232e5f34e1
3 changed files with 10 additions and 10 deletions
@@ -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
}
}
@@ -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<ofRectangle> rects;
std::vector<float> rectSpeeds;
};
};
+2 -2
View File
@@ -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;
};