Jump to content
  • Advertisement
Sign in to follow this  
Drunken_Coder

Direct3D window size changing

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

Hey all, I am writing a Direct3D based video renderer. I have an ortho projection set up to render into a window. I want the logical units of the vertex data to match the resolution of the viewing area (simplifies aspect ratio calculations, etc). The renderer does this correctly on initial startup, but once the user resizes the window, it doesn't seem to adjust the logical units, even if I reset the projection matrix and viewport. Did I miss a step? Do I have to reset the device, or change presentation parameters? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Yeah, you have to reset the device once the resize event finishes. If you don't then the backbuffer/swapchain don't change size and they're just stretched to fit the new rendering area...

Watch for WM_EXITSIZEMOVE message iirc.

hth
Jack

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!