Jump to content
  • Advertisement
Sign in to follow this  
all_names_taken

Surface lost question not covered by the tutorial

This topic is 4646 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

First of all very good tutorial: http://www.gamedev.net/reference/articles/article608.asp ...but I don't really understand the mechanics behind lost surfaces and how I'll fix the problem in practise. I understand the part of setting a bool flag when the app is inactivated/activated. I also understand that surfaces in the video memory can be overwritten when GDI gains control. But when I restore a surface, what is it I actually have to do? Is there a copy of the surface contents in the system memory that I need to copy to VRAM? If so, can that be done by an existing function in Direct Draw? Or do I actually have to reload the information from the bitmap file on my hard drive (in which case it's probably good to have some struct/class to encapsulate surface and filename of the file for better code structure)?

Share this post


Link to post
Share on other sites
Advertisement
looks like I finally found the answer - bitmap has to be manually reloaded from the file. Maybe that should be added to the tutorial? Or maybe the tutorial is too old so nobody except me cares anyway :/. I've seen many wanting to switch to D3D for rendering in 2D - is there any advantage using Direct3D9 if you're only going to render 2D anyway?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!