Browse Source

multiple_resolutions.rst: Clear up confusing use of terms window and viewport

Clear up a potential misunderstanding for new users.

When I first read this documentation, it left me with the impression that there's a `/root` viewport which lives inside of the window object. This false lesson was reinforced by the existing of both `get_window()` and `get_viewport()` in the API.
Jonathan Paugh 1 year ago
parent
commit
af5deac0db
1 changed files with 8 additions and 0 deletions
  1. 8 0
      tutorials/rendering/multiple_resolutions.rst

+ 8 - 0
tutorials/rendering/multiple_resolutions.rst

@@ -72,6 +72,14 @@ that are different from this base size. Godot offers many ways to
 control how the viewport will be resized and stretched to different
 control how the viewport will be resized and stretched to different
 screen sizes.
 screen sizes.
 
 
+.. note::
+
+   On this page, *window* refers to the screen area alloted to your game
+   by the system, while *viewport* refers to the root object (accessible 
+   from ``get_tree().root``) which the game controls to fill this screen area.
+   This viewport is a :ref:`Window <class_Window>` instance. Recall from the
+   :ref:`introduction <doc_viewports>` that *all* Window objects are viewports.
+
 To configure the stretch base size at runtime from a script, use the
 To configure the stretch base size at runtime from a script, use the
 ``get_tree().root.content_scale_size`` property (see
 ``get_tree().root.content_scale_size`` property (see
 :ref:`Window.content_scale_size <class_Window_property_content_scale_size>`).
 :ref:`Window.content_scale_size <class_Window_property_content_scale_size>`).