diff --git a/classes/class_animationnode.rst b/classes/class_animationnode.rst index 4131ee692e4..1729eb027d8 100644 --- a/classes/class_animationnode.rst +++ b/classes/class_animationnode.rst @@ -77,7 +77,7 @@ Methods +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_is_parameter_read_only`\ (\ parameter\: :ref:`StringName`\ ) |virtual| |const| | +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_process`\ (\ time\: :ref:`float`, seek\: :ref:`bool`, is_external_seeking\: :ref:`bool`, test_only\: :ref:`bool`\ ) |virtual| |const| | + | :ref:`float` | :ref:`_process`\ (\ time\: :ref:`float`, seek\: :ref:`bool`, is_external_seeking\: :ref:`bool`, test_only\: :ref:`bool`\ ) |virtual| | +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`add_input`\ (\ name\: :ref:`String`\ ) | +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -313,7 +313,7 @@ When inheriting from :ref:`AnimationRootNode`, implemen .. rst-class:: classref-method -:ref:`float` **_process**\ (\ time\: :ref:`float`, seek\: :ref:`bool`, is_external_seeking\: :ref:`bool`, test_only\: :ref:`bool`\ ) |virtual| |const| :ref:`🔗` +:ref:`float` **_process**\ (\ time\: :ref:`float`, seek\: :ref:`bool`, is_external_seeking\: :ref:`bool`, test_only\: :ref:`bool`\ ) |virtual| :ref:`🔗` **Deprecated:** Currently this is mostly useless as there is a lack of many APIs to extend AnimationNode by GDScript. It is planned that a more flexible API using structures will be provided in the future. diff --git a/classes/class_audioserver.rst b/classes/class_audioserver.rst index 35cd056cd96..aa74e69a2e9 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -91,6 +91,8 @@ Methods +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_input_device_list`\ (\ ) | +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_input_mix_rate`\ (\ ) |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_mix_rate`\ (\ ) |const| | +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_output_device_list`\ (\ ) | @@ -542,6 +544,18 @@ Returns the names of all audio input devices detected on the system. ---- +.. _class_AudioServer_method_get_input_mix_rate: + +.. rst-class:: classref-method + +:ref:`float` **get_input_mix_rate**\ (\ ) |const| :ref:`🔗` + +Returns the sample rate at the input of the **AudioServer**. + +.. rst-class:: classref-item-separator + +---- + .. _class_AudioServer_method_get_mix_rate: .. rst-class:: classref-method diff --git a/classes/class_classdb.rst b/classes/class_classdb.rst index 2aaa48001bf..14724e0be5c 100644 --- a/classes/class_classdb.rst +++ b/classes/class_classdb.rst @@ -32,7 +32,7 @@ Methods +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`can_instantiate`\ (\ class\: :ref:`StringName`\ ) |const| | +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`class_call_static_method`\ (\ class\: :ref:`StringName`, method\: :ref:`StringName`, ...\ ) |vararg| | + | :ref:`Variant` | :ref:`class_call_static`\ (\ class\: :ref:`StringName`, method\: :ref:`StringName`, ...\ ) |vararg| | +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`class_exists`\ (\ class\: :ref:`StringName`\ ) |const| | +------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -167,11 +167,11 @@ Returns ``true`` if objects can be instantiated from the specified ``class``, ot ---- -.. _class_ClassDB_method_class_call_static_method: +.. _class_ClassDB_method_class_call_static: .. rst-class:: classref-method -:ref:`Variant` **class_call_static_method**\ (\ class\: :ref:`StringName`, method\: :ref:`StringName`, ...\ ) |vararg| :ref:`🔗` +:ref:`Variant` **class_call_static**\ (\ class\: :ref:`StringName`, method\: :ref:`StringName`, ...\ ) |vararg| :ref:`🔗` Calls a static method on a class. diff --git a/classes/class_control.rst b/classes/class_control.rst index 4011a8e5769..4032c1c58a6 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -1926,7 +1926,7 @@ When set, this property gives the highest priority to the type of the specified Defines if tooltip text should automatically change to its translated version depending on the current locale. Uses the same auto translate mode as this control when set to :ref:`Node.AUTO_TRANSLATE_MODE_INHERIT`. -\ **Note:** When the tooltip is customized using :ref:`_make_custom_tooltip`, this auto translate mode is applied automatically to the returned control. +\ **Note:** Tooltips customized using :ref:`_make_custom_tooltip` do not use this auto translate mode automatically. .. rst-class:: classref-item-separator diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index 6e1ed97a915..b82e782215b 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -618,7 +618,15 @@ Display server supports spawning text input dialogs using the operating system's :ref:`Feature` **FEATURE_NATIVE_DIALOG_FILE** = ``25`` -Display server supports spawning dialogs for selecting files or directories using the operating system's native look-and-feel. See :ref:`file_dialog_show` and :ref:`file_dialog_with_options_show`. **Windows, macOS, Linux (X11/Wayland)** +Display server supports spawning dialogs for selecting files or directories using the operating system's native look-and-feel. See :ref:`file_dialog_show`. **Windows, macOS, Linux (X11/Wayland), Android** + +.. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE_EXTRA: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_NATIVE_DIALOG_FILE_EXTRA** = ``26`` + +The display server supports all features of :ref:`FEATURE_NATIVE_DIALOG_FILE`, with the added functionality of Options and native dialog file access to ``res://`` and ``user://`` paths. See :ref:`file_dialog_show` and :ref:`file_dialog_with_options_show`. **Windows, macOS, Linux (X11/Wayland)** .. rst-class:: classref-item-separator @@ -1702,7 +1710,7 @@ Removes the application status indicator. Shows a text input dialog which uses the operating system's native look-and-feel. ``callback`` should accept a single :ref:`String` parameter which contains the text field's contents. -\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_INPUT` feature. Supported platforms include macOS and Windows. +\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_INPUT` feature. Supported platforms include macOS, Windows, and Android. .. rst-class:: classref-item-separator @@ -1746,15 +1754,17 @@ Displays OS native dialog for selecting files or directories in the file system. Each filter string in the ``filters`` array should be formatted like this: ``*.txt,*.doc;Text Files``. The description text of the filter is optional and can be omitted. See also :ref:`FileDialog.filters`. -Callbacks have the following arguments: ``status: bool, selected_paths: PackedStringArray, selected_filter_index: int``. +Callbacks have the following arguments: ``status: bool, selected_paths: PackedStringArray, selected_filter_index: int``. **On Android,** callback argument ``selected_filter_index`` is always zero. -\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_FILE` feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. +\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_FILE` feature. Supported platforms include Linux (X11/Wayland), Windows, macOS, and Android. \ **Note:** ``current_directory`` might be ignored. -\ **Note:** On Linux, ``show_hidden`` is ignored. +\ **Note:** On Android, the filter strings in the ``filters`` array should be specified using MIME types, for example:``image/png, image/jpeg"``. Additionally, the ``mode`` :ref:`FILE_DIALOG_MODE_OPEN_ANY` is not supported on Android. -\ **Note:** On macOS, native file dialogs have no title. +\ **Note:** On Android and Linux, ``show_hidden`` is ignored. + +\ **Note:** On Android and macOS, native file dialogs have no title. \ **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use :ref:`OS.get_granted_permissions` to get a list of saved bookmarks. @@ -1782,7 +1792,7 @@ Each filter string in the ``filters`` array should be formatted like this: ``*.t Callbacks have the following arguments: ``status: bool, selected_paths: PackedStringArray, selected_filter_index: int, selected_option: Dictionary``. -\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_FILE` feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. +\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_FILE_EXTRA` feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. \ **Note:** ``current_directory`` might be ignored. diff --git a/classes/class_editorexportplugin.rst b/classes/class_editorexportplugin.rst index beb15d4a2c3..0037c9d95e5 100644 --- a/classes/class_editorexportplugin.rst +++ b/classes/class_editorexportplugin.rst @@ -149,6 +149,8 @@ Return ``true`` if this plugin will customize scenes based on the platform and f When enabled, :ref:`_get_customization_configuration_hash` and :ref:`_customize_scene` will be called and must be implemented. +\ **Note:** :ref:`_customize_scene` will only be called for scenes that have been modified since the last export. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_editorfeatureprofile.rst b/classes/class_editorfeatureprofile.rst index 3460c9359b8..6874c12b72e 100644 --- a/classes/class_editorfeatureprofile.rst +++ b/classes/class_editorfeatureprofile.rst @@ -134,11 +134,19 @@ The Import dock. If this feature is disabled, the Import dock won't be visible. The History dock. If this feature is disabled, the History dock won't be visible. +.. _class_EditorFeatureProfile_constant_FEATURE_GAME: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_GAME** = ``8`` + +The Game tab, which allows embedding the game window and selecting nodes by clicking inside of it. If this feature is disabled, the Game tab won't display. + .. _class_EditorFeatureProfile_constant_FEATURE_MAX: .. rst-class:: classref-enumeration-constant -:ref:`Feature` **FEATURE_MAX** = ``8`` +:ref:`Feature` **FEATURE_MAX** = ``9`` Represents the size of the :ref:`Feature` enum. diff --git a/classes/class_filedialog.rst b/classes/class_filedialog.rst index b5c7225d626..a6402cac45d 100644 --- a/classes/class_filedialog.rst +++ b/classes/class_filedialog.rst @@ -407,6 +407,8 @@ See also :ref:`filters`, which should be used The available file type filters. Each filter string in the array should be formatted like this: ``*.txt,*.doc;Text Files``. The description text of the filter is optional and can be omitted. +\ **Note:** For android native dialog, MIME types are used like this: ``image/*, application/pdf``. + **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. .. rst-class:: classref-item-separator @@ -479,7 +481,7 @@ If non-empty, the given sub-folder will be "root" of this **FileDialog**, i.e. u If ``true``, the dialog will show hidden files. -\ **Note:** This property is ignored by native file dialogs on Linux. +\ **Note:** This property is ignored by native file dialogs on Android and Linux. .. rst-class:: classref-item-separator @@ -498,6 +500,8 @@ If ``true``, the dialog will show hidden files. If ``true``, and if supported by the current :ref:`DisplayServer`, OS native dialog will be used instead of custom one. +\ **Note:** On Android, it is only supported when using :ref:`ACCESS_FILESYSTEM`. For access mode :ref:`ACCESS_RESOURCES` and :ref:`ACCESS_USERDATA`, the system will fall back to custom FileDialog. + \ **Note:** On Linux and macOS, sandboxed apps always use native dialogs to access the host file system. \ **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use :ref:`OS.get_granted_permissions` to get a list of saved bookmarks. diff --git a/classes/class_importermesh.rst b/classes/class_importermesh.rst index fbb9070e815..f1639a7c13a 100644 --- a/classes/class_importermesh.rst +++ b/classes/class_importermesh.rst @@ -144,7 +144,9 @@ Removes all surfaces and blend shapes from this **ImporterMesh**. Generates all lods for this ImporterMesh. -\ ``normal_merge_angle`` and ``normal_split_angle`` are in degrees and used in the same way as the importer settings in ``lods``. As a good default, use 25 and 60 respectively. +\ ``normal_merge_angle`` is in degrees and used in the same way as the importer settings in ``lods``. + +\ ``normal_split_angle`` is not used and only remains for compatibility with older versions of the API. The number of generated lods can be accessed using :ref:`get_surface_lod_count`, and each LOD is available in :ref:`get_surface_lod_size` and :ref:`get_surface_lod_indices`. diff --git a/classes/class_occluderinstance3d.rst b/classes/class_occluderinstance3d.rst index 332353bd8fc..e124300c222 100644 --- a/classes/class_occluderinstance3d.rst +++ b/classes/class_occluderinstance3d.rst @@ -23,7 +23,7 @@ Occlusion culling can improve rendering performance in closed/semi-open areas by The occlusion culling system is mostly static. **OccluderInstance3D**\ s can be moved or hidden at run-time, but doing so will trigger a background recomputation that can take several frames. It is recommended to only move **OccluderInstance3D**\ s sporadically (e.g. for procedural generation purposes), rather than doing so every frame. -The occlusion culling system works by rendering the occluders on the CPU in parallel using `Embree `__, drawing the result to a low-resolution buffer then using this to cull 3D nodes individually. In the 3D editor, you can preview the occlusion culling buffer by choosing **Perspective > Debug Advanced... > Occlusion Culling Buffer** in the top-left corner of the 3D viewport. The occlusion culling buffer quality can be adjusted in the Project Settings. +The occlusion culling system works by rendering the occluders on the CPU in parallel using `Embree `__, drawing the result to a low-resolution buffer then using this to cull 3D nodes individually. In the 3D editor, you can preview the occlusion culling buffer by choosing **Perspective > Display Advanced... > Occlusion Culling Buffer** in the top-left corner of the 3D viewport. The occlusion culling buffer quality can be adjusted in the Project Settings. \ **Baking:** Select an **OccluderInstance3D** node, then use the **Bake Occluders** button at the top of the 3D editor. Only opaque materials will be taken into account; transparent materials (alpha-blended or alpha-tested) will be ignored by the occluder generation. diff --git a/classes/class_projectsettings.rst b/classes/class_projectsettings.rst index 2c00ecdad6f..c222914b94b 100644 --- a/classes/class_projectsettings.rst +++ b/classes/class_projectsettings.rst @@ -405,6 +405,10 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`display/window/energy_saving/keep_screen_on` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`display/window/frame_pacing/android/enable_frame_pacing` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`display/window/frame_pacing/android/swappy_mode` | ``2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`display/window/handheld/orientation` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`display/window/ios/allow_high_refresh_rate` | ``true`` | @@ -1291,6 +1295,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/2d/batching/item_buffer_size` | ``16384`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/2d/batching/uniform_set_cache_size` | ``256`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/2d/sdf/oversize` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/2d/sdf/scale` | ``1`` | @@ -3982,6 +3988,40 @@ If ``true``, keeps the screen on (even in case of inactivity), so the screensave ---- +.. _class_ProjectSettings_property_display/window/frame_pacing/android/enable_frame_pacing: + +.. rst-class:: classref-property + +:ref:`bool` **display/window/frame_pacing/android/enable_frame_pacing** = ``true`` :ref:`🔗` + +Enable Swappy for stable frame pacing on Android. Highly recommended. + +\ **Note:** This option will be forced off when using OpenXR. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_display/window/frame_pacing/android/swappy_mode: + +.. rst-class:: classref-property + +:ref:`int` **display/window/frame_pacing/android/swappy_mode** = ``2`` :ref:`🔗` + +Swappy mode to use. The options are: + +- pipeline_forced_on: Try to honor :ref:`Engine.max_fps`. Pipelining is always on. This is the same behavior as Desktop PC. + +- auto_fps_pipeline_forced_on: Autocalculate max fps. Actual max_fps will be between 0 and :ref:`Engine.max_fps`. While this sounds convenient, beware that Swappy will often downgrade max fps until it finds something that can be met and sustained. That means if your game runs between 40fps and 60fps on a 60hz screen, after some time Swappy will downgrade max fps so that the game renders at perfect 30fps. + +- auto_fps_auto_pipeline: Same as auto_fps_pipeline_forced_on, but if Swappy detects that rendering is very fast (e.g. it takes < 8ms to render on a 60hz screen) Swappy will disable pipelining to minimize input latency. This is the default. + +\ **Note:** If :ref:`Engine.max_fps` is 0, actual max_fps will considered as to be the screen's refresh rate (often 60hz, 90hz or 120hz depending on device model and OS settings). + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_display/window/handheld/orientation: .. rst-class:: classref-property @@ -9716,6 +9756,20 @@ Maximum number of canvas item commands that can be batched into a single draw ca ---- +.. _class_ProjectSettings_property_rendering/2d/batching/uniform_set_cache_size: + +.. rst-class:: classref-property + +:ref:`int` **rendering/2d/batching/uniform_set_cache_size** = ``256`` :ref:`🔗` + +Maximum number of uniform sets that will be cached by the 2D renderer when batching draw calls. + +\ **Note:** A project that uses a large number of unique sprite textures per frame may benefit from increasing this value. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/2d/sdf/oversize: .. rst-class:: classref-property diff --git a/classes/class_renderingdevice.rst b/classes/class_renderingdevice.rst index 2ddbf90b608..bdc812ebb3e 100644 --- a/classes/class_renderingdevice.rst +++ b/classes/class_renderingdevice.rst @@ -103,6 +103,8 @@ Methods +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`draw_list_draw`\ (\ draw_list\: :ref:`int`, use_indices\: :ref:`bool`, instances\: :ref:`int`, procedural_vertex_count\: :ref:`int` = 0\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_list_draw_indirect`\ (\ draw_list\: :ref:`int`, use_indices\: :ref:`bool`, buffer\: :ref:`RID`, offset\: :ref:`int` = 0, draw_count\: :ref:`int` = 1, stride\: :ref:`int` = 0\ ) | + +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`draw_list_enable_scissor`\ (\ draw_list\: :ref:`int`, rect\: :ref:`Rect2` = Rect2(0, 0, 0, 0)\ ) | +------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`draw_list_end`\ (\ ) | @@ -5168,6 +5170,18 @@ Submits ``draw_list`` for rendering on the GPU. This is the raster equivalent to ---- +.. _class_RenderingDevice_method_draw_list_draw_indirect: + +.. rst-class:: classref-method + +|void| **draw_list_draw_indirect**\ (\ draw_list\: :ref:`int`, use_indices\: :ref:`bool`, buffer\: :ref:`RID`, offset\: :ref:`int` = 0, draw_count\: :ref:`int` = 1, stride\: :ref:`int` = 0\ ) :ref:`🔗` + +Submits ``draw_list`` for rendering on the GPU with the given parameters stored in the ``buffer`` at ``offset``. Parameters being integers: vertex count, instance count, first vertex, first instance. And when using indices: index count, instance count, first index, vertex offset, first instance. Buffer must have been created with :ref:`STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT` flag. + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingDevice_method_draw_list_enable_scissor: .. rst-class:: classref-method diff --git a/classes/class_shortcut.rst b/classes/class_shortcut.rst index 7d06b4bc86c..fad61bc5e07 100644 --- a/classes/class_shortcut.rst +++ b/classes/class_shortcut.rst @@ -21,7 +21,7 @@ Description Shortcuts are commonly used for interacting with a :ref:`Control` element from an :ref:`InputEvent` (also known as hotkeys). -One shortcut can contain multiple :ref:`InputEvent`'s, allowing the possibility of triggering one action with multiple different inputs. +One shortcut can contain multiple :ref:`InputEvent`\ s, allowing the possibility of triggering one action with multiple different inputs. .. rst-class:: classref-reftable-group diff --git a/classes/class_string.rst b/classes/class_string.rst index 13bb8f86efc..1622247b069 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -704,7 +704,7 @@ Returns the index of the **first** **case-insensitive** occurrence of ``what`` i Formats the string by replacing all occurrences of ``placeholder`` with the elements of ``values``. -\ ``values`` can be a :ref:`Dictionary` or an :ref:`Array`. Any underscores in ``placeholder`` will be replaced with the corresponding keys in advance. Array elements use their index as keys. +\ ``values`` can be a :ref:`Dictionary`, an :ref:`Array` or an :ref:`Object`. Any underscores in ``placeholder`` will be replaced with the corresponding keys in advance. Array elements use their index as keys. :: @@ -723,6 +723,14 @@ Some additional handling is performed when ``values`` is an :ref:`Array`, the property names from :ref:`Object.get_property_list` are used as keys. + +:: + + # Prints: Visible true, position (0, 0). + var node = Node2D.new() + print("Visible {visible}, position {position}".format(node)) + See also the :doc:`GDScript format string <../tutorials/scripting/gdscript/gdscript_format_string>` tutorial. \ **Note:** The replacement of placeholders is not done all at once, instead each placeholder is replaced in the order they are passed, this means that if one of the replacement strings contains a key it will also be replaced. This can be very powerful, but can also cause unexpected results if you are not careful. If you do not need to perform replacement in the replacement strings, make sure your replacements do not contain placeholders to ensure reliable results.