Closed javagl closed 6 months ago
Note: The current build failures are due to the differences in the "golden" reference files. Comparing the current "golden" output to the new output essentially shows that the PR has the desired effect: There is one fewer warning for a "potentially unused accessor" in the new output. The golden reference files will be updated accordingly when the specific tests are added here.
Fixes https://github.com/CesiumGS/3d-tiles-tools/issues/123
As noted in the issue: When the GLB in a B3DM re-used the same batch ID accessor for multiple primitives, then the conversion into feature IDs did cause duplicated storage of IDs. For example, when the input contained
then the output contained
This PR fixes this by keeping track of the accessors that have already been converted from batch ID into feature ID, and properly disposing of the former batch ID accessors, resulting in this:
There are no tests yet, but the output above has been created with the following snippet, which will be converted into a test soon: