mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
be less aggressive when window is resized or moved
This commit is contained in:
parent
e099c2312e
commit
9dc875c80d
@ -3060,7 +3060,10 @@ reset_d3d_device(D3DPRESENT_PARAMETERS *presentation_params,
|
|||||||
// Calling this forces all of the textures and vbuffers to be
|
// Calling this forces all of the textures and vbuffers to be
|
||||||
// regenerated. It appears to be necessary on some cards but not
|
// regenerated. It appears to be necessary on some cards but not
|
||||||
// on others.
|
// on others.
|
||||||
release_all();
|
// release_all();
|
||||||
|
// On second thought, let's try releasing the vertex buffers only.
|
||||||
|
release_all_vertex_buffers();
|
||||||
|
release_all_index_buffers();
|
||||||
|
|
||||||
// for windowed mode make sure our format matches the desktop fmt,
|
// for windowed mode make sure our format matches the desktop fmt,
|
||||||
// in case the desktop mode has been changed
|
// in case the desktop mode has been changed
|
||||||
|
@ -364,6 +364,9 @@ handle_reshape() {
|
|||||||
WindowProperties props = get_properties();
|
WindowProperties props = get_properties();
|
||||||
int x_size = props.get_x_size();
|
int x_size = props.get_x_size();
|
||||||
int y_size = props.get_y_size();
|
int y_size = props.get_y_size();
|
||||||
|
|
||||||
|
if (_wcontext._presentation_params.BackBufferWidth != x_size ||
|
||||||
|
_wcontext._presentation_params.BackBufferHeight != y_size) {
|
||||||
bool resize_succeeded = reset_device_resize_window(x_size, y_size);
|
bool resize_succeeded = reset_device_resize_window(x_size, y_size);
|
||||||
|
|
||||||
if (wdxdisplay8_cat.is_debug()) {
|
if (wdxdisplay8_cat.is_debug()) {
|
||||||
@ -381,6 +384,7 @@ handle_reshape() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user