greetings y’all, i’m new to Panda3D and Python in general, so i’ve been experimenting with the two, but now i have 3 things i want to figure out:
-
how can i get panda to use the native resolution when switching to fullscreen? i’ve found some threads but i think they used a function that doesn’t work on Windows
-
how can i toggle fullscreen during runtime?
from direct.showbase.ShowBase import ShowBase as Panda
from panda3d.core import loadPrcFile, WindowProperties
loadPrcFile('config.prc')
engine = Panda()
is_fullscreen = False
properties = WindowProperties()
def set_fullscreen():
global is_fullscreen
global properties
is_fullscreen = not is_fullscreen
if is_fullscreen:
properties.setFullscreen(1)
print("Fullscreen")
if not is_fullscreen:
properties.setFullscreen(0)
print("Not fullscreen")
engine.accept("alt-enter", set_fullscreen)
engine.run()
^^ i’ve tried using this but doesn’t seem to work
- is it possible to get fullscreen to render at the desired window size but upscaled to the native resolution?
any help would be appreciated!