Skip to main content
GameDev.net gamedev.net
🔒 Locked

Resizing D3D windows

Started by bjmumblingmiles Nov 24, 2003 at 7:58 PM 4 replies 500+ views
Original Post
bjmumblingmiles
bjmumblingmiles
I''m by no means new to DirectX, but I''ve always set up my device in a certain way. The problem is, when I resize my window, my backbuffer does not resize, resulting in ugly resizing, and pixelating. So, how do I resize my backbuffer on the fly? Maybe you just set the backbuffer to the max size?
Brian J
CD579
CD579
Try resizing the window, and then when you get a resize message or event(depends on what language you are using), try reseting the device. Works like a charm. :]

CD

Jesus is Lord!!
Jesus is Lord!!
Namethatnobodyelsetook
Namethatnobodyelsetook
Treat it like a lost device. Change the backbuffer size in the presentation parameters to match the new client rect of your window, and do a Reset(), and all associated invalidate/restore that goes with a Reset.

An alternative is to never use the main swapchain. Draw everything, even your main window (possibly only window) as a swapchain. All you''ll need to do is destroy and create a new swap chain rather than all your non-managed objects.
Namethatnobodyelsetook
Namethatnobodyelsetook
If you Reset, and your VBs are in D3DPOOL_DEFAULT, then yes. If they''re in D3DPOOL_MANAGED, no. Just like a lost device.

If you do the swap chain thing, then no, regardless of the pool.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.