Browse Source

classref: Sync with current master branch (a3b42d8)

Godot Organization 1 day ago
parent
commit
85131fb8cb

+ 41 - 0
classes/class_cameraserver.rst

@@ -86,6 +86,18 @@ Emitted when a :ref:`CameraFeed<class_CameraFeed>` is added (e.g. a webcam is pl
 
 Emitted when a :ref:`CameraFeed<class_CameraFeed>` is removed (e.g. a webcam is unplugged).
 
+.. rst-class:: classref-item-separator
+
+----
+
+.. _class_CameraServer_signal_camera_feeds_updated:
+
+.. rst-class:: classref-signal
+
+**camera_feeds_updated**\ (\ ) :ref:`🔗<class_CameraServer_signal_camera_feeds_updated>`
+
+Emitted when camera feeds are updated.
+
 .. rst-class:: classref-section-separator
 
 ----
@@ -157,6 +169,35 @@ If ``true``, the server is actively monitoring available camera feeds.
 
 This has a performance cost, so only set it to ``true`` when you're actively accessing the camera.
 
+\ **Note:** After setting it to ``true``, you can receive updated camera feeds through the :ref:`camera_feeds_updated<class_CameraServer_signal_camera_feeds_updated>` signal.
+
+
+.. tabs::
+
+ .. code-tab:: gdscript
+
+    func _ready():
+        CameraServer.camera_feeds_updated.connect(_on_camera_feeds_updated)
+        CameraServer.monitoring_feeds = true
+
+    func _on_camera_feeds_updated():
+        var feeds = CameraServer.feeds()
+
+ .. code-tab:: csharp
+
+    public override void _Ready()
+    {
+        CameraServer.CameraFeedsUpdated += OnCameraFeedsUpdated;
+        CameraServer.MonitoringFeeds = true;
+    }
+
+    void OnCameraFeedsUpdated()
+    {
+        var feeds = CameraServer.Feeds();
+    }
+
+
+
 .. rst-class:: classref-section-separator
 
 ----

+ 2 - 0
classes/class_label.rst

@@ -494,6 +494,8 @@ The number of characters to display. If set to ``-1``, all characters are displa
 
 \ **Note:** Setting this property updates :ref:`visible_ratio<class_Label_property_visible_ratio>` accordingly.
 
+\ **Note:** Characters are counted as Unicode codepoints. A single visible grapheme may contain multiple codepoints (e.g. certain emoji use three codepoints). A single codepoint may contain two UTF-16 characters, which are used in C# strings.
+
 .. rst-class:: classref-item-separator
 
 ----

+ 24 - 0
classes/class_os.rst

@@ -1481,6 +1481,30 @@ The second element holds the driver version. For example, on the ``nvidia`` driv
 
 \ **Note:** This method is only supported on Linux/BSD and Windows when not running in headless mode. On other platforms, it returns an empty array.
 
+\ **Note:** This method will run slowly the first time it is called in a session; it can take several seconds depending on the operating system and hardware. It is blocking if called on the main thread, so it's recommended to call it on a separate thread using :ref:`Thread<class_Thread>`. This allows the engine to keep running while the information is being retrieved. However, :ref:`get_video_adapter_driver_info()<class_OS_method_get_video_adapter_driver_info>` is *not* thread-safe, so it should not be called from multiple threads at the same time.
+
+
+.. tabs::
+
+ .. code-tab:: gdscript
+
+    var thread = Thread.new()
+
+    func _ready():
+        thread.start(
+            func():
+                var driver_info = OS.get_video_adapter_driver_info()
+                if not driver_info.is_empty():
+                    print("Driver: %s %s" % [driver_info[0], driver_info[1]])
+                else:
+                    print("Driver: (unknown)")
+        )
+
+    func _exit_tree():
+        thread.wait_to_finish()
+
+
+
 .. rst-class:: classref-item-separator
 
 ----

+ 6 - 4
classes/class_renderingserver.rst

@@ -8332,7 +8332,11 @@ Tries to free an object in the RenderingServer. To avoid memory leaks, this shou
 
 Returns the name of the current rendering driver. This can be ``vulkan``, ``d3d12``, ``metal``, ``opengl3``, ``opengl3_es``, or ``opengl3_angle``. See also :ref:`get_current_rendering_method()<class_RenderingServer_method_get_current_rendering_method>`.
 
-The rendering driver is determined by :ref:`ProjectSettings.rendering/rendering_device/driver<class_ProjectSettings_property_rendering/rendering_device/driver>`, the ``--rendering-driver`` command line argument that overrides this project setting, or an automatic fallback that is applied depending on the hardware.
+When :ref:`ProjectSettings.rendering/renderer/rendering_method<class_ProjectSettings_property_rendering/renderer/rendering_method>` is ``forward_plus`` or ``mobile``, the rendering driver is determined by :ref:`ProjectSettings.rendering/rendering_device/driver<class_ProjectSettings_property_rendering/rendering_device/driver>`.
+
+When :ref:`ProjectSettings.rendering/renderer/rendering_method<class_ProjectSettings_property_rendering/renderer/rendering_method>` is ``gl_compatibility``, the rendering driver is determined by :ref:`ProjectSettings.rendering/gl_compatibility/driver<class_ProjectSettings_property_rendering/gl_compatibility/driver>`.
+
+The rendering driver is also determined by the ``--rendering-driver`` command line argument that overrides this project setting, or an automatic fallback that is applied depending on the hardware.
 
 .. rst-class:: classref-item-separator
 
@@ -12487,9 +12491,7 @@ Equivalent to :ref:`Viewport.use_debanding<class_Viewport_property_use_debanding
 
 |void| **viewport_set_use_hdr_2d**\ (\ viewport\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_RenderingServer_method_viewport_set_use_hdr_2d>`
 
-If ``true``, 2D rendering will use a high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be an ``RGBA16`` framebuffer, while when using the Mobile renderer it will be an ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. This setting has the same effect as :ref:`Viewport.use_hdr_2d<class_Viewport_property_use_hdr_2d>`.
-
-\ **Note:** This setting will have no effect when using the Compatibility renderer, which always renders in low dynamic range for performance reasons.
+If ``true``, 2D rendering will use a high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ or Compatibility rendering method this will be an ``RGBA16`` framebuffer, while when using the Mobile rendering method it will be an ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. This setting has the same effect as :ref:`Viewport.use_hdr_2d<class_Viewport_property_use_hdr_2d>`.
 
 .. rst-class:: classref-item-separator
 

+ 2 - 0
classes/class_richtextlabel.rst

@@ -1110,6 +1110,8 @@ The number of characters to display. If set to ``-1``, all characters are displa
 
 \ **Note:** Setting this property updates :ref:`visible_ratio<class_RichTextLabel_property_visible_ratio>` accordingly.
 
+\ **Note:** Characters are counted as Unicode codepoints. A single visible grapheme may contain multiple codepoints (e.g. certain emoji use three codepoints). A single codepoint may contain two UTF-16 characters, which are used in C# strings.
+
 .. rst-class:: classref-item-separator
 
 ----

+ 14 - 0
classes/class_svgtexture.rst

@@ -50,6 +50,8 @@ Methods
    +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | :ref:`SVGTexture<class_SVGTexture>` | :ref:`create_from_string<class_SVGTexture_method_create_from_string>`\ (\ source\: :ref:`String<class_String>`, scale\: :ref:`float<class_float>` = 1.0, saturation\: :ref:`float<class_float>` = 1.0, color_map\: :ref:`Dictionary<class_Dictionary>` = {}\ ) |static| |
    +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+   | :ref:`RID<class_RID>`               | :ref:`get_scaled_rid<class_SVGTexture_method_get_scaled_rid>`\ (\ ) |const|                                                                                                                                                                                             |
+   +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | :ref:`String<class_String>`         | :ref:`get_source<class_SVGTexture_method_get_source>`\ (\ ) |const|                                                                                                                                                                                                     |
    +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | |void|                              | :ref:`set_size_override<class_SVGTexture_method_set_size_override>`\ (\ size\: :ref:`Vector2i<class_Vector2i>`\ )                                                                                                                                                       |
@@ -134,6 +136,18 @@ Creates a new **SVGTexture** and initializes it by allocating and setting the SV
 
 ----
 
+.. _class_SVGTexture_method_get_scaled_rid:
+
+.. rst-class:: classref-method
+
+:ref:`RID<class_RID>` **get_scaled_rid**\ (\ ) |const| :ref:`🔗<class_SVGTexture_method_get_scaled_rid>`
+
+Returns the :ref:`RID<class_RID>` of the texture rasterized to match the oversampling of the currently drawn canvas item.
+
+.. rst-class:: classref-item-separator
+
+----
+
 .. _class_SVGTexture_method_get_source:
 
 .. rst-class:: classref-method

+ 3 - 1
classes/class_tree.rst

@@ -443,7 +443,9 @@ Emitted when an item is double-clicked, or selected with a ``ui_accept`` input e
 
 **item_collapsed**\ (\ item\: :ref:`TreeItem<class_TreeItem>`\ ) :ref:`🔗<class_Tree_signal_item_collapsed>`
 
-Emitted when an item is collapsed by a click on the folding arrow.
+Emitted when an item is expanded or collapsed by clicking on the folding arrow or through code.
+
+\ **Note:** Despite its name, this signal is also emitted when an item is expanded.
 
 .. rst-class:: classref-item-separator
 

+ 1 - 3
classes/class_viewport.rst

@@ -1966,9 +1966,7 @@ See also :ref:`ProjectSettings.rendering/anti_aliasing/quality/use_debanding<cla
 - |void| **set_use_hdr_2d**\ (\ value\: :ref:`bool<class_bool>`\ )
 - :ref:`bool<class_bool>` **is_using_hdr_2d**\ (\ )
 
-If ``true``, 2D rendering will use a high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be an ``RGBA16`` framebuffer, while when using the Mobile renderer it will be an ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients.
-
-\ **Note:** This setting will have no effect when using the Compatibility renderer, which always renders in low dynamic range for performance reasons.
+If ``true``, 2D rendering will use a high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ or Compatibility rendering method this will be an ``RGBA16`` framebuffer, while when using the Mobile rendering method it will be an ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients.
 
 .. rst-class:: classref-item-separator