From eb08cd9c40a8945c9bea9817d743f15491879fa1 Mon Sep 17 00:00:00 2001 From: Robert Beckebans Date: Mon, 6 Jun 2022 17:19:45 +0200 Subject: [PATCH] Small glTF2 coords change --- neo/renderer/Model_gltf.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/neo/renderer/Model_gltf.cpp b/neo/renderer/Model_gltf.cpp index 1f8554d0..23c40410 100644 --- a/neo/renderer/Model_gltf.cpp +++ b/neo/renderer/Model_gltf.cpp @@ -48,7 +48,7 @@ void MapPolygonMesh::ConvertFromMeshGltf( const gltfMesh* _mesh, gltfData* data for( int i = 0; i < accessor->count; i += 3 ) { MapPolygon& polygon = polygons.Alloc( ); - polygon.SetMaterial( "textures/base_wall/lfwall27d" ); + polygon.SetMaterial( "textures/enpro/enwall16" ); polygon.AddIndex( indices[i + 1] ); polygon.AddIndex( indices[i + 2] ); polygon.AddIndex( indices[i + 0] ); @@ -85,7 +85,16 @@ void MapPolygonMesh::ConvertFromMeshGltf( const gltfMesh* _mesh, gltfData* data bin.Read( ( void* )( &pos.y ), attrAcc->typeSize ); bin.Read( ( void* )( &pos.z ), attrAcc->typeSize ); - verts[i].xyz = pos; +#if 0 + // RB: proper glTF2 convention + verts[i].xyz.x = pos.z; + verts[i].xyz.y = pos.x; + verts[i].xyz.z = pos.y; +#else + verts[i].xyz.x = pos.x; + verts[i].xyz.y = pos.y; + verts[i].xyz.z = pos.z; +#endif if( attrBv->byteStride ) {