No-graphics Panda

I know; that sounds like “no-sausage-and-beer Oktoberfest,” but bear with me. :wink:

We’d like to be able to switch Panda into an operating mode where it is using basically zero 3D graphics resources after it has had 3D windows open (specifically, it’s acting purely as a network server without a GUI after having shown a GUI to be configured; it should put the GUI away and free all those resources). The reason we want to trim it down is to allow two sessions of Panda to run simultaneously on one computer without halving the framerate on them both. Essentially, we’d like to avoid running the render loop at all; no culling or rendering operations are needed in this mode. But the event queue management is also contained in the event loop, so we can’t simply remove the render task from the task manager.

What steps can we take to minimize Panda’s runtime footprint and force it to free any graphics / visualization related resources it has allocated? The closer we can get to a simple event-and-network pump (with maybe collision calculations still executed), the happier I am!


Have you tried just base.graphicsEngine.removeAllWindows()? You might need to clear first, to avoid it automatically exiting the application as a result of this.


How about telling one Instance of Panda3D to either use an own config.prc or set the command parameter by yourself (dunno where, but when you dig in the forums you will find a function that will allow to set config variables at runtime):

window-type none

in the config.prc removes the whole graphic window (or better said: it doesn’t even start up.

I don’t know what uses less resources… David’s way or this approach.

Regards, Bigfoot29

i been using window-type none for my server, but will try out david’s way and report back.

window-type none is the best way to run a server that should never open a window. But the original poster said he wanted to open a window and then close it and release all its resources.