Document that ViewportTexture is flipped on Y

Fixes #26141.
This commit is contained in:
Rémi Verschelde 2019-02-22 15:11:32 +01:00
parent edbf1d0ea4
commit 8b9ec8bc88
1 changed files with 5 additions and 1 deletions

View File

@ -80,7 +80,11 @@
<return type="ViewportTexture"> <return type="ViewportTexture">
</return> </return>
<description> <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> </description>
</method> </method>
<method name="get_viewport_rid" qualifiers="const"> <method name="get_viewport_rid" qualifiers="const">