What is a Blit in SDL?

Viewed 20071

In the SDL wiki it says

Use this function to perform a fast blit from the source surface to the destination surface.

However that doesn't help me much.

What does the term surface blitting mean in this context?

4 Answers

It copies memory from one place in memory (source) to another place in memory (destination).

Eg. It can copy the pixels from one bitmap to another, from a bitmap to texture, or any of the above to the screen's surface or the screen's back buffer surface.

Say you have an image/tile that you want to display on the screen. You would perform a "blit" to copy the memory making up the image to the memory that is used on the screen.

It is, essentially, calling a function very much similar to memcpy() which copies the bytes specified as the source one-by-one to the bytes specified as the destination.

Related