Archived

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

what should i do when resize or move the window in dx8 windowsmode??

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

in dx6/7, we must restore all device object and init the device again. but in dx8,i didn''t ddo anything when resize the window,but it''s work well.

Share this post


Link to post
Share on other sites
I noticed if I let my D3D 8/9 window be resized it works fine with no reloading/reiniting, but it just stretches the image. Which isn''t what you usually want. I haven''t tried yet but I''m guess you''d have to do some kind of releasing of the device and reaquire it after window is resized. Could be wrong here tho..

Share this post


Link to post
Share on other sites
You want to resize the implict swap chain and the only way to do that is to reset the device.

The viewport is for when you want to render to only part of the back buffer.


[edited by - Donavon Keithley on May 8, 2003 2:33:22 AM]

Share this post


Link to post
Share on other sites
To be more explicit, you should call, with the desired parameters:

DX8Device->Reset(),

and so long as you allocated everything with D3DPOOL_MANAGED it should work. If you allocate with a different pool type you have to explicitly free those resources and re-create them once the Reset() has succeded.

However inspect the return result from DX8Device->Present(), if it is an error you may have to call reset again. However this only tipically happens if someone has Alt-Tabbed out of fullscreen mode and back again.

Or just don''t make the window sizeable!

Share this post


Link to post
Share on other sites