Skip to content

Commit 7780fd8

Browse files
author
James Johnson
committed
Fix for globbing binary glTF files.
1 parent 86c2fb5 commit 7780fd8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Samples/GLTFViewer/src/GLTFViewer.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,13 @@ void GLTFViewer::UpdateModelsList(const std::string& Dir)
257257
#if PLATFORM_WIN32 || PLATFORM_LINUX || PLATFORM_MACOS
258258
if (!Dir.empty())
259259
{
260-
FileSystem::SearchFilesResult SearchRes = FileSystem::SearchRecursive(Dir.c_str(), "*.gltf");
261-
for (const auto& File : SearchRes)
260+
for (const char* pattern : {"*.glb", "*.gltf"})
262261
{
263-
m_Models.push_back(ModelInfo{File.Name, Dir + FileSystem::SlashSymbol + File.Name});
262+
FileSystem::SearchFilesResult SearchRes = FileSystem::SearchRecursive(Dir.c_str(), pattern);
263+
for (const auto& File : SearchRes)
264+
{
265+
m_Models.push_back(ModelInfo{File.Name, Dir + FileSystem::SlashSymbol + File.Name});
266+
}
264267
}
265268
}
266269
#endif

0 commit comments

Comments
 (0)