javagl / JglTF

Java libraries related to glTF
MIT License
204 stars 57 forks source link

Data is duplicated when reading and writing a GLB #106

Open javagl opened 2 months ago

javagl commented 2 months ago

I just noticed that an operation as trivial as

GltfModelReader r = new GltfModelReader();
GltfModel m = r.read(Paths.get("input.glb"));

GltfModelWriter w = new GltfModelWriter();
w.writeBinary(m, new File("output.glb"));

causes buffer data to be duplicated (and the model becoming twice as large as before).

While preparing the model to be written as binary, it does not take into account that the images already refer to parts of the buffer in the input.

This has to be fixed ASAP.

javagl commented 1 month ago

This should be fixed with https://github.com/javagl/JglTF/pull/108 , but I'll leave it open for now, probably until a new version is released...

Jeongyong-park commented 3 days ago

This should be fixed with #108 , but I'll leave it open for now, probably until a new version is released...

When is the day of next version released?

javagl commented 2 days ago

Well... I don't plan/schedule regular releases. To some extent, it depends on how much of my spare time I (can) spend here.

But there indeed have been quite changes since the last release. (To keep track of that, I actually started a change log recently, and the list for the current 'SNAPSHOT' version at https://github.com/javagl/JglTF/blob/master/CHANGES.md#204-snapshot is already pretty long...).

I'll try to create a new release next week (no promises, but ... should be doable... 🤞 )