be less aggressive when window is resized or moved

This commit is contained in:
David Rose 2005-08-16 20:56:26 +00:00
parent e099c2312e
commit 9dc875c80d
2 changed files with 21 additions and 14 deletions

View File

@ -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

View File

@ -364,20 +364,24 @@ 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();
bool resize_succeeded = reset_device_resize_window(x_size, y_size);
if (wdxdisplay8_cat.is_debug()) { if (_wcontext._presentation_params.BackBufferWidth != x_size ||
if (!resize_succeeded) { _wcontext._presentation_params.BackBufferHeight != y_size) {
wdxdisplay8_cat.debug() bool resize_succeeded = reset_device_resize_window(x_size, y_size);
<< "windowed_resize to size: (" << x_size << ", " << y_size
<< ") failed due to out-of-memory\n"; if (wdxdisplay8_cat.is_debug()) {
} else { if (!resize_succeeded) {
int x_origin = props.get_x_origin(); wdxdisplay8_cat.debug()
int y_origin = props.get_y_origin(); << "windowed_resize to size: (" << x_size << ", " << y_size
wdxdisplay8_cat.debug() << ") failed due to out-of-memory\n";
<< "windowed_resize to origin: (" << x_origin << ", " } else {
<< y_origin << "), size: (" << x_size int x_origin = props.get_x_origin();
<< ", " << y_size << ")\n"; int y_origin = props.get_y_origin();
wdxdisplay8_cat.debug()
<< "windowed_resize to origin: (" << x_origin << ", "
<< y_origin << "), size: (" << x_size
<< ", " << y_size << ")\n";
}
} }
} }
} }