Advertisement

(SDL) Surface Question

Started by July 18, 2004 12:53 AM
2 comments, last by Sir Sapo 20 years, 4 months ago
Ok guys , I am relatively new to SDL and I have a question I hope someone can answer. If I create a surface and place a bitmap on it , do I have to create a surface for every object in my game, even if it has the same image as the first one I made? What I am trying to say is can I create a surface and blit it multiple times in one rendering loop.
My Current Project Angels 22 (4E5)
Quote: Original post by Sir Sapo
If I create a surface and place a bitmap on it , do I have to create a surface for every object in my game, even if it has the same image as the first one I made?

No.

Quote: What I am trying to say is can I create a surface and blit it multiple times in one rendering loop.

Yes, and that's exactly how it's done.
Advertisement
I'm not entirely sure what your asking. You can think of blitting as simply copying all pixels from the source surface to the destination surface. I hope this provides some help.
Thank you for your answers, I understand now.
My Current Project Angels 22 (4E5)

This topic is closed to new replies.

Advertisement