mirror of
https://github.com/kr15h/ofxPiMapper.git
synced 2026-06-16 12:31:49 +02:00
Rename CustomSource to ScanlineSource
This commit is contained in:
+6
-6
@@ -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
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -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,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;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user