Running in full screen


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

ConfigVariableInt("win-width", 1024).setValue(1024)
ConfigVariableInt("win-height", 768).setValue(768)

from direct.showbase.DirectObject import DirectObject   # for event handling
import direct.directbase.DirectStart
import sys

class World(DirectObject):
   def __init__(self):

w= World()


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 "", line 20, in ?
    class World(DirectObject.DirectObject):
AttributeError: class DirectObject has no attribute 'DirectObject'

anyone got any ideas what i am doing wrong?

Which Panda do you have?

The latest version 1.1.0

sorry it was my fault. I’ve corrected the code above. Sorry :frowning:

Super! that worked the second time around - Thanks! :laughing: :slight_smile: :stuck_out_tongue:

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 :slight_smile:
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/… ?

Regards, Bigfoot29

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
undecorated 1