summaryrefslogtreecommitdiff
path: root/doc/classes/Viewport.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/Viewport.xml')
-rw-r--r--doc/classes/Viewport.xml11
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 7a60ca9fa6..ce61f51b9a 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Viewport" inherits="Node" version="4.0">
+<class name="Viewport" inherits="Node" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
- Creates a sub-view into the screen.
+ Base class for viewports.
</brief_description>
<description>
A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera3D 3D nodes will render on it too.
Optionally, a viewport can have its own 2D or 3D world, so they don't share what they draw with other viewports.
- If a viewport is a child of a [SubViewportContainer], it will automatically take up its size, otherwise it must be set manually.
Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it.
Also, viewports can be assigned to different screens in case the devices have multiple screens.
Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw.
@@ -55,7 +54,7 @@
<method name="get_mouse_position" qualifiers="const">
<return type="Vector2" />
<description>
- Returns the mouse's positon in this [Viewport] using the coordinate system of this [Viewport].
+ Returns the mouse's position in this [Viewport] using the coordinate system of this [Viewport].
</description>
</method>
<method name="get_render_info">
@@ -128,7 +127,7 @@
<method name="gui_release_focus">
<return type="void" />
<description>
- Removes the focus from the currently focussed [Control] within this viewport. If no [Control] has the focus, does nothing.
+ Removes the focus from the currently focused [Control] within this viewport. If no [Control] has the focus, does nothing.
</description>
</method>
<method name="is_embedding_subwindows" qualifiers="const">
@@ -285,6 +284,8 @@
<member name="use_debanding" type="bool" setter="set_use_debanding" getter="is_using_debanding" default="false">
</member>
<member name="use_occlusion_culling" type="bool" setter="set_use_occlusion_culling" getter="is_using_occlusion_culling" default="false">
+ If [code]true[/code], [OccluderInstance3D] nodes will be usable for occlusion culling in 3D for this viewport. For the root viewport, [member ProjectSettings.rendering/occlusion_culling/use_occlusion_culling] must be set to [code]true[/code] instead.
+ [b]Note:[/b] Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it, and think whether your scene can actually benefit from occlusion culling. Large, open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges ([member GeometryInstance3D.visibility_range_begin] and [member GeometryInstance3D.visibility_range_end]) compared to occlusion culling.
</member>
<member name="use_xr" type="bool" setter="set_use_xr" getter="is_using_xr" default="false">
If [code]true[/code], the viewport will use the primary XR interface to render XR output. When applicable this can result in a stereoscopic image and the resulting render being output to a headset.