Closed kring closed 2 months ago
This PR also includes a bug fix to the GetInteger64
metadata functions on non-Windows platforms. None of them were working because on 64-bit clang platforms (definitely Linux, pretty sure about the others):
std::int64_t
is a typedef to signed long int
.int64
is a typedef to signed long long
.Both are 64-bit and seemingly identical. But they're different types, so IsMetadataInteger<int64>
evaluates to false. :upside_down_face:
So this PR makes sure we use int64_t
instead of int64
when instantiating cesium-native's type traits templates.
Thanks @kring !
Fixes #1380
We're seeing
bad_any_cast
exceptions when loading tilesets with metadata, in release builds, on every platform except Windows. The cause appears to be that cesium-native is compiled with runtime type information (RTTI) enabled, but Cesium for Unreal - as required by Unreal Engine itself - is compiled with RTTI disabled. Windows isn't fussed about this, but apparently it causes subtle problems on Linux/Android/Apple.