Search code examples
python-2.7panda3d

Panda3d unable to open directx window


I recently installed panda3d version 1.8.1 which was termed as latest stable release.But when I typed the following code from direct.showbase.ShowBase import ShowBase

    class MyApp(ShowBase):

      def __init__(self):
         ShowBase.__init__(self)

    app = MyApp()
    app.run()

The above code generated the following error message :

    :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.1\direct\showbase\ShowBase.py", line 244, in __init__
    self.openDefaultWindow(startDirect = False, props=props)
    File "C:\Panda3D-1.8.1\direct\showbase\ShowBase.py", line 880, in openDefaultWindow
    self.openMainWindow(*args, **kw)
    File "C:\Panda3D-1.8.1\direct\showbase\ShowBase.py", line 916, in openMainWindow
    self.openWindow(*args, **kw)
    File "C:\Panda3D-1.8.1\direct\showbase\ShowBase.py", line 671, in openWindow
    raise StandardError, 'Could not open window.'
StandardError: Could not open window.

Any ideas why is this happening and how do I resolve it??


Solution

  • I solved the problem myself. I edited panda3d1.8.1/etc/config.txt

    I changed : load-display pandadx9 to : load-display p3tinydisplay