mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 22:50:45 +00:00
Fixed duplication of glTF models
This commit is contained in:
parent
5446ae31e4
commit
ffd18bf9d4
3 changed files with 12 additions and 6 deletions
|
@ -178,7 +178,7 @@ void idRenderModelStatic::List() const
|
|||
totalTris += surf->geometry->numIndexes / 3;
|
||||
totalVerts += surf->geometry->numVerts;
|
||||
}
|
||||
common->Printf( "%c%4ik %3i %4i %4i %s", closed, totalBytes / 1024, NumSurfaces(), totalVerts, totalTris, Name() );
|
||||
common->Printf( "%c%4ik %3i %4i %4i '%s'", closed, totalBytes / 1024, NumSurfaces(), totalVerts, totalTris, Name() );
|
||||
|
||||
if( IsDynamicModel() == DM_CACHED )
|
||||
{
|
||||
|
|
|
@ -345,7 +345,6 @@ idRenderModel* idRenderModelManagerLocal::GetModel( const char* _modelName, bool
|
|||
if( ( extension.Icmp( GLTF_GLB_EXT ) == 0 ) || ( extension.Icmp( GLTF_EXT ) == 0 ) )
|
||||
{
|
||||
model = new( TAG_MODEL ) idRenderModelGLTF;
|
||||
|
||||
}
|
||||
// RB: Collada DAE and Wavefront OBJ
|
||||
else if( ( extension.Icmp( "dae" ) == 0 ) || ( extension.Icmp( "obj" ) == 0 ) // RB: Collada DAE and Wavefront OBJ
|
||||
|
|
|
@ -152,6 +152,7 @@ void idRenderModelGLTF::MakeMD5Mesh( )
|
|||
//If no nodeName/nodeId is given, all primitives active in default scene will be added as surfaces.
|
||||
void idRenderModelGLTF::InitFromFile( const char* fileName )
|
||||
{
|
||||
name = fileName;
|
||||
hasAnimations = false;
|
||||
fileExclusive = false;
|
||||
root = nullptr;
|
||||
|
@ -266,6 +267,7 @@ bool idRenderModelGLTF::LoadBinaryModel( idFile* file, const ID_TIME_T sourceTim
|
|||
#if 1
|
||||
idStr dataFilename;
|
||||
file->ReadString( dataFilename );
|
||||
name = dataFilename;
|
||||
|
||||
if( gltfParser->currentFile.Length( ) )
|
||||
{
|
||||
|
@ -429,18 +431,23 @@ void idRenderModelGLTF::CreateBuffers()
|
|||
|
||||
void idRenderModelGLTF::Print() const
|
||||
{
|
||||
common->Warning( "The method or operation is not implemented." );
|
||||
idRenderModelStatic::Print();
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
void idRenderModelGLTF::List() const
|
||||
{
|
||||
common->Warning( "The method or operation is not implemented." );
|
||||
idRenderModelStatic::List();
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
int idRenderModelGLTF::Memory() const
|
||||
{
|
||||
common->Warning( "The method or operation is not implemented." );
|
||||
return -1;
|
||||
return idRenderModelStatic::Memory();
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
dynamicModel_t idRenderModelGLTF::IsDynamicModel() const
|
||||
|
|
Loading…
Reference in a new issue