Documentation
¶
Overview ¶
Package OpenXRAPIExtension provides methods for working with OpenXRAPIExtension object instances.
Index ¶
- func OpenxrIsEnabled(check_run_in_editor bool) bool
- type Advanced
- type Any
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsOpenXRAPIExtension() Instance
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) CanRender() bool
- func (self Instance) GetErrorString(result int) string
- func (self Instance) GetHandTracker(hand_index int) int
- func (self Instance) GetInstance() int
- func (self Instance) GetInstanceProcAddr(name string) int
- func (self Instance) GetNextFrameTime() int
- func (self Instance) GetPlaySpace() int
- func (self Instance) GetPredictedDisplayTime() int
- func (self Instance) GetSession() int
- func (self Instance) GetSwapchainFormatName(swapchain_format int) string
- func (self Instance) GetSystemId() int
- func (self Instance) IsEnvironmentBlendModeAlphaSupported() gdclass.OpenXRAPIExtensionOpenXRAlphaBlendModeSupport
- func (self Instance) IsInitialized() bool
- func (self Instance) IsRunning() bool
- func (self Instance) RegisterCompositionLayerProvider(extension [1]gdclass.OpenXRExtensionWrapperExtension)
- func (self Instance) SetEmulateEnvironmentBlendModeAlphaBlend(enabled bool)
- func (self Instance) TransformFromPose(pose unsafe.Pointer) Transform3D.BasisOrigin
- func (self Instance) UnregisterCompositionLayerProvider(extension [1]gdclass.OpenXRExtensionWrapperExtension)
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- func (self Instance) XrResult(result int, format string, args []any) bool
- type OpenXRAlphaBlendModeSupport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenxrIsEnabled ¶
Returns [code]true[/code] if OpenXR is enabled.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Instance ¶
type Instance [1]gdclass.OpenXRAPIExtension
[OpenXRAPIExtension] makes OpenXR available for GDExtension. It provides the OpenXR API to GDExtension through the [method get_instance_proc_addr] method, and the OpenXR instance through [method get_instance]. It also provides methods for querying the status of OpenXR initialization, and helper methods for ease of use of the API with GDExtension.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsOpenXRAPIExtension ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) CanRender ¶
Returns [code]true[/code] if OpenXR is initialized for rendering with an XR viewport.
func (Instance) GetErrorString ¶
Returns an error string for the given [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html]XrResult[/url].
func (Instance) GetHandTracker ¶
Returns the corresponding [code]XRHandTrackerEXT[/code] handle for the given hand index value.
func (Instance) GetInstance ¶
Returns the [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrInstance.html]XrInstance[/url] created during the initialization of the OpenXR API.
func (Instance) GetInstanceProcAddr ¶
Returns the function pointer of the OpenXR function with the specified name, cast to an integer. If the function with the given name does not exist, the method returns [code]0[/code]. [b]Note:[/b] [code]openxr/util.h[/code] contains utility macros for acquiring OpenXR functions, e.g. [code]GDEXTENSION_INIT_XR_FUNC_V(xrCreateAction)[/code].
func (Instance) GetNextFrameTime ¶
Returns the predicted display timing for the next frame.
func (Instance) GetPlaySpace ¶
Returns the play space, which is an [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSpace.html]XrSpace[/url] cast to an integer.
func (Instance) GetPredictedDisplayTime ¶
Returns the predicted display timing for the current frame.
func (Instance) GetSession ¶
Returns the OpenXR session, which is an [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSession.html]XrSession[/url] cast to an integer.
func (Instance) GetSwapchainFormatName ¶
Returns the name of the specified swapchain format.
func (Instance) GetSystemId ¶
Returns the id of the system, which is a [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSystemId.html]XrSystemId[/url] cast to an integer.
func (Instance) IsEnvironmentBlendModeAlphaSupported ¶
func (self Instance) IsEnvironmentBlendModeAlphaSupported() gdclass.OpenXRAPIExtensionOpenXRAlphaBlendModeSupport
Returns [enum OpenXRAPIExtension.OpenXRAlphaBlendModeSupport] denoting if [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] is really supported, emulated or not supported at all.
func (Instance) IsInitialized ¶
Returns [code]true[/code] if OpenXR is initialized.
func (Instance) IsRunning ¶
Returns [code]true[/code] if OpenXR is running ([url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/xrBeginSession.html]xrBeginSession[/url] was successfully called and the swapchains were created).
func (Instance) RegisterCompositionLayerProvider ¶
func (self Instance) RegisterCompositionLayerProvider(extension [1]gdclass.OpenXRExtensionWrapperExtension)
Registers the given extension as a composition layer provider.
func (Instance) SetEmulateEnvironmentBlendModeAlphaBlend ¶
If set to [code]true[/code], an OpenXR extension is loaded which is capable of emulating the [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] blend mode.
func (Instance) TransformFromPose ¶
func (self Instance) TransformFromPose(pose unsafe.Pointer) Transform3D.BasisOrigin
Creates a [Transform3D] from an [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrPosef.html]XrPosef[/url].
func (Instance) UnregisterCompositionLayerProvider ¶
func (self Instance) UnregisterCompositionLayerProvider(extension [1]gdclass.OpenXRExtensionWrapperExtension)
Unregisters the given extension as a composition layer provider.
func (*Instance) UnsafePointer ¶
func (Instance) XrResult ¶
Returns [code]true[/code] if the provided [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html]XrResult[/url] (cast to an integer) is successful. Otherwise returns [code]false[/code] and prints the [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html]XrResult[/url] converted to a string, with the specified additional information.
type OpenXRAlphaBlendModeSupport ¶
type OpenXRAlphaBlendModeSupport = gdclass.OpenXRAPIExtensionOpenXRAlphaBlendModeSupport //gd:OpenXRAPIExtension.OpenXRAlphaBlendModeSupport
const ( /*Means that [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] isn't supported at all.*/ OpenxrAlphaBlendModeSupportNone OpenXRAlphaBlendModeSupport = 0 /*Means that [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] is really supported.*/ OpenxrAlphaBlendModeSupportReal OpenXRAlphaBlendModeSupport = 1 /*Means that [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] is emulated.*/ OpenxrAlphaBlendModeSupportEmulating OpenXRAlphaBlendModeSupport = 2 )