Jump to content
  • Advertisement
Sign in to follow this  
Headkaze

Switching modes and drawing trails

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

Can someone please show a basic template for dealing with switching between fullscreen and windowed mode in MDX1/C#/DirectX 9. Also I'm using Tom Miller's famous render loop (http://blogs.msdn.com/tmiller/archive/2005/05/05/415008.aspx) but when I move the window around it leaves behind what has been drawn. I can also seem to access windows "through" it; the graphics of the windows behind it flicker through and I can even click on buttons from applications behind my DX application. Any ideas what might be causing this?

Share this post


Link to post
Share on other sites
Advertisement
Have you tried resetting the device with the adjusted presentparemeters when the window has been resized? Moving should typically not require a reset, but if this problem occurs while moving after you switched back from fullscreen, something might be wrong with the viewport... Either way, manually calling Reset on the device would be worth a shot.

Share this post


Link to post
Share on other sites
For handling the movement issue, you should be able to call your Draw call from the Moving event on the forum. The event should fire enough to allow you to keep the window partially up to date, and not looking horrible.

Hope this helps.

Share this post


Link to post
Share on other sites
Thanks guys, I have the windowed/fullscreen switching working now.

I'm still having problems when in windowed mode that the rendered graphics are left when the window is moved. And that anything underneath the window can be accessed with the mouse like the window is not even there.

I'm not quite sure what you mean by "you should be able to call your Draw call from the Moving event on the forum" sirob. I have tried the following but no change:

private void MainForm_Move(object sender, EventArgs e)
{
this.Invalidate();
this.Refresh();
}

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!