mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 19:42:43 +00:00
Updated tutorial_viewports (markdown)
parent
98760f2433
commit
4bd34e120a
@ -4,7 +4,7 @@
|
||||
|
||||
Godot has a small but very useful feature called viewports. Viewports are, as they name implies, rectangles where the world is drawn. They have three main uses, but can flexibly adapted to a lot more. All this is done via the [Viewport](class_viewport) node.
|
||||
|
||||
image
|
||||
<p align="center"><img src="images/viewportnode.png"></p>
|
||||
|
||||
The main uses in question are:
|
||||
|
||||
@ -84,6 +84,10 @@ If the viewport is a child of a control, it will become active and display anyth
|
||||
|
||||
The viewport will cover the area of it's parent control completely.
|
||||
|
||||
|
||||
<p align="center"><img src="images/subviewport.png"></p>
|
||||
|
||||
|
||||
### Render Target
|
||||
|
||||
To set as a render target, just toggle the "render target" property of the viewport to enabled. Note that whatever is inside will not be visible in the scene editor. To display the contents, the render target texture must be used. This can be requested via code using (for example):
|
||||
|
Loading…
Reference in New Issue
Block a user