mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
Fix issue with taking screenshots from an FBO
This commit is contained in:
parent
8c914a2855
commit
78e4c71202
@ -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(),
|
||||
|
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user