how would one make a tiny model viewer using Panda3d?

Sure, it’s dynamically loaded.

…excuse my little knowledge.
Im more into interpretive than compiled.

Firstly Ill try to compile the source files in the “Pandatool/src/somethingegg” and “ptloader”. Ill come back if I fail (most likely).

Only after that Ill try to add obj format and others.

Would it be a bad idea to have another dll and have a python function for loading models, which in turn will call either panda’s loadModel or my loadModel (from my dll) depending on the file extension?

I didn’t really figure out how to comiple a single dll (ptloader) without compiling the whole engine.

ptloader depends on almost everything else in Panda, because it brings in the egg loader, which can create visible geometry, collision geometry, particles, and really almost anything that can be created in Panda. This means it needs to link with the entire Panda library.

Same is true of most other applications that load models. Only way to reduce the size of the application is to compile a custom version of Panda that doesn’t even have some of these features like collisions or whatever. But that’s a lot of work.

Perhaps it’s better to ask precisely what it is you would like to achieve?

David

its nothing special, just add another 3d format. i have problems compiling the whole engine, i cant get an answer to what the error are caused from, so i thought if i could compile a single dll, it would make things alot easier. Again im new to C++ and so to compiling code, so i dont really know if thats possible if the dll depends on other components of the engine. I thought the ‘patches’ for the engine are done this way.

No, sorry. Compiling the whole engine is really by far the easiest way to work. Only hardcore elite h4x0rs would try to get away with compiling only part of the engine, and then they risk getting something wrong somewhere.

If you can’t get Panda compiled from start to finish, you’re going to have problems with development anyway. So probably best to figure out what those problems are.

David

Okay.
I might just make a wrapper function which calls either panda’s loadModel or mine depending on the file extension. Sounds like an ugly approach, but at least it works and I get a regular nodepath either way. Didnt think of adding advanced stuff like collision solids, normal and other maps anyway (just geometry, normals, uvs and textures).