diff --git a/panda/src/display/displayRegion.cxx b/panda/src/display/displayRegion.cxx index c8f7626468..4ffa29285c 100644 --- a/panda/src/display/displayRegion.cxx +++ b/panda/src/display/displayRegion.cxx @@ -491,6 +491,12 @@ get_screenshot() { return NULL; } + { + // Make sure that the correct viewport is active. + DisplayRegionPipelineReader dr_reader(this, current_thread); + gsg->prepare_display_region(&dr_reader); + } + PT(Texture) tex = new Texture; RenderBuffer buffer = gsg->get_render_buffer(get_screenshot_buffer_type(), diff --git a/panda/src/glstuff/glGraphicsBuffer_src.cxx b/panda/src/glstuff/glGraphicsBuffer_src.cxx index ad09596f9c..3a73d175c4 100644 --- a/panda/src/glstuff/glGraphicsBuffer_src.cxx +++ b/panda/src/glstuff/glGraphicsBuffer_src.cxx @@ -269,6 +269,9 @@ begin_frame(FrameMode mode, Thread *current_thread) { } } #endif + } else if (mode == FM_refresh) { + // Just bind the FBO. + rebuild_bitplanes(); } _gsg->set_current_properties(&get_fb_properties());