windowless Panda3d?

Hello everyone,

Panda3d beginner here.
I’m trying to write a windowless panda3d program(server side for client/server architecture games)
and the problem is i dont even know how to initialize panda3d without graphic stuff.

I’ve tried google about this, all i found is
load_prc_file_data("", “window-type none”);
but this doesnt work for me.

Currently using:
Panda3d1.9.2
Qt5.7.0
MSVC2015
Windows10SDK

Hope you guys can help. Thanks.

It doesn’t look like a compatibility problem.
Maybe the panda3D development team given up the cpp version already, like i cant even start a panda3d 1.10.0 project, no matter the offical built or mine, it just crash at start-up.
:frowning:

some Panda3D features can be used without graphics rendering.
what you need to do is not to run directstart or showbase.showbase (it’s with python , for CPP it’s different).

panda 1.10 is not stable version yet so it can not be judged that CPP is given up.

Thank you for the reply.

But there’s too few documents for panda3d in CPP. I don’t know how to do works without help.
Like loading models, the function i knew and tried is WindowFramework::load_model(). besides this, I found ‘loader’ class, but I don’t even know how to use it, no documents, no examples.

Oh shit mistakes in my last post, ‘loader’ class is in python, not cpp.

So by now the only one way I found to load models in panda3d cpp is WindowFramework::load_model(), which means I do need to create a panda3d windows?

:frowning: Could somebody help me plz

if you import the “window” class in CPP, do you have to create the window? i don’t use CPP with Panda3D so i don’t know about this.
but, even if you have to create a window, you can create a small window or you can hide the window, and draw nothing in the window. then you can still think: your Panda3D application is windowless.

In panda3d cpp version, almost everything is base on WindowFramework(the “window”), and you know “server” like vps/vds means no gpu stuff, and we dont have too many performance to waste.

But its okay, im considering moving to gameplay3d, which looks more mature.

Yeah, I’m not sure what the problem is. Surely if you don’t need a window, you could just… not create a window? In C++, the window creation is an explicit process. Just don’t call open_window.

Using Panda 1.10 with C++ works fine; the C++ side of Panda is not less mature than the Python side.

I dont even know how to load models without WindowFramework :smiley:

and maybe all the crash occurred due to my strange system environment( my friend was learning panda3d too, and he didnt get any problem like what i said :frowning: )

Loading a model without WindowFramework:

Loader *loader = Loader::get_global_ptr();

// Create a scene graph root, a la 'render'
NodePath root("render");

PT(PandaNode) model = loader->load_sync(Filename("yourfilehere.egg"));
assert(model != nullptr);

NodePath model_path = root.attach_new_node(model);

I thought that loader is only in python version.

is there any decent c++ tutorial for this engine? 8)

Confusingly, there is a C++ Loader class, and a Python Loader that is a higher-level interface over the C++ Loader.
Documentation for Loader:
panda3d.org/reference/1.9.1/cxx/Loader

It’s true that the C++ documentation of Panda3D is rather lacking, though I believe there are third-party tutorials and sample programs out there. For example:
github.com/drivird/drunken-octo-robot

Thanks a lot, I’ll try it later. :smiley:

i tried these codes and they worked good.
but now i got some new questions to ask:

  1. if codes in 「Loading a model without WindowFramework」 work good why added other methods like WindowFramework::load_model() in panda3d, it did make me puzzled and thought that a WindowFramework is needed for loading models.
  2. why not build panda3d as a single library so users dont need to link multi libraries.
  3. will there be an official build for panda3d android?

im too curious, sorry if it makes you sick, and sorry for my bad english too. :smiley:

  1. I think it’s just so that they can make use of the convenience functions on WindowFramework that manipulate models (such as toggle wireframe, etc.)

  2. Because not all users want to use all components of Panda3D. This way they can pick and choose which components they use. Although you’re right that we could probably consolidate a few libraries together. This would make things harder on the Panda3D developers though, because every time they make a change to Panda, they would have to relink the entire library, which would take a long time.

  3. Maybe! There do seem to be some community members interested in contributing to an Android port.