123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/master/modules/openxr/doc_classes/OpenXRCompositionLayer.xml.
- .. _class_OpenXRCompositionLayer:
- OpenXRCompositionLayer
- ======================
- **Experimental:** This class may be changed or removed in future versions.
- **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
- **Inherited By:** :ref:`OpenXRCompositionLayerCylinder<class_OpenXRCompositionLayerCylinder>`, :ref:`OpenXRCompositionLayerEquirect<class_OpenXRCompositionLayerEquirect>`, :ref:`OpenXRCompositionLayerQuad<class_OpenXRCompositionLayerQuad>`
- The parent class of all OpenXR composition layer nodes.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- Composition layers allow 2D viewports to be displayed inside of the headset by the XR compositor through special projections that retain their quality. This allows for rendering clear text while keeping the layer at a native resolution.
- \ **Note:** If the OpenXR runtime doesn't support the given composition layer type, a fallback mesh can be generated with a :ref:`ViewportTexture<class_ViewportTexture>`, in order to emulate the composition layer.
- .. rst-class:: classref-reftable-group
- Properties
- ----------
- .. table::
- :widths: auto
- +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
- | :ref:`bool<class_bool>` | :ref:`alpha_blend<class_OpenXRCompositionLayer_property_alpha_blend>` | ``false`` |
- +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
- | :ref:`Vector2i<class_Vector2i>` | :ref:`android_surface_size<class_OpenXRCompositionLayer_property_android_surface_size>` | ``Vector2i(1024, 1024)`` |
- +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
- | :ref:`bool<class_bool>` | :ref:`enable_hole_punch<class_OpenXRCompositionLayer_property_enable_hole_punch>` | ``false`` |
- +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
- | :ref:`SubViewport<class_SubViewport>` | :ref:`layer_viewport<class_OpenXRCompositionLayer_property_layer_viewport>` | |
- +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
- | :ref:`int<class_int>` | :ref:`sort_order<class_OpenXRCompositionLayer_property_sort_order>` | ``1`` |
- +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
- | :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` | :ref:`swapchain_state_alpha_swizzle<class_OpenXRCompositionLayer_property_swapchain_state_alpha_swizzle>` | ``3`` |
- +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
- | :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` | :ref:`swapchain_state_blue_swizzle<class_OpenXRCompositionLayer_property_swapchain_state_blue_swizzle>` | ``2`` |
- +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
- | :ref:`Color<class_Color>` | :ref:`swapchain_state_border_color<class_OpenXRCompositionLayer_property_swapchain_state_border_color>` | ``Color(0, 0, 0, 0)`` |
- +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
- | :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` | :ref:`swapchain_state_green_swizzle<class_OpenXRCompositionLayer_property_swapchain_state_green_swizzle>` | ``1`` |
- +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
- | :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` | :ref:`swapchain_state_horizontal_wrap<class_OpenXRCompositionLayer_property_swapchain_state_horizontal_wrap>` | ``0`` |
- +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
- | :ref:`Filter<enum_OpenXRCompositionLayer_Filter>` | :ref:`swapchain_state_mag_filter<class_OpenXRCompositionLayer_property_swapchain_state_mag_filter>` | ``1`` |
- +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
- | :ref:`float<class_float>` | :ref:`swapchain_state_max_anisotropy<class_OpenXRCompositionLayer_property_swapchain_state_max_anisotropy>` | ``1.0`` |
- +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
- | :ref:`Filter<enum_OpenXRCompositionLayer_Filter>` | :ref:`swapchain_state_min_filter<class_OpenXRCompositionLayer_property_swapchain_state_min_filter>` | ``1`` |
- +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
- | :ref:`MipmapMode<enum_OpenXRCompositionLayer_MipmapMode>` | :ref:`swapchain_state_mipmap_mode<class_OpenXRCompositionLayer_property_swapchain_state_mipmap_mode>` | ``2`` |
- +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
- | :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` | :ref:`swapchain_state_red_swizzle<class_OpenXRCompositionLayer_property_swapchain_state_red_swizzle>` | ``0`` |
- +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
- | :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` | :ref:`swapchain_state_vertical_wrap<class_OpenXRCompositionLayer_property_swapchain_state_vertical_wrap>` | ``0`` |
- +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
- | :ref:`bool<class_bool>` | :ref:`use_android_surface<class_OpenXRCompositionLayer_property_use_android_surface>` | ``false`` |
- +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+--------------------------+
- .. rst-class:: classref-reftable-group
- Methods
- -------
- .. table::
- :widths: auto
- +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`JavaObject<class_JavaObject>` | :ref:`get_android_surface<class_OpenXRCompositionLayer_method_get_android_surface>`\ (\ ) |
- +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector2<class_Vector2>` | :ref:`intersects_ray<class_OpenXRCompositionLayer_method_intersects_ray>`\ (\ origin\: :ref:`Vector3<class_Vector3>`, direction\: :ref:`Vector3<class_Vector3>`\ ) |const| |
- +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`is_natively_supported<class_OpenXRCompositionLayer_method_is_natively_supported>`\ (\ ) |const| |
- +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Enumerations
- ------------
- .. _enum_OpenXRCompositionLayer_Filter:
- .. rst-class:: classref-enumeration
- enum **Filter**: :ref:`🔗<enum_OpenXRCompositionLayer_Filter>`
- .. _class_OpenXRCompositionLayer_constant_FILTER_NEAREST:
- .. rst-class:: classref-enumeration-constant
- :ref:`Filter<enum_OpenXRCompositionLayer_Filter>` **FILTER_NEAREST** = ``0``
- Perform nearest-neighbor filtering when sampling the texture.
- .. _class_OpenXRCompositionLayer_constant_FILTER_LINEAR:
- .. rst-class:: classref-enumeration-constant
- :ref:`Filter<enum_OpenXRCompositionLayer_Filter>` **FILTER_LINEAR** = ``1``
- Perform linear filtering when sampling the texture.
- .. _class_OpenXRCompositionLayer_constant_FILTER_CUBIC:
- .. rst-class:: classref-enumeration-constant
- :ref:`Filter<enum_OpenXRCompositionLayer_Filter>` **FILTER_CUBIC** = ``2``
- Perform cubic filtering when sampling the texture.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_OpenXRCompositionLayer_MipmapMode:
- .. rst-class:: classref-enumeration
- enum **MipmapMode**: :ref:`🔗<enum_OpenXRCompositionLayer_MipmapMode>`
- .. _class_OpenXRCompositionLayer_constant_MIPMAP_MODE_DISABLED:
- .. rst-class:: classref-enumeration-constant
- :ref:`MipmapMode<enum_OpenXRCompositionLayer_MipmapMode>` **MIPMAP_MODE_DISABLED** = ``0``
- Disable mipmapping.
- \ **Note:** Mipmapping can only be disabled in the Compatibility renderer.
- .. _class_OpenXRCompositionLayer_constant_MIPMAP_MODE_NEAREST:
- .. rst-class:: classref-enumeration-constant
- :ref:`MipmapMode<enum_OpenXRCompositionLayer_MipmapMode>` **MIPMAP_MODE_NEAREST** = ``1``
- Use the mipmap of the nearest resolution.
- .. _class_OpenXRCompositionLayer_constant_MIPMAP_MODE_LINEAR:
- .. rst-class:: classref-enumeration-constant
- :ref:`MipmapMode<enum_OpenXRCompositionLayer_MipmapMode>` **MIPMAP_MODE_LINEAR** = ``2``
- Use linear interpolation of the two mipmaps of the nearest resolution.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_OpenXRCompositionLayer_Wrap:
- .. rst-class:: classref-enumeration
- enum **Wrap**: :ref:`🔗<enum_OpenXRCompositionLayer_Wrap>`
- .. _class_OpenXRCompositionLayer_constant_WRAP_CLAMP_TO_BORDER:
- .. rst-class:: classref-enumeration-constant
- :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` **WRAP_CLAMP_TO_BORDER** = ``0``
- Clamp the texture to its specified border color.
- .. _class_OpenXRCompositionLayer_constant_WRAP_CLAMP_TO_EDGE:
- .. rst-class:: classref-enumeration-constant
- :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` **WRAP_CLAMP_TO_EDGE** = ``1``
- Clamp the texture to its edge color.
- .. _class_OpenXRCompositionLayer_constant_WRAP_REPEAT:
- .. rst-class:: classref-enumeration-constant
- :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` **WRAP_REPEAT** = ``2``
- Repeat the texture infinitely.
- .. _class_OpenXRCompositionLayer_constant_WRAP_MIRRORED_REPEAT:
- .. rst-class:: classref-enumeration-constant
- :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` **WRAP_MIRRORED_REPEAT** = ``3``
- Repeat the texture infinitely, mirroring it on each repeat.
- .. _class_OpenXRCompositionLayer_constant_WRAP_MIRROR_CLAMP_TO_EDGE:
- .. rst-class:: classref-enumeration-constant
- :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` **WRAP_MIRROR_CLAMP_TO_EDGE** = ``4``
- Mirror the texture once and then clamp the texture to its edge color.
- \ **Note:** This wrap mode is not available in the Compatibility renderer.
- .. rst-class:: classref-item-separator
- ----
- .. _enum_OpenXRCompositionLayer_Swizzle:
- .. rst-class:: classref-enumeration
- enum **Swizzle**: :ref:`🔗<enum_OpenXRCompositionLayer_Swizzle>`
- .. _class_OpenXRCompositionLayer_constant_SWIZZLE_RED:
- .. rst-class:: classref-enumeration-constant
- :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **SWIZZLE_RED** = ``0``
- Maps a color channel to the value of the red channel.
- .. _class_OpenXRCompositionLayer_constant_SWIZZLE_GREEN:
- .. rst-class:: classref-enumeration-constant
- :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **SWIZZLE_GREEN** = ``1``
- Maps a color channel to the value of the green channel.
- .. _class_OpenXRCompositionLayer_constant_SWIZZLE_BLUE:
- .. rst-class:: classref-enumeration-constant
- :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **SWIZZLE_BLUE** = ``2``
- Maps a color channel to the value of the blue channel.
- .. _class_OpenXRCompositionLayer_constant_SWIZZLE_ALPHA:
- .. rst-class:: classref-enumeration-constant
- :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **SWIZZLE_ALPHA** = ``3``
- Maps a color channel to the value of the alpha channel.
- .. _class_OpenXRCompositionLayer_constant_SWIZZLE_ZERO:
- .. rst-class:: classref-enumeration-constant
- :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **SWIZZLE_ZERO** = ``4``
- Maps a color channel to the value of zero.
- .. _class_OpenXRCompositionLayer_constant_SWIZZLE_ONE:
- .. rst-class:: classref-enumeration-constant
- :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **SWIZZLE_ONE** = ``5``
- Maps a color channel to the value of one.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Property Descriptions
- ---------------------
- .. _class_OpenXRCompositionLayer_property_alpha_blend:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **alpha_blend** = ``false`` :ref:`🔗<class_OpenXRCompositionLayer_property_alpha_blend>`
- .. rst-class:: classref-property-setget
- - |void| **set_alpha_blend**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **get_alpha_blend**\ (\ )
- Enables the blending the layer using its alpha channel.
- Can be combined with :ref:`Viewport.transparent_bg<class_Viewport_property_transparent_bg>` to give the layer a transparent background.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRCompositionLayer_property_android_surface_size:
- .. rst-class:: classref-property
- :ref:`Vector2i<class_Vector2i>` **android_surface_size** = ``Vector2i(1024, 1024)`` :ref:`🔗<class_OpenXRCompositionLayer_property_android_surface_size>`
- .. rst-class:: classref-property-setget
- - |void| **set_android_surface_size**\ (\ value\: :ref:`Vector2i<class_Vector2i>`\ )
- - :ref:`Vector2i<class_Vector2i>` **get_android_surface_size**\ (\ )
- The size of the Android surface to create if :ref:`use_android_surface<class_OpenXRCompositionLayer_property_use_android_surface>` is enabled.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRCompositionLayer_property_enable_hole_punch:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **enable_hole_punch** = ``false`` :ref:`🔗<class_OpenXRCompositionLayer_property_enable_hole_punch>`
- .. rst-class:: classref-property-setget
- - |void| **set_enable_hole_punch**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **get_enable_hole_punch**\ (\ )
- Enables a technique called "hole punching", which allows putting the composition layer behind the main projection layer (i.e. setting :ref:`sort_order<class_OpenXRCompositionLayer_property_sort_order>` to a negative value) while "punching a hole" through everything rendered by Godot so that the layer is still visible.
- This can be used to create the illusion that the composition layer exists in the same 3D space as everything rendered by Godot, allowing objects to appear to pass both behind or in front of the composition layer.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRCompositionLayer_property_layer_viewport:
- .. rst-class:: classref-property
- :ref:`SubViewport<class_SubViewport>` **layer_viewport** :ref:`🔗<class_OpenXRCompositionLayer_property_layer_viewport>`
- .. rst-class:: classref-property-setget
- - |void| **set_layer_viewport**\ (\ value\: :ref:`SubViewport<class_SubViewport>`\ )
- - :ref:`SubViewport<class_SubViewport>` **get_layer_viewport**\ (\ )
- The :ref:`SubViewport<class_SubViewport>` to render on the composition layer.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRCompositionLayer_property_sort_order:
- .. rst-class:: classref-property
- :ref:`int<class_int>` **sort_order** = ``1`` :ref:`🔗<class_OpenXRCompositionLayer_property_sort_order>`
- .. rst-class:: classref-property-setget
- - |void| **set_sort_order**\ (\ value\: :ref:`int<class_int>`\ )
- - :ref:`int<class_int>` **get_sort_order**\ (\ )
- The sort order for this composition layer. Higher numbers will be shown in front of lower numbers.
- \ **Note:** This will have no effect if a fallback mesh is being used.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRCompositionLayer_property_swapchain_state_alpha_swizzle:
- .. rst-class:: classref-property
- :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **swapchain_state_alpha_swizzle** = ``3`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_alpha_swizzle>`
- .. rst-class:: classref-property-setget
- - |void| **set_alpha_swizzle**\ (\ value\: :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>`\ )
- - :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **get_alpha_swizzle**\ (\ )
- The swizzle value for the alpha channel of the swapchain state.
- \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRCompositionLayer_property_swapchain_state_blue_swizzle:
- .. rst-class:: classref-property
- :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **swapchain_state_blue_swizzle** = ``2`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_blue_swizzle>`
- .. rst-class:: classref-property-setget
- - |void| **set_blue_swizzle**\ (\ value\: :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>`\ )
- - :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **get_blue_swizzle**\ (\ )
- The swizzle value for the blue channel of the swapchain state.
- \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRCompositionLayer_property_swapchain_state_border_color:
- .. rst-class:: classref-property
- :ref:`Color<class_Color>` **swapchain_state_border_color** = ``Color(0, 0, 0, 0)`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_border_color>`
- .. rst-class:: classref-property-setget
- - |void| **set_border_color**\ (\ value\: :ref:`Color<class_Color>`\ )
- - :ref:`Color<class_Color>` **get_border_color**\ (\ )
- The border color of the swapchain state that is used when the wrap mode clamps to the border.
- \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRCompositionLayer_property_swapchain_state_green_swizzle:
- .. rst-class:: classref-property
- :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **swapchain_state_green_swizzle** = ``1`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_green_swizzle>`
- .. rst-class:: classref-property-setget
- - |void| **set_green_swizzle**\ (\ value\: :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>`\ )
- - :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **get_green_swizzle**\ (\ )
- The swizzle value for the green channel of the swapchain state.
- \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRCompositionLayer_property_swapchain_state_horizontal_wrap:
- .. rst-class:: classref-property
- :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` **swapchain_state_horizontal_wrap** = ``0`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_horizontal_wrap>`
- .. rst-class:: classref-property-setget
- - |void| **set_horizontal_wrap**\ (\ value\: :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>`\ )
- - :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` **get_horizontal_wrap**\ (\ )
- The horizontal wrap mode of the swapchain state.
- \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRCompositionLayer_property_swapchain_state_mag_filter:
- .. rst-class:: classref-property
- :ref:`Filter<enum_OpenXRCompositionLayer_Filter>` **swapchain_state_mag_filter** = ``1`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_mag_filter>`
- .. rst-class:: classref-property-setget
- - |void| **set_mag_filter**\ (\ value\: :ref:`Filter<enum_OpenXRCompositionLayer_Filter>`\ )
- - :ref:`Filter<enum_OpenXRCompositionLayer_Filter>` **get_mag_filter**\ (\ )
- The magnification filter of the swapchain state.
- \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRCompositionLayer_property_swapchain_state_max_anisotropy:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **swapchain_state_max_anisotropy** = ``1.0`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_max_anisotropy>`
- .. rst-class:: classref-property-setget
- - |void| **set_max_anisotropy**\ (\ value\: :ref:`float<class_float>`\ )
- - :ref:`float<class_float>` **get_max_anisotropy**\ (\ )
- The max anisotropy of the swapchain state.
- \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRCompositionLayer_property_swapchain_state_min_filter:
- .. rst-class:: classref-property
- :ref:`Filter<enum_OpenXRCompositionLayer_Filter>` **swapchain_state_min_filter** = ``1`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_min_filter>`
- .. rst-class:: classref-property-setget
- - |void| **set_min_filter**\ (\ value\: :ref:`Filter<enum_OpenXRCompositionLayer_Filter>`\ )
- - :ref:`Filter<enum_OpenXRCompositionLayer_Filter>` **get_min_filter**\ (\ )
- The minification filter of the swapchain state.
- \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRCompositionLayer_property_swapchain_state_mipmap_mode:
- .. rst-class:: classref-property
- :ref:`MipmapMode<enum_OpenXRCompositionLayer_MipmapMode>` **swapchain_state_mipmap_mode** = ``2`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_mipmap_mode>`
- .. rst-class:: classref-property-setget
- - |void| **set_mipmap_mode**\ (\ value\: :ref:`MipmapMode<enum_OpenXRCompositionLayer_MipmapMode>`\ )
- - :ref:`MipmapMode<enum_OpenXRCompositionLayer_MipmapMode>` **get_mipmap_mode**\ (\ )
- The mipmap mode of the swapchain state.
- \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRCompositionLayer_property_swapchain_state_red_swizzle:
- .. rst-class:: classref-property
- :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **swapchain_state_red_swizzle** = ``0`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_red_swizzle>`
- .. rst-class:: classref-property-setget
- - |void| **set_red_swizzle**\ (\ value\: :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>`\ )
- - :ref:`Swizzle<enum_OpenXRCompositionLayer_Swizzle>` **get_red_swizzle**\ (\ )
- The swizzle value for the red channel of the swapchain state.
- \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRCompositionLayer_property_swapchain_state_vertical_wrap:
- .. rst-class:: classref-property
- :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` **swapchain_state_vertical_wrap** = ``0`` :ref:`🔗<class_OpenXRCompositionLayer_property_swapchain_state_vertical_wrap>`
- .. rst-class:: classref-property-setget
- - |void| **set_vertical_wrap**\ (\ value\: :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>`\ )
- - :ref:`Wrap<enum_OpenXRCompositionLayer_Wrap>` **get_vertical_wrap**\ (\ )
- The vertical wrap mode of the swapchain state.
- \ **Note:** This property only has an effect on devices that support the OpenXR XR_FB_swapchain_update_state OpenGLES/Vulkan extensions.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRCompositionLayer_property_use_android_surface:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **use_android_surface** = ``false`` :ref:`🔗<class_OpenXRCompositionLayer_property_use_android_surface>`
- .. rst-class:: classref-property-setget
- - |void| **set_use_android_surface**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **get_use_android_surface**\ (\ )
- If enabled, an Android surface will be created (with the dimensions from :ref:`android_surface_size<class_OpenXRCompositionLayer_property_android_surface_size>`) which will provide the 2D content for the composition layer, rather than using :ref:`layer_viewport<class_OpenXRCompositionLayer_property_layer_viewport>`.
- See :ref:`get_android_surface()<class_OpenXRCompositionLayer_method_get_android_surface>` for information about how to get the surface so that your application can draw to it.
- \ **Note:** This will only work in Android builds.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _class_OpenXRCompositionLayer_method_get_android_surface:
- .. rst-class:: classref-method
- :ref:`JavaObject<class_JavaObject>` **get_android_surface**\ (\ ) :ref:`🔗<class_OpenXRCompositionLayer_method_get_android_surface>`
- Returns a :ref:`JavaObject<class_JavaObject>` representing an ``android.view.Surface`` if :ref:`use_android_surface<class_OpenXRCompositionLayer_property_use_android_surface>` is enabled and OpenXR has created the surface. Otherwise, this will return ``null``.
- \ **Note:** The surface can only be created during an active OpenXR session. So, if :ref:`use_android_surface<class_OpenXRCompositionLayer_property_use_android_surface>` is enabled outside of an OpenXR session, it won't be created until a new session fully starts.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRCompositionLayer_method_intersects_ray:
- .. rst-class:: classref-method
- :ref:`Vector2<class_Vector2>` **intersects_ray**\ (\ origin\: :ref:`Vector3<class_Vector3>`, direction\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_OpenXRCompositionLayer_method_intersects_ray>`
- Returns UV coordinates where the given ray intersects with the composition layer. ``origin`` and ``direction`` must be in global space.
- Returns ``Vector2(-1.0, -1.0)`` if the ray doesn't intersect.
- .. rst-class:: classref-item-separator
- ----
- .. _class_OpenXRCompositionLayer_method_is_natively_supported:
- .. rst-class:: classref-method
- :ref:`bool<class_bool>` **is_natively_supported**\ (\ ) |const| :ref:`🔗<class_OpenXRCompositionLayer_method_is_natively_supported>`
- Returns ``true`` if the OpenXR runtime natively supports this composition layer type.
- \ **Note:** This will only return an accurate result after the OpenXR session has started.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
- .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
- .. |void| replace:: :abbr:`void (No return value.)`
|