diff --git a/panda/src/display/graphicsEngine.cxx b/panda/src/display/graphicsEngine.cxx index 4ce18c754c..3ca68c565e 100644 --- a/panda/src/display/graphicsEngine.cxx +++ b/panda/src/display/graphicsEngine.cxx @@ -444,6 +444,7 @@ make_output(GraphicsPipe *pipe, } else { display_cat.info() << window->get_type() << " wouldn't open; abandoning.\n"; + cerr << window->get_fb_properties() << "\n"; } // No good; delete the window and keep trying. diff --git a/panda/src/display/graphicsOutput.cxx b/panda/src/display/graphicsOutput.cxx index b3b8fff90e..17f627e30f 100644 --- a/panda/src/display/graphicsOutput.cxx +++ b/panda/src/display/graphicsOutput.cxx @@ -98,6 +98,12 @@ GraphicsOutput(GraphicsEngine *engine, GraphicsPipe *pipe, _y_size = win_prop.get_y_size(); _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; _flip_ready = false; _cube_map_index = -1; diff --git a/panda/src/glstuff/glGraphicsBuffer_src.cxx b/panda/src/glstuff/glGraphicsBuffer_src.cxx index 4a14b97102..ec523ed4d8 100644 --- a/panda/src/glstuff/glGraphicsBuffer_src.cxx +++ b/panda/src/glstuff/glGraphicsBuffer_src.cxx @@ -157,7 +157,14 @@ begin_frame(FrameMode mode, Thread *current_thread) { _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(); if (_needs_rebuild) {