Hi,
I am trying to have multiple windows, each presenting the same scene from a different perspective. I use
base.graphicsEngine.makeOutput
to create new windows.
The problem is that the new windows being created don’t respond to mouse or Key events. Is there a way to achieve this?
Below is a sample code. Only one of the windows receives the mouse event (try rotating the camera).
import direct.directbase.DirectStart
from pandac.PandaModules import *
#Load the first environment model
environ = loader.loadModel("models/environment")
environ.reparentTo(render)
environ.setScale(0.25,0.25,0.25)
environ.setPos(-8,42,0)
props = WindowProperties.getDefault()
#props.setParentWindow(panel.GetHandle())
if not base.pipe:
base.makeDefaultPipe()
newWindow = base.graphicsEngine.makeOutput(base.pipe, 'name', 0,
FrameBufferProperties.getDefault(),
props,
0,
gsg = base.win.getGsg())
if newWindow is None:
print 'Warning: New Output Could not be created\n'
newCamera = base.makeCamera(win = newWindow, camName = 'newCam')
run()