Skip to content

Instantly share code, notes, and snippets.

@peted70
Created June 4, 2018 11:14
Show Gist options
  • Save peted70/0c943c8c59749c65df9ecd778f5247cf to your computer and use it in GitHub Desktop.
Save peted70/0c943c8c59749c65df9ecd778f5247cf to your computer and use it in GitHub Desktop.
future<shared_ptr<GraphNode>> RootPageViewModel::LoadFileAsync()
{
auto fop = ref new FileOpenPicker();
fop->FileTypeFilter->Append(".glb");
fop->FileTypeFilter->Append(".gltf");
auto file = co_await fop->PickSingleFileAsync();
if (file == nullptr)
co_return nullptr;
auto ret = co_await ModelFactory::Instance().CreateFromFileAsync(file->Path);
co_return ret;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment