Closed luithefirst closed 2 years ago
Note, that we handle DXTC data explicitly with DevIL. We probably need a workaround for that, maybe parse the DDS file format ourselves? Also does it matter that the Aardvark loaders generate a PixImage and thus would require an additional copy?
After reviewing and cleaning up the code it is obvious that DevIL is only used for loading compressed images. For other uncompressed FileTexture
we already use the indirect approach with PixImage.Create
.
There are some direct texture uploads using DevIL, mainly used for
Sg.fileTexture
with direct upload from DevIL -> Texture (not using PixImage).We should change that to use the Aardvark.Tensors default image loader: Loader -> PixImage -> Backend Texture. For me, this looks like the only clean way for such a general feature and would also make the code simpler. This would then use the default loader configured (assuming we implement to allow that) in Aardvark.Tensors.
If an application still wants to use the texture upload with the intermediate copy to PixImage, it could be still implemented on the application side. Alternatively, we provide this in a separate package if this is needed by multiple projects.