diff --git a/doc/classes/SubViewport.xml b/doc/classes/SubViewport.xml index c439c1d016a..b62c294f2c6 100644 --- a/doc/classes/SubViewport.xml +++ b/doc/classes/SubViewport.xml @@ -4,6 +4,7 @@ Creates a sub-view into the screen. + [SubViewport] is a [Viewport] that isn't a [Window], i.e. it doesn't draw anything by itself. To display something, [SubViewport]'s [member size] must be non-zero and it should be either put inside a [SubViewportContainer] or assigned to a [ViewportTexture]. $DOCS_URL/tutorials/rendering/viewports.html diff --git a/doc/classes/SubViewportContainer.xml b/doc/classes/SubViewportContainer.xml index 050186a8837..c8babb8f436 100644 --- a/doc/classes/SubViewportContainer.xml +++ b/doc/classes/SubViewportContainer.xml @@ -4,7 +4,7 @@ Control for holding [SubViewport]s. - A [Container] node that holds a [SubViewport], automatically setting its size. + A [Container] node that holds a [SubViewport]. It uses the [SubViewport]'s size as minimum size, unless [member stretch] is enabled. [b]Note:[/b] Changing a SubViewportContainer's [member Control.rect_scale] will cause its contents to appear distorted. To change its visual size without causing distortion, adjust the node's margins instead (if it's not already in a container). [b]Note:[/b] The SubViewportContainer forwards mouse-enter and mouse-exit notifications to its sub-viewports. @@ -12,7 +12,7 @@ - If [code]true[/code], the sub-viewport will be scaled to the control's size. + If [code]true[/code], the sub-viewport will be automatically resized to the control's size. Divides the sub-viewport's effective resolution by this value while preserving its scale. This can be used to speed up rendering. diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 531b09c6a0b..ce61f51b9a7 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -1,12 +1,11 @@ - Creates a sub-view into the screen. + Base class for viewports. 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.