Click or drag to resize

ViewportGetTexture Method

Returns the viewport's texture.

Note: Due to the way OpenGL works, the resulting ViewportTexture is flipped vertically. You can use FlipY on the result of GetData to flip it back, for example:

var img = get_viewport().get_texture().get_data()
img.flip_y()

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public ViewportTexture GetTexture()

Return Value

Type: ViewportTexture

[Missing <returns> documentation for "M:Godot.Viewport.GetTexture"]

See Also