Fullscreen not fitting content to the screen

Oh sorry I didn’t give much information. It was late at night and I was fatigued from trying to fix the problem for hours.

I’m actually really stoked right now, because very late last night I found a way to fix the problem, and I want this reply to try and be of assistance to anyone who has the same problem.

There was a previous post with this same problem by another user, however, as far as I’m concerened, it was never closed and not solved (although the poster himself may have figured it out)
[url]setting full screen doesn't stretch content to screen]

So anyway, apparently this is a fairly common problem with many users, and I hope that this helps out.

This seems to occur on systems with Windows 7 installed particularly. I myself have a laptop running Windows 7 and an ATI Radeon (fairly good) multi-card installed.

So to re-elaborate, you can set fullscreen mode through whatever mode you like, whether it’s directly from configuration or even from real-time fullscreen switching, there seems to be no way to get the content in the graphics window to stretch to fit in fullscreen mode to fit the screen, leaving large black borders with a ridiculous little graphics square centered in the middle.

Take note for users that this is not a driver issue like many other posters have been concerned about. I attempted to change the settings myself in ATI Catalyst, and all that happened has the settings were normal, but as soon as Panda3D started, the settings automatically set to “Centered and no-scale”. You cannot change this without leaving the Panda window, resulting in the changes being set back to the default and largest resolution!

The way to fix this is to systematically use Python to “force” Panda3D to change to a lower resolution and stay there. For Windows users (who seem to be the only ones with the problem) will want to install a program known as QRes.exe (easy to get via google search). This simple program will need to be moved to the directory that you are running your game in.

Once this is done, use the os module to run QRes.exe on the start of the Panda window.

After initializing Panda3D and DirectStart (when the window comes up), add a line of code with the following:

os.system("qres /x:800 /y:600")

…with the 800 and 600 being your chosen resolution. NOTE: this resolution should be an available resolution for the system. I do not know what happens if you just choose any ol’ resolution. Also, make sure that your Panda configuration is starting the window in fullscreen and in the same defined resolution that the command used, or else the whole purpose will be defeated.

You’ll just want to use the same command to set the window back after the program is done as well.

I am very happy that I was able to figure out something to solve this, and I really hope it comes in handy for anyone else running in Windows 7 and Panda3D. I’m really excited to see what else this engine can do now that I know it can handle this.

Thank you guys :slight_smile: