Leaders snarfblam Posted September 27, 2003 Leaders Posted September 27, 2003 I am making a program that uses directdraw fullscreen. The screen doesnt redraw every frame, it makes any changes to the screen on the primary surface as they are needed. When the program starts up, it draws the initial screen on the primary surface. Here is the problem: Sometimes, when the image comes back on the screen, the screen is blank, just the backcolor of my target form. I am not sure why this happens. My best guess is that I am drawing it too early. If I am right, and I don't know if I am, then the solution would be to have the program wait until the resolution has changed and all ready for drawing. Here is the question: Does anyone know how, if possible, you can detect when directx is ready for drawing? Quote [sIGPIC]e[/sIGPIC]
wyrd Posted October 22, 2003 Posted October 22, 2003 Note: I know this thread is old, but someone may have a related question in the future. You can check that your owner control is created by testing the Control.Created property. This seems to be common practice among sample code that I've seen. But it sounds like your surface is being lost, which you can check through a try/catch block and catching the SurfaceLostException. When this happens, try to restore the surface and redraw it. Quote Gamer extraordinaire. Programmer wannabe.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.