mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
dxgsg9: fix problems with window without depth buffer
This commit is contained in:
parent
93a3e7e699
commit
96860b88e0
@ -799,9 +799,9 @@ clear(DrawableRegion *clearable) {
|
||||
main_flags |= D3DCLEAR_TARGET;
|
||||
}
|
||||
|
||||
if (clearable->get_clear_depth_active()) {
|
||||
if (clearable->get_clear_depth_active() &&
|
||||
_screen->_presentation_params.EnableAutoDepthStencil) {
|
||||
aux_flags |= D3DCLEAR_ZBUFFER;
|
||||
nassertv(_screen->_presentation_params.EnableAutoDepthStencil);
|
||||
}
|
||||
|
||||
if (clearable->get_clear_stencil_active()) {
|
||||
|
@ -1229,7 +1229,10 @@ init_resized_window() {
|
||||
DWORD flags;
|
||||
D3DCOLOR clear_color;
|
||||
|
||||
flags = D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER;
|
||||
flags = D3DCLEAR_TARGET;
|
||||
if (_fb_properties.get_depth_bits() > 0) {
|
||||
flags |= D3DCLEAR_ZBUFFER;
|
||||
}
|
||||
clear_color = 0x00000000;
|
||||
hr = _wcontext._d3d_device-> Clear (0, nullptr, flags, clear_color, 0.0f, 0);
|
||||
if (FAILED(hr)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user