What is a Blit in SDL?

前端 未结 4 1364
野趣味
野趣味 2021-02-18 14:29

In the SDL wiki it says

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

However that

4条回答
  •  太阳男子
    2021-02-18 14:55

    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.

提交回复
热议问题