summaryrefslogtreecommitdiff
path: root/doc/classes/SubViewport.xml
blob: c2a76b587f00029c763c4aad01f25132c58cc6ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?xml version="1.0" encoding="UTF-8" ?>
<class name="SubViewport" inherits="Viewport" version="4.0">
	<brief_description>
		Creates a sub-view into the screen.
	</brief_description>
	<description>
	</description>
	<tutorials>
		<link title="Using Viewports">https://docs.godotengine.org/en/latest/tutorials/rendering/viewports.html</link>
		<link title="Viewport and canvas transforms">https://docs.godotengine.org/en/latest/tutorials/2d/2d_transforms.html</link>
		<link title="GUI in 3D Demo">https://godotengine.org/asset-library/asset/127</link>
		<link title="3D in 2D Demo">https://godotengine.org/asset-library/asset/128</link>
		<link title="2D in 3D Demo">https://godotengine.org/asset-library/asset/129</link>
		<link title="Screen Capture Demo">https://godotengine.org/asset-library/asset/130</link>
		<link title="Dynamic Split Screen Demo">https://godotengine.org/asset-library/asset/541</link>
		<link title="3D Viewport Scaling Demo">https://godotengine.org/asset-library/asset/586</link>
	</tutorials>
	<members>
		<member name="render_target_clear_mode" type="int" setter="set_clear_mode" getter="get_clear_mode" enum="SubViewport.ClearMode" default="0">
			The clear mode when the sub-viewport is used as a render target.
			[b]Note:[/b] This property is intended for 2D usage.
		</member>
		<member name="render_target_update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="SubViewport.UpdateMode" default="2">
			The update mode when the sub-viewport is used as a render target.
		</member>
		<member name="size" type="Vector2i" setter="set_size" getter="get_size" default="Vector2i(512, 512)">
			The width and height of the sub-viewport.
		</member>
		<member name="size_2d_override" type="Vector2i" setter="set_size_2d_override" getter="get_size_2d_override" default="Vector2i(0, 0)">
			The 2D size override of the sub-viewport. If either the width or height is [code]0[/code], the override is disabled.
		</member>
		<member name="size_2d_override_stretch" type="bool" setter="set_size_2d_override_stretch" getter="is_size_2d_override_stretch_enabled" default="false">
			If [code]true[/code], the 2D size override affects stretch as well.
		</member>
	</members>
	<constants>
		<constant name="CLEAR_MODE_ALWAYS" value="0" enum="ClearMode">
			Always clear the render target before drawing.
		</constant>
		<constant name="CLEAR_MODE_NEVER" value="1" enum="ClearMode">
			Never clear the render target.
		</constant>
		<constant name="CLEAR_MODE_ONCE" value="2" enum="ClearMode">
			Clear the render target on the next frame, then switch to [constant CLEAR_MODE_NEVER].
		</constant>
		<constant name="UPDATE_DISABLED" value="0" enum="UpdateMode">
			Do not update the render target.
		</constant>
		<constant name="UPDATE_ONCE" value="1" enum="UpdateMode">
			Update the render target once, then switch to [constant UPDATE_DISABLED].
		</constant>
		<constant name="UPDATE_WHEN_VISIBLE" value="2" enum="UpdateMode">
			Update the render target only when it is visible. This is the default value.
		</constant>
		<constant name="UPDATE_WHEN_PARENT_VISIBLE" value="3" enum="UpdateMode">
			Update the render target only when its parent is visible.
		</constant>
		<constant name="UPDATE_ALWAYS" value="4" enum="UpdateMode">
			Always update the render target.
		</constant>
	</constants>
</class>