Cannot get samples to run after installing 1.6.0

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).

Thanks for the quick reply. I will try that when I get home tonight.

No, no luck.

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.

Any help would be appreciated.

Hmm. Do you have the latest video driver for your card installed? What graphics card do you have, does it support 3D acceleration?

Also, try switching to DirectX. In the C:\Panda3D-1.6.0\etc\Config.prc file, find this line:

load-display pandagl

Replace it with this:

load-display pandadx9

(Of course, that requires you to have DirectX 9 installed. You can also try pandadx8 if your card doesn’t support DirectX 9)

Do keep in mind that Panda’s DirectX support is much weaker than it’s OpenGL support.

Yes, run the samples via the command line instead of via the shortcuts.

Will try it.

FYI the alternate renderer settings names are not in the config.pyc file even though the comments say “Uncomment the one you want”.

You’re right - I’ve fixed that for the next release.

DirectX9 did it. Thanks for your help.

I notice a few of the samples don’t run and there is some serious artifacting in the normal mapping sample.

I will have to look at getting OpenGL for my machine…

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

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.

Thanks

That means you need to install DirectX 9.

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.

It’s using UNIX newlines, and you have a text editor that only supports Windows newlines.

You just are using a very poor text editor. Get one that supports UNIX newlines.

Same problem here. Had to switch to DirectX. But all samples were running with pre 1.6.0 versions (on exactly the same computer).

Intel Core 2 2.13 GHz
2 GB RAM
ATI Radeon X1300

€: … were running “with OpenGL” with pre …

I recommend notepad-plus.sourceforge.net/uk/site.htm