I looked at this page and its a bit confusing: panda3d.org/manual/index.php … ay_Regions
I still cant get 2 display regions to be one on top of another, but have transparency for the background color.
You just set it to black. If you want transparency, you don’t want clearing, so you need to disable it (set it to False instead of True).
Its weird, I tried that, and all the possible combinations of settings because the manual page is a bit confusing, and I cant get what I want
render1 = render.attachNewNode('render1')
dr1 = base.win.makeDisplayRegion(0,1,0,1)
cam1 = render1.attachNewNode(Camera('cam1'))
cam1.node().getLens().setAspectRatio(float(dr1.getPixelWidth()) / float(dr1.getPixelHeight()))
render2 = render.attachNewNode('render2')
dr2 = base.win.makeDisplayRegion(0,1,0,1)
cam2 = render2.attachNewNode(Camera('cam2'))
cam2.node().getLens().setAspectRatio(float(dr2.getPixelWidth()) / float(dr2.getPixelHeight()))
You’ll probably want the back one to have all clears enabled, and the front one to have depth-clear enabled and colour-clear disabled.
That should make the top display region transparent, showing over the contents of the bottom one.
Oh, i get it now. In my real code I actually had a splitscreen effect with 2 display regions like this (0,0.5,0,1) and (0.5,1,0,1) and I wanted them to render over their boundaries. Well, that was stupid.