Egg model loader doesn't work?

I can’t understand what I am doing wrong. I am following the manual:

Filename mydir = ExecutionEnvironment::get_cwd();
mydir = mydir.get_dirname();
NodePath np1 = window->load_model(framework.get_models(), mydir + "/panda.egg");

Output:

:loader(error): Extension of file /e/Projects/Dev/panda-benchmark-cpp/x64/Release/panda.egg is unrecognized; cannot load.
Currently known scene file types are:
Bam                             .bam

In the working directory, I have a panda.egg model. libpandaegg.dll is also in the working directory.
The working dir is on the model path.

This works with .bam files. Also, .egg loader works in Python code. I am using the latest Windows release from the site.

What am I doing wrong?

Is there an earlier error message about failing to load libpandaegg?

In order for the .egg plug-in to be loaded, you may need to put load-file-type egg pandaegg in Config.prc. You may also need to set plugin-path to the location where the plug-in is located; normally, this should be detected automatically, though.

Solved.

  1. First, I tried to load a non-existing file. This gave me a more informative error message:
    Unable to load libegg.dll: file not found
  2. I’ve renamed libpandaegg.dll to libegg.dll and it worked.
    Is this a bug in the release? Should I create an issue on Github?

Did you accidentally put in load-file-type egg instead of load-file-type egg pandaegg? The former loads a module called ‘libegg.dll’, whereas the latter loads a module called ‘libpandaegg.dll’ to load models that have the extension ‘.egg’.

Yes, thanks for the explanation.