aardvark-platform / aardvark.rendering

Aardvark.Rendering is a high-performance, dependency-aware rendering engine. It is part of the open-source Aardvark Platform for visual computing, real-time graphics, and visualization.
https://aardvarkians.com/
Other
129 stars 13 forks source link

Remove Aardvark.PixImage.DevIL reference #77

Closed luithefirst closed 2 years ago

luithefirst commented 3 years ago

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.

hyazinthh commented 3 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?

hyazinthh commented 2 years ago

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.