class_openxrcompositionlayer.rst 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/modules/openxr/doc_classes/OpenXRCompositionLayer.xml.
  6. .. _class_OpenXRCompositionLayer:
  7. OpenXRCompositionLayer
  8. ======================
  9. **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`OpenXRCompositionLayerCylinder<class_OpenXRCompositionLayerCylinder>`, :ref:`OpenXRCompositionLayerEquirect<class_OpenXRCompositionLayerEquirect>`, :ref:`OpenXRCompositionLayerQuad<class_OpenXRCompositionLayerQuad>`
  11. The parent class of all OpenXR composition layer nodes.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. 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.
  16. \ **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.
  17. .. rst-class:: classref-reftable-group
  18. Properties
  19. ----------
  20. .. table::
  21. :widths: auto
  22. +---------------------------------------+-----------------------------------------------------------------------------+-----------+
  23. | :ref:`bool<class_bool>` | :ref:`alpha_blend<class_OpenXRCompositionLayer_property_alpha_blend>` | ``false`` |
  24. +---------------------------------------+-----------------------------------------------------------------------------+-----------+
  25. | :ref:`SubViewport<class_SubViewport>` | :ref:`layer_viewport<class_OpenXRCompositionLayer_property_layer_viewport>` | |
  26. +---------------------------------------+-----------------------------------------------------------------------------+-----------+
  27. | :ref:`int<class_int>` | :ref:`sort_order<class_OpenXRCompositionLayer_property_sort_order>` | ``1`` |
  28. +---------------------------------------+-----------------------------------------------------------------------------+-----------+
  29. .. rst-class:: classref-reftable-group
  30. Methods
  31. -------
  32. .. table::
  33. :widths: auto
  34. +-------------------------+-------------------------------------------------------------------------------------------------------+
  35. | :ref:`bool<class_bool>` | :ref:`is_natively_supported<class_OpenXRCompositionLayer_method_is_natively_supported>`\ (\ ) |const| |
  36. +-------------------------+-------------------------------------------------------------------------------------------------------+
  37. .. rst-class:: classref-section-separator
  38. ----
  39. .. rst-class:: classref-descriptions-group
  40. Property Descriptions
  41. ---------------------
  42. .. _class_OpenXRCompositionLayer_property_alpha_blend:
  43. .. rst-class:: classref-property
  44. :ref:`bool<class_bool>` **alpha_blend** = ``false``
  45. .. rst-class:: classref-property-setget
  46. - |void| **set_alpha_blend**\ (\ value\: :ref:`bool<class_bool>`\ )
  47. - :ref:`bool<class_bool>` **get_alpha_blend**\ (\ )
  48. Enables the blending the layer using its alpha channel.
  49. Can be combined with :ref:`Viewport.transparent_bg<class_Viewport_property_transparent_bg>` to give the layer a transparent background.
  50. .. rst-class:: classref-item-separator
  51. ----
  52. .. _class_OpenXRCompositionLayer_property_layer_viewport:
  53. .. rst-class:: classref-property
  54. :ref:`SubViewport<class_SubViewport>` **layer_viewport**
  55. .. rst-class:: classref-property-setget
  56. - |void| **set_layer_viewport**\ (\ value\: :ref:`SubViewport<class_SubViewport>`\ )
  57. - :ref:`SubViewport<class_SubViewport>` **get_layer_viewport**\ (\ )
  58. The :ref:`SubViewport<class_SubViewport>` to render on the composition layer.
  59. .. rst-class:: classref-item-separator
  60. ----
  61. .. _class_OpenXRCompositionLayer_property_sort_order:
  62. .. rst-class:: classref-property
  63. :ref:`int<class_int>` **sort_order** = ``1``
  64. .. rst-class:: classref-property-setget
  65. - |void| **set_sort_order**\ (\ value\: :ref:`int<class_int>`\ )
  66. - :ref:`int<class_int>` **get_sort_order**\ (\ )
  67. The sort order for this composition layer. Higher numbers will be shown in front of lower numbers.
  68. \ **Note:** This will have no effect if a fallback mesh is being used.
  69. .. rst-class:: classref-section-separator
  70. ----
  71. .. rst-class:: classref-descriptions-group
  72. Method Descriptions
  73. -------------------
  74. .. _class_OpenXRCompositionLayer_method_is_natively_supported:
  75. .. rst-class:: classref-method
  76. :ref:`bool<class_bool>` **is_natively_supported**\ (\ ) |const|
  77. Returns true if the OpenXR runtime natively supports this composition layer type.
  78. \ **Note:** This will only return an accurate result after the OpenXR session has started.
  79. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  80. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  81. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  82. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  83. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  84. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  85. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  86. .. |void| replace:: :abbr:`void (No return value.)`