Jump to content
  • Advertisement

Archived

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

Qoy

Two questions

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

1) Yes, that's true what you're saying, but you have to change something in your DirectX code. I've got a special renderfunction which starts with the following code.

if (FrontBuffer->IsLost() == DDERR_SURFACELOST)
{
FrontBuffer->Restore();
}

Maybe that's your problem. I also use the WM_ACTIVEAPP stuff, but see what you need and change the appropriate stuff

2) No idea.......

PS. No idea....

------------------
Dance with me......

Share this post


Link to post
Share on other sites
Advertisement
Well question 1's already been answered, Question 2 confuses the hell out of me. But I can say that the new Lamothe book you asked about is probably the best Game Programming book I've ever seen, and I own alot of them. Definately worth the money even if you only use it for the physics, math, and AI info it contains.

Share this post


Link to post
Share on other sites
I had the problem you mentioned (number 2). I tried a lot of things to fix it, and in the end, the only thing that worked was deleting all the old project files and making a new one (you don't need to delete the .cpp and .h files, but pretty much everything else). If there is a more elegant solution, I'd love to hear it.

And I agree with eva. I'd read WGPFD, and I'll admit, much of the info in the new one is redundant and is targeted more at beginners, but there are some nuggets in there (since he goes into much greater depth than in WGPFD), and the later chapters are new material.

CJ covered your first question. What he suggested will fix it.

Share this post


Link to post
Share on other sites
Hey. As a matter of fact, I just discovered the making new project files thing today Thanks for the help though.
So for question number 1, I should put in a handler for WM_ACTIVATEAPP, and in it, check every surface for surface->IsLost(), and if it is, then call surface->Restore()? Then, I gathered from the SDK documentation that I also have to reload all the graphics on all the surfaces. Is this true, or should just restoring them work?

Share this post


Link to post
Share on other sites
Yup, DirectX is only restoring the surfaces that are in your chain, like primary buffer, back buffer, other offscreen buffers, etc. You have to explicitly reload bitmaps into those surfaces. See ya!

Share this post


Link to post
Share on other sites
Hello, I have two questions.
1) I notice that whenever I try to minimize the DirectX programs I make, they crash when I try to restore them again. Is there something I have to do when the window is restored or minimized to avoid this?
2) I just got a new computer, and on my old one, in the VC++ code editor, the feature that shows you the parameters for functions while you are typing worked for all the CRT functions, and the Win32 SDK functions, as well as the functions just in my code. Now, that feature only works for the functions in my code when I'm editing plain Win32 Applications (my games) but it still works for the other functions when I'm editing MFC applications. The old computer had Windows 95, and this one has Windows 98, does that have something to do with it? Is there something I have to do to make this work with functions from the SDK and from the Run time library?
Any help is appreciated!
Jonathan Little

PS: Is this new book, Tricks of the Windows Game Programming Gurus, a good buy if you've already read Windows Game Programming for Dummies, or is it only good for complete beginners? I mean, does it offer anything new or just another tutorial?

------------------
http://qoy.tripod.com

Share this post


Link to post
Share on other sites

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