MCPcopy Create free account
hub / github.com/carbonengine/trinity / GenerateLodResourcePaths

Method GenerateLodResourcePaths

trinity/Eve/SpaceObjectFactory/EveSOF.cpp:684–707  ·  view source on GitHub ↗

-------------------------------------------------------------------------------- Description: Helper function to build two med and low level texture res paths --------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

682// Helper function to build two med and low level texture res paths
683// --------------------------------------------------------------------------------
684bool EveSOF::GenerateLodResourcePaths( std::string& mediumResPath, std::string& lowResPath, std::string& ultraResPath, const char* resPath, const char* usage ) const
685{
686 // only dds files will ever have lods
687 if( StringFind( resPath, ".dds" ) )
688 {
689 if( !strcmp( usage, "AlbedoMap" ) ||
690 !strcmp( usage, "DirtMap" ) ||
691 !strcmp( usage, "GlowMap" ) ||
692 !strcmp( usage, "MaterialMap" ) ||
693 !strcmp( usage, "NormalMap" ) ||
694 !strcmp( usage, "AoMap" ) ||
695 !strcmp( usage, "PaintMaskMap" ) ||
696 !strcmp( usage, "RoughnessMap" ) )
697 {
698 ultraResPath = resPath;
699 StringInsertStubBefore( ultraResPath, ".dds", "_ultraDetail" );
700 mediumResPath = resPath;
701 lowResPath = resPath;
702 StringInsertStubBefore( lowResPath, ".dds", "_lowDetail" );
703 return true;
704 }
705 }
706 return false;
707}
708
709// --------------------------------------------------------------------------------
710// Description:

Callers

nothing calls this directly

Calls 2

StringFindFunction · 0.85
StringInsertStubBeforeFunction · 0.85

Tested by

no test coverage detected