Fullscreen not fitting content to the screen

This is very frustrating as I am brand new to Panda and I don’t understand why this is happening. :angry:

I’m setting the fullscreen option to “true” in the configuration and setting the resolution to something lower than the highest resolution for my monitor, however, I always make sure that the resolution I pick is a native resolution for my screen.

However, any time I try and do this, the result is just a black screen with a small rectangle the size of the resolution I picked centered in the middle. :frowning:

Do any of you guys have any idea why the screen contents are not stretching outward to the edges when they clearly should? I know that this is not a driver issue or anything like that because it seems to work on any other kind of 3D game I run, so why can’t Panda do this? :confused:

Thank you in advance to anyone with suggestions or tips :slight_smile:

Can you tell us a bit more about the hardware you are running on?
Operating system, laptop or desktop, what type of CPU and graphics card?

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:

Thank you for posting this. It has worked for me on start up.

I am trying to implement dynamic resolution change in my software. Updating the WindowProperties with the new resolution and calling Qres again with the new resolution does not seem to work again.

Any ideas why it works on start up but not later on? Any work around it?


Doing what I posted above, does change the user screen resolution to the new setting, panda also changes but now we are back to having the black borders filling the screen instead of the content stretching to fill the space like on start up.

Any help with this would be greatly appreciated.
Thank you