is EXT_meshopt_compression supported?
tigrazone opened this issue · comments
I try to open with examples/gl_viewer file https://github.com/gkjohnson/3d-demo-data/tree/main/models/interior-scene/scene.gltf and viewer failed with error code
Failed to parse glTF: 2
Failed to parse glTF
I searched for this error in source code and understand it is an Error::MissingExtensions(2).
I find in src/fastgltf.cpp
line
SET_ERROR_RETURN_ERROR(Error::MissingExtensions)
and before it added
printf("extension: %s\n", std::string(extensionString).c_str());
and now error message is
Loading c:\msys64\home\user\from-git\3d-demo-data\models\interior-scene\scene.gltf
extension: EXT_meshopt_compression
Failed to parse glTF: 2
Failed to parse glTF
i.e EXT_meshopt_compression not supported?
Maybe I need to set some config flags?
Please read the README thoroughly. Yes, the extension is fully supported by the fastgltf parser. For using extensions, please look at this constructor of the Parser object:
fastgltf/src/fastgltf_parser.hpp
Line 405 in 41f1793
You can OR together all Extensions you want to load to indicate that you do support them. If not, fastgltf assumes you don't support the Extensions and fails with the error code 2 (MissingExtensions):
fastgltf/src/fastgltf_parser.hpp
Lines 66 to 68 in 41f1793
And as the gl_viewer doesn't list those extensions in the constructor, it does not support it. I simply didn't want to make the example any more complex than it needs to be by adding another library. The gl_viewer is meant to show a very basic example of how to use most of the features fastgltf provides.