我最近安装了panda3d 1.8.1版本,它被称为最新的稳定版本。但是当我输入以下代码时从direct.showbase.showbase导入showbase
class MyApp(ShowBase):
def __init__(self):
ShowBase.__init__(self)
app = MyApp()
app.run()
上述代码生成以下错误消息:
:ShowBase(warning): Unable to open 'onscreen' window.
Traceback (most recent call last):
File "D:delme.py", line 8, in <module>
app = MyApp()
File "D:delme.py", line 6, in __init__
ShowBase.__init__(self)
File "C:Panda3D-1.8.1directshowbaseShowBase.py", line 244, in __init__
self.openDefaultWindow(startDirect = False, props=props)
File "C:Panda3D-1.8.1directshowbaseShowBase.py", line 880, in openDefaultWindow
self.openMainWindow(*args, **kw)
File "C:Panda3D-1.8.1directshowbaseShowBase.py", line 916, in openMainWindow
self.openWindow(*args, **kw)
File "C:Panda3D-1.8.1directshowbaseShowBase.py", line 671, in openWindow
raise StandardError, 'Could not open window.'
StandardError: Could not open window.
有什么想法吗?为什么会发生这种情况,我该如何解决??
我自己解决了这个问题。我编辑了panda3d1.8.1/etc/config.txt
我更改了:加载显示pandadx9到:加载显示p3tinydisplay