If the goal is to query the existing desktop size first, you can pre-set “window-type none”, then import DirectStart as usual, then set base.windowType = ‘onscreen’ and call base.openDefaultWindow() when you’re ready to open the window.
from panda3d.core import loadPrcFileData
w, h = 1024, 768#how do i get the current screen resolution?
loadPrcFileData('', 'win-size %i %i' % (w, h))
import direct.directbase.DirectStart
run()
David:
from panda3d.core import loadPrcFileData
loadPrcFileData('', "window-type none")
import direct.directbase.DirectStart
base.windowType = 'onscreen'
base.openDefaultWindow()#this opens on normal windowed panda window, how do i open as full screen?
run()
To open a fullscreen window, create a WindowProperties structure with the appropriate fullscreen configuration, and pass it as base.openDefaultWindow(props = myProps).