This is basically a MR description but this commit covers a lot of things so I'll include it so you don't have to look at the MR:
This allows us to use BC6H and BC7 textures as is, provided the used OSG revision and hardware support them
DDS images are unflipped by default, non-DDS bottom-left convention images are flipped (TGA, BMP, PNG, JPG)
3D DDS images always used top-left convention if they were used in post-processing
Numerous things flipped in this commit to guarantee the same visual results are:
- Terrain UV and blend maps
- Water UV, normal map and simple water ripple alignment
- NiTriShapeData and BSTriShape UV (unflipped), NiUVController vertical offset
- NIF particles are NOT flipped, they remain flipped for Morrowind compatibility
- GUI widget texture UV and convention
- Cursor
- Character preview inventory doll and race menu head UV and display
- Loading screen scene image UV
- Local and global map UVs (fog of war, unexplored and explored maps)
- Saved game screenshot UV
- Video widget UV
- Rain particle alignment
- Sun and moon UV
- Tangent space handedness (bitangent direction)
- Parallax vertical offset
Things where this is a breaking change
- Collada geometry UV (Example Suite and anything else affected must adopt the changes)
- Compressed non-S3TC images that should but can't be flipped (this is KTX which we don't technically support yet)
- Any forward pass shader replacements that currently still use the original tangent space handedness and parallax convention
But do not initialize. If the meta information is invalid and has a big
value, initialization will take significant amount of time but there
might be no actual data in the file because it's too small.
NIFFile might not always be created from a file or stream containing NIF data.
Basically there are 2 different responsibilities for this class:
1. Read NIF file
2. Provide input for nifosg and bulletnifloader.
Remove no longer needed NIFFileMock since the state of NIFFfile can be
initialized independently from reading NIF file.
These functions use NIFFile only as context, they are not really a part of
either reading nor state invariant. And they only confuse reader because it's
not immediatelly obvious that no code is executed after fail.