Add interfaces for getting textures from ar frames
This commit is contained in:
@@ -22,4 +22,20 @@ namespace OpenVulkano::AR
|
||||
else
|
||||
m_session->GetRecorder().Save(shared_from_this());
|
||||
}
|
||||
|
||||
void ArFrame::SaveToFile(const std::filesystem::path& path, bool downsample)
|
||||
{
|
||||
m_session->GetRecorder().SaveToFile(shared_from_this(), path, downsample);
|
||||
}
|
||||
|
||||
const Scene::Texture* ArFrame::GetImageTexture()
|
||||
{
|
||||
if (!m_texture) m_texture = m_session->MakeTexture(this);
|
||||
return m_texture;
|
||||
}
|
||||
|
||||
ArFrame::~ArFrame()
|
||||
{
|
||||
if (m_texture) m_session->ReturnTexture(m_texture);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user