Merge pull request #47584 from HaSa1002/docs-lang-7

This commit is contained in:
Rémi Verschelde 2021-06-11 14:35:45 +02:00 committed by GitHub
commit 74b3b0db0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 8 deletions

View file

@ -81,10 +81,16 @@
<description>
Returns the viewport's texture.
[b]Note:[/b] Due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture2D.get_image] to flip it back, for example:
[codeblock]
[codeblocks]
[gdscript]
var img = get_viewport().get_texture().get_image()
img.flip_y()
[/codeblock]
[/gdscript]
[csharp]
Image img = GetViewport().GetTexture().GetImage();
img.FlipY();
[/csharp]
[/codeblocks]
</description>
</method>
<method name="get_viewport_rid" qualifiers="const">