Closed dar-dev closed 1 year ago
Good catch, it was a regression introduced in https://github.com/mgsx-dev/gdx-gltf/commit/df61161368beef8e36ba4590b788e2e968e5b6a3 It should be OK now
That's good. Now, how can I avoid the pixmap loading when loading glTF textures? (are pixmaps needed?)
--
Yes, that was the purpose of the change : sometimes you want to get texture pixels. And they were disposed at the wrong time. If you don't want to keep them, you could dispose them after SceneAsset loading (by disposing them and nullify the array)
no, you need to decode PNG/JPG into Pixmap prior to upload pixels to GPU.
Pixmaps are never released after loading glTF images, see: https://github.com/mgsx-dev/gdx-gltf/blob/00dc40ea58b99e4aefb01644c595916e0a512cee/gltf/src/net/mgsx/gltf/loaders/shared/GLTFLoaderBase.java#L145
Here's a simple test code to replicate: