Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
OpenXRAPIExtension
Eredita: RefCounted < Object
Rende disponibile l'API di OpenXR per GDExtension.
Descrizione
OpenXRAPIExtension rende OpenXR disponibile per GDExtension. Fornisce l'API di OpenXR a GDExtension tramite il metodo get_instance_proc_addr() e l'istanza OpenXR tramite get_instance().
Fornisce inoltre metodi per interrogare lo stato di inizializzazione di OpenXR e metodi di supporto per semplificare l'utilizzo dell'API con GDExtension.
Tutorial
Metodi
Enumerazioni
enum OpenXRAlphaBlendModeSupport: 🔗
OpenXRAlphaBlendModeSupport OPENXR_ALPHA_BLEND_MODE_SUPPORT_NONE = 0
Significa che XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND non è affatto supportato.
OpenXRAlphaBlendModeSupport OPENXR_ALPHA_BLEND_MODE_SUPPORT_REAL = 1
Significa che XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND è realmente supportato.
OpenXRAlphaBlendModeSupport OPENXR_ALPHA_BLEND_MODE_SUPPORT_EMULATING = 2
Significa che XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND è emulato.
Descrizioni dei metodi
int action_get_handle(action: RID) 🔗
Restituisce il gestore XrAction OpenXR corrispondente per il RID azione specificato.
void begin_debug_label_region(label_name: String) 🔗
Comincia una nuova regione di etichetta di debug, questa etichetta verrà segnalata nei messaggi di debug per tutte le chiamate successive fino a quando non verrà chiamato end_debug_label_region(). È possibile accumulare le etichette di debug una sopra l'altra.
Restituisce true se OpenXR è inizializzato per il rendering con una viewport XR.
void end_debug_label_region() 🔗
Segna la fine di una regione di etichetta di debug. Rimuove l'ultima regione di etichetta di debug aggiunta tramite begin_debug_label_region().
RID find_action(name: String, action_set: RID) 🔗
Restituisce il RID corrispondente a un'Action di un nome corrispondente, facoltativamente limitato a un insieme di azioni specificato.
String get_error_string(result: int) 🔗
Restituisce una stringa di errore per l'XrResult fornito.
int get_hand_tracker(hand_index: int) 🔗
Restituisce il gestore XRHandTrackerEXT corrispondente per il valore dell'indice di mano specificato.
Restituisce l'XrInstance creato durante l'inizializzazione dell'API OpenXR.
int get_instance_proc_addr(name: String) 🔗
Restituisce il puntatore di funzione della funzione OpenXR con il nome specificato, convertito in un intero. Se la funzione con il nome specificato non esiste, il metodo restituisce 0.
Nota: openxr/util.h contiene macro di utilità per acquisire le funzioni di OpenXR, ad esempio GDEXTENSION_INIT_XR_FUNC_V(xrCreateAction).
Restituisce il tempo di visualizzazione previsto per il prossimo frame.
Returns the version of OpenXR that was initialized. Only valid after the OpenXR instance has been created. See XR_MAKE_VERSION for how the version is calculated.
Restituisce lo spazio di gioco, che è una conversione di XrSpace in un intero.
int get_predicted_display_time() 🔗
Restituisce il tempo di visualizzazione previsto per il frame attuale.
Restituisce un puntatore alla struct XrCompositionLayerProjection dello stato di rendering.
Nota: Questo metodo dovrebbe essere chiamato solo dal thread di rendering.
float get_render_state_z_far() 🔗
Restituisce il valore del limite lontano del tronco della telecamera.
Nota: Questo è accessibile solo nel thread di rendering.
float get_render_state_z_near() 🔗
Restituisce il valore del limite vicino del tronco della telecamera.
Nota: Questo è accessibile solo nel thread di rendering.
Restituisce la sessione OpenXR, che è una conversione di XrSession in un intero.
PackedInt64Array get_supported_swapchain_formats() 🔗
Restituisce un array di formati swapchain supportati.
String get_swapchain_format_name(swapchain_format: int) 🔗
Restituisce il nome del formato swapchain specificato.
Returns the ID of the system, which is an XrSystemId cast to an integer.
int get_view_configuration() const 🔗
Returns the view configuration type, which is an XrViewConfigurationType cast to an integer.
Returns the number of views. It is usually two, one for each eye, but may differ with different view configurations.
void insert_debug_label(label_name: String) 🔗
Inserisce un'etichetta di debug, questa etichetta viene segnalata in qualsiasi messaggio di debug risultante dalle chiamate OpenXR successive, finché non viene chiamato uno dei metodi begin_debug_label_region(), end_debug_label_region() o insert_debug_label().
OpenXRAlphaBlendModeSupport is_environment_blend_mode_alpha_supported() 🔗
Restituisce OpenXRAlphaBlendModeSupport che indica se XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND è realmente supportato, emulato o non supportato affatto.
Restituisce true se OpenXR è inizializzato.
Restituisce true se OpenXR è in esecuzione (xrBeginSession è stato chiamato correttamente e sono state create le swapchain).
bool openxr_is_enabled(check_run_in_editor: bool) static 🔗
Restituisce true se OpenXR è abilitato.
void openxr_swapchain_acquire(swapchain: int) 🔗
Ottiene l'immagine della swapchain specificata.
int openxr_swapchain_create(create_flags: int, usage_flags: int, swapchain_format: int, width: int, height: int, sample_count: int, array_size: int) 🔗
Restituisce un puntatore a una nuova swapchain creata attraverso i parametri forniti.
void openxr_swapchain_free(swapchain: int) 🔗
Distrugge la swapchain fornita e la libera dalla memoria.
RID openxr_swapchain_get_image(swapchain: int) 🔗
Restituisce il RID dell'immagine della swapchain specificata.
int openxr_swapchain_get_swapchain(swapchain: int) 🔗
Restituisce il gestore XrSwapchain della swapchain specificata.
void openxr_swapchain_release(swapchain: int) 🔗
Restituisce l'immagine della swapchain specificata.
void register_composition_layer_provider(extension: OpenXRExtensionWrapper) 🔗
Registers the given extension as a composition layer provider.
Note: This cannot be called after the OpenXR session has started. However, it can be called in OpenXRExtensionWrapper._on_session_created().
void register_frame_info_extension(extension: OpenXRExtensionWrapper) 🔗
Registers the given extension as modifying frame info via the OpenXRExtensionWrapper._set_frame_wait_info_and_get_next_pointer(), OpenXRExtensionWrapper._set_view_locate_info_and_get_next_pointer(), or OpenXRExtensionWrapper._set_frame_end_info_and_get_next_pointer() virtual methods.
Note: This cannot be called after the OpenXR session has started. However, it can be called in OpenXRExtensionWrapper._on_session_created().
void register_projection_layer_extension(extension: OpenXRExtensionWrapper) 🔗
Registers the given extension as modifying XrCompositionLayerProjection via the OpenXRExtensionWrapper._set_projection_layer_and_get_next_pointer() virtual method.
Note: This cannot be called after the OpenXR session has started. However, it can be called in OpenXRExtensionWrapper._on_session_created().
void register_projection_views_extension(extension: OpenXRExtensionWrapper) 🔗
Registers the given extension as a provider of additional data structures to projections views.
Note: This cannot be called after the OpenXR session has started. However, it can be called in OpenXRExtensionWrapper._on_session_created().
void set_custom_play_space(space: const void*) 🔗
Imposta lo spazio di riferimento utilizzato da OpenXR al XrSpace specificato (passato in un void *).
void set_emulate_environment_blend_mode_alpha_blend(enabled: bool) 🔗
Se impostato su true, viene caricata un'estensione OpenXR in grado di emulare la modalità di fusione XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND.
void set_object_name(object_type: int, object_handle: int, object_name: String) 🔗
Imposta il nome di un oggetto OpenXR, utilizzato per l'output di debug. object_type deve essere un enum XrObjectType valido di OpenXR e object_handle deve essere un gestore valido di oggetti OpenXR.
void set_render_region(render_region: Rect2i) 🔗
Imposta la regione di rendering su render_region, sovrascrivendo il rettangolo normale della destinazione di rendering.
void set_velocity_depth_texture(render_target: RID) 🔗
Imposta la destinazione di rendering della texture di profondità della velocità.
void set_velocity_target_size(target_size: Vector2i) 🔗
Imposta le dimensioni di destinazione della texture di velocità e della texture di profondità della velocità.
void set_velocity_texture(render_target: RID) 🔗
Imposta la destinazione di rendering della texture della velocità.
Transform3D transform_from_pose(pose: const void*) 🔗
Crea un Transform3D da un XrPosef.
void unregister_composition_layer_provider(extension: OpenXRExtensionWrapper) 🔗
Unregisters the given extension as a composition layer provider.
Note: This cannot be called while the OpenXR session is still running.
void unregister_frame_info_extension(extension: OpenXRExtensionWrapper) 🔗
Unregisters the given extension as modifying frame info.
Note: This cannot be called while the OpenXR session is still running.
void unregister_projection_layer_extension(extension: OpenXRExtensionWrapper) 🔗
Unregisters the given extension as modifying XrCompositionLayerProjection.
Note: This cannot be called while the OpenXR session is still running.
void unregister_projection_views_extension(extension: OpenXRExtensionWrapper) 🔗
Unregisters the given extension as a provider of additional data structures to projections views.
Note: This cannot be called while the OpenXR session is still running.
void update_main_swapchain_size() 🔗
Request the recommended resolution from the OpenXR runtime and update the main swapchain size if it has changed.
bool xr_result(result: int, format: String, args: Array) 🔗
Restituisce true se l'XrResult fornito (convertito in un intero) ha successo. Altrimenti, restituisce false e stampa l'XrResult convertito in una stringa, con le informazioni aggiuntive specificate.