Capture screen with wait screen

I am trying to screen capture a few scenes behind a wait screen. Is that possible?
Currently, the way im doing it is put up the wait screen while its rendering, turn off wait screen to screen capture, and turn back on wait screen for the second render…
is there a smarter way to do it? without turning wait screen on and off?
I have tried to move the display region out of the window but base.win.screenshot could not capture anything outside of the window…

    base.graphicsEngine.renderFrame()
    base.win.saveScreenshot(imgPath)
    myImage = PNMImage()
    myImage.read(Filename(imgPath))
    myImage.expandBorder(-w,-w,-h,h,0,0,0,0))
    myImage.write(imgPath)

was looking at the manual for offscreen capture, and was quite confused with the pipe, buffer, etc… and the graphics engine manual page is empty… https://www.panda3d.org/manual/?title=The_Graphics_Engine
could anyone give me some guidance? thanks!

sorry… amateur programmer here… :sweat_smile:

You could render the scene to an offscreen buffer only, without touching the main window. You can open an offscreen buffer that renders using the same camera with base.openWindow(type='offscreen', makeCamera=False, keepCamera=True), or with lower-level calls such as base.win.makeTextureBuffer(toRam=True) which requires you to explicitly add display regions to it.

Since the new buffer does not need to contain the same regions, you can use the 2D region on the main window to show the wait screen, while not showing it on the new buffer.

1 Like