diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-02-22 15:11:32 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2019-02-22 15:11:32 +0100 |
commit | 8b9ec8bc8820c0756544ecce45d8e867b7aad17b (patch) | |
tree | 7035c730fd08d37172ba4f469f55cce61fc04486 /doc/classes | |
parent | edbf1d0ea49517be80e514595fc71d7069423edb (diff) |
Document that ViewportTexture is flipped on Y
Fixes #26141.
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Viewport.xml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 880dc43c90..09891ca889 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -80,7 +80,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"> |