Full screen 2d renders in secondary windows

Hello! I’m using panda3d for making a virtual reality on a neuroscience experiment. To do that, I need to display content in two different monitors at the same time. All works fine. The problem comes when I have to render a fullscreen black frame, to separate different events in the gameplay. For some reason, I cannot cover the full window. I’ve tried

        cardMaker = CardMaker("blackScreen")
        self.blackScreens = []
        camera2dNP = self.setup2DCamera(self.firstWindow)
        blackScreenFirst = NodePath(cardMaker.generate())
        blackScreenFirst.setColor(0, 0, 0, 1)

Where the 2D camera camera2dNP is made as follows, from the window:

    def setup2DCamera(self, window):
        # Create a 2D camera for the window
        lens = OrthographicLens()

        # Set the film size of the lens 
        lens.setFilmSize(1, 1)
        lens.setNearFar(-1000, 1000)        

        camera2d = Camera('camera2d')
        camera2dNP = NodePath(camera2d)

        # Create a display region covering the whole window
        dr = window.makeDisplayRegion()

        return camera2dNP

I’ve also tried experimenting with the size of cardMaker(), like setting cardMaker.setFrame(-2, 2, -2, 2) instead of cardMaker.setFrameFullscreenQuad(), but it still does not work. I attach a picture of how it looks like. As can be seen, the card never covers the whole window, only part of it. On the default window, I can just reparent the card to render2d and it works, but there is no such thing, as far as I could find, in the other two windows.

I’d appreciate if anyone had any idea of how to do it! Thanks,


I think the problem is that you attach the quad to the camera, so it aligns with the camera accordingly. You need to create a node to which you will attach the camera and quad.