Removing certain features from the source

Hi there everyone.

Being somewhat new to C++, I was wondering how difficult it might be to remove certain dependencies completely.

I know one is supposed to just strip them away during buildtime, but I’d be rather interested in a smaller custom src repository.

Anyone got any experience in removing features like NVIDIA PhysX or ODE and rendering pipelines like DX8 and DX9 completely?

What would this all entail?

Pass --no-physx --no-ode --no-dx8 --no-dx9 on the makepanda command-line when building Panda3D from source.

Though keep in mind that all of the named modules are implemented as plug-ins that aren’t linked in, so you can also simply delete the libpandaphysx.dll, libpandaode.dll, libpandadx8.dll etc. files. This is not true for everything, but it is for the ones you named.

Thanks.
But I was actually looking for a way to remove them from the source (i. e. before compilation).

I just don’t see why I would want to keep them and commit them to my private repository, if I wasn’t ever going to use them.

I imagine, I’d have to remove all the header lines referring to them and then grep -r for all the files/lines within the source calling those modules. Is that correct?

Oh, okay. Most Panda modules are neatly organised into directories, so in general you can delete directories like panda/src/physx, panda/metalibs/pandaphysx, panda/src/dxgsg9, etc. You may have to delete parts of makepanda/makepanda.py that copy files from those directories.

Yea. Tried that right after my last post (deleting dxgsg8/dxgsg9 and removing the dx9 stuff from makepanda.py).
What a neat way to organize things. I wish every C++ project was as tidy as Panda3D.

To be honest, I was rather looking forward to greping my way through a few thousand files :laughing: