| 113 | } |
| 114 | |
| 115 | void Tr2Mesh::InitializeGeometryResource() |
| 116 | { |
| 117 | TriGeometryResPtr lowRes; |
| 118 | TriGeometryResPtr res; |
| 119 | |
| 120 | bool loadingLowRes = false; |
| 121 | |
| 122 | if( !m_meshResPath.empty() && !BePaths->FileExistsLocally( CA2W( m_meshResPath.c_str() ) ) ) |
| 123 | { |
| 124 | auto dot = m_meshResPath.rfind( '.' ); |
| 125 | if( dot != std::string::npos ) |
| 126 | { |
| 127 | auto lowResPath = m_meshResPath.substr( 0, dot ) + "_lowdetail" + m_meshResPath.substr( dot ); |
| 128 | if( BePaths->FileExistsLocally( CA2W( lowResPath.c_str() ) ) ) |
| 129 | { |
| 130 | BeResMan->GetResource( lowResPath.c_str(), m_geomResourceEx.c_str(), lowRes ); |
| 131 | m_loadFence.Put(); |
| 132 | BeResMan->GetResource( m_meshResPath.c_str(), m_geomResourceEx.c_str(), res ); |
| 133 | loadingLowRes = true; |
| 134 | } |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | if( !loadingLowRes ) |
| 139 | { |
| 140 | BeResMan->GetResource( m_meshResPath.c_str(), m_geomResourceEx.c_str(), res ); |
| 141 | m_loadFence.Put(); |
| 142 | } |
| 143 | |
| 144 | SetLowResGeometryRes( lowRes ); |
| 145 | SetGeometryRes( res ); |
| 146 | } |
| 147 | |
| 148 | void Tr2Mesh::InitializeMorphTargets() |
| 149 | { |
nothing calls this directly
no test coverage detected