OpenXRAPIExtension
Hérite de : RefCounted < Object
Rend l'API OpenXR disponible pour GDExtension.
Description
OpenXRAPIExtension rend OpenXR disponible pour GDExtension. Elle fournit l'API OpenXR à GDExtension à travers la méthode get_instance_proc_addr(), et l'instance OpenXR à travers get_instance().
Elle fournit également des méthodes pour demander l'état de l'initialisation d'OpenXR, et des méthodes d'aide pour faciliter l'utilisation de l'API avec GDExtension.
Tutoriels
Méthodes
Énumérations
enum OpenXRAlphaBlendModeSupport: 🔗
OpenXRAlphaBlendModeSupport OPENXR_ALPHA_BLEND_MODE_SUPPORT_NONE = 0
Signifie que XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND n'est pas supporté du tout.
OpenXRAlphaBlendModeSupport OPENXR_ALPHA_BLEND_MODE_SUPPORT_REAL = 1
Signifie que XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND est vraiment supporté.
OpenXRAlphaBlendModeSupport OPENXR_ALPHA_BLEND_MODE_SUPPORT_EMULATING = 2
Signifie que XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND est émulé.
Descriptions des méthodes
int action_get_handle(action: RID) 🔗
Renvoie le handle OpenXR XrAction correspondant pour le RID d'action donné.
void begin_debug_label_region(label_name: String) 🔗
Begins a new debug label region, this label will be reported in debug messages for any calls following this until end_debug_label_region() is called. Debug labels can be stacked.
Renvoie true si OpenXR est initialisé pour le rendu avec une fenêtre d'affichage XR.
void end_debug_label_region() 🔗
Marks the end of a debug label region. Removes the latest debug label region added by calling begin_debug_label_region().
RID find_action(name: String, action_set: RID) 🔗
Renvoie le RID correspondant à une Action avec un nom correspondant, optionnellement limité à un ensemble d'actions spécifié.
String get_error_string(result: int) 🔗
Renvoie une chaîne d'erreur pour le XrResult donné.
int get_hand_tracker(hand_index: int) 🔗
Renvoie le handle XRHandTrackerEXT correspondant à la valeur d'index de main donnée.
Renvoie la XrInstance créée lors de l'initialisation de l'API OpenXR.
int get_instance_proc_addr(name: String) 🔗
Renvoie le pointeur de fonction de la fonction OpenXR avec le nom spécifié, cast en un entier. Si la fonction avec le nom donné n'existe pas, la méthode renvoie 0.
Note : openxr/util.h contient des macros utilitaires pour l'acquisition de fonctions OpenXR, par ex. GDEXTENSION_INIT_XR_FUNC_V(xrCreateAction).
Renvoie le temps d'affichage prévu pour la prochaine trame.
Renvoie l’espace de jeu, qui est un XrSpace cast en entier.
int get_predicted_display_time() 🔗
Renvoie le temps d'affichage prévu pour la trame actuelle.
Returns a pointer to the render state's XrCompositionLayerProjection struct.
Note: This method should only be called from the rendering thread.
float get_render_state_z_far() 🔗
Returns the far boundary value of the camera frustum.
Note: This is only accessible in the render thread.
float get_render_state_z_near() 🔗
Returns the near boundary value of the camera frustum.
Note: This is only accessible in the render thread.
Renvoie la session OpenXR, qui est un XrSession cast en un entier.
PackedInt64Array get_supported_swapchain_formats() 🔗
Renvoie un tableau des formats de swapchain pris en charge.
String get_swapchain_format_name(swapchain_format: int) 🔗
Renvoie le nom du format de swapchain spécifié.
Returns the id of the system, which is an XrSystemId cast to an integer.
void insert_debug_label(label_name: String) 🔗
Inserts a debug label, this label is reported in any debug message resulting from the OpenXR calls that follows, until any of begin_debug_label_region(), end_debug_label_region(), or insert_debug_label() is called.
OpenXRAlphaBlendModeSupport is_environment_blend_mode_alpha_supported() 🔗
Returns OpenXRAlphaBlendModeSupport denoting if XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND is really supported, emulated or not supported at all.
Renvoie true si OpenXR est initialisé.
Renvoie true si OpenXR est en cours d'exécution (xrBeginSession a été appelée avec succès et les swapchains ont été créées).
bool openxr_is_enabled(check_run_in_editor: bool) static 🔗
Renvoie true si OpenXR est activé.
void openxr_swapchain_acquire(swapchain: int) 🔗
Acquiert l'image de la swapchain fournie.
int openxr_swapchain_create(create_flags: int, usage_flags: int, swapchain_format: int, width: int, height: int, sample_count: int, array_size: int) 🔗
Renvoie un pointeur vers une nouvelle swapchain créée en utilisant les paramètres fournis.
void openxr_swapchain_free(swapchain: int) 🔗
Détruit la swapchain fournie et la libère de la mémoire.
RID openxr_swapchain_get_image(swapchain: int) 🔗
Renvoie le RID de l'image de la swapchain fournie.
int openxr_swapchain_get_swapchain(swapchain: int) 🔗
Renvoie la handle XrSwapchain de la swapchain fournie.
void openxr_swapchain_release(swapchain: int) 🔗
Libère l'image de la swapchain fournie.
void register_composition_layer_provider(extension: OpenXRExtensionWrapper) 🔗
Registers the given extension as a composition layer provider.
void register_frame_info_extension(extension: OpenXRExtensionWrapper) 🔗
Enregistre l'extension donnée comme modificatrice des infos de trame via les méthodes virtuelles OpenXRExtensionWrapper._set_frame_wait_info_and_get_next_pointer(), OpenXRExtensionWrapper._set_view_locate_info_and_get_next_pointer(), ou OpenXRExtensionWrapper._set_frame_end_info_and_get_next_pointer().
void register_projection_views_extension(extension: OpenXRExtensionWrapper) 🔗
Registers the given extension as a provider of additional data structures to projections views.
void set_custom_play_space(space: const void*) 🔗
Définit l'espace de référence utilisé par OpenXR en le XrSpace donné (cast en un void *).
void set_emulate_environment_blend_mode_alpha_blend(enabled: bool) 🔗
S'il est défini à true, une extension OpenXR est chargée qui est capable d'émuler le mode de mélange XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND.
void set_object_name(object_type: int, object_handle: int, object_name: String) 🔗
Définir le nom d'objet d'un objet OpenXR, utilisé pour la sortie de débogage. object_type doit être un enum XrObjectType OpenXR valide et object_handle doit être un handle d'objet OpenXR valide.
void set_render_region(render_region: Rect2i) 🔗
Sets the render region to render_region, overriding the normal render target's rect.
void set_velocity_depth_texture(render_target: RID) 🔗
Sets the render target of the velocity depth texture.
void set_velocity_target_size(target_size: Vector2i) 🔗
Sets the target size of the velocity and velocity depth textures.
void set_velocity_texture(render_target: RID) 🔗
Sets the render target of the velocity texture.
Transform3D transform_from_pose(pose: const void*) 🔗
Creates a Transform3D from an XrPosef.
void unregister_composition_layer_provider(extension: OpenXRExtensionWrapper) 🔗
Désenregistre l'extension donnée en tant que fournisseur de calque de composition.
void unregister_frame_info_extension(extension: OpenXRExtensionWrapper) 🔗
Désenregistre l'extension donnée en tant que modificatrice d'info de trame.
void unregister_projection_views_extension(extension: OpenXRExtensionWrapper) 🔗
Désenregistre l'extension donnée en tant que fournisseur de structure de données supplémentaire aux vues de projection.
bool xr_result(result: int, format: String, args: Array) 🔗
Returns true if the provided XrResult (cast to an integer) is successful. Otherwise returns false and prints the XrResult converted to a string, with the specified additional information.