XR_ANDROID_enumerate_system_extension_properties
Name String
XR_ANDROID_enumerate_system_extension_properties
Uzantı Türü
Örnek uzantısı
Kayıtlı Uzantı Numarası
725
Düzeltme
1
Onay Durumu
Onaylanmadı
Uzantı ve Sürüm Bağımlılıkları
Son Değiştirilme Tarihi
2026-02-11
IP Durumu
Bilinen IP hak talebi yok.
Katkıda bulunanlar
Spencer Quin, Google
Nihav Jain, Google
Kenny Vercaemer, Google
Genel Bakış
Bu uzantı, uygulamaların mevcut sistem yapılandırması tarafından hangi uzantıların desteklendiğini belirlemesine olanak tanır. Bir uzantı çalışma zamanı tarafından desteklense bile mevcut sistem donanımı tarafından desteklenmiyor olabilir.
XrSystemExtensionPropertiesANDROID yapısı şu şekilde tanımlanır:
typedef struct XrSystemExtensionPropertiesANDROID {
XrStructureType type;
void* next;
XrExtensionProperties properties;
XrBool32 isSupported;
} XrSystemExtensionPropertiesANDROID;
Üye Açıklamaları
type, bu yapının XrStructureType'ıdır.next,NULLveya bir yapı zincirindeki sonraki yapının işaretçisidir.properties, uzantı adını içeren XrExtensionProperties'tir.isSupported, uzantının sistem tarafından şu anda desteklenip desteklenmediğini belirten bir Boole değeridir.
Geçerli Kullanım (Dolaylı)
-
XR_ANDROID_enumerate_system_extension_propertiesuzantısı, XrSystemExtensionPropertiesANDROID kullanılmadan önce etkinleştirilmelidir. -
typeXR_TYPE_SYSTEM_EXTENSION_PROPERTIES_ANDROIDolmalıdır. -
nextmust beNULLor a valid pointer to the next structure in a structure chain
XrEventDataSystemPropertiesChangedANDROID yapısı şu şekilde tanımlanır:
typedef struct XrEventDataSystemPropertiesChangedANDROID {
XrStructureType type;
const void* next;
} XrEventDataSystemPropertiesChangedANDROID;
Üye Açıklamaları
type, bu yapının XrStructureType'ıdır.next,NULLveya bir yapı zincirindeki sonraki yapının işaretçisidir.
Çalışma zamanı, sistem uzantısı özellikleri değiştiğinde bu etkinliği kuyruğa almalıdır. Örneğin, yeni çevre birimleri bağlandığında yeni işlevler etkinleştirilir.
Yeni bir XrEventDataSystemPropertiesChangedANDROID etkinliği sıraya alınana kadar xrEnumerateSystemExtensionPropertiesANDROID'e yapılan tüm çağrılar aynı değerleri döndürmelidir.
Bir uygulama bu etkinliği aldığında, en son sistem uzantısı özelliklerini belirlemek için xrEnumerateSystemExtensionPropertiesANDROID işlevini tekrar çağırması gerekir. Bu işlem, gerektiğinde bu uzantılarla ilişkili izleyicileri oluşturabilir veya yok edebilir.
Geçerli Kullanım (Dolaylı)
-
XR_ANDROID_enumerate_system_extension_propertiesuzantısı, XrEventDataSystemPropertiesChangedANDROID kullanılmadan önce etkinleştirilmelidir. -
typeXR_TYPE_EVENT_DATA_SYSTEM_PROPERTIES_CHANGED_ANDROIDolmalıdır. -
nextmust beNULLor a valid pointer to the next structure in a structure chain
xrEnumerateSystemExtensionPropertiesANDROID işlevi şu şekilde tanımlanır:
XrResult xrEnumerateSystemExtensionPropertiesANDROID(
XrInstance instance,
XrSystemId systemId,
uint32_t propertyCapacityInput,
uint32_t* propertyCountOutput,
XrSystemExtensionPropertiesANDROID* properties);
Parametre Açıklamaları
instance, geçerli bir XrInstance değeridir .systemId, uzantı özelliklerinin alınacağı sistemin geçerli bir sliink:XrSystemId'sidir.propertyCapacityInput,propertiesdizisinin kapasitesidir veya gerekli kapasitenin alınması için istek olduğunu belirtmek üzere 0'dır.propertyCountOutput, istenen uzantı özelliklerinin sayısıdır.properties, XrSystemExtensionPropertiesANDROID yapılarının bir dizisidir.propertyCapacityInput0 ise sonuçNULLolabilir.- Gerekli
propertiesboyutunun alınmasıyla ilgili ayrıntılı açıklama için Arabellek Boyutu Parametreleri bölümüne bakın.
Geçerli Kullanım (Dolaylı)
- xrEnumerateSystemExtensionPropertiesANDROID çağrılmadan önce
XR_ANDROID_enumerate_system_extension_propertiesuzantısı etkinleştirilmelidir. -
instancegeçerli bir XrInstance işleyeni olmalıdır. -
propertyCountOutput,uint32_tdeğerine yönelik bir işaretçi olmalıdır. -
propertyCapacityInput,0değilseproperties,propertyCapacityInputXrSystemExtensionPropertiesANDROID yapılarından oluşan bir dizinin işaretçisi olmalıdır.
Dönüş Kodları
XR_SUCCESS
XR_ERROR_FUNCTION_UNSUPPORTEDXR_ERROR_HANDLE_INVALIDXR_ERROR_INSTANCE_LOSTXR_ERROR_RUNTIME_FAILUREXR_ERROR_SYSTEM_INVALIDXR_ERROR_VALIDATION_FAILURE
Örnek
XrInstance instance; // XrInstance previously created
XrSystemId systemId; // XrSystemId from a previously created instance
PFN_xrEnumerateSystemExtensionPropertiesANDROID xrEnumerateSystemExtensionPropertiesANDROID;
// Poll events for recommended resolution changes.
XrEventDataBuffer event = {XR_TYPE_EVENT_DATA_BUFFER};
XrResult result = xrPollEvent(instance, &event);
if (result == XR_SUCCESS) {
switch (event.type) {
case XR_TYPE_EVENT_DATA_SYSTEM_PROPERTIES_CHANGED_ANDROID:
// It's possible that the system was lost and a new id will be returned
XrSystemId newSystemId;
XrSystemGetInfo getInfo = {XR_TYPE_SYSTEM_GET_INFO};
getInfo.formFactor = XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY;
if(XR_SUCCESS == xrGetSystem(instance, &getInfo, &newSystemId)) {
if(systemId != newSystemId) {
//Do things like recreate the session
systemId = newSystemId;
}
}
// Enumerate the extensions to see which ones are now supported based on hardware changes
uint32_t extensionsCount;
xrEnumerateSystemExtensionPropertiesANDROID(instance, systemId, 0, &extensionsCount, NULL);
std::vector<XrSystemExtensionPropertiesANDROID> properties(extensionsCount,
{.type = XR_TYPE_SYSTEM_EXTENSION_PROPERTIES_ANDROID});
XrResult result = xrEnumerateSystemExtensionPropertiesANDROID(
instance,
systemId,
extensionsCount,
&extensionsCount,
properties.data()
);
// Do something based on which extensions are now supported by the system
break;
}
}
PFN_xrEnumerateSystemExtensionPropertiesANDROID xrEnumerateSystemExtensionPropertiesANDROID;
XrInstance instance;
XrInstanceCreateInfo createInfo = {XR_TYPE_INSTANCE_CREATE_INFO};
// Initialize the createInfo with appropriate values for the application
CHK_XR(xrCreateInstance(&createInfo, &instance));
// Get the systemId for the system.
XrSystemId systemId;
XrSystemGetInfo getInfo = {XR_TYPE_SYSTEM_GET_INFO};
getInfo.formFactor = XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY;
CHK_XR(xrGetSystem(instance, &getInfo, &systemId));
// Enumerate the system extension properties.
uint32_t extensionsCount;
xrEnumerateSystemExtensionPropertiesANDROID(instance, systemId, 0, &extensionsCount, NULL);
std::vector<XrSystemExtensionPropertiesANDROID> properties(extensionsCount,
{.type = XR_TYPE_SYSTEM_EXTENSION_PROPERTIES_ANDROID});
XrResult result = xrEnumerateSystemExtensionPropertiesANDROID(
instance,
systemId,
extensionsCount,
&extensionsCount,
properties.data()
);
Sayılar
Sürüm Geçmişi
1. düzeltme, 17.03.2026 (Kenny Vercaemer)
- Uzantının ilk sürümü.