🎉 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
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement