• Advertisement

Archived

This topic is now archived and is closed to further replies.

Too many surfaces bad?

This topic is 6617 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

  • Advertisement