Updated Viewports with cull_mask info and post_frame signal

This commit is contained in:
clayjohn
2019-09-18 08:24:40 -07:00
parent 247ba2144c
commit 8d1e9783d2

View File

@@ -80,6 +80,11 @@ or make it the current camera by calling:
camera.make_current()
By default, cameras will render all objects in their world. In 3D, cameras can use their
:ref:`cull_mask <class_Camera_property_cull_mask>` property combined with the
:ref:`VisualInstance's <class_VisualInstance>` :ref:`layer <class_VisualInstance_property_layers>`
property to restrict which objects are rendered.
Scale & stretching
------------------
@@ -150,15 +155,10 @@ it using (for example):
::
# Let two frames pass to make sure the screen can be captured.
yield(get_tree(), "idle_frame")
yield(get_tree(), "idle_frame")
# Wait until the frame has finished before getting the texture
yield(VisualServer, "frame_post_draw")
# You can get the image after this.
If the returned image is empty, capture still didn't happen, wait a
little more, as Godot's rendering API is asynchronous. For a working example of this,
check out the `Screen Capture example <https://github.com/godotengine/godot-demo-projects/tree/master/viewport/screen_capture>`_ in the demo projects
Viewport Container
------------------