summaryrefslogtreecommitdiff
path: root/06_performance/src/testApp.cpp
diff options
context:
space:
mode:
Diffstat (limited to '06_performance/src/testApp.cpp')
-rw-r--r--06_performance/src/testApp.cpp46
1 files changed, 36 insertions, 10 deletions
diff --git a/06_performance/src/testApp.cpp b/06_performance/src/testApp.cpp
index 4cc47a3..75bb6eb 100644
--- a/06_performance/src/testApp.cpp
+++ b/06_performance/src/testApp.cpp
@@ -172,8 +172,8 @@ void testApp::setup(){
xOffs=startX=yOffs=startY=0;
xModel=0;
yModel=0;
- zModel=-400;
- sModel=1.0f;
+ zModel=-550;
+ sModel=4.0f;
};
@@ -246,7 +246,10 @@ void testApp::update(){
blendImage.setSpeed(F_movieSpeed);
//blendImage.idleMovie();
- for (int i=0;i<videoclips.size();i++) videoclips[i].update();
+ for (int i=0;i<videoclips.size();i++) {
+ videoclips[i].update();
+ if (videoclips[i].getPosition()>0.99f) videoclips[i].stop();
+ }
narrator.update();
@@ -324,10 +327,7 @@ void testApp::draw(){
}
- ofSetColor(255,255,255);
- for (int i=0;i<videoclips.size();i++) {
- if (videoclips[i].isPlaying()) videoclips[i].draw(ofGetWidth()/3,0,ofGetWidth()/3,ofGetHeight());
- }
+
F_xRotation+=(F_xRotate*interval);
F_yRotation+=((F_yRotate+xOffs)*interval);
@@ -416,6 +416,35 @@ void testApp::draw(){
glEnd();
ofPopMatrix();
}
+ camera.end();
+
+ ofPopMatrix();
+
+ for (int i=0;i<videoclips.size();i++) {
+ if (videoclips[i].isPlaying()) {
+ if (videoclips[i].getPosition()<0.1f) {
+ glEnable(GL_BLEND);
+ uint8_t b=uint8_t((videoclips[i].getPosition()/0.1f)*255);
+ ofSetColor(255,255,255,b);
+ }
+ else if (videoclips[i].getPosition()>0.8f) {
+ glEnable(GL_BLEND);
+ uint8_t b=uint8_t((1.0f-((videoclips[i].getPosition()-0.8f)/0.2f))*255);
+ ofSetColor(255,255,255,b);
+ }
+ else ofSetColor(255,255,255);
+ videoclips[i].draw(0,0,renderImage.getWidth()/3,renderImage.getHeight());
+ videoclips[i].draw(renderImage.getWidth()*0.666666667,0,renderImage.getWidth()/3,renderImage.getHeight());
+ glDisable(GL_BLEND);
+ }
+ }
+
+ ofPushMatrix();
+ //ofTranslate(hw,hh);
+ camera.begin();
+ ofRotateX(F_xRotation);
+ ofRotateY(F_yRotation);
+ ofRotateZ(F_zRotation);
ofPushMatrix();
//ofTranslate(0,-100,-1050);
@@ -647,9 +676,6 @@ void testApp::keyPressed (int key){
F_particleZ-=1;
}
- float F_particleX;
- float F_particleY;
- float F_particleZ;
}