mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
fix Tut-Fireflies demo (problem with initially zero-sized buffers)
This commit is contained in:
parent
4820b4a2db
commit
841bfb0743
@ -444,6 +444,7 @@ make_output(GraphicsPipe *pipe,
|
|||||||
} else {
|
} else {
|
||||||
display_cat.info()
|
display_cat.info()
|
||||||
<< window->get_type() << " wouldn't open; abandoning.\n";
|
<< window->get_type() << " wouldn't open; abandoning.\n";
|
||||||
|
cerr << window->get_fb_properties() << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// No good; delete the window and keep trying.
|
// No good; delete the window and keep trying.
|
||||||
|
@ -98,6 +98,12 @@ GraphicsOutput(GraphicsEngine *engine, GraphicsPipe *pipe,
|
|||||||
_y_size = win_prop.get_y_size();
|
_y_size = win_prop.get_y_size();
|
||||||
_is_nonzero_size = (_x_size > 0 && _y_size > 0);
|
_is_nonzero_size = (_x_size > 0 && _y_size > 0);
|
||||||
}
|
}
|
||||||
|
if (_creation_flags & GraphicsPipe::BF_size_track_host) {
|
||||||
|
// If we're tracking the host size, we assume we'll be nonzero
|
||||||
|
// eventually.
|
||||||
|
_is_nonzero_size = true;
|
||||||
|
}
|
||||||
|
|
||||||
_is_valid = false;
|
_is_valid = false;
|
||||||
_flip_ready = false;
|
_flip_ready = false;
|
||||||
_cube_map_index = -1;
|
_cube_map_index = -1;
|
||||||
|
@ -157,7 +157,14 @@ begin_frame(FrameMode mode, Thread *current_thread) {
|
|||||||
_needs_rebuild = true;
|
_needs_rebuild = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (_creation_flags & GraphicsPipe::BF_size_track_host) {
|
||||||
|
if ((_host->get_x_size() != _x_size)||
|
||||||
|
(_host->get_y_size() != _y_size)) {
|
||||||
|
// We also need to rebuild if we need to change size.
|
||||||
|
_needs_rebuild = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
rebuild_bitplanes();
|
rebuild_bitplanes();
|
||||||
|
|
||||||
if (_needs_rebuild) {
|
if (_needs_rebuild) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user