Tuesday, August 28, 2018

Functions-

In your own words, describe what the following functions do: al_flip_display(), al_init(), al_clear_to_color().
To start off, al_init() is important because it initializes the library so you can access all the code in it. The clear to color function is helpful when you are running a loop, where you are moving an drawing on the scree. It is used hear because the purpose of this function is to clear off the objects previous location on the screen, if you do not put this function on the screen it is going to look like its leaving a trail of that object and will cover the screen with clones of itself. Now the flip display function allows objects the computer to draw to the screen. Anything you draw will show up on the screen and if you do not not have this line of code your screen will be blank.

No comments:

Post a Comment