From 6ae491eea38055ebe3ba1154f0e916d7bbf95040 Mon Sep 17 00:00:00 2001 From: tim Date: Mon, 22 May 2017 21:31:33 +0100 Subject: directory reader in test case --- testDir/src/main.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 testDir/src/main.cpp (limited to 'testDir/src/main.cpp') diff --git a/testDir/src/main.cpp b/testDir/src/main.cpp new file mode 100644 index 0000000..c8c5551 --- /dev/null +++ b/testDir/src/main.cpp @@ -0,0 +1,17 @@ +#include "ofMain.h" +#include "ofApp.h" + +//======================================================================== +int main( ){ + +#ifdef FULLSCREEN + ofSetupOpenGL(256,256,OF_FULLSCREEN); +#else + ofSetupOpenGL(256,256,OF_WINDOW); // <-------- setup the GL context +#endif + // this kicks off the running of my app + // can be OF_WINDOW or OF_FULLSCREEN + // pass in width and height too: + ofRunApp( new ofApp()); + +} -- cgit v1.2.3 From a0e8fefd1bf241b805c4542421bdbc6a4447fdc3 Mon Sep 17 00:00:00 2001 From: tim Date: Tue, 30 May 2017 00:50:56 +0100 Subject: no alpha or movs --- testDir/src/dirscanner.cpp | 47 +++++++++++++++++++++++++++++++++++++--------- testDir/src/dirscanner.h | 4 +++- testDir/src/main.cpp | 4 ++-- testDir/src/ofApp.cpp | 3 +-- 4 files changed, 44 insertions(+), 14 deletions(-) (limited to 'testDir/src/main.cpp') diff --git a/testDir/src/dirscanner.cpp b/testDir/src/dirscanner.cpp index 34dec9b..f3aa974 100644 --- a/testDir/src/dirscanner.cpp +++ b/testDir/src/dirscanner.cpp @@ -1,9 +1,17 @@ #include "dirscanner.h" void playItem::play(){ - + if (video.isLoaded()){ + video.play(); + ofLogNotice() << "playing video: "<0; } void playItem::draw(){ + if (image.isAllocated()){ -} -bool playItem::isFinished(){ + //ofEnableAlphaBlending(); + //ofSetColor(255,255,255,1.0); + image.draw(0,0); + //ofDisableAlphaBlending(); + if (ofGetElapsedTimef()-startTime>5.0){ + isFinished=true; + } + } + if (video.isLoaded()){ + video.draw(0,0); + if (video.getIsMovieDone()){ + isFinished=true; + } + } } void dirScanner::scan(){ @@ -45,7 +66,7 @@ void dirScanner::scan(){ int start = ofToInt(d.substr(0,4)); int end = ofToInt(d.substr(5,4)); - if (start&&end){ + if (end){ slots.push_back(timeSlot(dir.getPath(i),start,end)); ofLogNotice() << "directory "<