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.xml10
1 files changed, 6 insertions, 4 deletions
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 880dc43c90..b48dc9de35 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Viewport" inherits="Node" category="Core" version="3.1">
+<class name="Viewport" inherits="Node" category="Core" version="3.2">
<brief_description>
Creates a sub-view into the screen.
</brief_description>
@@ -15,8 +15,6 @@
<link>https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
<link>https://docs.godotengine.org/en/latest/tutorials/viewports/index.html</link>
</tutorials>
- <demos>
- </demos>
<methods>
<method name="find_world" qualifiers="const">
<return type="World">
@@ -80,7 +78,11 @@
<return type="ViewportTexture">
</return>
<description>
- Returns the viewport's texture.
+ Returns the viewport's texture. Note that due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture.get_data] to flip it back, for example:
+ [codeblock]
+ var img = get_viewport().get_texture().get_data()
+ img.flip_y()
+ [/codeblock]
</description>
</method>
<method name="get_viewport_rid" qualifiers="const">