Quote:
As of now I'm not sure what programming concept I should go ahead.
Do you have some example which I can follow to do the same ?
I explained one concept: double-buffering. It has been used since the beginning of computer graphics, when displaying an image on screen took much less time than creating the image. The creation code uses one buffer to draw a new image, the display code uses another buffer with the previous image for display until the next image is ready. When the creation code is done, it switches buffers so now the display code read from the new buffer, while the creation code can fill the other buffer with the next image, and so on. Double-buffering can be used almost any time there is a speed difference between code that creates something and code that uses whatever that is.