Skip to content

Use an attribute for the current spec version - #2739

Merged
lexaknyazev merged 1 commit into
KhronosGroup:mainfrom
lexaknyazev:version-attr
Dec 2, 2026
Merged

lexaknyazev merged 1 commit into
KhronosGroup:mainfrom
lexaknyazev:version-attr

Conversation

@lexaknyazev

Copy link
Copy Markdown
Member

This change ensures consistency of all references to the current specification version.

@lexaknyazev lexaknyazev added this to the 2.0.x milestone Dec 1, 2026

@aaronfranke aaronfranke left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, we can do this. It makes the source a bit less readable perhaps, but we generally expect users to read the rendered version.

@lexaknyazev
lexaknyazev merged commit 474c48a into KhronosGroup:main Dec 2, 2026
2 checks passed
@lexaknyazev
lexaknyazev deleted the version-attr branch December 2, 2026 05:12
@lexaknyazev lexaknyazev mentioned this pull request Dec 2, 2026
@javagl

javagl commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

In general, this looks like a reasonable change.

But I was a bit surprised that this was also used in the inlined JSON snippets. And I'd think deeply about whether this is the right thing to do. Usually, these snippets are "2.0" assets. Even when the specification is updated to 2.1, these snippets still are "2.0" assets. They shouldn't automatically receive a version number that is higher than the one they need. The decision of whether a JSON snippet is 2.0 or 2.1 should be done consciously, on a case-by-case basis. (Yes, I know that you'll do that, but ... maybe it would simply be easier to not use that template/attribute in the JSON snippets...?)

@lexaknyazev

Copy link
Copy Markdown
Member Author

They shouldn't automatically receive a version number that is higher than the one they need. The decision of whether a JSON snippet is 2.0 or 2.1 should be done consciously, on a case-by-case basis.

I do think that all examples present in any spec version should use the spec's version as their asset version unless related to backward/forward compatibility topics. That said, most examples do not specify any asset version and that's probably even better.

Out of the three versioned examples present in glTF 2.0, only one needs a version value (because it shows the asset object); other two examples are located before the asset version concept is even introduced.

@javagl

javagl commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

unless related to backward/forward compatibility topics

This is exactly the "case-by-case basis" that I was referring to.

But it sounds like you have a different opinion about what should be the default. I'm strongly convinced that (at least for 2.0-vs-2.1), every asset should always use 2.0, unless it is explicitly using or demonstrating 2.0 features. When there is no reason to use a higher version number, then ... it shouldn't be done.

(No urgent need to change anything now - just something to consider when going forward...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants