vsg-dev / vsgXchange

Utility library for converting data+materials to/from VulkanSceneGraph
MIT License
65 stars 39 forks source link

Optional texture embedding #172

Closed appcodegen closed 8 months ago

appcodegen commented 11 months ago

The vsgXchange::assimp ReaderWriter now offers the option of not embedding texture files into the generated vsg native file. This is done by setting the external_textures option to true. Note that this does not work for textures already embedded within the source model!

In addition, by suppling the external_texture_format command line option, it is possible to specify whether the stand-alone texture files should be saved in the vsg-native format (either vsgt or vsga). By dong this there is no need for the integrating application to link against vsgXchange for texture conversion.

This leverages the vsg::External object, see this discussion.

One thing I am unsure about is that currently only the vsg::Image is being loaded from external file, but the associated vsg::Sampler is still embedded within the file and not recalculated if the image is being loaded, which could be problematic if that external file has some properties changed (like the number of included mipmaps..)