I have installed 1.6.0 on Windows XP, but cannot get any of the sample files to run successfully.
I have read through the forum for possible solutions. At the prompting of a recent post I have downloaded and installed the Visual C++ 2008 redist. Still no luck.
Here is a dump:
DirectStart: Starting the game.
Known pipe types:
wglGraphicsPipe
(all display modules loaded.)
:display:wgldisplay(error): SetPixelFormat(57) failed after window create
:display(error): Window wouldn’t open; abandoning window.
:ShowBase(warning): Unable to open ‘onscreen’ window.
Traceback (most recent call last):
File “…/samples/Boxing-Robots/Tut-Boxing-Robots.py”, line 7, in
import direct.directbase.DirectStart
File “C:\Panda3D-1.6.0\direct\directbase\DirectStart.py”, line 4, in
ShowBase.ShowBase()
File “C:\Panda3D-1.6.0\direct\showbase\ShowBase.py”, line 229, in init
self.openDefaultWindow(startDirect = False, props=props)
File “C:\Panda3D-1.6.0\direct\showbase\ShowBase.py”, line 726, in openDefaultW
indow
raise StandardError, ‘Could not open window.’
StandardError: Could not open window.
Rightclick the desktop, properties, go to the video settings, and make sure the color depth is 24 bit or 32 bit.
Otherwise, edit your C:\Panda3D-1.6.0\etc\Config.prc file, and change “color-bits” and “depth-bits” into 1 instead of the current (16 I believe).
Checked screen colour depth - its 32 bit
Changed depth-bits and color-bits to 1 in Config.prc
When I use the sample shortcuts a command window comes up with “DirectStart: starting the game”, then some more text, then a second blank, black window. Then both windows close. I am sure there is more error feedback in the command window, but it closes before I can read it or copy it out.
Is there a way of stopping the command window from closing so I can see what is going on?
BTW the same thing happens when I run pview.exe (which I saw on the forums is a way of testing your setup). The message in the command window is different, but again both windows close before I can learn anything meningful.
As ThomasEgi suggested, I will post in this thread to gather all the related problems together.
Besides, I double checked the config.prc and that part is like that:
# Uncomment one of the following lines to choose whether you should
# run using OpenGL or DirectX rendering.
load-display pandadx9
#load-display pandagl
# These control the placement and size of the default rendering window.
So, if panda is still using opengl it’s not because I’m not telling it in the config.prc to use directx.
Well, if you’re loading OpenGL, it either means (a) you didn’t edit the right Config.prc file, or (b) Panda did attempt to load dx9, but failed, and then tried OpenGL before giving up completely.
If you reached case (b), you’ll see messages in the output about Panda attempting to create a window in DirectX9 before trying OpenGL.
To test case (a), try this:
python
>>> from pandac.PandaModules import *
>>> print ConfigPageManager.getGlobalPtr()
This will list all of the Config.prc files you have loaded. Make sure the one you are editing is on the top of the list (or the only file on the list).
David, I tried your code and the result is I was still calling opengl, the reason: I made a backup called ‘copy of config.prc’ and panda loads it before the real one like it was a valid config file. It’s a bit weird but I cannot complain since this behaviour results to be documented, so my bad.
Now it demands d3dx9_29.dll, and the problem points now in a different direction. I’ll have a look at the posts about that.
I was having the same problems and I couldn’t get Panda to not use OpenGL, I couldn’t simply comment out the line with a #. I ended up deleted the line load-display pandagl. Is there some way to comment the lines out instead?
Also, mildly related, my config.prc file wasn’t formated, opening it in word pad I had three very long lines and I had to figure out where the newlines should have been. I’m pretty sure I got it figured out but it was annoying.