I want to take screen shots at save points in the game and display them to a user on top of the game window. The displayed version needs to be scaled down so I can fit multiple screenshots in. I want it to be a visual way for users to see their save points.
So far I know that I can save a screenshot into a PNMImage. Now I just need to display that back onto the screen.
You can retrieve a screenshot of the screen into a PNMImage using GraphicsWindow.getScreenshot. Then, you can load that into a texture using something like this:
img = PNMImage()
if base.win.getScreenshot(img):
tex = Texture()
tex.load(img)
Then you can use any method to display the texture on the screen. OnscreenImage is one possibility: panda3d.org/manual/index.php/OnscreenImage
(You’d just pass ‘tex’ as the ‘image’ parameter.)