D3D8 - Changing Display Settings

Started by
3 comments, last by PyroBoy 22 years, 5 months ago
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?
Advertisement
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.
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
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 =-.

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

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.

This topic is closed to new replies.

Advertisement