mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 07:00:58 +00:00
Small glTF2 coords change
This commit is contained in:
parent
24845c7edf
commit
c3098186b5
1 changed files with 11 additions and 2 deletions
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue