As we already know, in each frame before we draw something, we use black color to clear everything that is left there from the previous frame. We use
gl::clear() to do that. To create the effect of moving something, we need to change the object's position in each frame.
To do that, we will need to replace the values of the
drawSolidCircle position parameters to variables. Let's declare a new variable that will hold the position of the circle on the screen:
void prepareSettings( Settings *settings ); Vec2f currentPosition; };
This variable will hold the
y position of the circle that we are drawing inside the
Now we will set the initial value of the variable in the
void BasicAnimationApp::setup() ...