I am able export gltf with Draco compression. But I don't know about reading Draco compressed gltf file.
Does open cascade support import of Draco compressed file ?
gkv311 n Wed, 05/08/2024 - 09:16
Where your doubts come from? Do you experience some issues?
Both reader (RWGltf_CafReader) and writer (RWGltf_CafWriter) support Draco compression extension, in case of OCCT was built with USE_DRACO=ON building option.
in parseGLTF i have written this code up to now for Draco compression
cgltf_result result = cgltf_parse_file(&options, path, &data); //where data is cgltf_data* data
if (requiresExtension(data, "KHR_draco_mesh_compression")) //requiredExtension will check data contain KHR_draco_mesh_compression or not
*error = "file requires Draco mesh compression support";
To read GLTF you need to use RWGltf_CafReader and it will read draco compressed files by default.(if OCCT was build with USE_DRACE=on, on configuration time and can't be udpated in real time)
Wed, 05/08/2024 - 09:16
Where your doubts come from? Do you experience some issues?
Both reader (
RWGltf_CafReader
) and writer (RWGltf_CafWriter
) support Draco compression extension, in case of OCCT was built withUSE_DRACO=ON
building option.Wed, 05/08/2024 - 13:20
How can I read a file that includes 'KHR_draco_mesh_compression'?
I'm new to this, and here's what my current code looks like
std::vector<Mesh> meshes;
std::vector<Animation> animations;
std::string extras;
const char* error = 0;
Standard_CString input_file = aFileName;
cgltf_data* gltfdata = parseGltf(input_file, meshes, animations, extras, &error);
in parseGLTF i have written this code up to now for Draco compression
cgltf_result result = cgltf_parse_file(&options, path, &data); //where data is cgltf_data* data
if (requiresExtension(data, "KHR_draco_mesh_compression")) //requiredExtension will check data contain KHR_draco_mesh_compression or not
*error = "file requires Draco mesh compression support";
Wed, 05/08/2024 - 17:27
Hello, you code is not a OCCT related code.
To read GLTF you need to use RWGltf_CafReader and it will read draco compressed files by default.(if OCCT was build with USE_DRACE=on, on configuration time and can't be udpated in real time)
Best regards, Dmitrii.