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

Dynamically changing(loading) images on daily schedule

$
0
0

(copied from my response to your SO post)

You can use https://github.com/bakercp/ofxTime to do some basic time calculations or if you have a icalendar-based schedule you can use https://github.com/bakercp/ofxICalendar which will give you ofEvents for each calendar event. Easier though may be to just use the built-in C++11 time functions (available in openFrameworks 0.9+) http://en.cppreference.com/w/cpp/chrono, http://en.cppreference.com/w/cpp/chrono/duration, etc. Then it's up to you to create some control logic (if statements, etc) to determine what is currently loaded and what should be loaded based on the current time.

If you want to just use built-in oF functions you can get local time responses for:

int ofGetSeconds();
int ofGetMinutes();
int ofGetHours();
int ofGetYear();
int ofGetMonth();
int ofGetDay();
int ofGetWeekday();

Viewing all articles
Browse latest Browse all 40524

Trending Articles



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