Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

Resetting ofGetElapsedTimeMilles

$
0
0

hi i been trying to make an FBO to fade away in a short amount of time
but i like it to happen continuously thats why im trying to use ofGetElapsedTimeMilles so when it get to a second or more the fbo clears but i like it to happen all the time so is there a way to reset the ofGetElapsedTimeMilles value back to 0 and to started again so it happens continuously to the fbo can someone give a clue how to ?
on the ofApp.h
/////////////////////////////
float startTime;
float endTime;
bool bTimerReached;
/////////////////////////////
ofApp.cpp
setup()
startTime =ofGetElapsedTimeMillis();
endTime =1000;
bTimerReached =false;
update()
float timer = ofGetElapsedTimeMillis() - startTime;
if(timer >= endTime && !bTimerReached) {
bTimerReached = true;
dotFbo.begin();
ofClear(255,255,255);
dotFbo.end();


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>