🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

(SDL) Surface Question

Started by
2 comments, last by Sir Sapo 19 years, 11 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)
Advertisement
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.
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