| 154 | } |
| 155 | |
| 156 | void EaseGalleryApp::draw() |
| 157 | { |
| 158 | gl::clear( Color( 0.9f, 0.9f, 0.9f ) ); |
| 159 | gl::lineWidth( 4.0f ); |
| 160 | |
| 161 | // time cycles every 1 / TWEEN_SPEED seconds, with a 50% pause at the end |
| 162 | float time = math<float>::clamp( fmod( getElapsedSeconds() * TWEEN_SPEED, 1 ) * 1.5f, 0, 1 ); |
| 163 | for( vector<EaseBox>::iterator easeIt = mEaseBoxes.begin(); easeIt != mEaseBoxes.end(); ++easeIt ) |
| 164 | easeIt->draw( time ); |
| 165 | } |
| 166 | |
| 167 | CINDER_APP( EaseGalleryApp, RendererGl( RendererGl::Options().msaa( 16 ) ) ) |