Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicting info about PlatformID/RendererID #94

Open
Not-Nik opened this issue Apr 28, 2022 · 2 comments
Open

Conflicting info about PlatformID/RendererID #94

Not-Nik opened this issue Apr 28, 2022 · 2 comments

Comments

@Not-Nik
Copy link

Not-Nik commented Apr 28, 2022

In the info for PlatformID it says "later than 30.1" and for RendererID "until 30.1", but in NiPersistentSrcTextureRendererData PlatformID is marked as until 30.1.0.0 and RendererID as since 30.1.0.1. Neither of those types have a versions attribute, so this is quite confusing.

@hexabits
Copy link
Member

hexabits commented May 1, 2022

I probably swapped the until/later in the docstrings by mistake. The docstrings have no semantic value and only show up in doc gen. Enums in general aren't versioned -- except Bethesda-specific ones, which really only serve as documentation. There isn't much use in versioning an enum aside from stripping types during codegen or xmlgen (rewriting nifxml with pared down versions).

Enums don't have to have matching versions to the fields that use them either, unless the field is available in a version that the enum is not. This would only be a problem for anything actually validating the versioning, which I'm not sure anything publicly pushed does. Enums without the version attribute are always available. We cannot always be sure about when Gamebryo types were introduced or removed, so enums, structs, niobject, etc. only get version attributes when absolutely sure.

The since/until in NiPersistentSrcTextureRendererData are not documentation and are the only versions that matter, and are correct. You can easily tell which enum is newer because one has D3D11 and the other does not.

RendererID is from a Gamebryo namespace that has nothing to do specifically with NiPersistentSrcTextureRendererData so the versions on those fields should not dictate the versions of the enums. Even though it's the only type currently using those enums, that could change, and the other types may use them with different since/until values.

Hope that clarified everything. Tl;dr - The only versions that matter are on the fields, everything else is essentially just documentation/metadata.

@hexabits
Copy link
Member

hexabits commented May 1, 2022

Off-Topic to the issue: Just so this is mentioned somewhere, PlatformID is only a temporary backwards compatibility (BC) enum used in Gamebryo for deserializing older versions, and has nothing to do with efd::SystemDesc::PlatformID which has different enum values entirely. efd::SystemDesc is also where RendererID lies, so I got very confused while formulating the response, wondering where I was getting these names from, since the enum values do not match.

The PlatformID in nifxml is NiPersistentSrcTextureRendererData::PlatformID, the values of which are set in stone, so the UNKNOWN_ values added from my unknown values audit must have come from the enum used before the BC enum (i.e. older Gamebryo versions). So ideally, a third enum should actually be introduced, PlatformID should be renamed to something like NiPersistentSrcTextureRendererData__PlatformID, and the third enum should contain the unknown pre-BC values. Because NiPersistentSrcTextureRendererData::PlatformID does not contain the enum values 6-8 at least in the Gamebryo versions I have looked at.

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

No branches or pull requests

2 participants