Używanie bufora sprzętowego podczas renderowania Vulkan
Przykład renderowania aplikacji AR za pomocą Vulkana znajdziesz w artykule vulkan_handler.cc.
Obsługiwane urządzenia
Obsługa renderowania Vulkan jest dostępna tylko na poziomie interfejsu API Androida 27 i wyższym. Dodatkowo urządzenie musi obsługiwać rozszerzenie VK_ANDROID_external_memory_android_hardware_buffer.
Wymagaj Vulkana w pliku manifestu aplikacji
Google Play używa <uses-feature> zadeklarowanego w pliku manifestu aplikacji, aby odfiltrowywać aplikacje na urządzeniach, które nie spełniają wymagań dotyczących sprzętu i oprogramowania.
Urządzenia korzystające z Vulkana 1.0 mogą nie obsługiwać wymaganego rozszerzenia, ale urządzenia zgodne z Vulkanem 1.1 muszą mieć wymagane rozszerzenie, począwszy od Androida 10 (poziom interfejsu API 29).
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-07-14 UTC."],[[["ARCore can provide the camera image as an Android hardware buffer for efficient Vulkan rendering when `TextureUpdateMode.EXPOSE_HARDWARE_BUFFER` is enabled."],["This hardware buffer can be accessed using `Frame.getHardwareBuffer()` and bound to a Vulkan `VkImage` for rendering."],["Vulkan rendering with ARCore requires Android API level 27 or higher and device support for the `VK_ANDROID_external_memory_android_hardware_buffer` extension."],["The `hello_ar_vulkan_c` sample app demonstrates how to implement Vulkan rendering with ARCore."],["To ensure your app is only available on compatible devices, declare the Vulkan feature requirement in your app's manifest."]]],["To utilize hardware buffer output, set `Config.TextureUpdateMode` to `EXPOSE_HARDWARE_BUFFER` during session configuration. This enables ARCore to provide a hardware buffer via `Session.update()`. Retrieve this buffer using `Frame.getHardwareBuffer()`. It can then be bound to a Vulkan `VkImage`. Vulkan rendering is demonstrated in the `hello_ar_vulkan_c` sample app. Support requires Android API level 27+, with the `VK_ANDROID_external_memory_android_hardware_buffer` extension and ensure your manifest declares Vulkan usage.\n"]]