1 /**
2 Creates a sub-view into the screen.
3 
4 Copyright:
5 Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.  
6 Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)  
7 Copyright (c) 2017-2018 Godot-D contributors  
8 
9 License: $(LINK2 https://opensource.org/licenses/MIT, MIT License)
10 
11 
12 */
13 module godot.viewport;
14 import std.meta : AliasSeq, staticIndexOf;
15 import std.traits : Unqual;
16 import godot.d.traits;
17 import godot.core;
18 import godot.c;
19 import godot.d.bind;
20 import godot.d.reference;
21 import godot.globalenums;
22 import godot.object;
23 import godot.classdb;
24 import godot.node;
25 import godot.inputevent;
26 import godot.world;
27 import godot.world2d;
28 import godot.camera;
29 import godot.control;
30 import godot.viewporttexture;
31 /**
32 Creates a sub-view into the screen.
33 
34 A Viewport creates a different view into the screen, or a sub-view inside another viewport. Children 2D Nodes will display on it, and children Camera 3D nodes will render on it too.
35 Optionally, a viewport can have its own 2D or 3D world, so they don't share what they draw with other viewports.
36 If a viewport is a child of a $(D ViewportContainer), it will automatically take up its size, otherwise it must be set manually.
37 Viewports can also choose to be audio listeners, so they generate positional audio depending on a 2D or 3D camera child of it.
38 Also, viewports can be assigned to different screens in case the devices have multiple screens.
39 Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw.
40 */
41 @GodotBaseClass struct Viewport
42 {
43 	package(godot) enum string _GODOT_internal_name = "Viewport";
44 public:
45 @nogc nothrow:
46 	union { /** */ godot_object _godot_object; /** */ Node _GODOT_base; }
47 	alias _GODOT_base this;
48 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
49 	package(godot) __gshared bool _classBindingInitialized = false;
50 	package(godot) static struct GDNativeClassBinding
51 	{
52 		__gshared:
53 		@GodotName("_gui_remove_focus") GodotMethod!(void) _guiRemoveFocus;
54 		@GodotName("_gui_show_tooltip") GodotMethod!(void) _guiShowTooltip;
55 		@GodotName("_own_world_changed") GodotMethod!(void) _ownWorldChanged;
56 		@GodotName("_post_gui_grab_click_focus") GodotMethod!(void) _postGuiGrabClickFocus;
57 		@GodotName("_process_picking") GodotMethod!(void, bool) _processPicking;
58 		@GodotName("_subwindow_visibility_changed") GodotMethod!(void) _subwindowVisibilityChanged;
59 		@GodotName("_vp_input") GodotMethod!(void, InputEvent) _vpInput;
60 		@GodotName("_vp_input_text") GodotMethod!(void, String) _vpInputText;
61 		@GodotName("_vp_unhandled_input") GodotMethod!(void, InputEvent) _vpUnhandledInput;
62 		@GodotName("find_world") GodotMethod!(World) findWorld;
63 		@GodotName("find_world_2d") GodotMethod!(World2D) findWorld2d;
64 		@GodotName("get_camera") GodotMethod!(Camera) getCamera;
65 		@GodotName("get_canvas_transform") GodotMethod!(Transform2D) getCanvasTransform;
66 		@GodotName("get_clear_mode") GodotMethod!(Viewport.ClearMode) getClearMode;
67 		@GodotName("get_debug_draw") GodotMethod!(Viewport.DebugDraw) getDebugDraw;
68 		@GodotName("get_final_transform") GodotMethod!(Transform2D) getFinalTransform;
69 		@GodotName("get_global_canvas_transform") GodotMethod!(Transform2D) getGlobalCanvasTransform;
70 		@GodotName("get_hdr") GodotMethod!(bool) getHdr;
71 		@GodotName("get_keep_3d_linear") GodotMethod!(bool) getKeep3dLinear;
72 		@GodotName("get_modal_stack_top") GodotMethod!(Control) getModalStackTop;
73 		@GodotName("get_mouse_position") GodotMethod!(Vector2) getMousePosition;
74 		@GodotName("get_msaa") GodotMethod!(Viewport.MSAA) getMsaa;
75 		@GodotName("get_physics_object_picking") GodotMethod!(bool) getPhysicsObjectPicking;
76 		@GodotName("get_render_info") GodotMethod!(long, long) getRenderInfo;
77 		@GodotName("get_shadow_atlas_quadrant_subdiv") GodotMethod!(Viewport.ShadowAtlasQuadrantSubdiv, long) getShadowAtlasQuadrantSubdiv;
78 		@GodotName("get_shadow_atlas_size") GodotMethod!(long) getShadowAtlasSize;
79 		@GodotName("get_size") GodotMethod!(Vector2) getSize;
80 		@GodotName("get_size_override") GodotMethod!(Vector2) getSizeOverride;
81 		@GodotName("get_texture") GodotMethod!(ViewportTexture) getTexture;
82 		@GodotName("get_update_mode") GodotMethod!(Viewport.UpdateMode) getUpdateMode;
83 		@GodotName("get_usage") GodotMethod!(Viewport.Usage) getUsage;
84 		@GodotName("get_use_debanding") GodotMethod!(bool) getUseDebanding;
85 		@GodotName("get_use_fxaa") GodotMethod!(bool) getUseFxaa;
86 		@GodotName("get_vflip") GodotMethod!(bool) getVflip;
87 		@GodotName("get_viewport_rid") GodotMethod!(RID) getViewportRid;
88 		@GodotName("get_visible_rect") GodotMethod!(Rect2) getVisibleRect;
89 		@GodotName("get_world") GodotMethod!(World) getWorld;
90 		@GodotName("get_world_2d") GodotMethod!(World2D) getWorld2d;
91 		@GodotName("gui_get_drag_data") GodotMethod!(Variant) guiGetDragData;
92 		@GodotName("gui_has_modal_stack") GodotMethod!(bool) guiHasModalStack;
93 		@GodotName("gui_is_dragging") GodotMethod!(bool) guiIsDragging;
94 		@GodotName("has_transparent_background") GodotMethod!(bool) hasTransparentBackground;
95 		@GodotName("input") GodotMethod!(void, InputEvent) input;
96 		@GodotName("is_3d_disabled") GodotMethod!(bool) is3dDisabled;
97 		@GodotName("is_audio_listener") GodotMethod!(bool) isAudioListener;
98 		@GodotName("is_audio_listener_2d") GodotMethod!(bool) isAudioListener2d;
99 		@GodotName("is_handling_input_locally") GodotMethod!(bool) isHandlingInputLocally;
100 		@GodotName("is_input_disabled") GodotMethod!(bool) isInputDisabled;
101 		@GodotName("is_input_handled") GodotMethod!(bool) isInputHandled;
102 		@GodotName("is_size_override_enabled") GodotMethod!(bool) isSizeOverrideEnabled;
103 		@GodotName("is_size_override_stretch_enabled") GodotMethod!(bool) isSizeOverrideStretchEnabled;
104 		@GodotName("is_snap_controls_to_pixels_enabled") GodotMethod!(bool) isSnapControlsToPixelsEnabled;
105 		@GodotName("is_using_own_world") GodotMethod!(bool) isUsingOwnWorld;
106 		@GodotName("is_using_render_direct_to_screen") GodotMethod!(bool) isUsingRenderDirectToScreen;
107 		@GodotName("set_as_audio_listener") GodotMethod!(void, bool) setAsAudioListener;
108 		@GodotName("set_as_audio_listener_2d") GodotMethod!(void, bool) setAsAudioListener2d;
109 		@GodotName("set_attach_to_screen_rect") GodotMethod!(void, Rect2) setAttachToScreenRect;
110 		@GodotName("set_canvas_transform") GodotMethod!(void, Transform2D) setCanvasTransform;
111 		@GodotName("set_clear_mode") GodotMethod!(void, long) setClearMode;
112 		@GodotName("set_debug_draw") GodotMethod!(void, long) setDebugDraw;
113 		@GodotName("set_disable_3d") GodotMethod!(void, bool) setDisable3d;
114 		@GodotName("set_disable_input") GodotMethod!(void, bool) setDisableInput;
115 		@GodotName("set_global_canvas_transform") GodotMethod!(void, Transform2D) setGlobalCanvasTransform;
116 		@GodotName("set_handle_input_locally") GodotMethod!(void, bool) setHandleInputLocally;
117 		@GodotName("set_hdr") GodotMethod!(void, bool) setHdr;
118 		@GodotName("set_input_as_handled") GodotMethod!(void) setInputAsHandled;
119 		@GodotName("set_keep_3d_linear") GodotMethod!(void, bool) setKeep3dLinear;
120 		@GodotName("set_msaa") GodotMethod!(void, long) setMsaa;
121 		@GodotName("set_physics_object_picking") GodotMethod!(void, bool) setPhysicsObjectPicking;
122 		@GodotName("set_shadow_atlas_quadrant_subdiv") GodotMethod!(void, long, long) setShadowAtlasQuadrantSubdiv;
123 		@GodotName("set_shadow_atlas_size") GodotMethod!(void, long) setShadowAtlasSize;
124 		@GodotName("set_size") GodotMethod!(void, Vector2) setSize;
125 		@GodotName("set_size_override") GodotMethod!(void, bool, Vector2, Vector2) setSizeOverride;
126 		@GodotName("set_size_override_stretch") GodotMethod!(void, bool) setSizeOverrideStretch;
127 		@GodotName("set_snap_controls_to_pixels") GodotMethod!(void, bool) setSnapControlsToPixels;
128 		@GodotName("set_transparent_background") GodotMethod!(void, bool) setTransparentBackground;
129 		@GodotName("set_update_mode") GodotMethod!(void, long) setUpdateMode;
130 		@GodotName("set_usage") GodotMethod!(void, long) setUsage;
131 		@GodotName("set_use_arvr") GodotMethod!(void, bool) setUseArvr;
132 		@GodotName("set_use_debanding") GodotMethod!(void, bool) setUseDebanding;
133 		@GodotName("set_use_fxaa") GodotMethod!(void, bool) setUseFxaa;
134 		@GodotName("set_use_own_world") GodotMethod!(void, bool) setUseOwnWorld;
135 		@GodotName("set_use_render_direct_to_screen") GodotMethod!(void, bool) setUseRenderDirectToScreen;
136 		@GodotName("set_vflip") GodotMethod!(void, bool) setVflip;
137 		@GodotName("set_world") GodotMethod!(void, World) setWorld;
138 		@GodotName("set_world_2d") GodotMethod!(void, World2D) setWorld2d;
139 		@GodotName("unhandled_input") GodotMethod!(void, InputEvent) unhandledInput;
140 		@GodotName("update_worlds") GodotMethod!(void) updateWorlds;
141 		@GodotName("use_arvr") GodotMethod!(bool) useArvr;
142 		@GodotName("warp_mouse") GodotMethod!(void, Vector2) warpMouse;
143 	}
144 	/// 
145 	pragma(inline, true) bool opEquals(in Viewport other) const
146 	{ return _godot_object.ptr is other._godot_object.ptr; }
147 	/// 
148 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
149 	{ _godot_object.ptr = n; return null; }
150 	/// 
151 	pragma(inline, true) bool opEquals(typeof(null) n) const
152 	{ return _godot_object.ptr is n; }
153 	/// 
154 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
155 	mixin baseCasts;
156 	/// Construct a new instance of Viewport.
157 	/// Note: use `memnew!Viewport` instead.
158 	static Viewport _new()
159 	{
160 		static godot_class_constructor constructor;
161 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("Viewport");
162 		if(constructor is null) return typeof(this).init;
163 		return cast(Viewport)(constructor());
164 	}
165 	@disable new(size_t s);
166 	/// 
167 	enum ClearMode : int
168 	{
169 		/**
170 		Always clear the render target before drawing.
171 		*/
172 		clearModeAlways = 0,
173 		/**
174 		Never clear the render target.
175 		*/
176 		clearModeNever = 1,
177 		/**
178 		Clear the render target next frame, then switch to $(D constant CLEAR_MODE_NEVER).
179 		*/
180 		clearModeOnlyNextFrame = 2,
181 	}
182 	/// 
183 	enum RenderInfo : int
184 	{
185 		/**
186 		Amount of objects in frame.
187 		*/
188 		renderInfoObjectsInFrame = 0,
189 		/**
190 		Amount of vertices in frame.
191 		*/
192 		renderInfoVerticesInFrame = 1,
193 		/**
194 		Amount of material changes in frame.
195 		*/
196 		renderInfoMaterialChangesInFrame = 2,
197 		/**
198 		Amount of shader changes in frame.
199 		*/
200 		renderInfoShaderChangesInFrame = 3,
201 		/**
202 		Amount of surface changes in frame.
203 		*/
204 		renderInfoSurfaceChangesInFrame = 4,
205 		/**
206 		Amount of draw calls in frame.
207 		*/
208 		renderInfoDrawCallsInFrame = 5,
209 		/**
210 		Amount of items or joined items in frame.
211 		*/
212 		renderInfo2dItemsInFrame = 6,
213 		/**
214 		Amount of draw calls in frame.
215 		*/
216 		renderInfo2dDrawCallsInFrame = 7,
217 		/**
218 		Represents the size of the $(D renderinfo) enum.
219 		*/
220 		renderInfoMax = 8,
221 	}
222 	/// 
223 	enum Usage : int
224 	{
225 		/**
226 		Allocates all buffers needed for drawing 2D scenes. This takes less VRAM than the 3D usage modes. Note that 3D rendering effects such as glow and HDR are not available when using this mode.
227 		*/
228 		usage2d = 0,
229 		/**
230 		Allocates buffers needed for 2D scenes without allocating a buffer for screen copy. Accordingly, you cannot read from the screen. Of the $(D usage) types, this requires the least VRAM. Note that 3D rendering effects such as glow and HDR are not available when using this mode.
231 		*/
232 		usage2dNoSampling = 1,
233 		/**
234 		Allocates full buffers for drawing 3D scenes and all 3D effects including buffers needed for 2D scenes and effects.
235 		*/
236 		usage3d = 2,
237 		/**
238 		Allocates buffers needed for drawing 3D scenes. But does not allocate buffers needed for reading from the screen and post-processing effects. Saves some VRAM.
239 		*/
240 		usage3dNoEffects = 3,
241 	}
242 	/// 
243 	enum DebugDraw : int
244 	{
245 		/**
246 		Objects are displayed normally.
247 		*/
248 		debugDrawDisabled = 0,
249 		/**
250 		Objects are displayed without light information.
251 		*/
252 		debugDrawUnshaded = 1,
253 		/**
254 		Objected are displayed semi-transparent with additive blending so you can see where they intersect.
255 		*/
256 		debugDrawOverdraw = 2,
257 		/**
258 		Objects are displayed in wireframe style.
259 		*/
260 		debugDrawWireframe = 3,
261 	}
262 	/// 
263 	enum ShadowAtlasQuadrantSubdiv : int
264 	{
265 		/**
266 		This quadrant will not be used.
267 		*/
268 		shadowAtlasQuadrantSubdivDisabled = 0,
269 		/**
270 		This quadrant will only be used by one shadow map.
271 		*/
272 		shadowAtlasQuadrantSubdiv1 = 1,
273 		/**
274 		This quadrant will be split in 4 and used by up to 4 shadow maps.
275 		*/
276 		shadowAtlasQuadrantSubdiv4 = 2,
277 		/**
278 		This quadrant will be split 16 ways and used by up to 16 shadow maps.
279 		*/
280 		shadowAtlasQuadrantSubdiv16 = 3,
281 		/**
282 		This quadrant will be split 64 ways and used by up to 64 shadow maps.
283 		*/
284 		shadowAtlasQuadrantSubdiv64 = 4,
285 		/**
286 		This quadrant will be split 256 ways and used by up to 256 shadow maps. Unless the $(D shadowAtlasSize) is very high, the shadows in this quadrant will be very low resolution.
287 		*/
288 		shadowAtlasQuadrantSubdiv256 = 5,
289 		/**
290 		This quadrant will be split 1024 ways and used by up to 1024 shadow maps. Unless the $(D shadowAtlasSize) is very high, the shadows in this quadrant will be very low resolution.
291 		*/
292 		shadowAtlasQuadrantSubdiv1024 = 6,
293 		/**
294 		Represents the size of the $(D shadowatlasquadrantsubdiv) enum.
295 		*/
296 		shadowAtlasQuadrantSubdivMax = 7,
297 	}
298 	/// 
299 	enum UpdateMode : int
300 	{
301 		/**
302 		Do not update the render target.
303 		*/
304 		updateDisabled = 0,
305 		/**
306 		Update the render target once, then switch to $(D constant UPDATE_DISABLED).
307 		*/
308 		updateOnce = 1,
309 		/**
310 		Update the render target only when it is visible. This is the default value.
311 		*/
312 		updateWhenVisible = 2,
313 		/**
314 		Always update the render target.
315 		*/
316 		updateAlways = 3,
317 	}
318 	/// 
319 	enum MSAA : int
320 	{
321 		/**
322 		Multisample anti-aliasing mode disabled. This is the default value.
323 		*/
324 		msaaDisabled = 0,
325 		/**
326 		Use 2x Multisample Antialiasing.
327 		*/
328 		msaa2x = 1,
329 		/**
330 		Use 4x Multisample Antialiasing.
331 		*/
332 		msaa4x = 2,
333 		/**
334 		Use 8x Multisample Antialiasing. Likely unsupported on low-end and older hardware.
335 		*/
336 		msaa8x = 3,
337 		/**
338 		Use 16x Multisample Antialiasing. Likely unsupported on medium and low-end hardware.
339 		*/
340 		msaa16x = 4,
341 	}
342 	/// 
343 	enum Constants : int
344 	{
345 		debugDrawDisabled = 0,
346 		shadowAtlasQuadrantSubdivDisabled = 0,
347 		updateDisabled = 0,
348 		renderInfoObjectsInFrame = 0,
349 		clearModeAlways = 0,
350 		msaaDisabled = 0,
351 		usage2d = 0,
352 		updateOnce = 1,
353 		msaa2x = 1,
354 		debugDrawUnshaded = 1,
355 		renderInfoVerticesInFrame = 1,
356 		shadowAtlasQuadrantSubdiv1 = 1,
357 		clearModeNever = 1,
358 		usage2dNoSampling = 1,
359 		debugDrawOverdraw = 2,
360 		msaa4x = 2,
361 		clearModeOnlyNextFrame = 2,
362 		updateWhenVisible = 2,
363 		usage3d = 2,
364 		renderInfoMaterialChangesInFrame = 2,
365 		shadowAtlasQuadrantSubdiv4 = 2,
366 		shadowAtlasQuadrantSubdiv16 = 3,
367 		msaa8x = 3,
368 		renderInfoShaderChangesInFrame = 3,
369 		usage3dNoEffects = 3,
370 		debugDrawWireframe = 3,
371 		updateAlways = 3,
372 		shadowAtlasQuadrantSubdiv64 = 4,
373 		renderInfoSurfaceChangesInFrame = 4,
374 		msaa16x = 4,
375 		renderInfoDrawCallsInFrame = 5,
376 		shadowAtlasQuadrantSubdiv256 = 5,
377 		shadowAtlasQuadrantSubdiv1024 = 6,
378 		renderInfo2dItemsInFrame = 6,
379 		shadowAtlasQuadrantSubdivMax = 7,
380 		renderInfo2dDrawCallsInFrame = 7,
381 		renderInfoMax = 8,
382 	}
383 	/**
384 	
385 	*/
386 	void _guiRemoveFocus()
387 	{
388 		Array _GODOT_args = Array.make();
389 		String _GODOT_method_name = String("_gui_remove_focus");
390 		this.callv(_GODOT_method_name, _GODOT_args);
391 	}
392 	/**
393 	
394 	*/
395 	void _guiShowTooltip()
396 	{
397 		Array _GODOT_args = Array.make();
398 		String _GODOT_method_name = String("_gui_show_tooltip");
399 		this.callv(_GODOT_method_name, _GODOT_args);
400 	}
401 	/**
402 	
403 	*/
404 	void _ownWorldChanged()
405 	{
406 		Array _GODOT_args = Array.make();
407 		String _GODOT_method_name = String("_own_world_changed");
408 		this.callv(_GODOT_method_name, _GODOT_args);
409 	}
410 	/**
411 	
412 	*/
413 	void _postGuiGrabClickFocus()
414 	{
415 		Array _GODOT_args = Array.make();
416 		String _GODOT_method_name = String("_post_gui_grab_click_focus");
417 		this.callv(_GODOT_method_name, _GODOT_args);
418 	}
419 	/**
420 	
421 	*/
422 	void _processPicking(in bool ignore_paused)
423 	{
424 		Array _GODOT_args = Array.make();
425 		_GODOT_args.append(ignore_paused);
426 		String _GODOT_method_name = String("_process_picking");
427 		this.callv(_GODOT_method_name, _GODOT_args);
428 	}
429 	/**
430 	
431 	*/
432 	void _subwindowVisibilityChanged()
433 	{
434 		Array _GODOT_args = Array.make();
435 		String _GODOT_method_name = String("_subwindow_visibility_changed");
436 		this.callv(_GODOT_method_name, _GODOT_args);
437 	}
438 	/**
439 	
440 	*/
441 	void _vpInput(InputEvent arg0)
442 	{
443 		Array _GODOT_args = Array.make();
444 		_GODOT_args.append(arg0);
445 		String _GODOT_method_name = String("_vp_input");
446 		this.callv(_GODOT_method_name, _GODOT_args);
447 	}
448 	/**
449 	
450 	*/
451 	void _vpInputText(in String text)
452 	{
453 		Array _GODOT_args = Array.make();
454 		_GODOT_args.append(text);
455 		String _GODOT_method_name = String("_vp_input_text");
456 		this.callv(_GODOT_method_name, _GODOT_args);
457 	}
458 	/**
459 	
460 	*/
461 	void _vpUnhandledInput(InputEvent arg0)
462 	{
463 		Array _GODOT_args = Array.make();
464 		_GODOT_args.append(arg0);
465 		String _GODOT_method_name = String("_vp_unhandled_input");
466 		this.callv(_GODOT_method_name, _GODOT_args);
467 	}
468 	/**
469 	Returns the 3D world of the viewport, or if none the world of the parent viewport.
470 	*/
471 	Ref!World findWorld() const
472 	{
473 		checkClassBinding!(typeof(this))();
474 		return ptrcall!(World)(GDNativeClassBinding.findWorld, _godot_object);
475 	}
476 	/**
477 	Returns the 2D world of the viewport.
478 	*/
479 	Ref!World2D findWorld2d() const
480 	{
481 		checkClassBinding!(typeof(this))();
482 		return ptrcall!(World2D)(GDNativeClassBinding.findWorld2d, _godot_object);
483 	}
484 	/**
485 	Returns the active 3D camera.
486 	*/
487 	Camera getCamera() const
488 	{
489 		checkClassBinding!(typeof(this))();
490 		return ptrcall!(Camera)(GDNativeClassBinding.getCamera, _godot_object);
491 	}
492 	/**
493 	
494 	*/
495 	Transform2D getCanvasTransform() const
496 	{
497 		checkClassBinding!(typeof(this))();
498 		return ptrcall!(Transform2D)(GDNativeClassBinding.getCanvasTransform, _godot_object);
499 	}
500 	/**
501 	
502 	*/
503 	Viewport.ClearMode getClearMode() const
504 	{
505 		checkClassBinding!(typeof(this))();
506 		return ptrcall!(Viewport.ClearMode)(GDNativeClassBinding.getClearMode, _godot_object);
507 	}
508 	/**
509 	
510 	*/
511 	Viewport.DebugDraw getDebugDraw() const
512 	{
513 		checkClassBinding!(typeof(this))();
514 		return ptrcall!(Viewport.DebugDraw)(GDNativeClassBinding.getDebugDraw, _godot_object);
515 	}
516 	/**
517 	Returns the total transform of the viewport.
518 	*/
519 	Transform2D getFinalTransform() const
520 	{
521 		checkClassBinding!(typeof(this))();
522 		return ptrcall!(Transform2D)(GDNativeClassBinding.getFinalTransform, _godot_object);
523 	}
524 	/**
525 	
526 	*/
527 	Transform2D getGlobalCanvasTransform() const
528 	{
529 		checkClassBinding!(typeof(this))();
530 		return ptrcall!(Transform2D)(GDNativeClassBinding.getGlobalCanvasTransform, _godot_object);
531 	}
532 	/**
533 	
534 	*/
535 	bool getHdr() const
536 	{
537 		checkClassBinding!(typeof(this))();
538 		return ptrcall!(bool)(GDNativeClassBinding.getHdr, _godot_object);
539 	}
540 	/**
541 	
542 	*/
543 	bool getKeep3dLinear() const
544 	{
545 		checkClassBinding!(typeof(this))();
546 		return ptrcall!(bool)(GDNativeClassBinding.getKeep3dLinear, _godot_object);
547 	}
548 	/**
549 	Returns the topmost modal in the stack.
550 	*/
551 	Control getModalStackTop() const
552 	{
553 		checkClassBinding!(typeof(this))();
554 		return ptrcall!(Control)(GDNativeClassBinding.getModalStackTop, _godot_object);
555 	}
556 	/**
557 	Returns the mouse position relative to the viewport.
558 	*/
559 	Vector2 getMousePosition() const
560 	{
561 		checkClassBinding!(typeof(this))();
562 		return ptrcall!(Vector2)(GDNativeClassBinding.getMousePosition, _godot_object);
563 	}
564 	/**
565 	
566 	*/
567 	Viewport.MSAA getMsaa() const
568 	{
569 		checkClassBinding!(typeof(this))();
570 		return ptrcall!(Viewport.MSAA)(GDNativeClassBinding.getMsaa, _godot_object);
571 	}
572 	/**
573 	
574 	*/
575 	bool getPhysicsObjectPicking()
576 	{
577 		checkClassBinding!(typeof(this))();
578 		return ptrcall!(bool)(GDNativeClassBinding.getPhysicsObjectPicking, _godot_object);
579 	}
580 	/**
581 	Returns information about the viewport from the rendering pipeline.
582 	*/
583 	long getRenderInfo(in long info)
584 	{
585 		checkClassBinding!(typeof(this))();
586 		return ptrcall!(long)(GDNativeClassBinding.getRenderInfo, _godot_object, info);
587 	}
588 	/**
589 	Returns the $(D shadowatlasquadrantsubdiv) of the specified quadrant.
590 	*/
591 	Viewport.ShadowAtlasQuadrantSubdiv getShadowAtlasQuadrantSubdiv(in long quadrant) const
592 	{
593 		checkClassBinding!(typeof(this))();
594 		return ptrcall!(Viewport.ShadowAtlasQuadrantSubdiv)(GDNativeClassBinding.getShadowAtlasQuadrantSubdiv, _godot_object, quadrant);
595 	}
596 	/**
597 	
598 	*/
599 	long getShadowAtlasSize() const
600 	{
601 		checkClassBinding!(typeof(this))();
602 		return ptrcall!(long)(GDNativeClassBinding.getShadowAtlasSize, _godot_object);
603 	}
604 	/**
605 	
606 	*/
607 	Vector2 getSize() const
608 	{
609 		checkClassBinding!(typeof(this))();
610 		return ptrcall!(Vector2)(GDNativeClassBinding.getSize, _godot_object);
611 	}
612 	/**
613 	Returns the size override set with $(D setSizeOverride).
614 	*/
615 	Vector2 getSizeOverride() const
616 	{
617 		checkClassBinding!(typeof(this))();
618 		return ptrcall!(Vector2)(GDNativeClassBinding.getSizeOverride, _godot_object);
619 	}
620 	/**
621 	Returns the viewport's texture.
622 	$(B Note:) Due to the way OpenGL works, the resulting $(D ViewportTexture) is flipped vertically. You can use $(D Image.flipY) on the result of $(D Texture.getData) to flip it back, for example:
623 	
624 	
625 	var img = get_viewport().get_texture().get_data()
626 	img.flip_y()
627 	
628 	
629 	*/
630 	Ref!ViewportTexture getTexture() const
631 	{
632 		checkClassBinding!(typeof(this))();
633 		return ptrcall!(ViewportTexture)(GDNativeClassBinding.getTexture, _godot_object);
634 	}
635 	/**
636 	
637 	*/
638 	Viewport.UpdateMode getUpdateMode() const
639 	{
640 		checkClassBinding!(typeof(this))();
641 		return ptrcall!(Viewport.UpdateMode)(GDNativeClassBinding.getUpdateMode, _godot_object);
642 	}
643 	/**
644 	
645 	*/
646 	Viewport.Usage getUsage() const
647 	{
648 		checkClassBinding!(typeof(this))();
649 		return ptrcall!(Viewport.Usage)(GDNativeClassBinding.getUsage, _godot_object);
650 	}
651 	/**
652 	
653 	*/
654 	bool getUseDebanding() const
655 	{
656 		checkClassBinding!(typeof(this))();
657 		return ptrcall!(bool)(GDNativeClassBinding.getUseDebanding, _godot_object);
658 	}
659 	/**
660 	
661 	*/
662 	bool getUseFxaa() const
663 	{
664 		checkClassBinding!(typeof(this))();
665 		return ptrcall!(bool)(GDNativeClassBinding.getUseFxaa, _godot_object);
666 	}
667 	/**
668 	
669 	*/
670 	bool getVflip() const
671 	{
672 		checkClassBinding!(typeof(this))();
673 		return ptrcall!(bool)(GDNativeClassBinding.getVflip, _godot_object);
674 	}
675 	/**
676 	Returns the viewport's RID from the $(D VisualServer).
677 	*/
678 	RID getViewportRid() const
679 	{
680 		checkClassBinding!(typeof(this))();
681 		return ptrcall!(RID)(GDNativeClassBinding.getViewportRid, _godot_object);
682 	}
683 	/**
684 	Returns the visible rectangle in global screen coordinates.
685 	*/
686 	Rect2 getVisibleRect() const
687 	{
688 		checkClassBinding!(typeof(this))();
689 		return ptrcall!(Rect2)(GDNativeClassBinding.getVisibleRect, _godot_object);
690 	}
691 	/**
692 	
693 	*/
694 	Ref!World getWorld() const
695 	{
696 		checkClassBinding!(typeof(this))();
697 		return ptrcall!(World)(GDNativeClassBinding.getWorld, _godot_object);
698 	}
699 	/**
700 	
701 	*/
702 	Ref!World2D getWorld2d() const
703 	{
704 		checkClassBinding!(typeof(this))();
705 		return ptrcall!(World2D)(GDNativeClassBinding.getWorld2d, _godot_object);
706 	}
707 	/**
708 	Returns the drag data from the GUI, that was previously returned by $(D Control.getDragData).
709 	*/
710 	Variant guiGetDragData() const
711 	{
712 		checkClassBinding!(typeof(this))();
713 		return ptrcall!(Variant)(GDNativeClassBinding.guiGetDragData, _godot_object);
714 	}
715 	/**
716 	Returns `true` if there are visible modals on-screen.
717 	*/
718 	bool guiHasModalStack() const
719 	{
720 		checkClassBinding!(typeof(this))();
721 		return ptrcall!(bool)(GDNativeClassBinding.guiHasModalStack, _godot_object);
722 	}
723 	/**
724 	Returns `true` if the viewport is currently performing a drag operation.
725 	*/
726 	bool guiIsDragging() const
727 	{
728 		checkClassBinding!(typeof(this))();
729 		return ptrcall!(bool)(GDNativeClassBinding.guiIsDragging, _godot_object);
730 	}
731 	/**
732 	
733 	*/
734 	bool hasTransparentBackground() const
735 	{
736 		checkClassBinding!(typeof(this))();
737 		return ptrcall!(bool)(GDNativeClassBinding.hasTransparentBackground, _godot_object);
738 	}
739 	/**
740 	
741 	*/
742 	void input(InputEvent local_event)
743 	{
744 		checkClassBinding!(typeof(this))();
745 		ptrcall!(void)(GDNativeClassBinding.input, _godot_object, local_event);
746 	}
747 	/**
748 	
749 	*/
750 	bool is3dDisabled() const
751 	{
752 		checkClassBinding!(typeof(this))();
753 		return ptrcall!(bool)(GDNativeClassBinding.is3dDisabled, _godot_object);
754 	}
755 	/**
756 	
757 	*/
758 	bool isAudioListener() const
759 	{
760 		checkClassBinding!(typeof(this))();
761 		return ptrcall!(bool)(GDNativeClassBinding.isAudioListener, _godot_object);
762 	}
763 	/**
764 	
765 	*/
766 	bool isAudioListener2d() const
767 	{
768 		checkClassBinding!(typeof(this))();
769 		return ptrcall!(bool)(GDNativeClassBinding.isAudioListener2d, _godot_object);
770 	}
771 	/**
772 	
773 	*/
774 	bool isHandlingInputLocally() const
775 	{
776 		checkClassBinding!(typeof(this))();
777 		return ptrcall!(bool)(GDNativeClassBinding.isHandlingInputLocally, _godot_object);
778 	}
779 	/**
780 	
781 	*/
782 	bool isInputDisabled() const
783 	{
784 		checkClassBinding!(typeof(this))();
785 		return ptrcall!(bool)(GDNativeClassBinding.isInputDisabled, _godot_object);
786 	}
787 	/**
788 	
789 	*/
790 	bool isInputHandled() const
791 	{
792 		checkClassBinding!(typeof(this))();
793 		return ptrcall!(bool)(GDNativeClassBinding.isInputHandled, _godot_object);
794 	}
795 	/**
796 	Returns `true` if the size override is enabled. See $(D setSizeOverride).
797 	*/
798 	bool isSizeOverrideEnabled() const
799 	{
800 		checkClassBinding!(typeof(this))();
801 		return ptrcall!(bool)(GDNativeClassBinding.isSizeOverrideEnabled, _godot_object);
802 	}
803 	/**
804 	
805 	*/
806 	bool isSizeOverrideStretchEnabled() const
807 	{
808 		checkClassBinding!(typeof(this))();
809 		return ptrcall!(bool)(GDNativeClassBinding.isSizeOverrideStretchEnabled, _godot_object);
810 	}
811 	/**
812 	
813 	*/
814 	bool isSnapControlsToPixelsEnabled() const
815 	{
816 		checkClassBinding!(typeof(this))();
817 		return ptrcall!(bool)(GDNativeClassBinding.isSnapControlsToPixelsEnabled, _godot_object);
818 	}
819 	/**
820 	
821 	*/
822 	bool isUsingOwnWorld() const
823 	{
824 		checkClassBinding!(typeof(this))();
825 		return ptrcall!(bool)(GDNativeClassBinding.isUsingOwnWorld, _godot_object);
826 	}
827 	/**
828 	
829 	*/
830 	bool isUsingRenderDirectToScreen() const
831 	{
832 		checkClassBinding!(typeof(this))();
833 		return ptrcall!(bool)(GDNativeClassBinding.isUsingRenderDirectToScreen, _godot_object);
834 	}
835 	/**
836 	
837 	*/
838 	void setAsAudioListener(in bool enable)
839 	{
840 		checkClassBinding!(typeof(this))();
841 		ptrcall!(void)(GDNativeClassBinding.setAsAudioListener, _godot_object, enable);
842 	}
843 	/**
844 	
845 	*/
846 	void setAsAudioListener2d(in bool enable)
847 	{
848 		checkClassBinding!(typeof(this))();
849 		ptrcall!(void)(GDNativeClassBinding.setAsAudioListener2d, _godot_object, enable);
850 	}
851 	/**
852 	Attaches this $(D Viewport) to the root $(D Viewport) with the specified rectangle. This bypasses the need for another node to display this $(D Viewport) but makes you responsible for updating the position of this $(D Viewport) manually.
853 	*/
854 	void setAttachToScreenRect(in Rect2 rect)
855 	{
856 		checkClassBinding!(typeof(this))();
857 		ptrcall!(void)(GDNativeClassBinding.setAttachToScreenRect, _godot_object, rect);
858 	}
859 	/**
860 	
861 	*/
862 	void setCanvasTransform(in Transform2D xform)
863 	{
864 		checkClassBinding!(typeof(this))();
865 		ptrcall!(void)(GDNativeClassBinding.setCanvasTransform, _godot_object, xform);
866 	}
867 	/**
868 	
869 	*/
870 	void setClearMode(in long mode)
871 	{
872 		checkClassBinding!(typeof(this))();
873 		ptrcall!(void)(GDNativeClassBinding.setClearMode, _godot_object, mode);
874 	}
875 	/**
876 	
877 	*/
878 	void setDebugDraw(in long debug_draw)
879 	{
880 		checkClassBinding!(typeof(this))();
881 		ptrcall!(void)(GDNativeClassBinding.setDebugDraw, _godot_object, debug_draw);
882 	}
883 	/**
884 	
885 	*/
886 	void setDisable3d(in bool disable)
887 	{
888 		checkClassBinding!(typeof(this))();
889 		ptrcall!(void)(GDNativeClassBinding.setDisable3d, _godot_object, disable);
890 	}
891 	/**
892 	
893 	*/
894 	void setDisableInput(in bool disable)
895 	{
896 		checkClassBinding!(typeof(this))();
897 		ptrcall!(void)(GDNativeClassBinding.setDisableInput, _godot_object, disable);
898 	}
899 	/**
900 	
901 	*/
902 	void setGlobalCanvasTransform(in Transform2D xform)
903 	{
904 		checkClassBinding!(typeof(this))();
905 		ptrcall!(void)(GDNativeClassBinding.setGlobalCanvasTransform, _godot_object, xform);
906 	}
907 	/**
908 	
909 	*/
910 	void setHandleInputLocally(in bool enable)
911 	{
912 		checkClassBinding!(typeof(this))();
913 		ptrcall!(void)(GDNativeClassBinding.setHandleInputLocally, _godot_object, enable);
914 	}
915 	/**
916 	
917 	*/
918 	void setHdr(in bool enable)
919 	{
920 		checkClassBinding!(typeof(this))();
921 		ptrcall!(void)(GDNativeClassBinding.setHdr, _godot_object, enable);
922 	}
923 	/**
924 	Stops the input from propagating further down the $(D SceneTree).
925 	*/
926 	void setInputAsHandled()
927 	{
928 		checkClassBinding!(typeof(this))();
929 		ptrcall!(void)(GDNativeClassBinding.setInputAsHandled, _godot_object);
930 	}
931 	/**
932 	
933 	*/
934 	void setKeep3dLinear(in bool keep_3d_linear)
935 	{
936 		checkClassBinding!(typeof(this))();
937 		ptrcall!(void)(GDNativeClassBinding.setKeep3dLinear, _godot_object, keep_3d_linear);
938 	}
939 	/**
940 	
941 	*/
942 	void setMsaa(in long msaa)
943 	{
944 		checkClassBinding!(typeof(this))();
945 		ptrcall!(void)(GDNativeClassBinding.setMsaa, _godot_object, msaa);
946 	}
947 	/**
948 	
949 	*/
950 	void setPhysicsObjectPicking(in bool enable)
951 	{
952 		checkClassBinding!(typeof(this))();
953 		ptrcall!(void)(GDNativeClassBinding.setPhysicsObjectPicking, _godot_object, enable);
954 	}
955 	/**
956 	Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible.
957 	*/
958 	void setShadowAtlasQuadrantSubdiv(in long quadrant, in long subdiv)
959 	{
960 		checkClassBinding!(typeof(this))();
961 		ptrcall!(void)(GDNativeClassBinding.setShadowAtlasQuadrantSubdiv, _godot_object, quadrant, subdiv);
962 	}
963 	/**
964 	
965 	*/
966 	void setShadowAtlasSize(in long size)
967 	{
968 		checkClassBinding!(typeof(this))();
969 		ptrcall!(void)(GDNativeClassBinding.setShadowAtlasSize, _godot_object, size);
970 	}
971 	/**
972 	
973 	*/
974 	void setSize(in Vector2 size)
975 	{
976 		checkClassBinding!(typeof(this))();
977 		ptrcall!(void)(GDNativeClassBinding.setSize, _godot_object, size);
978 	}
979 	/**
980 	Sets the size override of the viewport. If the `enable` parameter is `true` the override is used, otherwise it uses the default size. If the size parameter is `(-1, -1)`, it won't update the size.
981 	*/
982 	void setSizeOverride(in bool enable, in Vector2 size = Vector2(-1, -1), in Vector2 margin = Vector2(0, 0))
983 	{
984 		checkClassBinding!(typeof(this))();
985 		ptrcall!(void)(GDNativeClassBinding.setSizeOverride, _godot_object, enable, size, margin);
986 	}
987 	/**
988 	
989 	*/
990 	void setSizeOverrideStretch(in bool enabled)
991 	{
992 		checkClassBinding!(typeof(this))();
993 		ptrcall!(void)(GDNativeClassBinding.setSizeOverrideStretch, _godot_object, enabled);
994 	}
995 	/**
996 	
997 	*/
998 	void setSnapControlsToPixels(in bool enabled)
999 	{
1000 		checkClassBinding!(typeof(this))();
1001 		ptrcall!(void)(GDNativeClassBinding.setSnapControlsToPixels, _godot_object, enabled);
1002 	}
1003 	/**
1004 	
1005 	*/
1006 	void setTransparentBackground(in bool enable)
1007 	{
1008 		checkClassBinding!(typeof(this))();
1009 		ptrcall!(void)(GDNativeClassBinding.setTransparentBackground, _godot_object, enable);
1010 	}
1011 	/**
1012 	
1013 	*/
1014 	void setUpdateMode(in long mode)
1015 	{
1016 		checkClassBinding!(typeof(this))();
1017 		ptrcall!(void)(GDNativeClassBinding.setUpdateMode, _godot_object, mode);
1018 	}
1019 	/**
1020 	
1021 	*/
1022 	void setUsage(in long usage)
1023 	{
1024 		checkClassBinding!(typeof(this))();
1025 		ptrcall!(void)(GDNativeClassBinding.setUsage, _godot_object, usage);
1026 	}
1027 	/**
1028 	
1029 	*/
1030 	void setUseArvr(in bool use)
1031 	{
1032 		checkClassBinding!(typeof(this))();
1033 		ptrcall!(void)(GDNativeClassBinding.setUseArvr, _godot_object, use);
1034 	}
1035 	/**
1036 	
1037 	*/
1038 	void setUseDebanding(in bool enable)
1039 	{
1040 		checkClassBinding!(typeof(this))();
1041 		ptrcall!(void)(GDNativeClassBinding.setUseDebanding, _godot_object, enable);
1042 	}
1043 	/**
1044 	
1045 	*/
1046 	void setUseFxaa(in bool enable)
1047 	{
1048 		checkClassBinding!(typeof(this))();
1049 		ptrcall!(void)(GDNativeClassBinding.setUseFxaa, _godot_object, enable);
1050 	}
1051 	/**
1052 	
1053 	*/
1054 	void setUseOwnWorld(in bool enable)
1055 	{
1056 		checkClassBinding!(typeof(this))();
1057 		ptrcall!(void)(GDNativeClassBinding.setUseOwnWorld, _godot_object, enable);
1058 	}
1059 	/**
1060 	
1061 	*/
1062 	void setUseRenderDirectToScreen(in bool enable)
1063 	{
1064 		checkClassBinding!(typeof(this))();
1065 		ptrcall!(void)(GDNativeClassBinding.setUseRenderDirectToScreen, _godot_object, enable);
1066 	}
1067 	/**
1068 	
1069 	*/
1070 	void setVflip(in bool enable)
1071 	{
1072 		checkClassBinding!(typeof(this))();
1073 		ptrcall!(void)(GDNativeClassBinding.setVflip, _godot_object, enable);
1074 	}
1075 	/**
1076 	
1077 	*/
1078 	void setWorld(World world)
1079 	{
1080 		checkClassBinding!(typeof(this))();
1081 		ptrcall!(void)(GDNativeClassBinding.setWorld, _godot_object, world);
1082 	}
1083 	/**
1084 	
1085 	*/
1086 	void setWorld2d(World2D world_2d)
1087 	{
1088 		checkClassBinding!(typeof(this))();
1089 		ptrcall!(void)(GDNativeClassBinding.setWorld2d, _godot_object, world_2d);
1090 	}
1091 	/**
1092 	
1093 	*/
1094 	void unhandledInput(InputEvent local_event)
1095 	{
1096 		checkClassBinding!(typeof(this))();
1097 		ptrcall!(void)(GDNativeClassBinding.unhandledInput, _godot_object, local_event);
1098 	}
1099 	/**
1100 	Forces update of the 2D and 3D worlds.
1101 	*/
1102 	void updateWorlds()
1103 	{
1104 		checkClassBinding!(typeof(this))();
1105 		ptrcall!(void)(GDNativeClassBinding.updateWorlds, _godot_object);
1106 	}
1107 	/**
1108 	
1109 	*/
1110 	bool useArvr()
1111 	{
1112 		checkClassBinding!(typeof(this))();
1113 		return ptrcall!(bool)(GDNativeClassBinding.useArvr, _godot_object);
1114 	}
1115 	/**
1116 	Warps the mouse to a position relative to the viewport.
1117 	*/
1118 	void warpMouse(in Vector2 to_position)
1119 	{
1120 		checkClassBinding!(typeof(this))();
1121 		ptrcall!(void)(GDNativeClassBinding.warpMouse, _godot_object, to_position);
1122 	}
1123 	/**
1124 	If `true`, the viewport will be used in AR/VR process.
1125 	*/
1126 	@property bool arvr()
1127 	{
1128 		return useArvr();
1129 	}
1130 	/// ditto
1131 	@property void arvr(bool v)
1132 	{
1133 		setUseArvr(v);
1134 	}
1135 	/**
1136 	If `true`, the viewport will process 2D audio streams.
1137 	*/
1138 	@property bool audioListenerEnable2d()
1139 	{
1140 		return isAudioListener2d();
1141 	}
1142 	/// ditto
1143 	@property void audioListenerEnable2d(bool v)
1144 	{
1145 		setAsAudioListener2d(v);
1146 	}
1147 	/**
1148 	If `true`, the viewport will process 3D audio streams.
1149 	*/
1150 	@property bool audioListenerEnable3d()
1151 	{
1152 		return isAudioListener();
1153 	}
1154 	/// ditto
1155 	@property void audioListenerEnable3d(bool v)
1156 	{
1157 		setAsAudioListener(v);
1158 	}
1159 	/**
1160 	The canvas transform of the viewport, useful for changing the on-screen positions of all child $(D CanvasItem)s. This is relative to the global canvas transform of the viewport.
1161 	*/
1162 	@property Transform2D canvasTransform()
1163 	{
1164 		return getCanvasTransform();
1165 	}
1166 	/// ditto
1167 	@property void canvasTransform(Transform2D v)
1168 	{
1169 		setCanvasTransform(v);
1170 	}
1171 	/**
1172 	If `true`, uses a fast post-processing filter to make banding significantly less visible. In some cases, debanding may introduce a slightly noticeable dithering pattern. It's recommended to enable debanding only when actually needed since the dithering pattern will make lossless-compressed screenshots larger.
1173 	$(B Note:) Only available on the GLES3 backend. $(D hdr) must also be `true` for debanding to be effective.
1174 	*/
1175 	@property bool debanding()
1176 	{
1177 		return getUseDebanding();
1178 	}
1179 	/// ditto
1180 	@property void debanding(bool v)
1181 	{
1182 		setUseDebanding(v);
1183 	}
1184 	/**
1185 	The overlay mode for test rendered geometry in debug purposes.
1186 	*/
1187 	@property Viewport.DebugDraw debugDraw()
1188 	{
1189 		return getDebugDraw();
1190 	}
1191 	/// ditto
1192 	@property void debugDraw(long v)
1193 	{
1194 		setDebugDraw(v);
1195 	}
1196 	/**
1197 	If `true`, the viewport will disable 3D rendering. For actual disabling use `usage`.
1198 	*/
1199 	@property bool disable3d()
1200 	{
1201 		return is3dDisabled();
1202 	}
1203 	/// ditto
1204 	@property void disable3d(bool v)
1205 	{
1206 		setDisable3d(v);
1207 	}
1208 	/**
1209 	Enables fast approximate antialiasing. FXAA is a popular screen-space antialiasing method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K.
1210 	*/
1211 	@property bool fxaa()
1212 	{
1213 		return getUseFxaa();
1214 	}
1215 	/// ditto
1216 	@property void fxaa(bool v)
1217 	{
1218 		setUseFxaa(v);
1219 	}
1220 	/**
1221 	The global canvas transform of the viewport. The canvas transform is relative to this.
1222 	*/
1223 	@property Transform2D globalCanvasTransform()
1224 	{
1225 		return getGlobalCanvasTransform();
1226 	}
1227 	/// ditto
1228 	@property void globalCanvasTransform(Transform2D v)
1229 	{
1230 		setGlobalCanvasTransform(v);
1231 	}
1232 	/**
1233 	If `true`, the viewport will not receive input events.
1234 	*/
1235 	@property bool guiDisableInput()
1236 	{
1237 		return isInputDisabled();
1238 	}
1239 	/// ditto
1240 	@property void guiDisableInput(bool v)
1241 	{
1242 		setDisableInput(v);
1243 	}
1244 	/**
1245 	If `true`, the GUI controls on the viewport will lay pixel perfectly.
1246 	*/
1247 	@property bool guiSnapControlsToPixels()
1248 	{
1249 		return isSnapControlsToPixelsEnabled();
1250 	}
1251 	/// ditto
1252 	@property void guiSnapControlsToPixels(bool v)
1253 	{
1254 		setSnapControlsToPixels(v);
1255 	}
1256 	/**
1257 	
1258 	*/
1259 	@property bool handleInputLocally()
1260 	{
1261 		return isHandlingInputLocally();
1262 	}
1263 	/// ditto
1264 	@property void handleInputLocally(bool v)
1265 	{
1266 		setHandleInputLocally(v);
1267 	}
1268 	/**
1269 	If `true`, the viewport rendering will receive benefits from High Dynamic Range algorithm. High Dynamic Range allows the viewport to receive values that are outside the 0-1 range. In Godot HDR uses 16 bits, meaning it does not store the full range of a floating point number.
1270 	$(B Note:) Requires $(D usage) to be set to $(D constant USAGE_3D) or $(D constant USAGE_3D_NO_EFFECTS), since HDR is not supported for 2D.
1271 	*/
1272 	@property bool hdr()
1273 	{
1274 		return getHdr();
1275 	}
1276 	/// ditto
1277 	@property void hdr(bool v)
1278 	{
1279 		setHdr(v);
1280 	}
1281 	/**
1282 	If `true`, the result after 3D rendering will not have a linear to sRGB color conversion applied. This is important when the viewport is used as a render target where the result is used as a texture on a 3D object rendered in another viewport. It is also important if the viewport is used to create data that is not color based (noise, heightmaps, pickmaps, etc.). Do not enable this when the viewport is used as a texture on a 2D object or if the viewport is your final output.
1283 	*/
1284 	@property bool keep3dLinear()
1285 	{
1286 		return getKeep3dLinear();
1287 	}
1288 	/// ditto
1289 	@property void keep3dLinear(bool v)
1290 	{
1291 		setKeep3dLinear(v);
1292 	}
1293 	/**
1294 	The multisample anti-aliasing mode. A higher number results in smoother edges at the cost of significantly worse performance. A value of 4 is best unless targeting very high-end systems.
1295 	*/
1296 	@property Viewport.MSAA msaa()
1297 	{
1298 		return getMsaa();
1299 	}
1300 	/// ditto
1301 	@property void msaa(long v)
1302 	{
1303 		setMsaa(v);
1304 	}
1305 	/**
1306 	If `true`, the viewport will use $(D World) defined in `world` property.
1307 	*/
1308 	@property bool ownWorld()
1309 	{
1310 		return isUsingOwnWorld();
1311 	}
1312 	/// ditto
1313 	@property void ownWorld(bool v)
1314 	{
1315 		setUseOwnWorld(v);
1316 	}
1317 	/**
1318 	If `true`, the objects rendered by viewport become subjects of mouse picking process.
1319 	*/
1320 	@property bool physicsObjectPicking()
1321 	{
1322 		return getPhysicsObjectPicking();
1323 	}
1324 	/// ditto
1325 	@property void physicsObjectPicking(bool v)
1326 	{
1327 		setPhysicsObjectPicking(v);
1328 	}
1329 	/**
1330 	If `true`, renders the Viewport directly to the screen instead of to the root viewport. Only available in GLES2. This is a low-level optimization and should not be used in most cases. If used, reading from the Viewport or from `SCREEN_TEXTURE` becomes unavailable. For more information see $(D VisualServer.viewportSetRenderDirectToScreen).
1331 	*/
1332 	@property bool renderDirectToScreen()
1333 	{
1334 		return isUsingRenderDirectToScreen();
1335 	}
1336 	/// ditto
1337 	@property void renderDirectToScreen(bool v)
1338 	{
1339 		setUseRenderDirectToScreen(v);
1340 	}
1341 	/**
1342 	The clear mode when viewport used as a render target.
1343 	$(B Note:) This property is intended for 2D usage.
1344 	*/
1345 	@property Viewport.ClearMode renderTargetClearMode()
1346 	{
1347 		return getClearMode();
1348 	}
1349 	/// ditto
1350 	@property void renderTargetClearMode(long v)
1351 	{
1352 		setClearMode(v);
1353 	}
1354 	/**
1355 	The update mode when viewport used as a render target.
1356 	*/
1357 	@property Viewport.UpdateMode renderTargetUpdateMode()
1358 	{
1359 		return getUpdateMode();
1360 	}
1361 	/// ditto
1362 	@property void renderTargetUpdateMode(long v)
1363 	{
1364 		setUpdateMode(v);
1365 	}
1366 	/**
1367 	If `true`, the result of rendering will be flipped vertically.
1368 	*/
1369 	@property bool renderTargetVFlip()
1370 	{
1371 		return getVflip();
1372 	}
1373 	/// ditto
1374 	@property void renderTargetVFlip(bool v)
1375 	{
1376 		setVflip(v);
1377 	}
1378 	/**
1379 	The subdivision amount of the first quadrant on the shadow atlas.
1380 	*/
1381 	@property Viewport.ShadowAtlasQuadrantSubdiv shadowAtlasQuad0()
1382 	{
1383 		return getShadowAtlasQuadrantSubdiv(0);
1384 	}
1385 	/// ditto
1386 	@property void shadowAtlasQuad0(long v)
1387 	{
1388 		setShadowAtlasQuadrantSubdiv(0, v);
1389 	}
1390 	/**
1391 	The subdivision amount of the second quadrant on the shadow atlas.
1392 	*/
1393 	@property Viewport.ShadowAtlasQuadrantSubdiv shadowAtlasQuad1()
1394 	{
1395 		return getShadowAtlasQuadrantSubdiv(1);
1396 	}
1397 	/// ditto
1398 	@property void shadowAtlasQuad1(long v)
1399 	{
1400 		setShadowAtlasQuadrantSubdiv(1, v);
1401 	}
1402 	/**
1403 	The subdivision amount of the third quadrant on the shadow atlas.
1404 	*/
1405 	@property Viewport.ShadowAtlasQuadrantSubdiv shadowAtlasQuad2()
1406 	{
1407 		return getShadowAtlasQuadrantSubdiv(2);
1408 	}
1409 	/// ditto
1410 	@property void shadowAtlasQuad2(long v)
1411 	{
1412 		setShadowAtlasQuadrantSubdiv(2, v);
1413 	}
1414 	/**
1415 	The subdivision amount of the fourth quadrant on the shadow atlas.
1416 	*/
1417 	@property Viewport.ShadowAtlasQuadrantSubdiv shadowAtlasQuad3()
1418 	{
1419 		return getShadowAtlasQuadrantSubdiv(3);
1420 	}
1421 	/// ditto
1422 	@property void shadowAtlasQuad3(long v)
1423 	{
1424 		setShadowAtlasQuadrantSubdiv(3, v);
1425 	}
1426 	/**
1427 	The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2.
1428 	$(B Note:) If this is set to 0, shadows won't be visible. Since user-created viewports default to a value of 0, this value must be set above 0 manually.
1429 	*/
1430 	@property long shadowAtlasSize()
1431 	{
1432 		return getShadowAtlasSize();
1433 	}
1434 	/// ditto
1435 	@property void shadowAtlasSize(long v)
1436 	{
1437 		setShadowAtlasSize(v);
1438 	}
1439 	/**
1440 	The width and height of viewport.
1441 	*/
1442 	@property Vector2 size()
1443 	{
1444 		return getSize();
1445 	}
1446 	/// ditto
1447 	@property void size(Vector2 v)
1448 	{
1449 		setSize(v);
1450 	}
1451 	/**
1452 	If `true`, the size override affects stretch as well.
1453 	*/
1454 	@property bool sizeOverrideStretch()
1455 	{
1456 		return isSizeOverrideStretchEnabled();
1457 	}
1458 	/// ditto
1459 	@property void sizeOverrideStretch(bool v)
1460 	{
1461 		setSizeOverrideStretch(v);
1462 	}
1463 	/**
1464 	If `true`, the viewport should render its background as transparent.
1465 	*/
1466 	@property bool transparentBg()
1467 	{
1468 		return hasTransparentBackground();
1469 	}
1470 	/// ditto
1471 	@property void transparentBg(bool v)
1472 	{
1473 		setTransparentBackground(v);
1474 	}
1475 	/**
1476 	The rendering mode of viewport.
1477 	*/
1478 	@property Viewport.Usage usage()
1479 	{
1480 		return getUsage();
1481 	}
1482 	/// ditto
1483 	@property void usage(long v)
1484 	{
1485 		setUsage(v);
1486 	}
1487 	/**
1488 	The custom $(D World) which can be used as 3D environment source.
1489 	*/
1490 	@property World world()
1491 	{
1492 		return getWorld();
1493 	}
1494 	/// ditto
1495 	@property void world(World v)
1496 	{
1497 		setWorld(v);
1498 	}
1499 	/**
1500 	The custom $(D World2D) which can be used as 2D environment source.
1501 	*/
1502 	@property World2D world2d()
1503 	{
1504 		return getWorld2d();
1505 	}
1506 	/// ditto
1507 	@property void world2d(World2D v)
1508 	{
1509 		setWorld2d(v);
1510 	}
1511 }