diff options
Diffstat (limited to 'doc/classes/Viewport.xml')
-rw-r--r-- | doc/classes/Viewport.xml | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 880dc43c90..53e66cee74 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"> @@ -251,6 +253,9 @@ <member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking"> If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process. Default value: [code]false[/code]. </member> + <member name="render_direct_to_screen" type="bool" setter="set_use_render_direct_to_screen" getter="is_using_render_direct_to_screen"> + If [code]true[/code], renders the Viewport directly to the screen instead of to the root viewport. Only available in GLES2. This is a low-level optimization and should not be used in most cases. If used, reading from the Viewport or from [code]SCREEN_TEXTURE[/code] becomes unavailable. For more information see [method VisualServer.viewport_set_render_direct_to_screen]. Default value: [code]false[/code]. + </member> <member name="render_target_clear_mode" type="int" setter="set_clear_mode" getter="get_clear_mode" enum="Viewport.ClearMode"> The clear mode when viewport used as a render target. Default value: [code]CLEAR_MODE_ALWAYS[/code]. </member> |