Trying to write a panda3d file, and want it to run in full screen rather than a window. I have had a look around this forum and the manuals already, but to be honest the answers do not make much sense to me!
I am currently running Panda 1.1.0.
Can someone please give me the code that I need to use (and give me a rough idea of where to put in into the code in order for it to run)
hope there is enough information here to get a response. if not let me know and i will post additonal info and explain more of what i want
Apologies if this has been answered before.
you can set
wp = WindowProperties()
There is a Config Variable for running in fullscreen
from pandac.PandaModules import ConfigVariableBool
from pandac.PandaModules import ConfigVariableInt
from direct.showbase.DirectObject import DirectObject # for event handling
i must be doing something wrong… i’ve copied martins code into my py file, and when i run it my screen does blank (assuming thats the loadscreen working) then i get the following error:
:prc(warning): value queried before default value set for win-width.
:prc(warning): value queried before default value set for win-height.
DirectStart: Starting the game.
Warning: DirectNotify: category 'Interval' already exists
Known pipe types:
(3 aux display modules not yet loaded.)
Traceback (most recent call last):
File "testgame.py", line 20, in ?
AttributeError: class DirectObject has no attribute 'DirectObject'
anyone got any ideas what i am doing wrong?
sorry it was my fault. I’ve corrected the code above. Sorry
Is the code posted by Martin supposed to work under Linux?
When trying it, I still get a window (not even maximized)
I think XServer doesn’t support fullscreen like Windows have it. I don’t know why…
Bigfoot do you know any tricks or issues?
lol nope, sorry
However. Even if the X-Server does not support Fullscreen, OpenGL does. The question is: Does Panda3D have a function to use OpenGL’s Fullscreen abilities?
Anyways. I never tested it till now, but there should be a way (because any of the 3D-Games I play run very well in fullscreen mode.
Any of the devs/coders/… ?
Are you sure OpenGL defines a fullscreen function? I’ve never heard of such a thing; and in general, OpenGL doesn’t define any functions for opening or closing windows of any type. It leaves that to a system-dependent interface layer, such as wgl on Windows or glX on Linux.
While X (and therefore Panda) don’t support fullscreen mode, in the same sense that Windows defines fullscreen mode, you can still open a window that covers your entire desktop. To do this, open a window that’s as big as your desktop, and use the “undecorated” property, which means you don’t want a title bar and stuff.
E.g. in your Config.prc file:
win-size 1280 1024