From deb3f12f1b787473e9d42fade418a407b1a636bb Mon Sep 17 00:00:00 2001 From: aignacio_sf <> Date: Thu, 4 Jan 2007 01:47:15 +0000 Subject: [PATCH] Add DirextX/driver managment options. --- panda/src/dxgsg9/config_dxgsg9.cxx | 8 ++++++++ panda/src/dxgsg9/config_dxgsg9.h | 2 ++ panda/src/dxgsg9/wdxGraphicsWindow9.cxx | 7 +++++++ 3 files changed, 17 insertions(+) diff --git a/panda/src/dxgsg9/config_dxgsg9.cxx b/panda/src/dxgsg9/config_dxgsg9.cxx index f90d7f7c64..f58790e51a 100755 --- a/panda/src/dxgsg9/config_dxgsg9.cxx +++ b/panda/src/dxgsg9/config_dxgsg9.cxx @@ -188,6 +188,14 @@ ConfigVariableBool dx_use_multithread ConfigVariableBool dx_use_puredevice ("dx-use-puredevice", false); +// DX device option +ConfigVariableBool dx_disable_driver_management +("dx-disable-driver-management", false); + +// DX device option +ConfigVariableBool dx_disable_driver_management_ex +("dx-disable-driver-management-ex", false); + // nVidia's performace heads up display ConfigVariableBool dx_use_nvperfhud ("dx-use-nvperfhud", false); diff --git a/panda/src/dxgsg9/config_dxgsg9.h b/panda/src/dxgsg9/config_dxgsg9.h index 63b6e6e783..eb80f9b42f 100755 --- a/panda/src/dxgsg9/config_dxgsg9.h +++ b/panda/src/dxgsg9/config_dxgsg9.h @@ -78,6 +78,8 @@ extern ConfigVariableBool dx_use_dynamic_textures; // DX device options extern ConfigVariableBool dx_use_multithread; extern ConfigVariableBool dx_use_puredevice; +extern ConfigVariableBool dx_disable_driver_management; +extern ConfigVariableBool dx_disable_driver_management_ex; // nVidia's performace heads up display extern ConfigVariableBool dx_use_nvperfhud; diff --git a/panda/src/dxgsg9/wdxGraphicsWindow9.cxx b/panda/src/dxgsg9/wdxGraphicsWindow9.cxx index 135cedb1a7..175e2d66a3 100755 --- a/panda/src/dxgsg9/wdxGraphicsWindow9.cxx +++ b/panda/src/dxgsg9/wdxGraphicsWindow9.cxx @@ -688,6 +688,13 @@ create_screen_buffers_and_device(DXScreenData &display, bool force_16bpp_zbuffer dwBehaviorFlags |= D3DCREATE_PUREDEVICE; } + if (dx_disable_driver_management) { + dwBehaviorFlags |= D3DCREATE_DISABLE_DRIVER_MANAGEMENT; + } + if (dx_disable_driver_management_ex) { + dwBehaviorFlags |= D3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX; + } + if (is_fullscreen()) { // CREATE FULLSCREEN BUFFERS