Archived

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

D3D8 - Changing Display Settings

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

When changing things like the display mode, device, z-buffer depth and the like, is it common practice to completely destroy the LPDIRECT3DDEVICE8 interface and create a brand new one, or will altering the PRESENT_PARAMS to reflect the new settings and calling Reset() do the trick?

Share this post


Link to post
Share on other sites
My guess is that its probably the best to destroy the main thingy that you mention. In my program (or my planned program), when a user changes the resolution or such, the program basically shuts down then restarts with the new settings. I noticed that Quake 3 does something very similar, or so it seems.

Share this post


Link to post
Share on other sites
yup, that''s how ta do it.

check out the Common Files'' InvalidateDeviceObjects()
that came with your DX SDK. that''s how they do it.
(it''s also what i''m doing tomorrow in my demo )

g/l

dan

Share this post


Link to post
Share on other sites
Yep you must inalidate all Direct3D related objects including all textures and vertex buffers. The device doesnt have to be destroyed/released if u are only going to change the display mode or color depth (or if the user ALT-TABs and u need to Reset the device).

For more info and source code check out the D3DX8 Sprite article/wrapper at:

Downloads, D3DXSprite tutorial, New platform game: .-= The ZeroOne Realm =-.

Share this post


Link to post
Share on other sites
Yeah I''ve seen how the common framework does it. I''m using d3d-managed resource memory, so Reset doesn''t monkey with my resources.
I like the idea of using Reset since it''s a quick, easy change, and the d3d pointer doesn''t need to be altered. I''m just unsure how well it''ll work when I''m switching z buffer formats and changing from windowed to fullscreen and back.

meh, only one way to find out I guess, test test test!

thanks for the replies.

Share this post


Link to post
Share on other sites