setting full screen doesn't stretch content to screen

I try setting my app to full screen like this:

    WindowProperties props = WindowProperties( ); 
    props.set_size(800, 600);

    window = framework.open_window(props);

And instead of the screen changing to full screen mode at 800x600, I get my monitor’s native resolution in a black screen, and in the center, in a small 800x600 area, I get the game content.

Also the performance decreases significantly.

Just wanted to check if this is a known issue before I start blaming my drivers.

I’m using OpenGL btw, cannot test with DirectX atm. Also, the same happens with any resolution I try. And I can switch to fullscreen in other games so I don’t think it’s the drivers, but it could be.

That’s a new one on me. Panda uses the ChangeDisplaySettings() call to switch your desktop resolution; I guess if that call failed, but everything else worked, you’d get something like what you describe. Are there any error messages in the output?


No errors. There’s no real resolution change at the monitor level (I can tell cause I always get a flicker when that happens). Also interestingly, before panda starts I see for a fraction of a second my windows desktop resized into a 800x600 area.

If you had never experienced it before then forget about it, just wanted to check it wasn’t something silly. I’m using Windows 7 64 bits, could be some driver problem, I’ll try with directx, new opengl drivers, or on another PC other day then get back to you if I isolate it.

I got back to this issue. It also happens with the pview binary found in the official panda 1.6.2 package, so that excludes any problem in my panda build or client code. Furthermore, it happens with DirectX, OpenGL and tinydisplay. Now, there’re tons of reports on the web of users with this problem in Windows 7. I’m pretty sure that reinstalling drivers or waiting for updated drivers will fix it. The thing is that in my case, only Panda is triggering this problem. I’ve tried other directx and opengl games and everything resizes the screen fine, so it’s probably related to something somewhere in all that cruft at panda’s initialization.

mhm, just a whild guess of mine. but my driver (nvidia under linux) allows me to switch between different fullscreen modes on driver level.
this is not uncommon for laptops or anything with integrated display where the native resolution is know. one of the modes is “centered-no rescale”. others are scaled with aspect ratio preserved and fully scaled. using centere unscaled i can produde the very result you’r describing.

dunno how things are with w7 but might be worth to check your driver settings.

As I said, this is related to my drivers probably, but I couldn’t care less about my instance of the problem. I’d like this fixed because it’s a very common problem (google for windows 7 game black border) and all the games and engines I’ve tried handle it gracefully except Panda in my case. Also, the scaling setting is absent from this version of the Windows 7 nvidia drivers for some reason, but as I said, that is irrelevant.

In any case, I’m able to switch to full screen now directly issuing a api call to ChangeDisplaySettings() in my client code. And by switching to full screen I mean “correctly switching to a resolution lower than my native resolution.” I still get the panda windows floating around, obviously.

But for some reason, when panda does the call at winGraphicsWindow, there’s no actual resolution change and I get the black borders.

Panda is using the api call in the same way than me. I compared the values of the structure that I’m sending as param and the one that panda sends and it’s basically the same. Only the following changes:

  • dmLogPixels is 96 in mine, 0 in panda’s. I tried setting it to 96 in Panda and it didnt change anything.
  • My structure size is 188, panda’s is 124, probably irrelevant. Maybe because I dont have LEAN_AND_MEAN? Though I should inherit that from Panda’s… Dunno.
  • dmFormName and dmDeviceName are different pointers, which is to be expected, I guess.

EDIT: For the record, this is fixed on CVS as of 19nov2009.