VulkanSceneGraph icon indicating copy to clipboard operation
VulkanSceneGraph copied to clipboard

Inconsistent handling of vsga files

Open appcodegen opened this issue 9 months ago • 0 comments

Describe the bug The vsga extension is probably deprecated anyway but right now the VSG ReaderWriter's 'VSG::read' and 'VSG::write' functions do not allow the vsga extension.

Note however that the vsg::read and vsg::write functions use this ReaderWriter as the fallback in case no other ReaderWriter could load the file, and actually regard the vsga extension as valid (but the loading will be aborted because of the VSG ReaderWriter)

Note also the VSG::getFeatures does not list vsga as supported extension

To Reproduce

  1. Load up an object, write it out as a vsga (using the overload expecting vsg::Path)
  2. try to read that object in using vsg::read(vsg::Path)
  3. note that the returned object is invalid (nullptr)

Expected behavior I'd expect the object to be loaded. If vsga is indeed deprecated it would be nice if vsgconv didn't allow to use that extension any longer.

Solution

  • if vsga indeed is no longer supported then I think vsg::read and vsg::write need to have the code hanlding the vsga extension removed (and vsgconv should be changed)
  • if vsga is still supported then the VSG ReaderWriter should be updated.

I could do a PR for this but I'd need to know which direction to take :)

appcodegen avatar Sep 27 '23 11:09 appcodegen