|
@@ -3795,12 +3795,11 @@
|
|
<description>
|
|
<description>
|
|
Copies the viewport to a region of the screen specified by [param rect]. If [method viewport_set_render_direct_to_screen] is [code]true[/code], then the viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to.
|
|
Copies the viewport to a region of the screen specified by [param rect]. If [method viewport_set_render_direct_to_screen] is [code]true[/code], then the viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to.
|
|
For example, you can set the root viewport to not render at all with the following code:
|
|
For example, you can set the root viewport to not render at all with the following code:
|
|
- FIXME: The method seems to be non-existent.
|
|
|
|
[codeblocks]
|
|
[codeblocks]
|
|
[gdscript]
|
|
[gdscript]
|
|
func _ready():
|
|
func _ready():
|
|
- get_viewport().set_attach_to_screen_rect(Rect2())
|
|
|
|
- $Viewport.set_attach_to_screen_rect(Rect2(0, 0, 600, 600))
|
|
|
|
|
|
+ RenderingServer.viewport_attach_to_screen(get_viewport().get_viewport_rid(), Rect2())
|
|
|
|
+ RenderingServer.viewport_attach_to_screen($Viewport.get_viewport_rid(), Rect2(0, 0, 600, 600))
|
|
[/gdscript]
|
|
[/gdscript]
|
|
[/codeblocks]
|
|
[/codeblocks]
|
|
Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For further optimization, see [method viewport_set_render_direct_to_screen].
|
|
Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For further optimization, see [method viewport_set_render_direct_to_screen].
|
|
@@ -4599,27 +4598,37 @@
|
|
Flag used to mark an index array.
|
|
Flag used to mark an index array.
|
|
</constant>
|
|
</constant>
|
|
<constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="7" enum="ArrayFormat" is_bitfield="true">
|
|
<constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="7" enum="ArrayFormat" is_bitfield="true">
|
|
|
|
+ Mask of mesh channels permitted in blend shapes.
|
|
</constant>
|
|
</constant>
|
|
<constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat" is_bitfield="true">
|
|
<constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat" is_bitfield="true">
|
|
|
|
+ Shift of first custom channel.
|
|
</constant>
|
|
</constant>
|
|
<constant name="ARRAY_FORMAT_CUSTOM_BITS" value="3" enum="ArrayFormat" is_bitfield="true">
|
|
<constant name="ARRAY_FORMAT_CUSTOM_BITS" value="3" enum="ArrayFormat" is_bitfield="true">
|
|
|
|
+ Number of format bits per custom channel. See [enum ArrayCustomFormat].
|
|
</constant>
|
|
</constant>
|
|
<constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat" is_bitfield="true">
|
|
<constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat" is_bitfield="true">
|
|
|
|
+ Amount to shift [enum ArrayCustomFormat] for custom channel index 0.
|
|
</constant>
|
|
</constant>
|
|
<constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat" is_bitfield="true">
|
|
<constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat" is_bitfield="true">
|
|
|
|
+ Amount to shift [enum ArrayCustomFormat] for custom channel index 1.
|
|
</constant>
|
|
</constant>
|
|
<constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" enum="ArrayFormat" is_bitfield="true">
|
|
<constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" enum="ArrayFormat" is_bitfield="true">
|
|
|
|
+ Amount to shift [enum ArrayCustomFormat] for custom channel index 2.
|
|
</constant>
|
|
</constant>
|
|
<constant name="ARRAY_FORMAT_CUSTOM3_SHIFT" value="22" enum="ArrayFormat" is_bitfield="true">
|
|
<constant name="ARRAY_FORMAT_CUSTOM3_SHIFT" value="22" enum="ArrayFormat" is_bitfield="true">
|
|
|
|
+ Amount to shift [enum ArrayCustomFormat] for custom channel index 3.
|
|
</constant>
|
|
</constant>
|
|
<constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat" is_bitfield="true">
|
|
<constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat" is_bitfield="true">
|
|
|
|
+ Mask of custom format bits per custom channel. Must be shifted by one of the SHIFT constants. See [enum ArrayCustomFormat].
|
|
</constant>
|
|
</constant>
|
|
<constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat" is_bitfield="true">
|
|
<constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat" is_bitfield="true">
|
|
|
|
+ Shift of first compress flag. Compress flags should be passed to [method ArrayMesh.add_surface_from_arrays] and [method SurfaceTool.commit].
|
|
</constant>
|
|
</constant>
|
|
<constant name="ARRAY_FLAG_USE_2D_VERTICES" value="33554432" enum="ArrayFormat" is_bitfield="true">
|
|
<constant name="ARRAY_FLAG_USE_2D_VERTICES" value="33554432" enum="ArrayFormat" is_bitfield="true">
|
|
Flag used to mark that the array contains 2D vertices.
|
|
Flag used to mark that the array contains 2D vertices.
|
|
</constant>
|
|
</constant>
|
|
<constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat" is_bitfield="true">
|
|
<constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat" is_bitfield="true">
|
|
|
|
+ Flag indices that the mesh data will use [code]GL_DYNAMIC_DRAW[/code] on GLES. Unused on Vulkan.
|
|
</constant>
|
|
</constant>
|
|
<constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat" is_bitfield="true">
|
|
<constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat" is_bitfield="true">
|
|
Flag used to mark that the array uses 8 bone weights instead of 4.
|
|
Flag used to mark that the array uses 8 bone weights instead of 4.
|