1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 17:29:55 +00:00

Fix SSE mesh loading

This commit is contained in:
Alexei Kotov 2023-09-27 18:41:06 +03:00
parent b4f81fb4fa
commit b9d42946be

View file

@ -393,8 +393,6 @@ namespace Nif
mShaderProperty.read(nif); mShaderProperty.read(nif);
mAlphaProperty.read(nif); mAlphaProperty.read(nif);
mVertDesc.read(nif); mVertDesc.read(nif);
if (nif->getBethVersion() == NIFFile::BethVersion::BETHVER_SSE)
mVertDesc.mFlags |= BSVertexDesc::VertexAttribute::Full_Precision;
if (nif->getBethVersion() >= NIFFile::BethVersion::BETHVER_FO4) if (nif->getBethVersion() >= NIFFile::BethVersion::BETHVER_FO4)
mTriangles.resize(nif->get<uint32_t>() * 3); mTriangles.resize(nif->get<uint32_t>() * 3);
@ -462,6 +460,8 @@ namespace Nif
mLandscapeDataOffset = (data & 0xF00000000) >> 0x20; mLandscapeDataOffset = (data & 0xF00000000) >> 0x20;
mEyeDataOffset = (data & 0xF000000000) >> 0x24; mEyeDataOffset = (data & 0xF000000000) >> 0x24;
mFlags = (data & 0xFFF00000000000) >> 0x2C; mFlags = (data & 0xFFF00000000000) >> 0x2C;
if (nif->getBethVersion() == NIFFile::BethVersion::BETHVER_SSE)
mFlags |= BSVertexDesc::VertexAttribute::Full_Precision;
} }
void BSVertexData::read(NIFStream* nif, uint16_t flags) void BSVertexData::read(NIFStream* nif, uint16_t flags)