Add ArKit HighRes capture
This commit is contained in:
@@ -81,7 +81,24 @@ namespace openVulkanoCpp::AR::ArKit
|
||||
|
||||
void ArSessionArKitInternal::RequestHighResolutionFrame()
|
||||
{
|
||||
Logger::AR->error("Failed to perform high resolution still frame capture: not supported on this platform!");
|
||||
if (@available(iOS 16.0, *)) {
|
||||
[m_arSession captureHighResolutionFrameWithCompletion:^(ARFrame * _Nullable frame, NSError * _Nullable error) {
|
||||
if (frame)
|
||||
{
|
||||
std::shared_ptr<ArFrame> arFrame = std::make_shared<ArFrameArKit>(frame, shared_from_this());
|
||||
arFrame->MarkHighRes();
|
||||
OnNewFrameHighResolution(arFrame);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger::AR->warn("Failed to perform high resolution still frame capture: {}", [[error description] UTF8String]);
|
||||
}
|
||||
}];
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger::AR->warn("Failed to perform high resolution still frame capture: requires iOS 16 or later!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user