🎉 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!

Too many surfaces bad?

Started by
2 comments, last by SikCiv 24 years, 6 months ago
there's no limit that I've seen.

Quaternion (my game) keeps roughly 1000 surfaces (of various sizes) in memory.

But you should be watching the video memory very closely... putting your most commonly used surfaces in vidmem gives you a BIG speedup.

Mason McCuskey
Spin Studios
www.spin-studios.com

Founder, Cuttlefish Industries
The Cuttlefish Engine lets anyone develop great games for iPad, iPhone, Android, WP7, the web, and more!
Advertisement
Coole.

At runtime, can you move a surface from the system memory to the video memory and vise versa without releasing and recreating the surface?

  Downloads:  ZeroOne Realm

I have around six 640x480 surfaces in use in my game, and I will add more when I create more sprites, but I was wandering if there is a limit to how many surfaces you can have at any one time, or does it just depend on how much system memory you have?

  Downloads:  ZeroOne Realm

If your using OFFSCREENPLAIN surfaces then no. You have to create a separate video memory surface and Blt the system memory surface into it. Remember that an offscreen plain surface in video memory _MUST_ have the same pixel format as the primary surface!

If your using your surfaces as Direct3DIM textures then in DX7 you can have the texture manager automatically move them between system memory and video memory depending on which ones have been used most recently. Create the surface with the TEXTURE and TEXTUREMANAGE caps. Note that textures have stricter size restrictions than offscreen plain surfaces.

This topic is closed to new replies.

Advertisement