How do I remove all other outputs from the rendering pipeline after I created a new one with base.graphicsEngine.make_output
? The same question is about display regions: I’m creating a new display region and want all other display regions to be disposed, so that GPU resoures are not wasted on rendering frames in those regions.
You should call base.graphicsEngine.remove_window(output)
to remove a previous output, or remove_all_windows()
. Despite the name, it applies to offscreen buffers as well as windows.
To remove display regions, you can call GraphicsOutput.remove_display_region(region)
or GraphicsOutput.remove_all_display_regions()
(note that the default display region, created with the output, is never removed).
You could also make a display region inactive to prevent the associated camera from rendering into it:
display_region.active = False
After I call base.graphicsEngine.remove_window(base.win)
I can no longer obtain the rendered frame from the output that I create prior to that call with base.graphicsEngine.make_output
. What could be the problem?
When you call remove_window, I think the buffer is closed altogether. If you want to deactivate it prior to removing it, but allowing you to still access the contents, you can put .set_active(False)
.