- fixed asserts while converting gltf meshes primitives

This commit is contained in:
HarrievG 2022-08-16 20:26:37 +02:00
parent 3ea4ac29fe
commit 8b5dc677e3

View file

@ -238,6 +238,9 @@ MapPolygonMesh* MapPolygonMesh::ConvertFromMeshGltf( const gltfMesh_Primitive* p
if( attrAcc->typeSize == 2 )
{
uint16_t vec[4];
assert( sizeof( vec ) == (attrAcc->typeSize * 4) );
for( int i = 0; i < attrAcc->count; i++ )
{
bin.Read( ( void* )( &vec[0] ), attrAcc->typeSize );
@ -260,7 +263,7 @@ MapPolygonMesh* MapPolygonMesh::ConvertFromMeshGltf( const gltfMesh_Primitive* p
uint8_t vec[4];
for( int i = 0; i < attrAcc->count; i++ )
{
assert( sizeof( vec ) == attrAcc->typeSize );
assert( sizeof( vec ) == (attrAcc->typeSize * 4) );
bin.Read( ( void* )( &vec[0] ), attrAcc->typeSize );
bin.Read( ( void* )( &vec[1] ), attrAcc->typeSize );