Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a Blit in SDL?

Tags:

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?

like image 379
Marks Avatar asked Sep 13 '10 13:09

Marks


People also ask

What does it mean to blit an image?

To "blit" is to copy bits from one part of a computer's graphical memory to another part. This technique deals directly with the pixels of an image, and draws them directly to the screen, which makes it a very fast rendering technique that's often perfect for fast-paced 2D action games.

What is blit surface?

The method . blit() — blit stands for Block Transfer—and it's going to copy the contents of one Surface onto another Surface .

What is an SDL surface?

An SDL surface is just an image data type that contains the pixels of an image along with all data needed to render it. SDL surfaces use software rendering which means it uses the CPU to render. It is possible to render hardware images but it's a bit more difficult so we're going to learn it the easy way first.

What is texture in SDL?

As mentioned in the last lesson, textures are the GPU rendering equivalent of surfaces. Hence, textures are almost always created from surfaces, using the function SDL_CreateTextureFromSurface().


1 Answers

Basically it means copying the image from one surface to another -- possibly cropped and shifted.

like image 101
Radomir Dopieralski Avatar answered Sep 25 '22 19:09

Radomir Dopieralski