display gl error on multiple window


As you may know if you follow my post, my application display a panda window inside a gtk interface.

that being said, if, when the window open, I’m in fullscreen on a multiple screen desktop ( which mean that only one screen is used for the fullscreen)
I get this error:

:display:windisplay(warning): SetForegroundWindow() failed!
:display:wgldisplay(error): SetPixelFormat(56) failed after window create

the window is not created and the application crash.

the code that create that is

props = WindowProperties().getDefault()
        request = self.parent_window.widget.get_allocation()
        props.setSize(request.width, request.height)
        props.setOrigin(0, 0)

I’m not setting it to fullscreen since it 's the gtk window that is fullscreen, the panda window has a fixed size inside that window.

note that if I create the program not in fullscreen and stich to fullscren after I use this code and there are no error:

        if not self.parent_window: return
        request = self.parent_window.widget.get_allocation()
        props = WindowProperties().getDefault()
        props.setOrigin(0, 0)
        props.setSize(request.width, request.height)

I’ve check the size, it can be the same for working case and non-working case ( depending on the resolution), and the id for the setParentWindow can be the same too.

The bug don’t occurs on pandadx9 only in pandagl.
I’ve got a nvidia 8800gt ( tested with a 6600gt and a 9600gt too)
Confirmed with different nvidia drivers and card and on XP, vista and seven.

  • pandagl
  • multiple screen box
  • fulscreen gtk application
    –> wgldisplay error

I can’t see where that come from outside some strange code in pandagl or the nvidia drivers…

does the SetPixelFormat(56) inspire someone ?

Yep, and if you did a forum search on “SetPixelFormat”, you would turn up this thread, and numerous other threads where people asking a similar question where directed to this thread:


Thank you

at the end, any value before 7 stop the creation of the graphicstategardian ( lots of error)
any value between 8 and 15 provoke a cpp crash/debug with ‘C:\Panda3D-1.6.2\bin\libp3ptloader.dll’
and any value after that provoke the problem described.

It seems that the value 7 work however, I will try that.