1 /** 2 Server for anything visible. 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.visualserver; 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.image; 24 /** 25 Server for anything visible. 26 27 The visual server is the API backend for everything visible. The whole scene system mounts on it to display. 28 The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed. 29 The visual server can be used to bypass the scene system entirely. 30 Resources are created using the `*_create` functions. 31 All objects are drawn to a viewport. You can use the $(D Viewport) attached to the $(D SceneTree) or you can create one yourself with $(D viewportCreate). When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using $(D viewportSetScenario) or $(D viewportAttachCanvas). 32 In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the visual server from a running game, the scenario can be accessed from the scene tree from any $(D Spatial) node with $(D Spatial.getWorld). Otherwise, a scenario can be created with $(D scenarioCreate). 33 Similarly, in 2D, a canvas is needed to draw all canvas items. 34 In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using $(D instanceSetBase). The instance must also be attached to the scenario using $(D instanceSetScenario) in order to be visible. 35 In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. 36 */ 37 @GodotBaseClass struct VisualServerSingleton 38 { 39 package(godot) enum string _GODOT_internal_name = "VisualServer"; 40 public: 41 @nogc nothrow: 42 union { /** */ godot_object _godot_object; /** */ GodotObject _GODOT_base; } 43 alias _GODOT_base this; 44 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 45 package(godot) __gshared bool _classBindingInitialized = false; 46 package(godot) static struct GDNativeClassBinding 47 { 48 __gshared: 49 godot_object _singleton; 50 immutable char* _singletonName = "VisualServer"; 51 @GodotName("black_bars_set_images") GodotMethod!(void, RID, RID, RID, RID) blackBarsSetImages; 52 @GodotName("black_bars_set_margins") GodotMethod!(void, long, long, long, long) blackBarsSetMargins; 53 @GodotName("camera_create") GodotMethod!(RID) cameraCreate; 54 @GodotName("camera_set_cull_mask") GodotMethod!(void, RID, long) cameraSetCullMask; 55 @GodotName("camera_set_environment") GodotMethod!(void, RID, RID) cameraSetEnvironment; 56 @GodotName("camera_set_frustum") GodotMethod!(void, RID, double, Vector2, double, double) cameraSetFrustum; 57 @GodotName("camera_set_orthogonal") GodotMethod!(void, RID, double, double, double) cameraSetOrthogonal; 58 @GodotName("camera_set_perspective") GodotMethod!(void, RID, double, double, double) cameraSetPerspective; 59 @GodotName("camera_set_transform") GodotMethod!(void, RID, Transform) cameraSetTransform; 60 @GodotName("camera_set_use_vertical_aspect") GodotMethod!(void, RID, bool) cameraSetUseVerticalAspect; 61 @GodotName("canvas_create") GodotMethod!(RID) canvasCreate; 62 @GodotName("canvas_item_add_circle") GodotMethod!(void, RID, Vector2, double, Color) canvasItemAddCircle; 63 @GodotName("canvas_item_add_clip_ignore") GodotMethod!(void, RID, bool) canvasItemAddClipIgnore; 64 @GodotName("canvas_item_add_line") GodotMethod!(void, RID, Vector2, Vector2, Color, double, bool) canvasItemAddLine; 65 @GodotName("canvas_item_add_mesh") GodotMethod!(void, RID, RID, Transform2D, Color, RID, RID) canvasItemAddMesh; 66 @GodotName("canvas_item_add_multimesh") GodotMethod!(void, RID, RID, RID, RID) canvasItemAddMultimesh; 67 @GodotName("canvas_item_add_nine_patch") GodotMethod!(void, RID, Rect2, Rect2, RID, Vector2, Vector2, long, long, bool, Color, RID) canvasItemAddNinePatch; 68 @GodotName("canvas_item_add_particles") GodotMethod!(void, RID, RID, RID, RID) canvasItemAddParticles; 69 @GodotName("canvas_item_add_polygon") GodotMethod!(void, RID, PoolVector2Array, PoolColorArray, PoolVector2Array, RID, RID, bool) canvasItemAddPolygon; 70 @GodotName("canvas_item_add_polyline") GodotMethod!(void, RID, PoolVector2Array, PoolColorArray, double, bool) canvasItemAddPolyline; 71 @GodotName("canvas_item_add_primitive") GodotMethod!(void, RID, PoolVector2Array, PoolColorArray, PoolVector2Array, RID, double, RID) canvasItemAddPrimitive; 72 @GodotName("canvas_item_add_rect") GodotMethod!(void, RID, Rect2, Color) canvasItemAddRect; 73 @GodotName("canvas_item_add_set_transform") GodotMethod!(void, RID, Transform2D) canvasItemAddSetTransform; 74 @GodotName("canvas_item_add_texture_rect") GodotMethod!(void, RID, Rect2, RID, bool, Color, bool, RID) canvasItemAddTextureRect; 75 @GodotName("canvas_item_add_texture_rect_region") GodotMethod!(void, RID, Rect2, RID, Rect2, Color, bool, RID, bool) canvasItemAddTextureRectRegion; 76 @GodotName("canvas_item_add_triangle_array") GodotMethod!(void, RID, PoolIntArray, PoolVector2Array, PoolColorArray, PoolVector2Array, PoolIntArray, PoolRealArray, RID, long, RID, bool, bool) canvasItemAddTriangleArray; 77 @GodotName("canvas_item_clear") GodotMethod!(void, RID) canvasItemClear; 78 @GodotName("canvas_item_create") GodotMethod!(RID) canvasItemCreate; 79 @GodotName("canvas_item_set_clip") GodotMethod!(void, RID, bool) canvasItemSetClip; 80 @GodotName("canvas_item_set_copy_to_backbuffer") GodotMethod!(void, RID, bool, Rect2) canvasItemSetCopyToBackbuffer; 81 @GodotName("canvas_item_set_custom_rect") GodotMethod!(void, RID, bool, Rect2) canvasItemSetCustomRect; 82 @GodotName("canvas_item_set_distance_field_mode") GodotMethod!(void, RID, bool) canvasItemSetDistanceFieldMode; 83 @GodotName("canvas_item_set_draw_behind_parent") GodotMethod!(void, RID, bool) canvasItemSetDrawBehindParent; 84 @GodotName("canvas_item_set_draw_index") GodotMethod!(void, RID, long) canvasItemSetDrawIndex; 85 @GodotName("canvas_item_set_light_mask") GodotMethod!(void, RID, long) canvasItemSetLightMask; 86 @GodotName("canvas_item_set_material") GodotMethod!(void, RID, RID) canvasItemSetMaterial; 87 @GodotName("canvas_item_set_modulate") GodotMethod!(void, RID, Color) canvasItemSetModulate; 88 @GodotName("canvas_item_set_parent") GodotMethod!(void, RID, RID) canvasItemSetParent; 89 @GodotName("canvas_item_set_self_modulate") GodotMethod!(void, RID, Color) canvasItemSetSelfModulate; 90 @GodotName("canvas_item_set_sort_children_by_y") GodotMethod!(void, RID, bool) canvasItemSetSortChildrenByY; 91 @GodotName("canvas_item_set_transform") GodotMethod!(void, RID, Transform2D) canvasItemSetTransform; 92 @GodotName("canvas_item_set_use_parent_material") GodotMethod!(void, RID, bool) canvasItemSetUseParentMaterial; 93 @GodotName("canvas_item_set_visible") GodotMethod!(void, RID, bool) canvasItemSetVisible; 94 @GodotName("canvas_item_set_z_as_relative_to_parent") GodotMethod!(void, RID, bool) canvasItemSetZAsRelativeToParent; 95 @GodotName("canvas_item_set_z_index") GodotMethod!(void, RID, long) canvasItemSetZIndex; 96 @GodotName("canvas_light_attach_to_canvas") GodotMethod!(void, RID, RID) canvasLightAttachToCanvas; 97 @GodotName("canvas_light_create") GodotMethod!(RID) canvasLightCreate; 98 @GodotName("canvas_light_occluder_attach_to_canvas") GodotMethod!(void, RID, RID) canvasLightOccluderAttachToCanvas; 99 @GodotName("canvas_light_occluder_create") GodotMethod!(RID) canvasLightOccluderCreate; 100 @GodotName("canvas_light_occluder_set_enabled") GodotMethod!(void, RID, bool) canvasLightOccluderSetEnabled; 101 @GodotName("canvas_light_occluder_set_light_mask") GodotMethod!(void, RID, long) canvasLightOccluderSetLightMask; 102 @GodotName("canvas_light_occluder_set_polygon") GodotMethod!(void, RID, RID) canvasLightOccluderSetPolygon; 103 @GodotName("canvas_light_occluder_set_transform") GodotMethod!(void, RID, Transform2D) canvasLightOccluderSetTransform; 104 @GodotName("canvas_light_set_color") GodotMethod!(void, RID, Color) canvasLightSetColor; 105 @GodotName("canvas_light_set_enabled") GodotMethod!(void, RID, bool) canvasLightSetEnabled; 106 @GodotName("canvas_light_set_energy") GodotMethod!(void, RID, double) canvasLightSetEnergy; 107 @GodotName("canvas_light_set_height") GodotMethod!(void, RID, double) canvasLightSetHeight; 108 @GodotName("canvas_light_set_item_cull_mask") GodotMethod!(void, RID, long) canvasLightSetItemCullMask; 109 @GodotName("canvas_light_set_item_shadow_cull_mask") GodotMethod!(void, RID, long) canvasLightSetItemShadowCullMask; 110 @GodotName("canvas_light_set_layer_range") GodotMethod!(void, RID, long, long) canvasLightSetLayerRange; 111 @GodotName("canvas_light_set_mode") GodotMethod!(void, RID, long) canvasLightSetMode; 112 @GodotName("canvas_light_set_scale") GodotMethod!(void, RID, double) canvasLightSetScale; 113 @GodotName("canvas_light_set_shadow_buffer_size") GodotMethod!(void, RID, long) canvasLightSetShadowBufferSize; 114 @GodotName("canvas_light_set_shadow_color") GodotMethod!(void, RID, Color) canvasLightSetShadowColor; 115 @GodotName("canvas_light_set_shadow_enabled") GodotMethod!(void, RID, bool) canvasLightSetShadowEnabled; 116 @GodotName("canvas_light_set_shadow_filter") GodotMethod!(void, RID, long) canvasLightSetShadowFilter; 117 @GodotName("canvas_light_set_shadow_gradient_length") GodotMethod!(void, RID, double) canvasLightSetShadowGradientLength; 118 @GodotName("canvas_light_set_shadow_smooth") GodotMethod!(void, RID, double) canvasLightSetShadowSmooth; 119 @GodotName("canvas_light_set_texture") GodotMethod!(void, RID, RID) canvasLightSetTexture; 120 @GodotName("canvas_light_set_texture_offset") GodotMethod!(void, RID, Vector2) canvasLightSetTextureOffset; 121 @GodotName("canvas_light_set_transform") GodotMethod!(void, RID, Transform2D) canvasLightSetTransform; 122 @GodotName("canvas_light_set_z_range") GodotMethod!(void, RID, long, long) canvasLightSetZRange; 123 @GodotName("canvas_occluder_polygon_create") GodotMethod!(RID) canvasOccluderPolygonCreate; 124 @GodotName("canvas_occluder_polygon_set_cull_mode") GodotMethod!(void, RID, long) canvasOccluderPolygonSetCullMode; 125 @GodotName("canvas_occluder_polygon_set_shape") GodotMethod!(void, RID, PoolVector2Array, bool) canvasOccluderPolygonSetShape; 126 @GodotName("canvas_occluder_polygon_set_shape_as_lines") GodotMethod!(void, RID, PoolVector2Array) canvasOccluderPolygonSetShapeAsLines; 127 @GodotName("canvas_set_item_mirroring") GodotMethod!(void, RID, RID, Vector2) canvasSetItemMirroring; 128 @GodotName("canvas_set_modulate") GodotMethod!(void, RID, Color) canvasSetModulate; 129 @GodotName("directional_light_create") GodotMethod!(RID) directionalLightCreate; 130 @GodotName("draw") GodotMethod!(void, bool, double) draw; 131 @GodotName("environment_create") GodotMethod!(RID) environmentCreate; 132 @GodotName("environment_set_adjustment") GodotMethod!(void, RID, bool, double, double, double, RID) environmentSetAdjustment; 133 @GodotName("environment_set_ambient_light") GodotMethod!(void, RID, Color, double, double) environmentSetAmbientLight; 134 @GodotName("environment_set_background") GodotMethod!(void, RID, long) environmentSetBackground; 135 @GodotName("environment_set_bg_color") GodotMethod!(void, RID, Color) environmentSetBgColor; 136 @GodotName("environment_set_bg_energy") GodotMethod!(void, RID, double) environmentSetBgEnergy; 137 @GodotName("environment_set_canvas_max_layer") GodotMethod!(void, RID, long) environmentSetCanvasMaxLayer; 138 @GodotName("environment_set_dof_blur_far") GodotMethod!(void, RID, bool, double, double, double, long) environmentSetDofBlurFar; 139 @GodotName("environment_set_dof_blur_near") GodotMethod!(void, RID, bool, double, double, double, long) environmentSetDofBlurNear; 140 @GodotName("environment_set_fog") GodotMethod!(void, RID, bool, Color, Color, double) environmentSetFog; 141 @GodotName("environment_set_fog_depth") GodotMethod!(void, RID, bool, double, double, double, bool, double) environmentSetFogDepth; 142 @GodotName("environment_set_fog_height") GodotMethod!(void, RID, bool, double, double, double) environmentSetFogHeight; 143 @GodotName("environment_set_glow") GodotMethod!(void, RID, bool, long, double, double, double, long, double, double, double, bool) environmentSetGlow; 144 @GodotName("environment_set_sky") GodotMethod!(void, RID, RID) environmentSetSky; 145 @GodotName("environment_set_sky_custom_fov") GodotMethod!(void, RID, double) environmentSetSkyCustomFov; 146 @GodotName("environment_set_sky_orientation") GodotMethod!(void, RID, Basis) environmentSetSkyOrientation; 147 @GodotName("environment_set_ssao") GodotMethod!(void, RID, bool, double, double, double, double, double, double, double, Color, long, long, double) environmentSetSsao; 148 @GodotName("environment_set_ssr") GodotMethod!(void, RID, bool, long, double, double, double, bool) environmentSetSsr; 149 @GodotName("environment_set_tonemap") GodotMethod!(void, RID, long, double, double, bool, double, double, double, double) environmentSetTonemap; 150 @GodotName("finish") GodotMethod!(void) finish; 151 @GodotName("force_draw") GodotMethod!(void, bool, double) forceDraw; 152 @GodotName("force_sync") GodotMethod!(void) forceSync; 153 @GodotName("free_rid") GodotMethod!(void, RID) freeRid; 154 @GodotName("get_render_info") GodotMethod!(long, long) getRenderInfo; 155 @GodotName("get_test_cube") GodotMethod!(RID) getTestCube; 156 @GodotName("get_test_texture") GodotMethod!(RID) getTestTexture; 157 @GodotName("get_video_adapter_name") GodotMethod!(String) getVideoAdapterName; 158 @GodotName("get_video_adapter_vendor") GodotMethod!(String) getVideoAdapterVendor; 159 @GodotName("get_white_texture") GodotMethod!(RID) getWhiteTexture; 160 @GodotName("gi_probe_create") GodotMethod!(RID) giProbeCreate; 161 @GodotName("gi_probe_get_bias") GodotMethod!(double, RID) giProbeGetBias; 162 @GodotName("gi_probe_get_bounds") GodotMethod!(AABB, RID) giProbeGetBounds; 163 @GodotName("gi_probe_get_cell_size") GodotMethod!(double, RID) giProbeGetCellSize; 164 @GodotName("gi_probe_get_dynamic_data") GodotMethod!(PoolIntArray, RID) giProbeGetDynamicData; 165 @GodotName("gi_probe_get_dynamic_range") GodotMethod!(long, RID) giProbeGetDynamicRange; 166 @GodotName("gi_probe_get_energy") GodotMethod!(double, RID) giProbeGetEnergy; 167 @GodotName("gi_probe_get_normal_bias") GodotMethod!(double, RID) giProbeGetNormalBias; 168 @GodotName("gi_probe_get_propagation") GodotMethod!(double, RID) giProbeGetPropagation; 169 @GodotName("gi_probe_get_to_cell_xform") GodotMethod!(Transform, RID) giProbeGetToCellXform; 170 @GodotName("gi_probe_is_compressed") GodotMethod!(bool, RID) giProbeIsCompressed; 171 @GodotName("gi_probe_is_interior") GodotMethod!(bool, RID) giProbeIsInterior; 172 @GodotName("gi_probe_set_bias") GodotMethod!(void, RID, double) giProbeSetBias; 173 @GodotName("gi_probe_set_bounds") GodotMethod!(void, RID, AABB) giProbeSetBounds; 174 @GodotName("gi_probe_set_cell_size") GodotMethod!(void, RID, double) giProbeSetCellSize; 175 @GodotName("gi_probe_set_compress") GodotMethod!(void, RID, bool) giProbeSetCompress; 176 @GodotName("gi_probe_set_dynamic_data") GodotMethod!(void, RID, PoolIntArray) giProbeSetDynamicData; 177 @GodotName("gi_probe_set_dynamic_range") GodotMethod!(void, RID, long) giProbeSetDynamicRange; 178 @GodotName("gi_probe_set_energy") GodotMethod!(void, RID, double) giProbeSetEnergy; 179 @GodotName("gi_probe_set_interior") GodotMethod!(void, RID, bool) giProbeSetInterior; 180 @GodotName("gi_probe_set_normal_bias") GodotMethod!(void, RID, double) giProbeSetNormalBias; 181 @GodotName("gi_probe_set_propagation") GodotMethod!(void, RID, double) giProbeSetPropagation; 182 @GodotName("gi_probe_set_to_cell_xform") GodotMethod!(void, RID, Transform) giProbeSetToCellXform; 183 @GodotName("has_changed") GodotMethod!(bool) hasChanged; 184 @GodotName("has_feature") GodotMethod!(bool, long) hasFeature; 185 @GodotName("has_os_feature") GodotMethod!(bool, String) hasOsFeature; 186 @GodotName("immediate_begin") GodotMethod!(void, RID, long, RID) immediateBegin; 187 @GodotName("immediate_clear") GodotMethod!(void, RID) immediateClear; 188 @GodotName("immediate_color") GodotMethod!(void, RID, Color) immediateColor; 189 @GodotName("immediate_create") GodotMethod!(RID) immediateCreate; 190 @GodotName("immediate_end") GodotMethod!(void, RID) immediateEnd; 191 @GodotName("immediate_get_material") GodotMethod!(RID, RID) immediateGetMaterial; 192 @GodotName("immediate_normal") GodotMethod!(void, RID, Vector3) immediateNormal; 193 @GodotName("immediate_set_material") GodotMethod!(void, RID, RID) immediateSetMaterial; 194 @GodotName("immediate_tangent") GodotMethod!(void, RID, Plane) immediateTangent; 195 @GodotName("immediate_uv") GodotMethod!(void, RID, Vector2) immediateUv; 196 @GodotName("immediate_uv2") GodotMethod!(void, RID, Vector2) immediateUv2; 197 @GodotName("immediate_vertex") GodotMethod!(void, RID, Vector3) immediateVertex; 198 @GodotName("immediate_vertex_2d") GodotMethod!(void, RID, Vector2) immediateVertex2d; 199 @GodotName("init") GodotMethod!(void) _init; 200 @GodotName("instance_attach_object_instance_id") GodotMethod!(void, RID, long) instanceAttachObjectInstanceId; 201 @GodotName("instance_attach_skeleton") GodotMethod!(void, RID, RID) instanceAttachSkeleton; 202 @GodotName("instance_create") GodotMethod!(RID) instanceCreate; 203 @GodotName("instance_create2") GodotMethod!(RID, RID, RID) instanceCreate2; 204 @GodotName("instance_geometry_set_as_instance_lod") GodotMethod!(void, RID, RID) instanceGeometrySetAsInstanceLod; 205 @GodotName("instance_geometry_set_cast_shadows_setting") GodotMethod!(void, RID, long) instanceGeometrySetCastShadowsSetting; 206 @GodotName("instance_geometry_set_draw_range") GodotMethod!(void, RID, double, double, double, double) instanceGeometrySetDrawRange; 207 @GodotName("instance_geometry_set_flag") GodotMethod!(void, RID, long, bool) instanceGeometrySetFlag; 208 @GodotName("instance_geometry_set_material_override") GodotMethod!(void, RID, RID) instanceGeometrySetMaterialOverride; 209 @GodotName("instance_set_base") GodotMethod!(void, RID, RID) instanceSetBase; 210 @GodotName("instance_set_blend_shape_weight") GodotMethod!(void, RID, long, double) instanceSetBlendShapeWeight; 211 @GodotName("instance_set_custom_aabb") GodotMethod!(void, RID, AABB) instanceSetCustomAabb; 212 @GodotName("instance_set_exterior") GodotMethod!(void, RID, bool) instanceSetExterior; 213 @GodotName("instance_set_extra_visibility_margin") GodotMethod!(void, RID, double) instanceSetExtraVisibilityMargin; 214 @GodotName("instance_set_layer_mask") GodotMethod!(void, RID, long) instanceSetLayerMask; 215 @GodotName("instance_set_scenario") GodotMethod!(void, RID, RID) instanceSetScenario; 216 @GodotName("instance_set_surface_material") GodotMethod!(void, RID, long, RID) instanceSetSurfaceMaterial; 217 @GodotName("instance_set_transform") GodotMethod!(void, RID, Transform) instanceSetTransform; 218 @GodotName("instance_set_use_lightmap") GodotMethod!(void, RID, RID, RID, long, Rect2) instanceSetUseLightmap; 219 @GodotName("instance_set_visible") GodotMethod!(void, RID, bool) instanceSetVisible; 220 @GodotName("instances_cull_aabb") GodotMethod!(Array, AABB, RID) instancesCullAabb; 221 @GodotName("instances_cull_convex") GodotMethod!(Array, Array, RID) instancesCullConvex; 222 @GodotName("instances_cull_ray") GodotMethod!(Array, Vector3, Vector3, RID) instancesCullRay; 223 @GodotName("is_render_loop_enabled") GodotMethod!(bool) isRenderLoopEnabled; 224 @GodotName("light_directional_set_blend_splits") GodotMethod!(void, RID, bool) lightDirectionalSetBlendSplits; 225 @GodotName("light_directional_set_shadow_depth_range_mode") GodotMethod!(void, RID, long) lightDirectionalSetShadowDepthRangeMode; 226 @GodotName("light_directional_set_shadow_mode") GodotMethod!(void, RID, long) lightDirectionalSetShadowMode; 227 @GodotName("light_omni_set_shadow_detail") GodotMethod!(void, RID, long) lightOmniSetShadowDetail; 228 @GodotName("light_omni_set_shadow_mode") GodotMethod!(void, RID, long) lightOmniSetShadowMode; 229 @GodotName("light_set_bake_mode") GodotMethod!(void, RID, long) lightSetBakeMode; 230 @GodotName("light_set_color") GodotMethod!(void, RID, Color) lightSetColor; 231 @GodotName("light_set_cull_mask") GodotMethod!(void, RID, long) lightSetCullMask; 232 @GodotName("light_set_negative") GodotMethod!(void, RID, bool) lightSetNegative; 233 @GodotName("light_set_param") GodotMethod!(void, RID, long, double) lightSetParam; 234 @GodotName("light_set_projector") GodotMethod!(void, RID, RID) lightSetProjector; 235 @GodotName("light_set_reverse_cull_face_mode") GodotMethod!(void, RID, bool) lightSetReverseCullFaceMode; 236 @GodotName("light_set_shadow") GodotMethod!(void, RID, bool) lightSetShadow; 237 @GodotName("light_set_shadow_color") GodotMethod!(void, RID, Color) lightSetShadowColor; 238 @GodotName("light_set_use_gi") GodotMethod!(void, RID, bool) lightSetUseGi; 239 @GodotName("lightmap_capture_create") GodotMethod!(RID) lightmapCaptureCreate; 240 @GodotName("lightmap_capture_get_bounds") GodotMethod!(AABB, RID) lightmapCaptureGetBounds; 241 @GodotName("lightmap_capture_get_energy") GodotMethod!(double, RID) lightmapCaptureGetEnergy; 242 @GodotName("lightmap_capture_get_octree") GodotMethod!(PoolByteArray, RID) lightmapCaptureGetOctree; 243 @GodotName("lightmap_capture_get_octree_cell_subdiv") GodotMethod!(long, RID) lightmapCaptureGetOctreeCellSubdiv; 244 @GodotName("lightmap_capture_get_octree_cell_transform") GodotMethod!(Transform, RID) lightmapCaptureGetOctreeCellTransform; 245 @GodotName("lightmap_capture_is_interior") GodotMethod!(bool, RID) lightmapCaptureIsInterior; 246 @GodotName("lightmap_capture_set_bounds") GodotMethod!(void, RID, AABB) lightmapCaptureSetBounds; 247 @GodotName("lightmap_capture_set_energy") GodotMethod!(void, RID, double) lightmapCaptureSetEnergy; 248 @GodotName("lightmap_capture_set_interior") GodotMethod!(void, RID, bool) lightmapCaptureSetInterior; 249 @GodotName("lightmap_capture_set_octree") GodotMethod!(void, RID, PoolByteArray) lightmapCaptureSetOctree; 250 @GodotName("lightmap_capture_set_octree_cell_subdiv") GodotMethod!(void, RID, long) lightmapCaptureSetOctreeCellSubdiv; 251 @GodotName("lightmap_capture_set_octree_cell_transform") GodotMethod!(void, RID, Transform) lightmapCaptureSetOctreeCellTransform; 252 @GodotName("make_sphere_mesh") GodotMethod!(RID, long, long, double) makeSphereMesh; 253 @GodotName("material_create") GodotMethod!(RID) materialCreate; 254 @GodotName("material_get_param") GodotMethod!(Variant, RID, String) materialGetParam; 255 @GodotName("material_get_param_default") GodotMethod!(Variant, RID, String) materialGetParamDefault; 256 @GodotName("material_get_shader") GodotMethod!(RID, RID) materialGetShader; 257 @GodotName("material_set_line_width") GodotMethod!(void, RID, double) materialSetLineWidth; 258 @GodotName("material_set_next_pass") GodotMethod!(void, RID, RID) materialSetNextPass; 259 @GodotName("material_set_param") GodotMethod!(void, RID, String, Variant) materialSetParam; 260 @GodotName("material_set_render_priority") GodotMethod!(void, RID, long) materialSetRenderPriority; 261 @GodotName("material_set_shader") GodotMethod!(void, RID, RID) materialSetShader; 262 @GodotName("mesh_add_surface_from_arrays") GodotMethod!(void, RID, long, Array, Array, long) meshAddSurfaceFromArrays; 263 @GodotName("mesh_clear") GodotMethod!(void, RID) meshClear; 264 @GodotName("mesh_create") GodotMethod!(RID) meshCreate; 265 @GodotName("mesh_get_blend_shape_count") GodotMethod!(long, RID) meshGetBlendShapeCount; 266 @GodotName("mesh_get_blend_shape_mode") GodotMethod!(VisualServer.BlendShapeMode, RID) meshGetBlendShapeMode; 267 @GodotName("mesh_get_custom_aabb") GodotMethod!(AABB, RID) meshGetCustomAabb; 268 @GodotName("mesh_get_surface_count") GodotMethod!(long, RID) meshGetSurfaceCount; 269 @GodotName("mesh_remove_surface") GodotMethod!(void, RID, long) meshRemoveSurface; 270 @GodotName("mesh_set_blend_shape_count") GodotMethod!(void, RID, long) meshSetBlendShapeCount; 271 @GodotName("mesh_set_blend_shape_mode") GodotMethod!(void, RID, long) meshSetBlendShapeMode; 272 @GodotName("mesh_set_custom_aabb") GodotMethod!(void, RID, AABB) meshSetCustomAabb; 273 @GodotName("mesh_surface_get_aabb") GodotMethod!(AABB, RID, long) meshSurfaceGetAabb; 274 @GodotName("mesh_surface_get_array") GodotMethod!(PoolByteArray, RID, long) meshSurfaceGetArray; 275 @GodotName("mesh_surface_get_array_index_len") GodotMethod!(long, RID, long) meshSurfaceGetArrayIndexLen; 276 @GodotName("mesh_surface_get_array_len") GodotMethod!(long, RID, long) meshSurfaceGetArrayLen; 277 @GodotName("mesh_surface_get_arrays") GodotMethod!(Array, RID, long) meshSurfaceGetArrays; 278 @GodotName("mesh_surface_get_blend_shape_arrays") GodotMethod!(Array, RID, long) meshSurfaceGetBlendShapeArrays; 279 @GodotName("mesh_surface_get_format") GodotMethod!(long, RID, long) meshSurfaceGetFormat; 280 @GodotName("mesh_surface_get_format_offset") GodotMethod!(long, long, long, long, long) meshSurfaceGetFormatOffset; 281 @GodotName("mesh_surface_get_format_stride") GodotMethod!(long, long, long, long) meshSurfaceGetFormatStride; 282 @GodotName("mesh_surface_get_index_array") GodotMethod!(PoolByteArray, RID, long) meshSurfaceGetIndexArray; 283 @GodotName("mesh_surface_get_material") GodotMethod!(RID, RID, long) meshSurfaceGetMaterial; 284 @GodotName("mesh_surface_get_primitive_type") GodotMethod!(VisualServer.PrimitiveType, RID, long) meshSurfaceGetPrimitiveType; 285 @GodotName("mesh_surface_get_skeleton_aabb") GodotMethod!(Array, RID, long) meshSurfaceGetSkeletonAabb; 286 @GodotName("mesh_surface_set_material") GodotMethod!(void, RID, long, RID) meshSurfaceSetMaterial; 287 @GodotName("mesh_surface_update_region") GodotMethod!(void, RID, long, long, PoolByteArray) meshSurfaceUpdateRegion; 288 @GodotName("multimesh_allocate") GodotMethod!(void, RID, long, long, long, long) multimeshAllocate; 289 @GodotName("multimesh_create") GodotMethod!(RID) multimeshCreate; 290 @GodotName("multimesh_get_aabb") GodotMethod!(AABB, RID) multimeshGetAabb; 291 @GodotName("multimesh_get_instance_count") GodotMethod!(long, RID) multimeshGetInstanceCount; 292 @GodotName("multimesh_get_mesh") GodotMethod!(RID, RID) multimeshGetMesh; 293 @GodotName("multimesh_get_visible_instances") GodotMethod!(long, RID) multimeshGetVisibleInstances; 294 @GodotName("multimesh_instance_get_color") GodotMethod!(Color, RID, long) multimeshInstanceGetColor; 295 @GodotName("multimesh_instance_get_custom_data") GodotMethod!(Color, RID, long) multimeshInstanceGetCustomData; 296 @GodotName("multimesh_instance_get_transform") GodotMethod!(Transform, RID, long) multimeshInstanceGetTransform; 297 @GodotName("multimesh_instance_get_transform_2d") GodotMethod!(Transform2D, RID, long) multimeshInstanceGetTransform2d; 298 @GodotName("multimesh_instance_set_color") GodotMethod!(void, RID, long, Color) multimeshInstanceSetColor; 299 @GodotName("multimesh_instance_set_custom_data") GodotMethod!(void, RID, long, Color) multimeshInstanceSetCustomData; 300 @GodotName("multimesh_instance_set_transform") GodotMethod!(void, RID, long, Transform) multimeshInstanceSetTransform; 301 @GodotName("multimesh_instance_set_transform_2d") GodotMethod!(void, RID, long, Transform2D) multimeshInstanceSetTransform2d; 302 @GodotName("multimesh_set_as_bulk_array") GodotMethod!(void, RID, PoolRealArray) multimeshSetAsBulkArray; 303 @GodotName("multimesh_set_mesh") GodotMethod!(void, RID, RID) multimeshSetMesh; 304 @GodotName("multimesh_set_visible_instances") GodotMethod!(void, RID, long) multimeshSetVisibleInstances; 305 @GodotName("omni_light_create") GodotMethod!(RID) omniLightCreate; 306 @GodotName("particles_create") GodotMethod!(RID) particlesCreate; 307 @GodotName("particles_get_current_aabb") GodotMethod!(AABB, RID) particlesGetCurrentAabb; 308 @GodotName("particles_get_emitting") GodotMethod!(bool, RID) particlesGetEmitting; 309 @GodotName("particles_is_inactive") GodotMethod!(bool, RID) particlesIsInactive; 310 @GodotName("particles_request_process") GodotMethod!(void, RID) particlesRequestProcess; 311 @GodotName("particles_restart") GodotMethod!(void, RID) particlesRestart; 312 @GodotName("particles_set_amount") GodotMethod!(void, RID, long) particlesSetAmount; 313 @GodotName("particles_set_custom_aabb") GodotMethod!(void, RID, AABB) particlesSetCustomAabb; 314 @GodotName("particles_set_draw_order") GodotMethod!(void, RID, long) particlesSetDrawOrder; 315 @GodotName("particles_set_draw_pass_mesh") GodotMethod!(void, RID, long, RID) particlesSetDrawPassMesh; 316 @GodotName("particles_set_draw_passes") GodotMethod!(void, RID, long) particlesSetDrawPasses; 317 @GodotName("particles_set_emission_transform") GodotMethod!(void, RID, Transform) particlesSetEmissionTransform; 318 @GodotName("particles_set_emitting") GodotMethod!(void, RID, bool) particlesSetEmitting; 319 @GodotName("particles_set_explosiveness_ratio") GodotMethod!(void, RID, double) particlesSetExplosivenessRatio; 320 @GodotName("particles_set_fixed_fps") GodotMethod!(void, RID, long) particlesSetFixedFps; 321 @GodotName("particles_set_fractional_delta") GodotMethod!(void, RID, bool) particlesSetFractionalDelta; 322 @GodotName("particles_set_lifetime") GodotMethod!(void, RID, double) particlesSetLifetime; 323 @GodotName("particles_set_one_shot") GodotMethod!(void, RID, bool) particlesSetOneShot; 324 @GodotName("particles_set_pre_process_time") GodotMethod!(void, RID, double) particlesSetPreProcessTime; 325 @GodotName("particles_set_process_material") GodotMethod!(void, RID, RID) particlesSetProcessMaterial; 326 @GodotName("particles_set_randomness_ratio") GodotMethod!(void, RID, double) particlesSetRandomnessRatio; 327 @GodotName("particles_set_speed_scale") GodotMethod!(void, RID, double) particlesSetSpeedScale; 328 @GodotName("particles_set_use_local_coordinates") GodotMethod!(void, RID, bool) particlesSetUseLocalCoordinates; 329 @GodotName("reflection_probe_create") GodotMethod!(RID) reflectionProbeCreate; 330 @GodotName("reflection_probe_set_as_interior") GodotMethod!(void, RID, bool) reflectionProbeSetAsInterior; 331 @GodotName("reflection_probe_set_cull_mask") GodotMethod!(void, RID, long) reflectionProbeSetCullMask; 332 @GodotName("reflection_probe_set_enable_box_projection") GodotMethod!(void, RID, bool) reflectionProbeSetEnableBoxProjection; 333 @GodotName("reflection_probe_set_enable_shadows") GodotMethod!(void, RID, bool) reflectionProbeSetEnableShadows; 334 @GodotName("reflection_probe_set_extents") GodotMethod!(void, RID, Vector3) reflectionProbeSetExtents; 335 @GodotName("reflection_probe_set_intensity") GodotMethod!(void, RID, double) reflectionProbeSetIntensity; 336 @GodotName("reflection_probe_set_interior_ambient") GodotMethod!(void, RID, Color) reflectionProbeSetInteriorAmbient; 337 @GodotName("reflection_probe_set_interior_ambient_energy") GodotMethod!(void, RID, double) reflectionProbeSetInteriorAmbientEnergy; 338 @GodotName("reflection_probe_set_interior_ambient_probe_contribution") GodotMethod!(void, RID, double) reflectionProbeSetInteriorAmbientProbeContribution; 339 @GodotName("reflection_probe_set_max_distance") GodotMethod!(void, RID, double) reflectionProbeSetMaxDistance; 340 @GodotName("reflection_probe_set_origin_offset") GodotMethod!(void, RID, Vector3) reflectionProbeSetOriginOffset; 341 @GodotName("reflection_probe_set_update_mode") GodotMethod!(void, RID, long) reflectionProbeSetUpdateMode; 342 @GodotName("request_frame_drawn_callback") GodotMethod!(void, GodotObject, String, Variant) requestFrameDrawnCallback; 343 @GodotName("scenario_create") GodotMethod!(RID) scenarioCreate; 344 @GodotName("scenario_set_debug") GodotMethod!(void, RID, long) scenarioSetDebug; 345 @GodotName("scenario_set_environment") GodotMethod!(void, RID, RID) scenarioSetEnvironment; 346 @GodotName("scenario_set_fallback_environment") GodotMethod!(void, RID, RID) scenarioSetFallbackEnvironment; 347 @GodotName("scenario_set_reflection_atlas_size") GodotMethod!(void, RID, long, long) scenarioSetReflectionAtlasSize; 348 @GodotName("set_boot_image") GodotMethod!(void, Image, Color, bool, bool) setBootImage; 349 @GodotName("set_debug_generate_wireframes") GodotMethod!(void, bool) setDebugGenerateWireframes; 350 @GodotName("set_default_clear_color") GodotMethod!(void, Color) setDefaultClearColor; 351 @GodotName("set_render_loop_enabled") GodotMethod!(void, bool) setRenderLoopEnabled; 352 @GodotName("set_shader_time_scale") GodotMethod!(void, double) setShaderTimeScale; 353 @GodotName("shader_create") GodotMethod!(RID) shaderCreate; 354 @GodotName("shader_get_code") GodotMethod!(String, RID) shaderGetCode; 355 @GodotName("shader_get_default_texture_param") GodotMethod!(RID, RID, String) shaderGetDefaultTextureParam; 356 @GodotName("shader_get_param_list") GodotMethod!(Array, RID) shaderGetParamList; 357 @GodotName("shader_set_code") GodotMethod!(void, RID, String) shaderSetCode; 358 @GodotName("shader_set_default_texture_param") GodotMethod!(void, RID, String, RID) shaderSetDefaultTextureParam; 359 @GodotName("skeleton_allocate") GodotMethod!(void, RID, long, bool) skeletonAllocate; 360 @GodotName("skeleton_bone_get_transform") GodotMethod!(Transform, RID, long) skeletonBoneGetTransform; 361 @GodotName("skeleton_bone_get_transform_2d") GodotMethod!(Transform2D, RID, long) skeletonBoneGetTransform2d; 362 @GodotName("skeleton_bone_set_transform") GodotMethod!(void, RID, long, Transform) skeletonBoneSetTransform; 363 @GodotName("skeleton_bone_set_transform_2d") GodotMethod!(void, RID, long, Transform2D) skeletonBoneSetTransform2d; 364 @GodotName("skeleton_create") GodotMethod!(RID) skeletonCreate; 365 @GodotName("skeleton_get_bone_count") GodotMethod!(long, RID) skeletonGetBoneCount; 366 @GodotName("sky_create") GodotMethod!(RID) skyCreate; 367 @GodotName("sky_set_texture") GodotMethod!(void, RID, RID, long) skySetTexture; 368 @GodotName("spot_light_create") GodotMethod!(RID) spotLightCreate; 369 @GodotName("sync") GodotMethod!(void) sync; 370 @GodotName("texture_allocate") GodotMethod!(void, RID, long, long, long, long, long, long) textureAllocate; 371 @GodotName("texture_bind") GodotMethod!(void, RID, long) textureBind; 372 @GodotName("texture_create") GodotMethod!(RID) textureCreate; 373 @GodotName("texture_create_from_image") GodotMethod!(RID, Image, long) textureCreateFromImage; 374 @GodotName("texture_debug_usage") GodotMethod!(Array) textureDebugUsage; 375 @GodotName("texture_get_data") GodotMethod!(Image, RID, long) textureGetData; 376 @GodotName("texture_get_depth") GodotMethod!(long, RID) textureGetDepth; 377 @GodotName("texture_get_flags") GodotMethod!(long, RID) textureGetFlags; 378 @GodotName("texture_get_format") GodotMethod!(Image.Format, RID) textureGetFormat; 379 @GodotName("texture_get_height") GodotMethod!(long, RID) textureGetHeight; 380 @GodotName("texture_get_path") GodotMethod!(String, RID) textureGetPath; 381 @GodotName("texture_get_texid") GodotMethod!(long, RID) textureGetTexid; 382 @GodotName("texture_get_type") GodotMethod!(VisualServer.TextureType, RID) textureGetType; 383 @GodotName("texture_get_width") GodotMethod!(long, RID) textureGetWidth; 384 @GodotName("texture_set_data") GodotMethod!(void, RID, Image, long) textureSetData; 385 @GodotName("texture_set_data_partial") GodotMethod!(void, RID, Image, long, long, long, long, long, long, long, long) textureSetDataPartial; 386 @GodotName("texture_set_flags") GodotMethod!(void, RID, long) textureSetFlags; 387 @GodotName("texture_set_path") GodotMethod!(void, RID, String) textureSetPath; 388 @GodotName("texture_set_shrink_all_x2_on_set_data") GodotMethod!(void, bool) textureSetShrinkAllX2OnSetData; 389 @GodotName("texture_set_size_override") GodotMethod!(void, RID, long, long, long) textureSetSizeOverride; 390 @GodotName("textures_keep_original") GodotMethod!(void, bool) texturesKeepOriginal; 391 @GodotName("viewport_attach_camera") GodotMethod!(void, RID, RID) viewportAttachCamera; 392 @GodotName("viewport_attach_canvas") GodotMethod!(void, RID, RID) viewportAttachCanvas; 393 @GodotName("viewport_attach_to_screen") GodotMethod!(void, RID, Rect2, long) viewportAttachToScreen; 394 @GodotName("viewport_create") GodotMethod!(RID) viewportCreate; 395 @GodotName("viewport_detach") GodotMethod!(void, RID) viewportDetach; 396 @GodotName("viewport_get_render_info") GodotMethod!(long, RID, long) viewportGetRenderInfo; 397 @GodotName("viewport_get_texture") GodotMethod!(RID, RID) viewportGetTexture; 398 @GodotName("viewport_remove_canvas") GodotMethod!(void, RID, RID) viewportRemoveCanvas; 399 @GodotName("viewport_set_active") GodotMethod!(void, RID, bool) viewportSetActive; 400 @GodotName("viewport_set_canvas_stacking") GodotMethod!(void, RID, RID, long, long) viewportSetCanvasStacking; 401 @GodotName("viewport_set_canvas_transform") GodotMethod!(void, RID, RID, Transform2D) viewportSetCanvasTransform; 402 @GodotName("viewport_set_clear_mode") GodotMethod!(void, RID, long) viewportSetClearMode; 403 @GodotName("viewport_set_debug_draw") GodotMethod!(void, RID, long) viewportSetDebugDraw; 404 @GodotName("viewport_set_disable_3d") GodotMethod!(void, RID, bool) viewportSetDisable3d; 405 @GodotName("viewport_set_disable_environment") GodotMethod!(void, RID, bool) viewportSetDisableEnvironment; 406 @GodotName("viewport_set_global_canvas_transform") GodotMethod!(void, RID, Transform2D) viewportSetGlobalCanvasTransform; 407 @GodotName("viewport_set_hdr") GodotMethod!(void, RID, bool) viewportSetHdr; 408 @GodotName("viewport_set_hide_canvas") GodotMethod!(void, RID, bool) viewportSetHideCanvas; 409 @GodotName("viewport_set_hide_scenario") GodotMethod!(void, RID, bool) viewportSetHideScenario; 410 @GodotName("viewport_set_msaa") GodotMethod!(void, RID, long) viewportSetMsaa; 411 @GodotName("viewport_set_parent_viewport") GodotMethod!(void, RID, RID) viewportSetParentViewport; 412 @GodotName("viewport_set_render_direct_to_screen") GodotMethod!(void, RID, bool) viewportSetRenderDirectToScreen; 413 @GodotName("viewport_set_scenario") GodotMethod!(void, RID, RID) viewportSetScenario; 414 @GodotName("viewport_set_shadow_atlas_quadrant_subdivision") GodotMethod!(void, RID, long, long) viewportSetShadowAtlasQuadrantSubdivision; 415 @GodotName("viewport_set_shadow_atlas_size") GodotMethod!(void, RID, long) viewportSetShadowAtlasSize; 416 @GodotName("viewport_set_size") GodotMethod!(void, RID, long, long) viewportSetSize; 417 @GodotName("viewport_set_transparent_background") GodotMethod!(void, RID, bool) viewportSetTransparentBackground; 418 @GodotName("viewport_set_update_mode") GodotMethod!(void, RID, long) viewportSetUpdateMode; 419 @GodotName("viewport_set_usage") GodotMethod!(void, RID, long) viewportSetUsage; 420 @GodotName("viewport_set_use_arvr") GodotMethod!(void, RID, bool) viewportSetUseArvr; 421 @GodotName("viewport_set_use_debanding") GodotMethod!(void, RID, bool) viewportSetUseDebanding; 422 @GodotName("viewport_set_use_fxaa") GodotMethod!(void, RID, bool) viewportSetUseFxaa; 423 @GodotName("viewport_set_vflip") GodotMethod!(void, RID, bool) viewportSetVflip; 424 } 425 /// 426 pragma(inline, true) bool opEquals(in VisualServerSingleton other) const 427 { return _godot_object.ptr is other._godot_object.ptr; } 428 /// 429 pragma(inline, true) typeof(null) opAssign(typeof(null) n) 430 { _godot_object.ptr = n; return null; } 431 /// 432 pragma(inline, true) bool opEquals(typeof(null) n) const 433 { return _godot_object.ptr is n; } 434 /// 435 size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; } 436 mixin baseCasts; 437 /// Construct a new instance of VisualServerSingleton. 438 /// Note: use `memnew!VisualServerSingleton` instead. 439 static VisualServerSingleton _new() 440 { 441 static godot_class_constructor constructor; 442 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VisualServer"); 443 if(constructor is null) return typeof(this).init; 444 return cast(VisualServerSingleton)(constructor()); 445 } 446 @disable new(size_t s); 447 /// 448 enum ReflectionProbeUpdateMode : int 449 { 450 /** 451 Reflection probe will update reflections once and then stop. 452 */ 453 reflectionProbeUpdateOnce = 0, 454 /** 455 Reflection probe will update each frame. This mode is necessary to capture moving objects. 456 */ 457 reflectionProbeUpdateAlways = 1, 458 } 459 /// 460 enum LightDirectionalShadowDepthRangeMode : int 461 { 462 /** 463 Keeps shadows stable as camera moves but has lower effective resolution. 464 */ 465 lightDirectionalShadowDepthRangeStable = 0, 466 /** 467 Optimize use of shadow maps, increasing the effective resolution. But may result in shadows moving or flickering slightly. 468 */ 469 lightDirectionalShadowDepthRangeOptimized = 1, 470 } 471 /// 472 enum BlendShapeMode : int 473 { 474 /** 475 Blend shapes are normalized. 476 */ 477 blendShapeModeNormalized = 0, 478 /** 479 Blend shapes are relative to base weight. 480 */ 481 blendShapeModeRelative = 1, 482 } 483 /// 484 enum PrimitiveType : int 485 { 486 /** 487 Primitive to draw consists of points. 488 */ 489 primitivePoints = 0, 490 /** 491 Primitive to draw consists of lines. 492 */ 493 primitiveLines = 1, 494 /** 495 Primitive to draw consists of a line strip from start to end. 496 */ 497 primitiveLineStrip = 2, 498 /** 499 Primitive to draw consists of a line loop (a line strip with a line between the last and the first vertex). 500 */ 501 primitiveLineLoop = 3, 502 /** 503 Primitive to draw consists of triangles. 504 */ 505 primitiveTriangles = 4, 506 /** 507 Primitive to draw consists of a triangle strip (the last 3 vertices are always combined to make a triangle). 508 */ 509 primitiveTriangleStrip = 5, 510 /** 511 Primitive to draw consists of a triangle strip (the last 2 vertices are always combined with the first to make a triangle). 512 */ 513 primitiveTriangleFan = 6, 514 /** 515 Represents the size of the $(D primitivetype) enum. 516 */ 517 primitiveMax = 7, 518 } 519 /// 520 enum TextureType : int 521 { 522 /** 523 Normal texture with 2 dimensions, width and height. 524 */ 525 textureType2d = 0, 526 /** 527 Texture made up of six faces, can be looked up with a `vec3` in shader. 528 */ 529 textureTypeCubemap = 2, 530 /** 531 An array of 2-dimensional textures. 532 */ 533 textureType2dArray = 3, 534 /** 535 A 3-dimensional texture with width, height, and depth. 536 */ 537 textureType3d = 4, 538 } 539 /// 540 enum EnvironmentSSAOQuality : int 541 { 542 /** 543 Lowest quality of screen space ambient occlusion. 544 */ 545 envSsaoQualityLow = 0, 546 /** 547 Medium quality screen space ambient occlusion. 548 */ 549 envSsaoQualityMedium = 1, 550 /** 551 Highest quality screen space ambient occlusion. 552 */ 553 envSsaoQualityHigh = 2, 554 } 555 /// 556 enum EnvironmentDOFBlurQuality : int 557 { 558 /** 559 Use lowest blur quality. Fastest, but may look bad. 560 */ 561 envDofBlurQualityLow = 0, 562 /** 563 Use medium blur quality. 564 */ 565 envDofBlurQualityMedium = 1, 566 /** 567 Used highest blur quality. Looks the best, but is the slowest. 568 */ 569 envDofBlurQualityHigh = 2, 570 } 571 /// 572 enum RenderInfo : int 573 { 574 /** 575 The amount of objects in the frame. 576 */ 577 infoObjectsInFrame = 0, 578 /** 579 The amount of vertices in the frame. 580 */ 581 infoVerticesInFrame = 1, 582 /** 583 The amount of modified materials in the frame. 584 */ 585 infoMaterialChangesInFrame = 2, 586 /** 587 The amount of shader rebinds in the frame. 588 */ 589 infoShaderChangesInFrame = 3, 590 /** 591 The amount of surface changes in the frame. 592 */ 593 infoSurfaceChangesInFrame = 4, 594 /** 595 The amount of draw calls in frame. 596 */ 597 infoDrawCallsInFrame = 5, 598 /** 599 The amount of 2d items in the frame. 600 */ 601 info2dItemsInFrame = 6, 602 /** 603 The amount of 2d draw calls in frame. 604 */ 605 info2dDrawCallsInFrame = 7, 606 /** 607 Unimplemented in the GLES2 and GLES3 rendering backends, always returns 0. 608 */ 609 infoUsageVideoMemTotal = 8, 610 /** 611 The amount of video memory used, i.e. texture and vertex memory combined. 612 */ 613 infoVideoMemUsed = 9, 614 /** 615 The amount of texture memory used. 616 */ 617 infoTextureMemUsed = 10, 618 /** 619 The amount of vertex memory used. 620 */ 621 infoVertexMemUsed = 11, 622 } 623 /// 624 enum NinePatchAxisMode : int 625 { 626 /** 627 The nine patch gets stretched where needed. 628 */ 629 ninePatchStretch = 0, 630 /** 631 The nine patch gets filled with tiles where needed. 632 */ 633 ninePatchTile = 1, 634 /** 635 The nine patch gets filled with tiles where needed and stretches them a bit if needed. 636 */ 637 ninePatchTileFit = 2, 638 } 639 /// 640 enum ViewportRenderInfo : int 641 { 642 /** 643 Number of objects drawn in a single frame. 644 */ 645 viewportRenderInfoObjectsInFrame = 0, 646 /** 647 Number of vertices drawn in a single frame. 648 */ 649 viewportRenderInfoVerticesInFrame = 1, 650 /** 651 Number of material changes during this frame. 652 */ 653 viewportRenderInfoMaterialChangesInFrame = 2, 654 /** 655 Number of shader changes during this frame. 656 */ 657 viewportRenderInfoShaderChangesInFrame = 3, 658 /** 659 Number of surface changes during this frame. 660 */ 661 viewportRenderInfoSurfaceChangesInFrame = 4, 662 /** 663 Number of draw calls during this frame. 664 */ 665 viewportRenderInfoDrawCallsInFrame = 5, 666 /** 667 Number of 2d items drawn this frame. 668 */ 669 viewportRenderInfo2dItemsInFrame = 6, 670 /** 671 Number of 2d draw calls during this frame. 672 */ 673 viewportRenderInfo2dDrawCallsInFrame = 7, 674 /** 675 Represents the size of the $(D viewportrenderinfo) enum. 676 */ 677 viewportRenderInfoMax = 8, 678 } 679 /// 680 enum ViewportClearMode : int 681 { 682 /** 683 The viewport is always cleared before drawing. 684 */ 685 viewportClearAlways = 0, 686 /** 687 The viewport is never cleared before drawing. 688 */ 689 viewportClearNever = 1, 690 /** 691 The viewport is cleared once, then the clear mode is set to $(D constant VIEWPORT_CLEAR_NEVER). 692 */ 693 viewportClearOnlyNextFrame = 2, 694 } 695 /// 696 enum LightOmniShadowDetail : int 697 { 698 /** 699 Use more detail vertically when computing shadow map. 700 */ 701 lightOmniShadowDetailVertical = 0, 702 /** 703 Use more detail horizontally when computing shadow map. 704 */ 705 lightOmniShadowDetailHorizontal = 1, 706 } 707 /// 708 enum ShaderMode : int 709 { 710 /** 711 Shader is a 3D shader. 712 */ 713 shaderSpatial = 0, 714 /** 715 Shader is a 2D shader. 716 */ 717 shaderCanvasItem = 1, 718 /** 719 Shader is a particle shader. 720 */ 721 shaderParticles = 2, 722 /** 723 Represents the size of the $(D shadermode) enum. 724 */ 725 shaderMax = 3, 726 } 727 /// 728 enum MultimeshTransformFormat : int 729 { 730 /** 731 Use $(D Transform2D) to store MultiMesh transform. 732 */ 733 multimeshTransform2d = 0, 734 /** 735 Use $(D Transform) to store MultiMesh transform. 736 */ 737 multimeshTransform3d = 1, 738 } 739 /// 740 enum ShadowCastingSetting : int 741 { 742 /** 743 Disable shadows from this instance. 744 */ 745 shadowCastingSettingOff = 0, 746 /** 747 Cast shadows from this instance. 748 */ 749 shadowCastingSettingOn = 1, 750 /** 751 Disable backface culling when rendering the shadow of the object. This is slightly slower but may result in more correct shadows. 752 */ 753 shadowCastingSettingDoubleSided = 2, 754 /** 755 Only render the shadows from the object. The object itself will not be drawn. 756 */ 757 shadowCastingSettingShadowsOnly = 3, 758 } 759 /// 760 enum ViewportDebugDraw : int 761 { 762 /** 763 Debug draw is disabled. Default setting. 764 */ 765 viewportDebugDrawDisabled = 0, 766 /** 767 Debug draw sets objects to unshaded. 768 */ 769 viewportDebugDrawUnshaded = 1, 770 /** 771 Overwrites clear color to `(0,0,0,0)`. 772 */ 773 viewportDebugDrawOverdraw = 2, 774 /** 775 Debug draw draws objects in wireframe. 776 */ 777 viewportDebugDrawWireframe = 3, 778 } 779 /// 780 enum ViewportUsage : int 781 { 782 /** 783 The Viewport does not render 3D but samples. 784 */ 785 viewportUsage2d = 0, 786 /** 787 The Viewport does not render 3D and does not sample. 788 */ 789 viewportUsage2dNoSampling = 1, 790 /** 791 The Viewport renders 3D with effects. 792 */ 793 viewportUsage3d = 2, 794 /** 795 The Viewport renders 3D but without effects. 796 */ 797 viewportUsage3dNoEffects = 3, 798 } 799 /// 800 enum EnvironmentBG : int 801 { 802 /** 803 Use the clear color as background. 804 */ 805 envBgClearColor = 0, 806 /** 807 Use a specified color as the background. 808 */ 809 envBgColor = 1, 810 /** 811 Use a sky resource for the background. 812 */ 813 envBgSky = 2, 814 /** 815 Use a custom color for background, but use a sky for shading and reflections. 816 */ 817 envBgColorSky = 3, 818 /** 819 Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world. 820 */ 821 envBgCanvas = 4, 822 /** 823 Do not clear the background, use whatever was rendered last frame as the background. 824 */ 825 envBgKeep = 5, 826 /** 827 Represents the size of the $(D environmentbg) enum. 828 */ 829 envBgMax = 7, 830 } 831 /// 832 enum MultimeshCustomDataFormat : int 833 { 834 /** 835 MultiMesh does not use custom data. 836 */ 837 multimeshCustomDataNone = 0, 838 /** 839 MultiMesh custom data uses 8 bits per component. This packs the 4-component custom data into a single float. 840 */ 841 multimeshCustomData8bit = 1, 842 /** 843 MultiMesh custom data uses a float per component. 844 */ 845 multimeshCustomDataFloat = 2, 846 } 847 /// 848 enum LightOmniShadowMode : int 849 { 850 /** 851 Use a dual paraboloid shadow map for omni lights. 852 */ 853 lightOmniShadowDualParaboloid = 0, 854 /** 855 Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid. 856 */ 857 lightOmniShadowCube = 1, 858 } 859 /// 860 enum TextureFlags : int 861 { 862 /** 863 Generates mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. 864 */ 865 textureFlagMipmaps = 1, 866 /** 867 Repeats the texture (instead of clamp to edge). 868 */ 869 textureFlagRepeat = 2, 870 /** 871 Uses a magnifying filter, to enable smooth zooming in of the texture. 872 */ 873 textureFlagFilter = 4, 874 /** 875 Default flags. $(D constant TEXTURE_FLAG_MIPMAPS), $(D constant TEXTURE_FLAG_REPEAT) and $(D constant TEXTURE_FLAG_FILTER) are enabled. 876 */ 877 textureFlagsDefault = 7, 878 /** 879 Uses anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios. 880 This results in better-looking textures when viewed from oblique angles. 881 */ 882 textureFlagAnisotropicFilter = 8, 883 /** 884 Converts the texture to the sRGB color space. 885 */ 886 textureFlagConvertToLinear = 16, 887 /** 888 Repeats the texture with alternate sections mirrored. 889 */ 890 textureFlagMirroredRepeat = 32, 891 /** 892 Texture is a video surface. 893 */ 894 textureFlagUsedForStreaming = 2048, 895 } 896 /// 897 enum Features : int 898 { 899 /** 900 Hardware supports shaders. This enum is currently unused in Godot 3.x. 901 */ 902 featureShaders = 0, 903 /** 904 Hardware supports multithreading. This enum is currently unused in Godot 3.x. 905 */ 906 featureMultithreaded = 1, 907 } 908 /// 909 enum InstanceType : int 910 { 911 /** 912 The instance does not have a type. 913 */ 914 instanceNone = 0, 915 /** 916 The instance is a mesh. 917 */ 918 instanceMesh = 1, 919 /** 920 The instance is a multimesh. 921 */ 922 instanceMultimesh = 2, 923 /** 924 The instance is an immediate geometry. 925 */ 926 instanceImmediate = 3, 927 /** 928 The instance is a particle emitter. 929 */ 930 instanceParticles = 4, 931 /** 932 The instance is a light. 933 */ 934 instanceLight = 5, 935 /** 936 The instance is a reflection probe. 937 */ 938 instanceReflectionProbe = 6, 939 /** 940 The instance is a GI probe. 941 */ 942 instanceGiProbe = 7, 943 /** 944 The instance is a lightmap capture. 945 */ 946 instanceLightmapCapture = 8, 947 /** 948 Represents the size of the $(D instancetype) enum. 949 */ 950 instanceMax = 9, 951 /** 952 A combination of the flags of geometry instances (mesh, multimesh, immediate and particles). 953 */ 954 instanceGeometryMask = 30, 955 } 956 /// 957 enum EnvironmentSSAOBlur : int 958 { 959 /** 960 Disables the blur set for SSAO. Will make SSAO look noisier. 961 */ 962 envSsaoBlurDisabled = 0, 963 /** 964 Perform a 1x1 blur on the SSAO output. 965 */ 966 envSsaoBlur1x1 = 1, 967 /** 968 Performs a 2x2 blur on the SSAO output. 969 */ 970 envSsaoBlur2x2 = 2, 971 /** 972 Performs a 3x3 blur on the SSAO output. Use this for smoothest SSAO. 973 */ 974 envSsaoBlur3x3 = 3, 975 } 976 /// 977 enum EnvironmentToneMapper : int 978 { 979 /** 980 Output color as they came in. 981 */ 982 envToneMapperLinear = 0, 983 /** 984 Use the Reinhard tonemapper. 985 */ 986 envToneMapperReinhard = 1, 987 /** 988 Use the filmic tonemapper. 989 */ 990 envToneMapperFilmic = 2, 991 /** 992 Use the ACES tonemapper. 993 */ 994 envToneMapperAces = 3, 995 } 996 /// 997 enum EnvironmentGlowBlendMode : int 998 { 999 /** 1000 Add the effect of the glow on top of the scene. 1001 */ 1002 glowBlendModeAdditive = 0, 1003 /** 1004 Blends the glow effect with the screen. Does not get as bright as additive. 1005 */ 1006 glowBlendModeScreen = 1, 1007 /** 1008 Produces a subtle color disturbance around objects. 1009 */ 1010 glowBlendModeSoftlight = 2, 1011 /** 1012 Shows the glow effect by itself without the underlying scene. 1013 */ 1014 glowBlendModeReplace = 3, 1015 } 1016 /// 1017 enum MultimeshColorFormat : int 1018 { 1019 /** 1020 MultiMesh does not use per-instance color. 1021 */ 1022 multimeshColorNone = 0, 1023 /** 1024 MultiMesh color uses 8 bits per component. This packs the color into a single float. 1025 */ 1026 multimeshColor8bit = 1, 1027 /** 1028 MultiMesh color uses a float per channel. 1029 */ 1030 multimeshColorFloat = 2, 1031 } 1032 /// 1033 enum CanvasLightShadowFilter : int 1034 { 1035 /** 1036 Do not apply a filter to canvas light shadows. 1037 */ 1038 canvasLightFilterNone = 0, 1039 /** 1040 Use PCF3 filtering to filter canvas light shadows. 1041 */ 1042 canvasLightFilterPcf3 = 1, 1043 /** 1044 Use PCF5 filtering to filter canvas light shadows. 1045 */ 1046 canvasLightFilterPcf5 = 2, 1047 /** 1048 Use PCF7 filtering to filter canvas light shadows. 1049 */ 1050 canvasLightFilterPcf7 = 3, 1051 /** 1052 Use PCF9 filtering to filter canvas light shadows. 1053 */ 1054 canvasLightFilterPcf9 = 4, 1055 /** 1056 Use PCF13 filtering to filter canvas light shadows. 1057 */ 1058 canvasLightFilterPcf13 = 5, 1059 } 1060 /// 1061 enum ScenarioDebugMode : int 1062 { 1063 /** 1064 Do not use a debug mode. 1065 */ 1066 scenarioDebugDisabled = 0, 1067 /** 1068 Draw all objects as wireframe models. 1069 */ 1070 scenarioDebugWireframe = 1, 1071 /** 1072 Draw all objects in a way that displays how much overdraw is occurring. Overdraw occurs when a section of pixels is drawn and shaded and then another object covers it up. To optimize a scene, you should reduce overdraw. 1073 */ 1074 scenarioDebugOverdraw = 2, 1075 /** 1076 Draw all objects without shading. Equivalent to setting all objects shaders to `unshaded`. 1077 */ 1078 scenarioDebugShadeless = 3, 1079 } 1080 /// 1081 enum ViewportUpdateMode : int 1082 { 1083 /** 1084 Do not update the viewport. 1085 */ 1086 viewportUpdateDisabled = 0, 1087 /** 1088 Update the viewport once then set to disabled. 1089 */ 1090 viewportUpdateOnce = 1, 1091 /** 1092 Update the viewport whenever it is visible. 1093 */ 1094 viewportUpdateWhenVisible = 2, 1095 /** 1096 Always update the viewport. 1097 */ 1098 viewportUpdateAlways = 3, 1099 } 1100 /// 1101 enum LightBakeMode : int 1102 { 1103 /** 1104 1105 */ 1106 lightBakeDisabled = 0, 1107 /** 1108 1109 */ 1110 lightBakeIndirect = 1, 1111 /** 1112 1113 */ 1114 lightBakeAll = 2, 1115 } 1116 /// 1117 enum ArrayFormat : int 1118 { 1119 /** 1120 Flag used to mark a vertex array. 1121 */ 1122 arrayFormatVertex = 1, 1123 /** 1124 Flag used to mark a normal array. 1125 */ 1126 arrayFormatNormal = 2, 1127 /** 1128 Flag used to mark a tangent array. 1129 */ 1130 arrayFormatTangent = 4, 1131 /** 1132 Flag used to mark a color array. 1133 */ 1134 arrayFormatColor = 8, 1135 /** 1136 Flag used to mark an UV coordinates array. 1137 */ 1138 arrayFormatTexUv = 16, 1139 /** 1140 Flag used to mark an UV coordinates array for the second UV coordinates. 1141 */ 1142 arrayFormatTexUv2 = 32, 1143 /** 1144 Flag used to mark a bone information array. 1145 */ 1146 arrayFormatBones = 64, 1147 /** 1148 Flag used to mark a weights array. 1149 */ 1150 arrayFormatWeights = 128, 1151 /** 1152 Flag used to mark an index array. 1153 */ 1154 arrayFormatIndex = 256, 1155 /** 1156 Flag used to mark a compressed (half float) vertex array. 1157 */ 1158 arrayCompressVertex = 512, 1159 /** 1160 Flag used to mark a compressed (half float) normal array. 1161 */ 1162 arrayCompressNormal = 1024, 1163 /** 1164 Flag used to mark a compressed (half float) tangent array. 1165 */ 1166 arrayCompressTangent = 2048, 1167 /** 1168 Flag used to mark a compressed (half float) color array. 1169 */ 1170 arrayCompressColor = 4096, 1171 /** 1172 Flag used to mark a compressed (half float) UV coordinates array. 1173 */ 1174 arrayCompressTexUv = 8192, 1175 /** 1176 Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. 1177 */ 1178 arrayCompressTexUv2 = 16384, 1179 /** 1180 Flag used to mark a compressed bone array. 1181 */ 1182 arrayCompressBones = 32768, 1183 /** 1184 Flag used to mark a compressed (half float) weight array. 1185 */ 1186 arrayCompressWeights = 65536, 1187 /** 1188 Used to set flags $(D constant ARRAY_COMPRESS_NORMAL), $(D constant ARRAY_COMPRESS_TANGENT), $(D constant ARRAY_COMPRESS_COLOR), $(D constant ARRAY_COMPRESS_TEX_UV), $(D constant ARRAY_COMPRESS_TEX_UV2) and $(D constant ARRAY_COMPRESS_WEIGHTS) quickly. 1189 */ 1190 arrayCompressDefault = 97280, 1191 /** 1192 Flag used to mark a compressed index array. 1193 */ 1194 arrayCompressIndex = 131072, 1195 /** 1196 Flag used to mark that the array contains 2D vertices. 1197 */ 1198 arrayFlagUse2dVertices = 262144, 1199 /** 1200 Flag used to mark that the array uses 16-bit bones instead of 8-bit. 1201 */ 1202 arrayFlagUse16BitBones = 524288, 1203 } 1204 /// 1205 enum ParticlesDrawOrder : int 1206 { 1207 /** 1208 Draw particles in the order that they appear in the particles array. 1209 */ 1210 particlesDrawOrderIndex = 0, 1211 /** 1212 Sort particles based on their lifetime. 1213 */ 1214 particlesDrawOrderLifetime = 1, 1215 /** 1216 Sort particles based on their distance to the camera. 1217 */ 1218 particlesDrawOrderViewDepth = 2, 1219 } 1220 /// 1221 enum CanvasLightMode : int 1222 { 1223 /** 1224 Adds light color additive to the canvas. 1225 */ 1226 canvasLightModeAdd = 0, 1227 /** 1228 Adds light color subtractive to the canvas. 1229 */ 1230 canvasLightModeSub = 1, 1231 /** 1232 The light adds color depending on transparency. 1233 */ 1234 canvasLightModeMix = 2, 1235 /** 1236 The light adds color depending on mask. 1237 */ 1238 canvasLightModeMask = 3, 1239 } 1240 /// 1241 enum LightDirectionalShadowMode : int 1242 { 1243 /** 1244 Use orthogonal shadow projection for directional light. 1245 */ 1246 lightDirectionalShadowOrthogonal = 0, 1247 /** 1248 Use 2 splits for shadow projection when using directional light. 1249 */ 1250 lightDirectionalShadowParallel2Splits = 1, 1251 /** 1252 Use 4 splits for shadow projection when using directional light. 1253 */ 1254 lightDirectionalShadowParallel4Splits = 2, 1255 } 1256 /// 1257 enum LightParam : int 1258 { 1259 /** 1260 The light's energy. 1261 */ 1262 lightParamEnergy = 0, 1263 /** 1264 The light's influence on specularity. 1265 */ 1266 lightParamSpecular = 2, 1267 /** 1268 The light's range. 1269 */ 1270 lightParamRange = 3, 1271 /** 1272 The light's attenuation. 1273 */ 1274 lightParamAttenuation = 4, 1275 /** 1276 The spotlight's angle. 1277 */ 1278 lightParamSpotAngle = 5, 1279 /** 1280 The spotlight's attenuation. 1281 */ 1282 lightParamSpotAttenuation = 6, 1283 /** 1284 Scales the shadow color. 1285 */ 1286 lightParamContactShadowSize = 7, 1287 /** 1288 Max distance that shadows will be rendered. 1289 */ 1290 lightParamShadowMaxDistance = 8, 1291 /** 1292 Proportion of shadow atlas occupied by the first split. 1293 */ 1294 lightParamShadowSplit1Offset = 9, 1295 /** 1296 Proportion of shadow atlas occupied by the second split. 1297 */ 1298 lightParamShadowSplit2Offset = 10, 1299 /** 1300 Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest. 1301 */ 1302 lightParamShadowSplit3Offset = 11, 1303 /** 1304 Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts. 1305 */ 1306 lightParamShadowNormalBias = 12, 1307 /** 1308 Bias the shadow lookup to fix self-shadowing artifacts. 1309 */ 1310 lightParamShadowBias = 13, 1311 /** 1312 Increases bias on further splits to fix self-shadowing that only occurs far away from the camera. 1313 */ 1314 lightParamShadowBiasSplitScale = 14, 1315 /** 1316 Represents the size of the $(D lightparam) enum. 1317 */ 1318 lightParamMax = 15, 1319 } 1320 /// 1321 enum ArrayType : int 1322 { 1323 /** 1324 Array is a vertex array. 1325 */ 1326 arrayVertex = 0, 1327 /** 1328 Array is a normal array. 1329 */ 1330 arrayNormal = 1, 1331 /** 1332 Array is a tangent array. 1333 */ 1334 arrayTangent = 2, 1335 /** 1336 Array is a color array. 1337 */ 1338 arrayColor = 3, 1339 /** 1340 Array is an UV coordinates array. 1341 */ 1342 arrayTexUv = 4, 1343 /** 1344 Array is an UV coordinates array for the second UV coordinates. 1345 */ 1346 arrayTexUv2 = 5, 1347 /** 1348 Array contains bone information. 1349 */ 1350 arrayBones = 6, 1351 /** 1352 Array is weight information. 1353 */ 1354 arrayWeights = 7, 1355 /** 1356 Array is index array. 1357 */ 1358 arrayIndex = 8, 1359 /** 1360 Represents the size of the $(D arraytype) enum. 1361 */ 1362 arrayMax = 9, 1363 } 1364 /// 1365 enum CanvasOccluderPolygonCullMode : int 1366 { 1367 /** 1368 Culling of the canvas occluder is disabled. 1369 */ 1370 canvasOccluderPolygonCullDisabled = 0, 1371 /** 1372 Culling of the canvas occluder is clockwise. 1373 */ 1374 canvasOccluderPolygonCullClockwise = 1, 1375 /** 1376 Culling of the canvas occluder is counterclockwise. 1377 */ 1378 canvasOccluderPolygonCullCounterClockwise = 2, 1379 } 1380 /// 1381 enum InstanceFlags : int 1382 { 1383 /** 1384 Allows the instance to be used in baked lighting. 1385 */ 1386 instanceFlagUseBakedLight = 0, 1387 /** 1388 When set, manually requests to draw geometry on next frame. 1389 */ 1390 instanceFlagDrawNextFrameIfVisible = 1, 1391 /** 1392 Represents the size of the $(D instanceflags) enum. 1393 */ 1394 instanceFlagMax = 2, 1395 } 1396 /// 1397 enum ViewportMSAA : int 1398 { 1399 /** 1400 Multisample antialiasing is disabled. 1401 */ 1402 viewportMsaaDisabled = 0, 1403 /** 1404 Multisample antialiasing is set to 2×. 1405 */ 1406 viewportMsaa2x = 1, 1407 /** 1408 Multisample antialiasing is set to 4×. 1409 */ 1410 viewportMsaa4x = 2, 1411 /** 1412 Multisample antialiasing is set to 8×. 1413 */ 1414 viewportMsaa8x = 3, 1415 /** 1416 Multisample antialiasing is set to 16×. 1417 */ 1418 viewportMsaa16x = 4, 1419 /** 1420 Multisample antialiasing is set to 2× on external texture. Special mode for GLES2 Android VR (Oculus Quest and Go). 1421 */ 1422 viewportMsaaExt2x = 5, 1423 /** 1424 Multisample antialiasing is set to 4× on external texture. Special mode for GLES2 Android VR (Oculus Quest and Go). 1425 */ 1426 viewportMsaaExt4x = 6, 1427 } 1428 /// 1429 enum LightType : int 1430 { 1431 /** 1432 Is a directional (sun) light. 1433 */ 1434 lightDirectional = 0, 1435 /** 1436 Is an omni light. 1437 */ 1438 lightOmni = 1, 1439 /** 1440 Is a spot light. 1441 */ 1442 lightSpot = 2, 1443 } 1444 /// 1445 enum CubeMapSide : int 1446 { 1447 /** 1448 Marks the left side of a cubemap. 1449 */ 1450 cubemapLeft = 0, 1451 /** 1452 Marks the right side of a cubemap. 1453 */ 1454 cubemapRight = 1, 1455 /** 1456 Marks the bottom side of a cubemap. 1457 */ 1458 cubemapBottom = 2, 1459 /** 1460 Marks the top side of a cubemap. 1461 */ 1462 cubemapTop = 3, 1463 /** 1464 Marks the front side of a cubemap. 1465 */ 1466 cubemapFront = 4, 1467 /** 1468 Marks the back side of a cubemap. 1469 */ 1470 cubemapBack = 5, 1471 } 1472 /// 1473 enum Constants : int 1474 { 1475 /** 1476 The minimum Z-layer for canvas items. 1477 */ 1478 canvasItemZMin = -4096, 1479 /** 1480 The minimum renderpriority of all materials. 1481 */ 1482 materialRenderPriorityMin = -128, 1483 /** 1484 Marks an error that shows that the index array is empty. 1485 */ 1486 noIndexArray = -1, 1487 glowBlendModeAdditive = 0, 1488 arrayVertex = 0, 1489 featureShaders = 0, 1490 canvasLightFilterNone = 0, 1491 lightDirectionalShadowDepthRangeStable = 0, 1492 particlesDrawOrderIndex = 0, 1493 shaderSpatial = 0, 1494 lightOmniShadowDualParaboloid = 0, 1495 envSsaoBlurDisabled = 0, 1496 lightOmniShadowDetailVertical = 0, 1497 viewportUsage2d = 0, 1498 viewportClearAlways = 0, 1499 ninePatchStretch = 0, 1500 envSsaoQualityLow = 0, 1501 textureType2d = 0, 1502 multimeshCustomDataNone = 0, 1503 canvasOccluderPolygonCullDisabled = 0, 1504 shadowCastingSettingOff = 0, 1505 multimeshColorNone = 0, 1506 lightDirectional = 0, 1507 viewportDebugDrawDisabled = 0, 1508 primitivePoints = 0, 1509 cubemapLeft = 0, 1510 envBgClearColor = 0, 1511 infoObjectsInFrame = 0, 1512 canvasLightModeAdd = 0, 1513 lightBakeDisabled = 0, 1514 viewportMsaaDisabled = 0, 1515 instanceNone = 0, 1516 viewportUpdateDisabled = 0, 1517 reflectionProbeUpdateOnce = 0, 1518 envDofBlurQualityLow = 0, 1519 lightParamEnergy = 0, 1520 lightDirectionalShadowOrthogonal = 0, 1521 envToneMapperLinear = 0, 1522 scenarioDebugDisabled = 0, 1523 instanceFlagUseBakedLight = 0, 1524 multimeshTransform2d = 0, 1525 blendShapeModeNormalized = 0, 1526 viewportRenderInfoObjectsInFrame = 0, 1527 multimeshTransform3d = 1, 1528 glowBlendModeScreen = 1, 1529 viewportDebugDrawUnshaded = 1, 1530 envSsaoQualityMedium = 1, 1531 envSsaoBlur1x1 = 1, 1532 primitiveLines = 1, 1533 lightOmniShadowCube = 1, 1534 lightBakeIndirect = 1, 1535 multimeshColor8bit = 1, 1536 featureMultithreaded = 1, 1537 instanceMesh = 1, 1538 ninePatchTile = 1, 1539 envToneMapperReinhard = 1, 1540 arrayNormal = 1, 1541 textureFlagMipmaps = 1, 1542 viewportRenderInfoVerticesInFrame = 1, 1543 instanceFlagDrawNextFrameIfVisible = 1, 1544 envBgColor = 1, 1545 viewportClearNever = 1, 1546 shadowCastingSettingOn = 1, 1547 viewportMsaa2x = 1, 1548 infoVerticesInFrame = 1, 1549 envDofBlurQualityMedium = 1, 1550 cubemapRight = 1, 1551 lightOmniShadowDetailHorizontal = 1, 1552 viewportUsage2dNoSampling = 1, 1553 lightDirectionalShadowDepthRangeOptimized = 1, 1554 lightOmni = 1, 1555 arrayFormatVertex = 1, 1556 canvasLightFilterPcf3 = 1, 1557 lightDirectionalShadowParallel2Splits = 1, 1558 reflectionProbeUpdateAlways = 1, 1559 multimeshCustomData8bit = 1, 1560 scenarioDebugWireframe = 1, 1561 particlesDrawOrderLifetime = 1, 1562 blendShapeModeRelative = 1, 1563 canvasLightModeSub = 1, 1564 viewportUpdateOnce = 1, 1565 canvasOccluderPolygonCullClockwise = 1, 1566 shaderCanvasItem = 1, 1567 envToneMapperFilmic = 2, 1568 canvasLightModeMix = 2, 1569 envDofBlurQualityHigh = 2, 1570 particlesDrawOrderViewDepth = 2, 1571 textureTypeCubemap = 2, 1572 multimeshColorFloat = 2, 1573 viewportMsaa4x = 2, 1574 scenarioDebugOverdraw = 2, 1575 lightBakeAll = 2, 1576 viewportUsage3d = 2, 1577 lightParamSpecular = 2, 1578 envSsaoBlur2x2 = 2, 1579 viewportClearOnlyNextFrame = 2, 1580 viewportUpdateWhenVisible = 2, 1581 ninePatchTileFit = 2, 1582 instanceMultimesh = 2, 1583 canvasOccluderPolygonCullCounterClockwise = 2, 1584 glowBlendModeSoftlight = 2, 1585 viewportRenderInfoMaterialChangesInFrame = 2, 1586 textureFlagRepeat = 2, 1587 lightSpot = 2, 1588 canvasLightFilterPcf5 = 2, 1589 shadowCastingSettingDoubleSided = 2, 1590 shaderParticles = 2, 1591 envSsaoQualityHigh = 2, 1592 arrayTangent = 2, 1593 envBgSky = 2, 1594 multimeshCustomDataFloat = 2, 1595 instanceFlagMax = 2, 1596 primitiveLineStrip = 2, 1597 viewportDebugDrawOverdraw = 2, 1598 lightDirectionalShadowParallel4Splits = 2, 1599 infoMaterialChangesInFrame = 2, 1600 cubemapBottom = 2, 1601 arrayFormatNormal = 2, 1602 infoShaderChangesInFrame = 3, 1603 viewportMsaa8x = 3, 1604 shaderMax = 3, 1605 glowBlendModeReplace = 3, 1606 canvasLightModeMask = 3, 1607 envBgColorSky = 3, 1608 cubemapTop = 3, 1609 viewportRenderInfoShaderChangesInFrame = 3, 1610 instanceImmediate = 3, 1611 viewportDebugDrawWireframe = 3, 1612 envToneMapperAces = 3, 1613 lightParamRange = 3, 1614 viewportUpdateAlways = 3, 1615 envSsaoBlur3x3 = 3, 1616 viewportUsage3dNoEffects = 3, 1617 textureType2dArray = 3, 1618 primitiveLineLoop = 3, 1619 canvasLightFilterPcf7 = 3, 1620 arrayColor = 3, 1621 scenarioDebugShadeless = 3, 1622 shadowCastingSettingShadowsOnly = 3, 1623 textureType3d = 4, 1624 cubemapFront = 4, 1625 textureFlagFilter = 4, 1626 canvasLightFilterPcf9 = 4, 1627 /** 1628 Number of weights/bones per vertex. 1629 */ 1630 arrayWeightsSize = 4, 1631 arrayTexUv = 4, 1632 viewportMsaa16x = 4, 1633 lightParamAttenuation = 4, 1634 infoSurfaceChangesInFrame = 4, 1635 arrayFormatTangent = 4, 1636 instanceParticles = 4, 1637 envBgCanvas = 4, 1638 primitiveTriangles = 4, 1639 viewportRenderInfoSurfaceChangesInFrame = 4, 1640 viewportRenderInfoDrawCallsInFrame = 5, 1641 instanceLight = 5, 1642 cubemapBack = 5, 1643 lightParamSpotAngle = 5, 1644 envBgKeep = 5, 1645 primitiveTriangleStrip = 5, 1646 canvasLightFilterPcf13 = 5, 1647 viewportMsaaExt2x = 5, 1648 infoDrawCallsInFrame = 5, 1649 arrayTexUv2 = 5, 1650 arrayBones = 6, 1651 primitiveTriangleFan = 6, 1652 viewportMsaaExt4x = 6, 1653 viewportRenderInfo2dItemsInFrame = 6, 1654 info2dItemsInFrame = 6, 1655 instanceReflectionProbe = 6, 1656 lightParamSpotAttenuation = 6, 1657 envBgMax = 7, 1658 primitiveMax = 7, 1659 lightParamContactShadowSize = 7, 1660 textureFlagsDefault = 7, 1661 instanceGiProbe = 7, 1662 arrayWeights = 7, 1663 info2dDrawCallsInFrame = 7, 1664 /** 1665 Max number of glow levels that can be used with glow post-process effect. 1666 */ 1667 maxGlowLevels = 7, 1668 viewportRenderInfo2dDrawCallsInFrame = 7, 1669 instanceLightmapCapture = 8, 1670 arrayFormatColor = 8, 1671 viewportRenderInfoMax = 8, 1672 arrayIndex = 8, 1673 textureFlagAnisotropicFilter = 8, 1674 /** 1675 Unused enum in Godot 3.x. 1676 */ 1677 maxCursors = 8, 1678 lightParamShadowMaxDistance = 8, 1679 infoUsageVideoMemTotal = 8, 1680 instanceMax = 9, 1681 infoVideoMemUsed = 9, 1682 arrayMax = 9, 1683 lightParamShadowSplit1Offset = 9, 1684 infoTextureMemUsed = 10, 1685 lightParamShadowSplit2Offset = 10, 1686 infoVertexMemUsed = 11, 1687 lightParamShadowSplit3Offset = 11, 1688 lightParamShadowNormalBias = 12, 1689 lightParamShadowBias = 13, 1690 lightParamShadowBiasSplitScale = 14, 1691 lightParamMax = 15, 1692 arrayFormatTexUv = 16, 1693 textureFlagConvertToLinear = 16, 1694 instanceGeometryMask = 30, 1695 arrayFormatTexUv2 = 32, 1696 textureFlagMirroredRepeat = 32, 1697 arrayFormatBones = 64, 1698 /** 1699 The maximum renderpriority of all materials. 1700 */ 1701 materialRenderPriorityMax = 127, 1702 arrayFormatWeights = 128, 1703 arrayFormatIndex = 256, 1704 arrayCompressVertex = 512, 1705 arrayCompressNormal = 1024, 1706 arrayCompressTangent = 2048, 1707 textureFlagUsedForStreaming = 2048, 1708 /** 1709 The maximum Z-layer for canvas items. 1710 */ 1711 canvasItemZMax = 4096, 1712 arrayCompressColor = 4096, 1713 arrayCompressTexUv = 8192, 1714 arrayCompressTexUv2 = 16384, 1715 arrayCompressBones = 32768, 1716 arrayCompressWeights = 65536, 1717 arrayCompressDefault = 97280, 1718 arrayCompressIndex = 131072, 1719 arrayFlagUse2dVertices = 262144, 1720 arrayFlagUse16BitBones = 524288, 1721 } 1722 /** 1723 Sets images to be rendered in the window margin. 1724 */ 1725 void blackBarsSetImages(in RID left, in RID top, in RID right, in RID bottom) 1726 { 1727 checkClassBinding!(typeof(this))(); 1728 ptrcall!(void)(GDNativeClassBinding.blackBarsSetImages, _godot_object, left, top, right, bottom); 1729 } 1730 /** 1731 Sets margin size, where black bars (or images, if $(D blackBarsSetImages) was used) are rendered. 1732 */ 1733 void blackBarsSetMargins(in long left, in long top, in long right, in long bottom) 1734 { 1735 checkClassBinding!(typeof(this))(); 1736 ptrcall!(void)(GDNativeClassBinding.blackBarsSetMargins, _godot_object, left, top, right, bottom); 1737 } 1738 /** 1739 Creates a camera and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `camera_*` VisualServer functions. 1740 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 1741 */ 1742 RID cameraCreate() 1743 { 1744 checkClassBinding!(typeof(this))(); 1745 return ptrcall!(RID)(GDNativeClassBinding.cameraCreate, _godot_object); 1746 } 1747 /** 1748 Sets the cull mask associated with this camera. The cull mask describes which 3D layers are rendered by this camera. Equivalent to $(D Camera.cullMask). 1749 */ 1750 void cameraSetCullMask(in RID camera, in long layers) 1751 { 1752 checkClassBinding!(typeof(this))(); 1753 ptrcall!(void)(GDNativeClassBinding.cameraSetCullMask, _godot_object, camera, layers); 1754 } 1755 /** 1756 Sets the environment used by this camera. Equivalent to $(D Camera.environment). 1757 */ 1758 void cameraSetEnvironment(in RID camera, in RID env) 1759 { 1760 checkClassBinding!(typeof(this))(); 1761 ptrcall!(void)(GDNativeClassBinding.cameraSetEnvironment, _godot_object, camera, env); 1762 } 1763 /** 1764 Sets camera to use frustum projection. This mode allows adjusting the `offset` argument to create "tilted frustum" effects. 1765 */ 1766 void cameraSetFrustum(in RID camera, in double size, in Vector2 offset, in double z_near, in double z_far) 1767 { 1768 checkClassBinding!(typeof(this))(); 1769 ptrcall!(void)(GDNativeClassBinding.cameraSetFrustum, _godot_object, camera, size, offset, z_near, z_far); 1770 } 1771 /** 1772 Sets camera to use orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. 1773 */ 1774 void cameraSetOrthogonal(in RID camera, in double size, in double z_near, in double z_far) 1775 { 1776 checkClassBinding!(typeof(this))(); 1777 ptrcall!(void)(GDNativeClassBinding.cameraSetOrthogonal, _godot_object, camera, size, z_near, z_far); 1778 } 1779 /** 1780 Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away. 1781 */ 1782 void cameraSetPerspective(in RID camera, in double fovy_degrees, in double z_near, in double z_far) 1783 { 1784 checkClassBinding!(typeof(this))(); 1785 ptrcall!(void)(GDNativeClassBinding.cameraSetPerspective, _godot_object, camera, fovy_degrees, z_near, z_far); 1786 } 1787 /** 1788 Sets $(D Transform) of camera. 1789 */ 1790 void cameraSetTransform(in RID camera, in Transform transform) 1791 { 1792 checkClassBinding!(typeof(this))(); 1793 ptrcall!(void)(GDNativeClassBinding.cameraSetTransform, _godot_object, camera, transform); 1794 } 1795 /** 1796 If `true`, preserves the horizontal aspect ratio which is equivalent to $(D constant Camera.KEEP_WIDTH). If `false`, preserves the vertical aspect ratio which is equivalent to $(D constant Camera.KEEP_HEIGHT). 1797 */ 1798 void cameraSetUseVerticalAspect(in RID camera, in bool enable) 1799 { 1800 checkClassBinding!(typeof(this))(); 1801 ptrcall!(void)(GDNativeClassBinding.cameraSetUseVerticalAspect, _godot_object, camera, enable); 1802 } 1803 /** 1804 Creates a canvas and returns the assigned $(D RID). It can be accessed with the RID that is returned. This RID will be used in all `canvas_*` VisualServer functions. 1805 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 1806 */ 1807 RID canvasCreate() 1808 { 1809 checkClassBinding!(typeof(this))(); 1810 return ptrcall!(RID)(GDNativeClassBinding.canvasCreate, _godot_object); 1811 } 1812 /** 1813 Adds a circle command to the $(D CanvasItem)'s draw commands. 1814 */ 1815 void canvasItemAddCircle(in RID item, in Vector2 pos, in double radius, in Color color) 1816 { 1817 checkClassBinding!(typeof(this))(); 1818 ptrcall!(void)(GDNativeClassBinding.canvasItemAddCircle, _godot_object, item, pos, radius, color); 1819 } 1820 /** 1821 If ignore is `true`, the VisualServer does not perform clipping. 1822 */ 1823 void canvasItemAddClipIgnore(in RID item, in bool ignore) 1824 { 1825 checkClassBinding!(typeof(this))(); 1826 ptrcall!(void)(GDNativeClassBinding.canvasItemAddClipIgnore, _godot_object, item, ignore); 1827 } 1828 /** 1829 Adds a line command to the $(D CanvasItem)'s draw commands. 1830 */ 1831 void canvasItemAddLine(in RID item, in Vector2 from, in Vector2 to, in Color color, in double width = 1, in bool antialiased = false) 1832 { 1833 checkClassBinding!(typeof(this))(); 1834 ptrcall!(void)(GDNativeClassBinding.canvasItemAddLine, _godot_object, item, from, to, color, width, antialiased); 1835 } 1836 /** 1837 Adds a mesh command to the $(D CanvasItem)'s draw commands. 1838 */ 1839 void canvasItemAddMesh(in RID item, in RID mesh, in Transform2D transform = Transform2D.init, in Color modulate = Color(1,1,1,1), in RID texture = RID.init, in RID normal_map = RID.init) 1840 { 1841 checkClassBinding!(typeof(this))(); 1842 ptrcall!(void)(GDNativeClassBinding.canvasItemAddMesh, _godot_object, item, mesh, transform, modulate, texture, normal_map); 1843 } 1844 /** 1845 Adds a $(D MultiMesh) to the $(D CanvasItem)'s draw commands. Only affects its aabb at the moment. 1846 */ 1847 void canvasItemAddMultimesh(in RID item, in RID mesh, in RID texture, in RID normal_map = RID.init) 1848 { 1849 checkClassBinding!(typeof(this))(); 1850 ptrcall!(void)(GDNativeClassBinding.canvasItemAddMultimesh, _godot_object, item, mesh, texture, normal_map); 1851 } 1852 /** 1853 Adds a nine patch image to the $(D CanvasItem)'s draw commands. 1854 See $(D NinePatchRect) for more explanation. 1855 */ 1856 void canvasItemAddNinePatch(in RID item, in Rect2 rect, in Rect2 source, in RID texture, in Vector2 topleft, in Vector2 bottomright, in long x_axis_mode = 0, in long y_axis_mode = 0, in bool draw_center = true, in Color modulate = Color(1,1,1,1), in RID normal_map = RID.init) 1857 { 1858 checkClassBinding!(typeof(this))(); 1859 ptrcall!(void)(GDNativeClassBinding.canvasItemAddNinePatch, _godot_object, item, rect, source, texture, topleft, bottomright, x_axis_mode, y_axis_mode, draw_center, modulate, normal_map); 1860 } 1861 /** 1862 Adds a particle system to the $(D CanvasItem)'s draw commands. 1863 */ 1864 void canvasItemAddParticles(in RID item, in RID particles, in RID texture, in RID normal_map) 1865 { 1866 checkClassBinding!(typeof(this))(); 1867 ptrcall!(void)(GDNativeClassBinding.canvasItemAddParticles, _godot_object, item, particles, texture, normal_map); 1868 } 1869 /** 1870 Adds a polygon to the $(D CanvasItem)'s draw commands. 1871 */ 1872 void canvasItemAddPolygon(in RID item, in PoolVector2Array points, in PoolColorArray colors, in PoolVector2Array uvs = PoolVector2Array.init, in RID texture = RID.init, in RID normal_map = RID.init, in bool antialiased = false) 1873 { 1874 checkClassBinding!(typeof(this))(); 1875 ptrcall!(void)(GDNativeClassBinding.canvasItemAddPolygon, _godot_object, item, points, colors, uvs, texture, normal_map, antialiased); 1876 } 1877 /** 1878 Adds a polyline, which is a line from multiple points with a width, to the $(D CanvasItem)'s draw commands. 1879 */ 1880 void canvasItemAddPolyline(in RID item, in PoolVector2Array points, in PoolColorArray colors, in double width = 1, in bool antialiased = false) 1881 { 1882 checkClassBinding!(typeof(this))(); 1883 ptrcall!(void)(GDNativeClassBinding.canvasItemAddPolyline, _godot_object, item, points, colors, width, antialiased); 1884 } 1885 /** 1886 Adds a primitive to the $(D CanvasItem)'s draw commands. 1887 */ 1888 void canvasItemAddPrimitive(in RID item, in PoolVector2Array points, in PoolColorArray colors, in PoolVector2Array uvs, in RID texture, in double width = 1, in RID normal_map = RID.init) 1889 { 1890 checkClassBinding!(typeof(this))(); 1891 ptrcall!(void)(GDNativeClassBinding.canvasItemAddPrimitive, _godot_object, item, points, colors, uvs, texture, width, normal_map); 1892 } 1893 /** 1894 Adds a rectangle to the $(D CanvasItem)'s draw commands. 1895 */ 1896 void canvasItemAddRect(in RID item, in Rect2 rect, in Color color) 1897 { 1898 checkClassBinding!(typeof(this))(); 1899 ptrcall!(void)(GDNativeClassBinding.canvasItemAddRect, _godot_object, item, rect, color); 1900 } 1901 /** 1902 Adds a $(D Transform2D) command to the $(D CanvasItem)'s draw commands. 1903 This sets the extra_matrix uniform when executed. This affects the later commands of the canvas item. 1904 */ 1905 void canvasItemAddSetTransform(in RID item, in Transform2D transform) 1906 { 1907 checkClassBinding!(typeof(this))(); 1908 ptrcall!(void)(GDNativeClassBinding.canvasItemAddSetTransform, _godot_object, item, transform); 1909 } 1910 /** 1911 Adds a textured rect to the $(D CanvasItem)'s draw commands. 1912 */ 1913 void canvasItemAddTextureRect(in RID item, in Rect2 rect, in RID texture, in bool tile = false, in Color modulate = Color(1,1,1,1), in bool transpose = false, in RID normal_map = RID.init) 1914 { 1915 checkClassBinding!(typeof(this))(); 1916 ptrcall!(void)(GDNativeClassBinding.canvasItemAddTextureRect, _godot_object, item, rect, texture, tile, modulate, transpose, normal_map); 1917 } 1918 /** 1919 Adds a texture rect with region setting to the $(D CanvasItem)'s draw commands. 1920 */ 1921 void canvasItemAddTextureRectRegion(in RID item, in Rect2 rect, in RID texture, in Rect2 src_rect, in Color modulate = Color(1,1,1,1), in bool transpose = false, in RID normal_map = RID.init, in bool clip_uv = true) 1922 { 1923 checkClassBinding!(typeof(this))(); 1924 ptrcall!(void)(GDNativeClassBinding.canvasItemAddTextureRectRegion, _godot_object, item, rect, texture, src_rect, modulate, transpose, normal_map, clip_uv); 1925 } 1926 /** 1927 Adds a triangle array to the $(D CanvasItem)'s draw commands. 1928 */ 1929 void canvasItemAddTriangleArray(in RID item, in PoolIntArray indices, in PoolVector2Array points, in PoolColorArray colors, in PoolVector2Array uvs = PoolVector2Array.init, in PoolIntArray bones = PoolIntArray.init, in PoolRealArray weights = PoolRealArray.init, in RID texture = RID.init, in long count = -1, in RID normal_map = RID.init, in bool antialiased = false, in bool antialiasing_use_indices = false) 1930 { 1931 checkClassBinding!(typeof(this))(); 1932 ptrcall!(void)(GDNativeClassBinding.canvasItemAddTriangleArray, _godot_object, item, indices, points, colors, uvs, bones, weights, texture, count, normal_map, antialiased, antialiasing_use_indices); 1933 } 1934 /** 1935 Clears the $(D CanvasItem) and removes all commands in it. 1936 */ 1937 void canvasItemClear(in RID item) 1938 { 1939 checkClassBinding!(typeof(this))(); 1940 ptrcall!(void)(GDNativeClassBinding.canvasItemClear, _godot_object, item); 1941 } 1942 /** 1943 Creates a new $(D CanvasItem) and returns its $(D RID). It can be accessed with the RID that is returned. This RID will be used in all `canvas_item_*` VisualServer functions. 1944 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 1945 */ 1946 RID canvasItemCreate() 1947 { 1948 checkClassBinding!(typeof(this))(); 1949 return ptrcall!(RID)(GDNativeClassBinding.canvasItemCreate, _godot_object); 1950 } 1951 /** 1952 Sets clipping for the $(D CanvasItem). 1953 */ 1954 void canvasItemSetClip(in RID item, in bool clip) 1955 { 1956 checkClassBinding!(typeof(this))(); 1957 ptrcall!(void)(GDNativeClassBinding.canvasItemSetClip, _godot_object, item, clip); 1958 } 1959 /** 1960 Sets the $(D CanvasItem) to copy a rect to the backbuffer. 1961 */ 1962 void canvasItemSetCopyToBackbuffer(in RID item, in bool enabled, in Rect2 rect) 1963 { 1964 checkClassBinding!(typeof(this))(); 1965 ptrcall!(void)(GDNativeClassBinding.canvasItemSetCopyToBackbuffer, _godot_object, item, enabled, rect); 1966 } 1967 /** 1968 Defines a custom drawing rectangle for the $(D CanvasItem). 1969 */ 1970 void canvasItemSetCustomRect(in RID item, in bool use_custom_rect, in Rect2 rect = Rect2(0, 0, 0, 0)) 1971 { 1972 checkClassBinding!(typeof(this))(); 1973 ptrcall!(void)(GDNativeClassBinding.canvasItemSetCustomRect, _godot_object, item, use_custom_rect, rect); 1974 } 1975 /** 1976 Enables the use of distance fields for GUI elements that are rendering distance field based fonts. 1977 */ 1978 void canvasItemSetDistanceFieldMode(in RID item, in bool enabled) 1979 { 1980 checkClassBinding!(typeof(this))(); 1981 ptrcall!(void)(GDNativeClassBinding.canvasItemSetDistanceFieldMode, _godot_object, item, enabled); 1982 } 1983 /** 1984 Sets $(D CanvasItem) to be drawn behind its parent. 1985 */ 1986 void canvasItemSetDrawBehindParent(in RID item, in bool enabled) 1987 { 1988 checkClassBinding!(typeof(this))(); 1989 ptrcall!(void)(GDNativeClassBinding.canvasItemSetDrawBehindParent, _godot_object, item, enabled); 1990 } 1991 /** 1992 Sets the index for the $(D CanvasItem). 1993 */ 1994 void canvasItemSetDrawIndex(in RID item, in long index) 1995 { 1996 checkClassBinding!(typeof(this))(); 1997 ptrcall!(void)(GDNativeClassBinding.canvasItemSetDrawIndex, _godot_object, item, index); 1998 } 1999 /** 2000 The light mask. See $(D LightOccluder2D) for more information on light masks. 2001 */ 2002 void canvasItemSetLightMask(in RID item, in long mask) 2003 { 2004 checkClassBinding!(typeof(this))(); 2005 ptrcall!(void)(GDNativeClassBinding.canvasItemSetLightMask, _godot_object, item, mask); 2006 } 2007 /** 2008 Sets a new material to the $(D CanvasItem). 2009 */ 2010 void canvasItemSetMaterial(in RID item, in RID material) 2011 { 2012 checkClassBinding!(typeof(this))(); 2013 ptrcall!(void)(GDNativeClassBinding.canvasItemSetMaterial, _godot_object, item, material); 2014 } 2015 /** 2016 Sets the color that modulates the $(D CanvasItem) and its children. 2017 */ 2018 void canvasItemSetModulate(in RID item, in Color color) 2019 { 2020 checkClassBinding!(typeof(this))(); 2021 ptrcall!(void)(GDNativeClassBinding.canvasItemSetModulate, _godot_object, item, color); 2022 } 2023 /** 2024 Sets the parent for the $(D CanvasItem). The parent can be another canvas item, or it can be the root canvas that is attached to the viewport. 2025 */ 2026 void canvasItemSetParent(in RID item, in RID parent) 2027 { 2028 checkClassBinding!(typeof(this))(); 2029 ptrcall!(void)(GDNativeClassBinding.canvasItemSetParent, _godot_object, item, parent); 2030 } 2031 /** 2032 Sets the color that modulates the $(D CanvasItem) without children. 2033 */ 2034 void canvasItemSetSelfModulate(in RID item, in Color color) 2035 { 2036 checkClassBinding!(typeof(this))(); 2037 ptrcall!(void)(GDNativeClassBinding.canvasItemSetSelfModulate, _godot_object, item, color); 2038 } 2039 /** 2040 Sets if $(D CanvasItem)'s children should be sorted by y-position. 2041 */ 2042 void canvasItemSetSortChildrenByY(in RID item, in bool enabled) 2043 { 2044 checkClassBinding!(typeof(this))(); 2045 ptrcall!(void)(GDNativeClassBinding.canvasItemSetSortChildrenByY, _godot_object, item, enabled); 2046 } 2047 /** 2048 Sets the $(D CanvasItem)'s $(D Transform2D). 2049 */ 2050 void canvasItemSetTransform(in RID item, in Transform2D transform) 2051 { 2052 checkClassBinding!(typeof(this))(); 2053 ptrcall!(void)(GDNativeClassBinding.canvasItemSetTransform, _godot_object, item, transform); 2054 } 2055 /** 2056 Sets if the $(D CanvasItem) uses its parent's material. 2057 */ 2058 void canvasItemSetUseParentMaterial(in RID item, in bool enabled) 2059 { 2060 checkClassBinding!(typeof(this))(); 2061 ptrcall!(void)(GDNativeClassBinding.canvasItemSetUseParentMaterial, _godot_object, item, enabled); 2062 } 2063 /** 2064 Sets if the canvas item (including its children) is visible. 2065 */ 2066 void canvasItemSetVisible(in RID item, in bool visible) 2067 { 2068 checkClassBinding!(typeof(this))(); 2069 ptrcall!(void)(GDNativeClassBinding.canvasItemSetVisible, _godot_object, item, visible); 2070 } 2071 /** 2072 If this is enabled, the Z index of the parent will be added to the children's Z index. 2073 */ 2074 void canvasItemSetZAsRelativeToParent(in RID item, in bool enabled) 2075 { 2076 checkClassBinding!(typeof(this))(); 2077 ptrcall!(void)(GDNativeClassBinding.canvasItemSetZAsRelativeToParent, _godot_object, item, enabled); 2078 } 2079 /** 2080 Sets the $(D CanvasItem)'s Z index, i.e. its draw order (lower indexes are drawn first). 2081 */ 2082 void canvasItemSetZIndex(in RID item, in long z_index) 2083 { 2084 checkClassBinding!(typeof(this))(); 2085 ptrcall!(void)(GDNativeClassBinding.canvasItemSetZIndex, _godot_object, item, z_index); 2086 } 2087 /** 2088 Attaches the canvas light to the canvas. Removes it from its previous canvas. 2089 */ 2090 void canvasLightAttachToCanvas(in RID light, in RID canvas) 2091 { 2092 checkClassBinding!(typeof(this))(); 2093 ptrcall!(void)(GDNativeClassBinding.canvasLightAttachToCanvas, _godot_object, light, canvas); 2094 } 2095 /** 2096 Creates a canvas light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `canvas_light_*` VisualServer functions. 2097 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 2098 */ 2099 RID canvasLightCreate() 2100 { 2101 checkClassBinding!(typeof(this))(); 2102 return ptrcall!(RID)(GDNativeClassBinding.canvasLightCreate, _godot_object); 2103 } 2104 /** 2105 Attaches a light occluder to the canvas. Removes it from its previous canvas. 2106 */ 2107 void canvasLightOccluderAttachToCanvas(in RID occluder, in RID canvas) 2108 { 2109 checkClassBinding!(typeof(this))(); 2110 ptrcall!(void)(GDNativeClassBinding.canvasLightOccluderAttachToCanvas, _godot_object, occluder, canvas); 2111 } 2112 /** 2113 Creates a light occluder and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `canvas_light_ocluder_*` VisualServer functions. 2114 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 2115 */ 2116 RID canvasLightOccluderCreate() 2117 { 2118 checkClassBinding!(typeof(this))(); 2119 return ptrcall!(RID)(GDNativeClassBinding.canvasLightOccluderCreate, _godot_object); 2120 } 2121 /** 2122 Enables or disables light occluder. 2123 */ 2124 void canvasLightOccluderSetEnabled(in RID occluder, in bool enabled) 2125 { 2126 checkClassBinding!(typeof(this))(); 2127 ptrcall!(void)(GDNativeClassBinding.canvasLightOccluderSetEnabled, _godot_object, occluder, enabled); 2128 } 2129 /** 2130 The light mask. See $(D LightOccluder2D) for more information on light masks. 2131 */ 2132 void canvasLightOccluderSetLightMask(in RID occluder, in long mask) 2133 { 2134 checkClassBinding!(typeof(this))(); 2135 ptrcall!(void)(GDNativeClassBinding.canvasLightOccluderSetLightMask, _godot_object, occluder, mask); 2136 } 2137 /** 2138 Sets a light occluder's polygon. 2139 */ 2140 void canvasLightOccluderSetPolygon(in RID occluder, in RID polygon) 2141 { 2142 checkClassBinding!(typeof(this))(); 2143 ptrcall!(void)(GDNativeClassBinding.canvasLightOccluderSetPolygon, _godot_object, occluder, polygon); 2144 } 2145 /** 2146 Sets a light occluder's $(D Transform2D). 2147 */ 2148 void canvasLightOccluderSetTransform(in RID occluder, in Transform2D transform) 2149 { 2150 checkClassBinding!(typeof(this))(); 2151 ptrcall!(void)(GDNativeClassBinding.canvasLightOccluderSetTransform, _godot_object, occluder, transform); 2152 } 2153 /** 2154 Sets the color for a light. 2155 */ 2156 void canvasLightSetColor(in RID light, in Color color) 2157 { 2158 checkClassBinding!(typeof(this))(); 2159 ptrcall!(void)(GDNativeClassBinding.canvasLightSetColor, _godot_object, light, color); 2160 } 2161 /** 2162 Enables or disables a canvas light. 2163 */ 2164 void canvasLightSetEnabled(in RID light, in bool enabled) 2165 { 2166 checkClassBinding!(typeof(this))(); 2167 ptrcall!(void)(GDNativeClassBinding.canvasLightSetEnabled, _godot_object, light, enabled); 2168 } 2169 /** 2170 Sets a canvas light's energy. 2171 */ 2172 void canvasLightSetEnergy(in RID light, in double energy) 2173 { 2174 checkClassBinding!(typeof(this))(); 2175 ptrcall!(void)(GDNativeClassBinding.canvasLightSetEnergy, _godot_object, light, energy); 2176 } 2177 /** 2178 Sets a canvas light's height. 2179 */ 2180 void canvasLightSetHeight(in RID light, in double height) 2181 { 2182 checkClassBinding!(typeof(this))(); 2183 ptrcall!(void)(GDNativeClassBinding.canvasLightSetHeight, _godot_object, light, height); 2184 } 2185 /** 2186 The light mask. See $(D LightOccluder2D) for more information on light masks. 2187 */ 2188 void canvasLightSetItemCullMask(in RID light, in long mask) 2189 { 2190 checkClassBinding!(typeof(this))(); 2191 ptrcall!(void)(GDNativeClassBinding.canvasLightSetItemCullMask, _godot_object, light, mask); 2192 } 2193 /** 2194 The binary mask used to determine which layers this canvas light's shadows affects. See $(D LightOccluder2D) for more information on light masks. 2195 */ 2196 void canvasLightSetItemShadowCullMask(in RID light, in long mask) 2197 { 2198 checkClassBinding!(typeof(this))(); 2199 ptrcall!(void)(GDNativeClassBinding.canvasLightSetItemShadowCullMask, _godot_object, light, mask); 2200 } 2201 /** 2202 The layer range that gets rendered with this light. 2203 */ 2204 void canvasLightSetLayerRange(in RID light, in long min_layer, in long max_layer) 2205 { 2206 checkClassBinding!(typeof(this))(); 2207 ptrcall!(void)(GDNativeClassBinding.canvasLightSetLayerRange, _godot_object, light, min_layer, max_layer); 2208 } 2209 /** 2210 The mode of the light, see $(D canvaslightmode) constants. 2211 */ 2212 void canvasLightSetMode(in RID light, in long mode) 2213 { 2214 checkClassBinding!(typeof(this))(); 2215 ptrcall!(void)(GDNativeClassBinding.canvasLightSetMode, _godot_object, light, mode); 2216 } 2217 /** 2218 Sets the texture's scale factor of the light. Equivalent to $(D Light2D.textureScale). 2219 */ 2220 void canvasLightSetScale(in RID light, in double scale) 2221 { 2222 checkClassBinding!(typeof(this))(); 2223 ptrcall!(void)(GDNativeClassBinding.canvasLightSetScale, _godot_object, light, scale); 2224 } 2225 /** 2226 Sets the width of the shadow buffer, size gets scaled to the next power of two for this. 2227 */ 2228 void canvasLightSetShadowBufferSize(in RID light, in long size) 2229 { 2230 checkClassBinding!(typeof(this))(); 2231 ptrcall!(void)(GDNativeClassBinding.canvasLightSetShadowBufferSize, _godot_object, light, size); 2232 } 2233 /** 2234 Sets the color of the canvas light's shadow. 2235 */ 2236 void canvasLightSetShadowColor(in RID light, in Color color) 2237 { 2238 checkClassBinding!(typeof(this))(); 2239 ptrcall!(void)(GDNativeClassBinding.canvasLightSetShadowColor, _godot_object, light, color); 2240 } 2241 /** 2242 Enables or disables the canvas light's shadow. 2243 */ 2244 void canvasLightSetShadowEnabled(in RID light, in bool enabled) 2245 { 2246 checkClassBinding!(typeof(this))(); 2247 ptrcall!(void)(GDNativeClassBinding.canvasLightSetShadowEnabled, _godot_object, light, enabled); 2248 } 2249 /** 2250 Sets the canvas light's shadow's filter, see $(D canvaslightshadowfilter) constants. 2251 */ 2252 void canvasLightSetShadowFilter(in RID light, in long filter) 2253 { 2254 checkClassBinding!(typeof(this))(); 2255 ptrcall!(void)(GDNativeClassBinding.canvasLightSetShadowFilter, _godot_object, light, filter); 2256 } 2257 /** 2258 Sets the length of the shadow's gradient. 2259 */ 2260 void canvasLightSetShadowGradientLength(in RID light, in double length) 2261 { 2262 checkClassBinding!(typeof(this))(); 2263 ptrcall!(void)(GDNativeClassBinding.canvasLightSetShadowGradientLength, _godot_object, light, length); 2264 } 2265 /** 2266 Smoothens the shadow. The lower, the smoother. 2267 */ 2268 void canvasLightSetShadowSmooth(in RID light, in double smooth) 2269 { 2270 checkClassBinding!(typeof(this))(); 2271 ptrcall!(void)(GDNativeClassBinding.canvasLightSetShadowSmooth, _godot_object, light, smooth); 2272 } 2273 /** 2274 Sets texture to be used by light. Equivalent to $(D Light2D.texture). 2275 */ 2276 void canvasLightSetTexture(in RID light, in RID texture) 2277 { 2278 checkClassBinding!(typeof(this))(); 2279 ptrcall!(void)(GDNativeClassBinding.canvasLightSetTexture, _godot_object, light, texture); 2280 } 2281 /** 2282 Sets the offset of the light's texture. Equivalent to $(D Light2D.offset). 2283 */ 2284 void canvasLightSetTextureOffset(in RID light, in Vector2 offset) 2285 { 2286 checkClassBinding!(typeof(this))(); 2287 ptrcall!(void)(GDNativeClassBinding.canvasLightSetTextureOffset, _godot_object, light, offset); 2288 } 2289 /** 2290 Sets the canvas light's $(D Transform2D). 2291 */ 2292 void canvasLightSetTransform(in RID light, in Transform2D transform) 2293 { 2294 checkClassBinding!(typeof(this))(); 2295 ptrcall!(void)(GDNativeClassBinding.canvasLightSetTransform, _godot_object, light, transform); 2296 } 2297 /** 2298 Sets the Z range of objects that will be affected by this light. Equivalent to $(D Light2D.rangeZMin) and $(D Light2D.rangeZMax). 2299 */ 2300 void canvasLightSetZRange(in RID light, in long min_z, in long max_z) 2301 { 2302 checkClassBinding!(typeof(this))(); 2303 ptrcall!(void)(GDNativeClassBinding.canvasLightSetZRange, _godot_object, light, min_z, max_z); 2304 } 2305 /** 2306 Creates a new light occluder polygon and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `canvas_occluder_polygon_*` VisualServer functions. 2307 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 2308 */ 2309 RID canvasOccluderPolygonCreate() 2310 { 2311 checkClassBinding!(typeof(this))(); 2312 return ptrcall!(RID)(GDNativeClassBinding.canvasOccluderPolygonCreate, _godot_object); 2313 } 2314 /** 2315 Sets an occluder polygons cull mode. See $(D canvasoccluderpolygoncullmode) constants. 2316 */ 2317 void canvasOccluderPolygonSetCullMode(in RID occluder_polygon, in long mode) 2318 { 2319 checkClassBinding!(typeof(this))(); 2320 ptrcall!(void)(GDNativeClassBinding.canvasOccluderPolygonSetCullMode, _godot_object, occluder_polygon, mode); 2321 } 2322 /** 2323 Sets the shape of the occluder polygon. 2324 */ 2325 void canvasOccluderPolygonSetShape(in RID occluder_polygon, in PoolVector2Array shape, in bool closed) 2326 { 2327 checkClassBinding!(typeof(this))(); 2328 ptrcall!(void)(GDNativeClassBinding.canvasOccluderPolygonSetShape, _godot_object, occluder_polygon, shape, closed); 2329 } 2330 /** 2331 Sets the shape of the occluder polygon as lines. 2332 */ 2333 void canvasOccluderPolygonSetShapeAsLines(in RID occluder_polygon, in PoolVector2Array shape) 2334 { 2335 checkClassBinding!(typeof(this))(); 2336 ptrcall!(void)(GDNativeClassBinding.canvasOccluderPolygonSetShapeAsLines, _godot_object, occluder_polygon, shape); 2337 } 2338 /** 2339 A copy of the canvas item will be drawn with a local offset of the mirroring $(D Vector2). 2340 */ 2341 void canvasSetItemMirroring(in RID canvas, in RID item, in Vector2 mirroring) 2342 { 2343 checkClassBinding!(typeof(this))(); 2344 ptrcall!(void)(GDNativeClassBinding.canvasSetItemMirroring, _godot_object, canvas, item, mirroring); 2345 } 2346 /** 2347 Modulates all colors in the given canvas. 2348 */ 2349 void canvasSetModulate(in RID canvas, in Color color) 2350 { 2351 checkClassBinding!(typeof(this))(); 2352 ptrcall!(void)(GDNativeClassBinding.canvasSetModulate, _godot_object, canvas, color); 2353 } 2354 /** 2355 Creates a directional light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most `light_*` VisualServer functions. 2356 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 2357 To place in a scene, attach this directional light to an instance using $(D instanceSetBase) using the returned RID. 2358 */ 2359 RID directionalLightCreate() 2360 { 2361 checkClassBinding!(typeof(this))(); 2362 return ptrcall!(RID)(GDNativeClassBinding.directionalLightCreate, _godot_object); 2363 } 2364 /** 2365 Draws a frame. $(I This method is deprecated), please use $(D forceDraw) instead. 2366 */ 2367 void draw(in bool swap_buffers = true, in double frame_step = 0) 2368 { 2369 checkClassBinding!(typeof(this))(); 2370 ptrcall!(void)(GDNativeClassBinding.draw, _godot_object, swap_buffers, frame_step); 2371 } 2372 /** 2373 Creates an environment and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `environment_*` VisualServer functions. 2374 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 2375 */ 2376 RID environmentCreate() 2377 { 2378 checkClassBinding!(typeof(this))(); 2379 return ptrcall!(RID)(GDNativeClassBinding.environmentCreate, _godot_object); 2380 } 2381 /** 2382 Sets the values to be used with the "Adjustment" post-process effect. See $(D Environment) for more details. 2383 */ 2384 void environmentSetAdjustment(in RID env, in bool enable, in double brightness, in double contrast, in double saturation, in RID ramp) 2385 { 2386 checkClassBinding!(typeof(this))(); 2387 ptrcall!(void)(GDNativeClassBinding.environmentSetAdjustment, _godot_object, env, enable, brightness, contrast, saturation, ramp); 2388 } 2389 /** 2390 Sets the ambient light parameters. See $(D Environment) for more details. 2391 */ 2392 void environmentSetAmbientLight(in RID env, in Color color, in double energy = 1, in double sky_contibution = 0) 2393 { 2394 checkClassBinding!(typeof(this))(); 2395 ptrcall!(void)(GDNativeClassBinding.environmentSetAmbientLight, _godot_object, env, color, energy, sky_contibution); 2396 } 2397 /** 2398 Sets the $(I BGMode) of the environment. Equivalent to $(D Environment.backgroundMode). 2399 */ 2400 void environmentSetBackground(in RID env, in long bg) 2401 { 2402 checkClassBinding!(typeof(this))(); 2403 ptrcall!(void)(GDNativeClassBinding.environmentSetBackground, _godot_object, env, bg); 2404 } 2405 /** 2406 Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes). 2407 */ 2408 void environmentSetBgColor(in RID env, in Color color) 2409 { 2410 checkClassBinding!(typeof(this))(); 2411 ptrcall!(void)(GDNativeClassBinding.environmentSetBgColor, _godot_object, env, color); 2412 } 2413 /** 2414 Sets the intensity of the background color. 2415 */ 2416 void environmentSetBgEnergy(in RID env, in double energy) 2417 { 2418 checkClassBinding!(typeof(this))(); 2419 ptrcall!(void)(GDNativeClassBinding.environmentSetBgEnergy, _godot_object, env, energy); 2420 } 2421 /** 2422 Sets the maximum layer to use if using Canvas background mode. 2423 */ 2424 void environmentSetCanvasMaxLayer(in RID env, in long max_layer) 2425 { 2426 checkClassBinding!(typeof(this))(); 2427 ptrcall!(void)(GDNativeClassBinding.environmentSetCanvasMaxLayer, _godot_object, env, max_layer); 2428 } 2429 /** 2430 Sets the values to be used with the "DoF Far Blur" post-process effect. See $(D Environment) for more details. 2431 */ 2432 void environmentSetDofBlurFar(in RID env, in bool enable, in double distance, in double transition, in double far_amount, in long quality) 2433 { 2434 checkClassBinding!(typeof(this))(); 2435 ptrcall!(void)(GDNativeClassBinding.environmentSetDofBlurFar, _godot_object, env, enable, distance, transition, far_amount, quality); 2436 } 2437 /** 2438 Sets the values to be used with the "DoF Near Blur" post-process effect. See $(D Environment) for more details. 2439 */ 2440 void environmentSetDofBlurNear(in RID env, in bool enable, in double distance, in double transition, in double far_amount, in long quality) 2441 { 2442 checkClassBinding!(typeof(this))(); 2443 ptrcall!(void)(GDNativeClassBinding.environmentSetDofBlurNear, _godot_object, env, enable, distance, transition, far_amount, quality); 2444 } 2445 /** 2446 Sets the variables to be used with the scene fog. See $(D Environment) for more details. 2447 */ 2448 void environmentSetFog(in RID env, in bool enable, in Color color, in Color sun_color, in double sun_amount) 2449 { 2450 checkClassBinding!(typeof(this))(); 2451 ptrcall!(void)(GDNativeClassBinding.environmentSetFog, _godot_object, env, enable, color, sun_color, sun_amount); 2452 } 2453 /** 2454 Sets the variables to be used with the fog depth effect. See $(D Environment) for more details. 2455 */ 2456 void environmentSetFogDepth(in RID env, in bool enable, in double depth_begin, in double depth_end, in double depth_curve, in bool transmit, in double transmit_curve) 2457 { 2458 checkClassBinding!(typeof(this))(); 2459 ptrcall!(void)(GDNativeClassBinding.environmentSetFogDepth, _godot_object, env, enable, depth_begin, depth_end, depth_curve, transmit, transmit_curve); 2460 } 2461 /** 2462 Sets the variables to be used with the fog height effect. See $(D Environment) for more details. 2463 */ 2464 void environmentSetFogHeight(in RID env, in bool enable, in double min_height, in double max_height, in double height_curve) 2465 { 2466 checkClassBinding!(typeof(this))(); 2467 ptrcall!(void)(GDNativeClassBinding.environmentSetFogHeight, _godot_object, env, enable, min_height, max_height, height_curve); 2468 } 2469 /** 2470 Sets the variables to be used with the "glow" post-process effect. See $(D Environment) for more details. 2471 */ 2472 void environmentSetGlow(in RID env, in bool enable, in long level_flags, in double intensity, in double strength, in double bloom_threshold, in long blend_mode, in double hdr_bleed_threshold, in double hdr_bleed_scale, in double hdr_luminance_cap, in bool bicubic_upscale) 2473 { 2474 checkClassBinding!(typeof(this))(); 2475 ptrcall!(void)(GDNativeClassBinding.environmentSetGlow, _godot_object, env, enable, level_flags, intensity, strength, bloom_threshold, blend_mode, hdr_bleed_threshold, hdr_bleed_scale, hdr_luminance_cap, bicubic_upscale); 2476 } 2477 /** 2478 Sets the $(D Sky) to be used as the environment's background when using $(I BGMode) sky. Equivalent to $(D Environment.backgroundSky). 2479 */ 2480 void environmentSetSky(in RID env, in RID sky) 2481 { 2482 checkClassBinding!(typeof(this))(); 2483 ptrcall!(void)(GDNativeClassBinding.environmentSetSky, _godot_object, env, sky); 2484 } 2485 /** 2486 Sets a custom field of view for the background $(D Sky). Equivalent to $(D Environment.backgroundSkyCustomFov). 2487 */ 2488 void environmentSetSkyCustomFov(in RID env, in double scale) 2489 { 2490 checkClassBinding!(typeof(this))(); 2491 ptrcall!(void)(GDNativeClassBinding.environmentSetSkyCustomFov, _godot_object, env, scale); 2492 } 2493 /** 2494 Sets the rotation of the background $(D Sky) expressed as a $(D Basis). Equivalent to $(D Environment.backgroundSkyOrientation). 2495 */ 2496 void environmentSetSkyOrientation(in RID env, in Basis orientation) 2497 { 2498 checkClassBinding!(typeof(this))(); 2499 ptrcall!(void)(GDNativeClassBinding.environmentSetSkyOrientation, _godot_object, env, orientation); 2500 } 2501 /** 2502 Sets the variables to be used with the "Screen Space Ambient Occlusion (SSAO)" post-process effect. See $(D Environment) for more details. 2503 */ 2504 void environmentSetSsao(in RID env, in bool enable, in double radius, in double intensity, in double radius2, in double intensity2, in double bias, in double light_affect, in double ao_channel_affect, in Color color, in long quality, in long blur, in double bilateral_sharpness) 2505 { 2506 checkClassBinding!(typeof(this))(); 2507 ptrcall!(void)(GDNativeClassBinding.environmentSetSsao, _godot_object, env, enable, radius, intensity, radius2, intensity2, bias, light_affect, ao_channel_affect, color, quality, blur, bilateral_sharpness); 2508 } 2509 /** 2510 Sets the variables to be used with the "screen space reflections" post-process effect. See $(D Environment) for more details. 2511 */ 2512 void environmentSetSsr(in RID env, in bool enable, in long max_steps, in double fade_in, in double fade_out, in double depth_tolerance, in bool roughness) 2513 { 2514 checkClassBinding!(typeof(this))(); 2515 ptrcall!(void)(GDNativeClassBinding.environmentSetSsr, _godot_object, env, enable, max_steps, fade_in, fade_out, depth_tolerance, roughness); 2516 } 2517 /** 2518 Sets the variables to be used with the "tonemap" post-process effect. See $(D Environment) for more details. 2519 */ 2520 void environmentSetTonemap(in RID env, in long tone_mapper, in double exposure, in double white, in bool auto_exposure, in double min_luminance, in double max_luminance, in double auto_exp_speed, in double auto_exp_grey) 2521 { 2522 checkClassBinding!(typeof(this))(); 2523 ptrcall!(void)(GDNativeClassBinding.environmentSetTonemap, _godot_object, env, tone_mapper, exposure, white, auto_exposure, min_luminance, max_luminance, auto_exp_speed, auto_exp_grey); 2524 } 2525 /** 2526 Removes buffers and clears testcubes. 2527 */ 2528 void finish() 2529 { 2530 checkClassBinding!(typeof(this))(); 2531 ptrcall!(void)(GDNativeClassBinding.finish, _godot_object); 2532 } 2533 /** 2534 Forces a frame to be drawn when the function is called. Drawing a frame updates all $(D Viewport)s that are set to update. Use with extreme caution. 2535 */ 2536 void forceDraw(in bool swap_buffers = true, in double frame_step = 0) 2537 { 2538 checkClassBinding!(typeof(this))(); 2539 ptrcall!(void)(GDNativeClassBinding.forceDraw, _godot_object, swap_buffers, frame_step); 2540 } 2541 /** 2542 Synchronizes threads. 2543 */ 2544 void forceSync() 2545 { 2546 checkClassBinding!(typeof(this))(); 2547 ptrcall!(void)(GDNativeClassBinding.forceSync, _godot_object); 2548 } 2549 /** 2550 Tries to free an object in the VisualServer. 2551 */ 2552 void freeRid(in RID rid) 2553 { 2554 checkClassBinding!(typeof(this))(); 2555 ptrcall!(void)(GDNativeClassBinding.freeRid, _godot_object, rid); 2556 } 2557 /** 2558 Returns a certain information, see $(D renderinfo) for options. 2559 */ 2560 long getRenderInfo(in long info) 2561 { 2562 checkClassBinding!(typeof(this))(); 2563 return ptrcall!(long)(GDNativeClassBinding.getRenderInfo, _godot_object, info); 2564 } 2565 /** 2566 Returns the id of the test cube. Creates one if none exists. 2567 */ 2568 RID getTestCube() 2569 { 2570 checkClassBinding!(typeof(this))(); 2571 return ptrcall!(RID)(GDNativeClassBinding.getTestCube, _godot_object); 2572 } 2573 /** 2574 Returns the id of the test texture. Creates one if none exists. 2575 */ 2576 RID getTestTexture() 2577 { 2578 checkClassBinding!(typeof(this))(); 2579 return ptrcall!(RID)(GDNativeClassBinding.getTestTexture, _godot_object); 2580 } 2581 /** 2582 Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). 2583 $(B Note:) When running a headless or server binary, this function returns an empty string. 2584 */ 2585 String getVideoAdapterName() const 2586 { 2587 checkClassBinding!(typeof(this))(); 2588 return ptrcall!(String)(GDNativeClassBinding.getVideoAdapterName, _godot_object); 2589 } 2590 /** 2591 Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). 2592 $(B Note:) When running a headless or server binary, this function returns an empty string. 2593 */ 2594 String getVideoAdapterVendor() const 2595 { 2596 checkClassBinding!(typeof(this))(); 2597 return ptrcall!(String)(GDNativeClassBinding.getVideoAdapterVendor, _godot_object); 2598 } 2599 /** 2600 Returns the id of a white texture. Creates one if none exists. 2601 */ 2602 RID getWhiteTexture() 2603 { 2604 checkClassBinding!(typeof(this))(); 2605 return ptrcall!(RID)(GDNativeClassBinding.getWhiteTexture, _godot_object); 2606 } 2607 /** 2608 Creates a GI probe and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `gi_probe_*` VisualServer functions. 2609 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 2610 To place in a scene, attach this GI probe to an instance using $(D instanceSetBase) using the returned RID. 2611 */ 2612 RID giProbeCreate() 2613 { 2614 checkClassBinding!(typeof(this))(); 2615 return ptrcall!(RID)(GDNativeClassBinding.giProbeCreate, _godot_object); 2616 } 2617 /** 2618 Returns the bias value for the GI probe. Bias is used to avoid self occlusion. Equivalent to $(D GIProbeData.bias). 2619 */ 2620 double giProbeGetBias(in RID probe) const 2621 { 2622 checkClassBinding!(typeof(this))(); 2623 return ptrcall!(double)(GDNativeClassBinding.giProbeGetBias, _godot_object, probe); 2624 } 2625 /** 2626 Returns the axis-aligned bounding box that covers the full extent of the GI probe. 2627 */ 2628 AABB giProbeGetBounds(in RID probe) const 2629 { 2630 checkClassBinding!(typeof(this))(); 2631 return ptrcall!(AABB)(GDNativeClassBinding.giProbeGetBounds, _godot_object, probe); 2632 } 2633 /** 2634 Returns the cell size set by $(D giProbeSetCellSize). 2635 */ 2636 double giProbeGetCellSize(in RID probe) const 2637 { 2638 checkClassBinding!(typeof(this))(); 2639 return ptrcall!(double)(GDNativeClassBinding.giProbeGetCellSize, _godot_object, probe); 2640 } 2641 /** 2642 Returns the data used by the GI probe. 2643 */ 2644 PoolIntArray giProbeGetDynamicData(in RID probe) const 2645 { 2646 checkClassBinding!(typeof(this))(); 2647 return ptrcall!(PoolIntArray)(GDNativeClassBinding.giProbeGetDynamicData, _godot_object, probe); 2648 } 2649 /** 2650 Returns the dynamic range set for this GI probe. Equivalent to $(D GIProbe.dynamicRange). 2651 */ 2652 long giProbeGetDynamicRange(in RID probe) const 2653 { 2654 checkClassBinding!(typeof(this))(); 2655 return ptrcall!(long)(GDNativeClassBinding.giProbeGetDynamicRange, _godot_object, probe); 2656 } 2657 /** 2658 Returns the energy multiplier for this GI probe. Equivalent to $(D GIProbe.energy). 2659 */ 2660 double giProbeGetEnergy(in RID probe) const 2661 { 2662 checkClassBinding!(typeof(this))(); 2663 return ptrcall!(double)(GDNativeClassBinding.giProbeGetEnergy, _godot_object, probe); 2664 } 2665 /** 2666 Returns the normal bias for this GI probe. Equivalent to $(D GIProbe.normalBias). 2667 */ 2668 double giProbeGetNormalBias(in RID probe) const 2669 { 2670 checkClassBinding!(typeof(this))(); 2671 return ptrcall!(double)(GDNativeClassBinding.giProbeGetNormalBias, _godot_object, probe); 2672 } 2673 /** 2674 Returns the propagation value for this GI probe. Equivalent to $(D GIProbe.propagation). 2675 */ 2676 double giProbeGetPropagation(in RID probe) const 2677 { 2678 checkClassBinding!(typeof(this))(); 2679 return ptrcall!(double)(GDNativeClassBinding.giProbeGetPropagation, _godot_object, probe); 2680 } 2681 /** 2682 Returns the Transform set by $(D giProbeSetToCellXform). 2683 */ 2684 Transform giProbeGetToCellXform(in RID probe) const 2685 { 2686 checkClassBinding!(typeof(this))(); 2687 return ptrcall!(Transform)(GDNativeClassBinding.giProbeGetToCellXform, _godot_object, probe); 2688 } 2689 /** 2690 Returns `true` if the GI probe data associated with this GI probe is compressed. Equivalent to $(D GIProbe.compress). 2691 */ 2692 bool giProbeIsCompressed(in RID probe) const 2693 { 2694 checkClassBinding!(typeof(this))(); 2695 return ptrcall!(bool)(GDNativeClassBinding.giProbeIsCompressed, _godot_object, probe); 2696 } 2697 /** 2698 Returns `true` if the GI probe is set to interior, meaning it does not account for sky light. Equivalent to $(D GIProbe.interior). 2699 */ 2700 bool giProbeIsInterior(in RID probe) const 2701 { 2702 checkClassBinding!(typeof(this))(); 2703 return ptrcall!(bool)(GDNativeClassBinding.giProbeIsInterior, _godot_object, probe); 2704 } 2705 /** 2706 Sets the bias value to avoid self-occlusion. Equivalent to $(D GIProbe.bias). 2707 */ 2708 void giProbeSetBias(in RID probe, in double bias) 2709 { 2710 checkClassBinding!(typeof(this))(); 2711 ptrcall!(void)(GDNativeClassBinding.giProbeSetBias, _godot_object, probe, bias); 2712 } 2713 /** 2714 Sets the axis-aligned bounding box that covers the extent of the GI probe. 2715 */ 2716 void giProbeSetBounds(in RID probe, in AABB bounds) 2717 { 2718 checkClassBinding!(typeof(this))(); 2719 ptrcall!(void)(GDNativeClassBinding.giProbeSetBounds, _godot_object, probe, bounds); 2720 } 2721 /** 2722 Sets the size of individual cells within the GI probe. 2723 */ 2724 void giProbeSetCellSize(in RID probe, in double range) 2725 { 2726 checkClassBinding!(typeof(this))(); 2727 ptrcall!(void)(GDNativeClassBinding.giProbeSetCellSize, _godot_object, probe, range); 2728 } 2729 /** 2730 Sets the compression setting for the GI probe data. Compressed data will take up less space but may look worse. Equivalent to $(D GIProbe.compress). 2731 */ 2732 void giProbeSetCompress(in RID probe, in bool enable) 2733 { 2734 checkClassBinding!(typeof(this))(); 2735 ptrcall!(void)(GDNativeClassBinding.giProbeSetCompress, _godot_object, probe, enable); 2736 } 2737 /** 2738 Sets the data to be used in the GI probe for lighting calculations. Normally this is created and called internally within the $(D GIProbe) node. You should not try to set this yourself. 2739 */ 2740 void giProbeSetDynamicData(in RID probe, in PoolIntArray data) 2741 { 2742 checkClassBinding!(typeof(this))(); 2743 ptrcall!(void)(GDNativeClassBinding.giProbeSetDynamicData, _godot_object, probe, data); 2744 } 2745 /** 2746 Sets the dynamic range of the GI probe. Dynamic range sets the limit for how bright lights can be. A smaller range captures greater detail but limits how bright lights can be. Equivalent to $(D GIProbe.dynamicRange). 2747 */ 2748 void giProbeSetDynamicRange(in RID probe, in long range) 2749 { 2750 checkClassBinding!(typeof(this))(); 2751 ptrcall!(void)(GDNativeClassBinding.giProbeSetDynamicRange, _godot_object, probe, range); 2752 } 2753 /** 2754 Sets the energy multiplier for this GI probe. A higher energy makes the indirect light from the GI probe brighter. Equivalent to $(D GIProbe.energy). 2755 */ 2756 void giProbeSetEnergy(in RID probe, in double energy) 2757 { 2758 checkClassBinding!(typeof(this))(); 2759 ptrcall!(void)(GDNativeClassBinding.giProbeSetEnergy, _godot_object, probe, energy); 2760 } 2761 /** 2762 Sets the interior value of this GI probe. A GI probe set to interior does not include the sky when calculating lighting. Equivalent to $(D GIProbe.interior). 2763 */ 2764 void giProbeSetInterior(in RID probe, in bool enable) 2765 { 2766 checkClassBinding!(typeof(this))(); 2767 ptrcall!(void)(GDNativeClassBinding.giProbeSetInterior, _godot_object, probe, enable); 2768 } 2769 /** 2770 Sets the normal bias for this GI probe. Normal bias behaves similar to the other form of bias and may help reduce self-occlusion. Equivalent to $(D GIProbe.normalBias). 2771 */ 2772 void giProbeSetNormalBias(in RID probe, in double bias) 2773 { 2774 checkClassBinding!(typeof(this))(); 2775 ptrcall!(void)(GDNativeClassBinding.giProbeSetNormalBias, _godot_object, probe, bias); 2776 } 2777 /** 2778 Sets the propagation of light within this GI probe. Equivalent to $(D GIProbe.propagation). 2779 */ 2780 void giProbeSetPropagation(in RID probe, in double propagation) 2781 { 2782 checkClassBinding!(typeof(this))(); 2783 ptrcall!(void)(GDNativeClassBinding.giProbeSetPropagation, _godot_object, probe, propagation); 2784 } 2785 /** 2786 Sets the to cell $(D Transform) for this GI probe. 2787 */ 2788 void giProbeSetToCellXform(in RID probe, in Transform xform) 2789 { 2790 checkClassBinding!(typeof(this))(); 2791 ptrcall!(void)(GDNativeClassBinding.giProbeSetToCellXform, _godot_object, probe, xform); 2792 } 2793 /** 2794 Returns `true` if changes have been made to the VisualServer's data. $(D draw) is usually called if this happens. 2795 */ 2796 bool hasChanged() const 2797 { 2798 checkClassBinding!(typeof(this))(); 2799 return ptrcall!(bool)(GDNativeClassBinding.hasChanged, _godot_object); 2800 } 2801 /** 2802 Not yet implemented. Always returns `false`. 2803 */ 2804 bool hasFeature(in long feature) const 2805 { 2806 checkClassBinding!(typeof(this))(); 2807 return ptrcall!(bool)(GDNativeClassBinding.hasFeature, _godot_object, feature); 2808 } 2809 /** 2810 Returns `true` if the OS supports a certain feature. Features might be `s3tc`, `etc`, `etc2`, `pvrtc` and `skinning_fallback`. 2811 When rendering with GLES2, returns `true` with `skinning_fallback` in case the hardware doesn't support the default GPU skinning process. 2812 */ 2813 bool hasOsFeature(in String feature) const 2814 { 2815 checkClassBinding!(typeof(this))(); 2816 return ptrcall!(bool)(GDNativeClassBinding.hasOsFeature, _godot_object, feature); 2817 } 2818 /** 2819 Sets up $(D ImmediateGeometry) internals to prepare for drawing. Equivalent to $(D ImmediateGeometry.begin). 2820 */ 2821 void immediateBegin(in RID immediate, in long primitive, in RID texture = RID.init) 2822 { 2823 checkClassBinding!(typeof(this))(); 2824 ptrcall!(void)(GDNativeClassBinding.immediateBegin, _godot_object, immediate, primitive, texture); 2825 } 2826 /** 2827 Clears everything that was set up between $(D immediateBegin) and $(D immediateEnd). Equivalent to $(D ImmediateGeometry.clear). 2828 */ 2829 void immediateClear(in RID immediate) 2830 { 2831 checkClassBinding!(typeof(this))(); 2832 ptrcall!(void)(GDNativeClassBinding.immediateClear, _godot_object, immediate); 2833 } 2834 /** 2835 Sets the color to be used with next vertex. Equivalent to $(D ImmediateGeometry.setColor). 2836 */ 2837 void immediateColor(in RID immediate, in Color color) 2838 { 2839 checkClassBinding!(typeof(this))(); 2840 ptrcall!(void)(GDNativeClassBinding.immediateColor, _godot_object, immediate, color); 2841 } 2842 /** 2843 Creates an immediate geometry and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `immediate_*` VisualServer functions. 2844 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 2845 To place in a scene, attach this immediate geometry to an instance using $(D instanceSetBase) using the returned RID. 2846 */ 2847 RID immediateCreate() 2848 { 2849 checkClassBinding!(typeof(this))(); 2850 return ptrcall!(RID)(GDNativeClassBinding.immediateCreate, _godot_object); 2851 } 2852 /** 2853 Ends drawing the $(D ImmediateGeometry) and displays it. Equivalent to $(D ImmediateGeometry.end). 2854 */ 2855 void immediateEnd(in RID immediate) 2856 { 2857 checkClassBinding!(typeof(this))(); 2858 ptrcall!(void)(GDNativeClassBinding.immediateEnd, _godot_object, immediate); 2859 } 2860 /** 2861 Returns the material assigned to the $(D ImmediateGeometry). 2862 */ 2863 RID immediateGetMaterial(in RID immediate) const 2864 { 2865 checkClassBinding!(typeof(this))(); 2866 return ptrcall!(RID)(GDNativeClassBinding.immediateGetMaterial, _godot_object, immediate); 2867 } 2868 /** 2869 Sets the normal to be used with next vertex. Equivalent to $(D ImmediateGeometry.setNormal). 2870 */ 2871 void immediateNormal(in RID immediate, in Vector3 normal) 2872 { 2873 checkClassBinding!(typeof(this))(); 2874 ptrcall!(void)(GDNativeClassBinding.immediateNormal, _godot_object, immediate, normal); 2875 } 2876 /** 2877 Sets the material to be used to draw the $(D ImmediateGeometry). 2878 */ 2879 void immediateSetMaterial(in RID immediate, in RID material) 2880 { 2881 checkClassBinding!(typeof(this))(); 2882 ptrcall!(void)(GDNativeClassBinding.immediateSetMaterial, _godot_object, immediate, material); 2883 } 2884 /** 2885 Sets the tangent to be used with next vertex. Equivalent to $(D ImmediateGeometry.setTangent). 2886 */ 2887 void immediateTangent(in RID immediate, in Plane tangent) 2888 { 2889 checkClassBinding!(typeof(this))(); 2890 ptrcall!(void)(GDNativeClassBinding.immediateTangent, _godot_object, immediate, tangent); 2891 } 2892 /** 2893 Sets the UV to be used with next vertex. Equivalent to $(D ImmediateGeometry.setUv). 2894 */ 2895 void immediateUv(in RID immediate, in Vector2 tex_uv) 2896 { 2897 checkClassBinding!(typeof(this))(); 2898 ptrcall!(void)(GDNativeClassBinding.immediateUv, _godot_object, immediate, tex_uv); 2899 } 2900 /** 2901 Sets the UV2 to be used with next vertex. Equivalent to $(D ImmediateGeometry.setUv2). 2902 */ 2903 void immediateUv2(in RID immediate, in Vector2 tex_uv) 2904 { 2905 checkClassBinding!(typeof(this))(); 2906 ptrcall!(void)(GDNativeClassBinding.immediateUv2, _godot_object, immediate, tex_uv); 2907 } 2908 /** 2909 Adds the next vertex using the information provided in advance. Equivalent to $(D ImmediateGeometry.addVertex). 2910 */ 2911 void immediateVertex(in RID immediate, in Vector3 vertex) 2912 { 2913 checkClassBinding!(typeof(this))(); 2914 ptrcall!(void)(GDNativeClassBinding.immediateVertex, _godot_object, immediate, vertex); 2915 } 2916 /** 2917 Adds the next vertex using the information provided in advance. This is a helper class that calls $(D immediateVertex) under the hood. Equivalent to $(D ImmediateGeometry.addVertex). 2918 */ 2919 void immediateVertex2d(in RID immediate, in Vector2 vertex) 2920 { 2921 checkClassBinding!(typeof(this))(); 2922 ptrcall!(void)(GDNativeClassBinding.immediateVertex2d, _godot_object, immediate, vertex); 2923 } 2924 /** 2925 Initializes the visual server. This function is called internally by platform-dependent code during engine initialization. If called from a running game, it will not do anything. 2926 */ 2927 void _init() 2928 { 2929 checkClassBinding!(typeof(this))(); 2930 ptrcall!(void)(GDNativeClassBinding._init, _godot_object); 2931 } 2932 /** 2933 Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with $(D instancesCullAabb), $(D instancesCullConvex), and $(D instancesCullRay). 2934 */ 2935 void instanceAttachObjectInstanceId(in RID instance, in long id) 2936 { 2937 checkClassBinding!(typeof(this))(); 2938 ptrcall!(void)(GDNativeClassBinding.instanceAttachObjectInstanceId, _godot_object, instance, id); 2939 } 2940 /** 2941 Attaches a skeleton to an instance. Removes the previous skeleton from the instance. 2942 */ 2943 void instanceAttachSkeleton(in RID instance, in RID skeleton) 2944 { 2945 checkClassBinding!(typeof(this))(); 2946 ptrcall!(void)(GDNativeClassBinding.instanceAttachSkeleton, _godot_object, instance, skeleton); 2947 } 2948 /** 2949 Creates a visual instance and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `instance_*` VisualServer functions. 2950 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 2951 An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, and reflection probes need to be associated with an instance to be visible in the scenario using $(D instanceSetBase). 2952 */ 2953 RID instanceCreate() 2954 { 2955 checkClassBinding!(typeof(this))(); 2956 return ptrcall!(RID)(GDNativeClassBinding.instanceCreate, _godot_object); 2957 } 2958 /** 2959 Creates a visual instance, adds it to the VisualServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all `instance_*` VisualServer functions. 2960 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 2961 */ 2962 RID instanceCreate2(in RID base, in RID scenario) 2963 { 2964 checkClassBinding!(typeof(this))(); 2965 return ptrcall!(RID)(GDNativeClassBinding.instanceCreate2, _godot_object, base, scenario); 2966 } 2967 /** 2968 Not implemented in Godot 3.x. 2969 */ 2970 void instanceGeometrySetAsInstanceLod(in RID instance, in RID as_lod_of_instance) 2971 { 2972 checkClassBinding!(typeof(this))(); 2973 ptrcall!(void)(GDNativeClassBinding.instanceGeometrySetAsInstanceLod, _godot_object, instance, as_lod_of_instance); 2974 } 2975 /** 2976 Sets the shadow casting setting to one of $(D shadowcastingsetting). Equivalent to $(D GeometryInstance.castShadow). 2977 */ 2978 void instanceGeometrySetCastShadowsSetting(in RID instance, in long shadow_casting_setting) 2979 { 2980 checkClassBinding!(typeof(this))(); 2981 ptrcall!(void)(GDNativeClassBinding.instanceGeometrySetCastShadowsSetting, _godot_object, instance, shadow_casting_setting); 2982 } 2983 /** 2984 Not implemented in Godot 3.x. 2985 */ 2986 void instanceGeometrySetDrawRange(in RID instance, in double min, in double max, in double min_margin, in double max_margin) 2987 { 2988 checkClassBinding!(typeof(this))(); 2989 ptrcall!(void)(GDNativeClassBinding.instanceGeometrySetDrawRange, _godot_object, instance, min, max, min_margin, max_margin); 2990 } 2991 /** 2992 Sets the flag for a given $(D instanceflags). See $(D instanceflags) for more details. 2993 */ 2994 void instanceGeometrySetFlag(in RID instance, in long flag, in bool enabled) 2995 { 2996 checkClassBinding!(typeof(this))(); 2997 ptrcall!(void)(GDNativeClassBinding.instanceGeometrySetFlag, _godot_object, instance, flag, enabled); 2998 } 2999 /** 3000 Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to $(D GeometryInstance.materialOverride). 3001 */ 3002 void instanceGeometrySetMaterialOverride(in RID instance, in RID material) 3003 { 3004 checkClassBinding!(typeof(this))(); 3005 ptrcall!(void)(GDNativeClassBinding.instanceGeometrySetMaterialOverride, _godot_object, instance, material); 3006 } 3007 /** 3008 Sets the base of the instance. A base can be any of the 3D objects that are created in the VisualServer that can be displayed. For example, any of the light types, mesh, multimesh, immediate geometry, particle system, reflection probe, lightmap capture, and the GI probe are all types that can be set as the base of an instance in order to be displayed in the scenario. 3009 */ 3010 void instanceSetBase(in RID instance, in RID base) 3011 { 3012 checkClassBinding!(typeof(this))(); 3013 ptrcall!(void)(GDNativeClassBinding.instanceSetBase, _godot_object, instance, base); 3014 } 3015 /** 3016 Sets the weight for a given blend shape associated with this instance. 3017 */ 3018 void instanceSetBlendShapeWeight(in RID instance, in long shape, in double weight) 3019 { 3020 checkClassBinding!(typeof(this))(); 3021 ptrcall!(void)(GDNativeClassBinding.instanceSetBlendShapeWeight, _godot_object, instance, shape, weight); 3022 } 3023 /** 3024 Sets a custom AABB to use when culling objects from the view frustum. Equivalent to $(D GeometryInstance.setCustomAabb). 3025 */ 3026 void instanceSetCustomAabb(in RID instance, in AABB aabb) 3027 { 3028 checkClassBinding!(typeof(this))(); 3029 ptrcall!(void)(GDNativeClassBinding.instanceSetCustomAabb, _godot_object, instance, aabb); 3030 } 3031 /** 3032 Function not implemented in Godot 3.x. 3033 */ 3034 void instanceSetExterior(in RID instance, in bool enabled) 3035 { 3036 checkClassBinding!(typeof(this))(); 3037 ptrcall!(void)(GDNativeClassBinding.instanceSetExterior, _godot_object, instance, enabled); 3038 } 3039 /** 3040 Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you to avoid culling objects that fall outside the view frustum. Equivalent to $(D GeometryInstance.extraCullMargin). 3041 */ 3042 void instanceSetExtraVisibilityMargin(in RID instance, in double margin) 3043 { 3044 checkClassBinding!(typeof(this))(); 3045 ptrcall!(void)(GDNativeClassBinding.instanceSetExtraVisibilityMargin, _godot_object, instance, margin); 3046 } 3047 /** 3048 Sets the render layers that this instance will be drawn to. Equivalent to $(D VisualInstance.layers). 3049 */ 3050 void instanceSetLayerMask(in RID instance, in long mask) 3051 { 3052 checkClassBinding!(typeof(this))(); 3053 ptrcall!(void)(GDNativeClassBinding.instanceSetLayerMask, _godot_object, instance, mask); 3054 } 3055 /** 3056 Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in. 3057 */ 3058 void instanceSetScenario(in RID instance, in RID scenario) 3059 { 3060 checkClassBinding!(typeof(this))(); 3061 ptrcall!(void)(GDNativeClassBinding.instanceSetScenario, _godot_object, instance, scenario); 3062 } 3063 /** 3064 Sets the material of a specific surface. Equivalent to $(D MeshInstance.setSurfaceMaterial). 3065 */ 3066 void instanceSetSurfaceMaterial(in RID instance, in long surface, in RID material) 3067 { 3068 checkClassBinding!(typeof(this))(); 3069 ptrcall!(void)(GDNativeClassBinding.instanceSetSurfaceMaterial, _godot_object, instance, surface, material); 3070 } 3071 /** 3072 Sets the world space transform of the instance. Equivalent to $(D Spatial.transform). 3073 */ 3074 void instanceSetTransform(in RID instance, in Transform transform) 3075 { 3076 checkClassBinding!(typeof(this))(); 3077 ptrcall!(void)(GDNativeClassBinding.instanceSetTransform, _godot_object, instance, transform); 3078 } 3079 /** 3080 Sets the lightmap to use with this instance. 3081 */ 3082 void instanceSetUseLightmap(in RID instance, in RID lightmap_instance, in RID lightmap, in long lightmap_slice = -1, in Rect2 lightmap_uv_rect = Rect2(0, 0, 1, 1)) 3083 { 3084 checkClassBinding!(typeof(this))(); 3085 ptrcall!(void)(GDNativeClassBinding.instanceSetUseLightmap, _godot_object, instance, lightmap_instance, lightmap, lightmap_slice, lightmap_uv_rect); 3086 } 3087 /** 3088 Sets whether an instance is drawn or not. Equivalent to $(D Spatial.visible). 3089 */ 3090 void instanceSetVisible(in RID instance, in bool visible) 3091 { 3092 checkClassBinding!(typeof(this))(); 3093 ptrcall!(void)(GDNativeClassBinding.instanceSetVisible, _godot_object, instance, visible); 3094 } 3095 /** 3096 Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as $(D MeshInstance) or $(D DirectionalLight). Use $(D @GDScript.instanceFromId) to obtain the actual nodes. A scenario RID must be provided, which is available in the $(D World) you want to query. This forces an update for all resources queued to update. 3097 $(B Warning:) This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. 3098 */ 3099 Array instancesCullAabb(in AABB aabb, in RID scenario = RID.init) const 3100 { 3101 checkClassBinding!(typeof(this))(); 3102 return ptrcall!(Array)(GDNativeClassBinding.instancesCullAabb, _godot_object, aabb, scenario); 3103 } 3104 /** 3105 Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as $(D MeshInstance) or $(D DirectionalLight). Use $(D @GDScript.instanceFromId) to obtain the actual nodes. A scenario RID must be provided, which is available in the $(D World) you want to query. This forces an update for all resources queued to update. 3106 $(B Warning:) This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. 3107 */ 3108 Array instancesCullConvex(in Array convex, in RID scenario = RID.init) const 3109 { 3110 checkClassBinding!(typeof(this))(); 3111 return ptrcall!(Array)(GDNativeClassBinding.instancesCullConvex, _godot_object, convex, scenario); 3112 } 3113 /** 3114 Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as $(D MeshInstance) or $(D DirectionalLight). Use $(D @GDScript.instanceFromId) to obtain the actual nodes. A scenario RID must be provided, which is available in the $(D World) you want to query. This forces an update for all resources queued to update. 3115 $(B Warning:) This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. 3116 */ 3117 Array instancesCullRay(in Vector3 from, in Vector3 to, in RID scenario = RID.init) const 3118 { 3119 checkClassBinding!(typeof(this))(); 3120 return ptrcall!(Array)(GDNativeClassBinding.instancesCullRay, _godot_object, from, to, scenario); 3121 } 3122 /** 3123 3124 */ 3125 bool isRenderLoopEnabled() const 3126 { 3127 checkClassBinding!(typeof(this))(); 3128 return ptrcall!(bool)(GDNativeClassBinding.isRenderLoopEnabled, _godot_object); 3129 } 3130 /** 3131 If `true`, this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to $(D DirectionalLight.directionalShadowBlendSplits). 3132 */ 3133 void lightDirectionalSetBlendSplits(in RID light, in bool enable) 3134 { 3135 checkClassBinding!(typeof(this))(); 3136 ptrcall!(void)(GDNativeClassBinding.lightDirectionalSetBlendSplits, _godot_object, light, enable); 3137 } 3138 /** 3139 Sets the shadow depth range mode for this directional light. Equivalent to $(D DirectionalLight.directionalShadowDepthRange). See $(D lightdirectionalshadowdepthrangemode) for options. 3140 */ 3141 void lightDirectionalSetShadowDepthRangeMode(in RID light, in long range_mode) 3142 { 3143 checkClassBinding!(typeof(this))(); 3144 ptrcall!(void)(GDNativeClassBinding.lightDirectionalSetShadowDepthRangeMode, _godot_object, light, range_mode); 3145 } 3146 /** 3147 Sets the shadow mode for this directional light. Equivalent to $(D DirectionalLight.directionalShadowMode). See $(D lightdirectionalshadowmode) for options. 3148 */ 3149 void lightDirectionalSetShadowMode(in RID light, in long mode) 3150 { 3151 checkClassBinding!(typeof(this))(); 3152 ptrcall!(void)(GDNativeClassBinding.lightDirectionalSetShadowMode, _godot_object, light, mode); 3153 } 3154 /** 3155 Sets whether to use vertical or horizontal detail for this omni light. This can be used to alleviate artifacts in the shadow map. Equivalent to $(D OmniLight.omniShadowDetail). 3156 */ 3157 void lightOmniSetShadowDetail(in RID light, in long detail) 3158 { 3159 checkClassBinding!(typeof(this))(); 3160 ptrcall!(void)(GDNativeClassBinding.lightOmniSetShadowDetail, _godot_object, light, detail); 3161 } 3162 /** 3163 Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to $(D OmniLight.omniShadowMode). 3164 */ 3165 void lightOmniSetShadowMode(in RID light, in long mode) 3166 { 3167 checkClassBinding!(typeof(this))(); 3168 ptrcall!(void)(GDNativeClassBinding.lightOmniSetShadowMode, _godot_object, light, mode); 3169 } 3170 /** 3171 Sets the bake mode for this light, see $(D lightbakemode) for options. The bake mode affects how the light will be baked in $(D BakedLightmap)s and $(D GIProbe)s. 3172 */ 3173 void lightSetBakeMode(in RID light, in long bake_mode) 3174 { 3175 checkClassBinding!(typeof(this))(); 3176 ptrcall!(void)(GDNativeClassBinding.lightSetBakeMode, _godot_object, light, bake_mode); 3177 } 3178 /** 3179 Sets the color of the light. Equivalent to $(D Light.lightColor). 3180 */ 3181 void lightSetColor(in RID light, in Color color) 3182 { 3183 checkClassBinding!(typeof(this))(); 3184 ptrcall!(void)(GDNativeClassBinding.lightSetColor, _godot_object, light, color); 3185 } 3186 /** 3187 Sets the cull mask for this Light. Lights only affect objects in the selected layers. Equivalent to $(D Light.lightCullMask). 3188 */ 3189 void lightSetCullMask(in RID light, in long mask) 3190 { 3191 checkClassBinding!(typeof(this))(); 3192 ptrcall!(void)(GDNativeClassBinding.lightSetCullMask, _godot_object, light, mask); 3193 } 3194 /** 3195 If `true`, light will subtract light instead of adding light. Equivalent to $(D Light.lightNegative). 3196 */ 3197 void lightSetNegative(in RID light, in bool enable) 3198 { 3199 checkClassBinding!(typeof(this))(); 3200 ptrcall!(void)(GDNativeClassBinding.lightSetNegative, _godot_object, light, enable); 3201 } 3202 /** 3203 Sets the specified light parameter. See $(D lightparam) for options. Equivalent to $(D Light.setParam). 3204 */ 3205 void lightSetParam(in RID light, in long param, in double value) 3206 { 3207 checkClassBinding!(typeof(this))(); 3208 ptrcall!(void)(GDNativeClassBinding.lightSetParam, _godot_object, light, param, value); 3209 } 3210 /** 3211 Not implemented in Godot 3.x. 3212 */ 3213 void lightSetProjector(in RID light, in RID texture) 3214 { 3215 checkClassBinding!(typeof(this))(); 3216 ptrcall!(void)(GDNativeClassBinding.lightSetProjector, _godot_object, light, texture); 3217 } 3218 /** 3219 If `true`, reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double sided shadows with $(D instanceGeometrySetCastShadowsSetting). Equivalent to $(D Light.shadowReverseCullFace). 3220 */ 3221 void lightSetReverseCullFaceMode(in RID light, in bool enabled) 3222 { 3223 checkClassBinding!(typeof(this))(); 3224 ptrcall!(void)(GDNativeClassBinding.lightSetReverseCullFaceMode, _godot_object, light, enabled); 3225 } 3226 /** 3227 If `true`, light will cast shadows. Equivalent to $(D Light.shadowEnabled). 3228 */ 3229 void lightSetShadow(in RID light, in bool enabled) 3230 { 3231 checkClassBinding!(typeof(this))(); 3232 ptrcall!(void)(GDNativeClassBinding.lightSetShadow, _godot_object, light, enabled); 3233 } 3234 /** 3235 Sets the color of the shadow cast by the light. Equivalent to $(D Light.shadowColor). 3236 */ 3237 void lightSetShadowColor(in RID light, in Color color) 3238 { 3239 checkClassBinding!(typeof(this))(); 3240 ptrcall!(void)(GDNativeClassBinding.lightSetShadowColor, _godot_object, light, color); 3241 } 3242 /** 3243 Sets whether GI probes capture light information from this light. $(I Deprecated method.) Use $(D lightSetBakeMode) instead. This method is only kept for compatibility reasons and calls $(D lightSetBakeMode) internally, setting the bake mode to $(D constant LIGHT_BAKE_DISABLED) or $(D constant LIGHT_BAKE_INDIRECT) depending on the given parameter. 3244 */ 3245 void lightSetUseGi(in RID light, in bool enabled) 3246 { 3247 checkClassBinding!(typeof(this))(); 3248 ptrcall!(void)(GDNativeClassBinding.lightSetUseGi, _godot_object, light, enabled); 3249 } 3250 /** 3251 Creates a lightmap capture and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `lightmap_capture_*` VisualServer functions. 3252 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 3253 To place in a scene, attach this lightmap capture to an instance using $(D instanceSetBase) using the returned RID. 3254 */ 3255 RID lightmapCaptureCreate() 3256 { 3257 checkClassBinding!(typeof(this))(); 3258 return ptrcall!(RID)(GDNativeClassBinding.lightmapCaptureCreate, _godot_object); 3259 } 3260 /** 3261 Returns the size of the lightmap capture area. 3262 */ 3263 AABB lightmapCaptureGetBounds(in RID capture) const 3264 { 3265 checkClassBinding!(typeof(this))(); 3266 return ptrcall!(AABB)(GDNativeClassBinding.lightmapCaptureGetBounds, _godot_object, capture); 3267 } 3268 /** 3269 Returns the energy multiplier used by the lightmap capture. 3270 */ 3271 double lightmapCaptureGetEnergy(in RID capture) const 3272 { 3273 checkClassBinding!(typeof(this))(); 3274 return ptrcall!(double)(GDNativeClassBinding.lightmapCaptureGetEnergy, _godot_object, capture); 3275 } 3276 /** 3277 Returns the octree used by the lightmap capture. 3278 */ 3279 PoolByteArray lightmapCaptureGetOctree(in RID capture) const 3280 { 3281 checkClassBinding!(typeof(this))(); 3282 return ptrcall!(PoolByteArray)(GDNativeClassBinding.lightmapCaptureGetOctree, _godot_object, capture); 3283 } 3284 /** 3285 Returns the cell subdivision amount used by this lightmap capture's octree. 3286 */ 3287 long lightmapCaptureGetOctreeCellSubdiv(in RID capture) const 3288 { 3289 checkClassBinding!(typeof(this))(); 3290 return ptrcall!(long)(GDNativeClassBinding.lightmapCaptureGetOctreeCellSubdiv, _godot_object, capture); 3291 } 3292 /** 3293 Returns the cell transform for this lightmap capture's octree. 3294 */ 3295 Transform lightmapCaptureGetOctreeCellTransform(in RID capture) const 3296 { 3297 checkClassBinding!(typeof(this))(); 3298 return ptrcall!(Transform)(GDNativeClassBinding.lightmapCaptureGetOctreeCellTransform, _godot_object, capture); 3299 } 3300 /** 3301 Returns `true` if capture is in "interior" mode. 3302 */ 3303 bool lightmapCaptureIsInterior(in RID capture) const 3304 { 3305 checkClassBinding!(typeof(this))(); 3306 return ptrcall!(bool)(GDNativeClassBinding.lightmapCaptureIsInterior, _godot_object, capture); 3307 } 3308 /** 3309 Sets the size of the area covered by the lightmap capture. Equivalent to $(D BakedLightmapData.bounds). 3310 */ 3311 void lightmapCaptureSetBounds(in RID capture, in AABB bounds) 3312 { 3313 checkClassBinding!(typeof(this))(); 3314 ptrcall!(void)(GDNativeClassBinding.lightmapCaptureSetBounds, _godot_object, capture, bounds); 3315 } 3316 /** 3317 Sets the energy multiplier for this lightmap capture. Equivalent to $(D BakedLightmapData.energy). 3318 */ 3319 void lightmapCaptureSetEnergy(in RID capture, in double energy) 3320 { 3321 checkClassBinding!(typeof(this))(); 3322 ptrcall!(void)(GDNativeClassBinding.lightmapCaptureSetEnergy, _godot_object, capture, energy); 3323 } 3324 /** 3325 Sets the "interior" mode for this lightmap capture. Equivalent to $(D BakedLightmapData.interior). 3326 */ 3327 void lightmapCaptureSetInterior(in RID capture, in bool interior) 3328 { 3329 checkClassBinding!(typeof(this))(); 3330 ptrcall!(void)(GDNativeClassBinding.lightmapCaptureSetInterior, _godot_object, capture, interior); 3331 } 3332 /** 3333 Sets the octree to be used by this lightmap capture. This function is normally used by the $(D BakedLightmap) node. Equivalent to $(D BakedLightmapData.octree). 3334 */ 3335 void lightmapCaptureSetOctree(in RID capture, in PoolByteArray octree) 3336 { 3337 checkClassBinding!(typeof(this))(); 3338 ptrcall!(void)(GDNativeClassBinding.lightmapCaptureSetOctree, _godot_object, capture, octree); 3339 } 3340 /** 3341 Sets the subdivision level of this lightmap capture's octree. Equivalent to $(D BakedLightmapData.cellSubdiv). 3342 */ 3343 void lightmapCaptureSetOctreeCellSubdiv(in RID capture, in long subdiv) 3344 { 3345 checkClassBinding!(typeof(this))(); 3346 ptrcall!(void)(GDNativeClassBinding.lightmapCaptureSetOctreeCellSubdiv, _godot_object, capture, subdiv); 3347 } 3348 /** 3349 Sets the octree cell transform for this lightmap capture's octree. Equivalent to $(D BakedLightmapData.cellSpaceTransform). 3350 */ 3351 void lightmapCaptureSetOctreeCellTransform(in RID capture, in Transform xform) 3352 { 3353 checkClassBinding!(typeof(this))(); 3354 ptrcall!(void)(GDNativeClassBinding.lightmapCaptureSetOctreeCellTransform, _godot_object, capture, xform); 3355 } 3356 /** 3357 Returns a mesh of a sphere with the given amount of horizontal and vertical subdivisions. 3358 */ 3359 RID makeSphereMesh(in long latitudes, in long longitudes, in double radius) 3360 { 3361 checkClassBinding!(typeof(this))(); 3362 return ptrcall!(RID)(GDNativeClassBinding.makeSphereMesh, _godot_object, latitudes, longitudes, radius); 3363 } 3364 /** 3365 Creates an empty material and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `material_*` VisualServer functions. 3366 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 3367 */ 3368 RID materialCreate() 3369 { 3370 checkClassBinding!(typeof(this))(); 3371 return ptrcall!(RID)(GDNativeClassBinding.materialCreate, _godot_object); 3372 } 3373 /** 3374 Returns the value of a certain material's parameter. 3375 */ 3376 Variant materialGetParam(in RID material, in String parameter) const 3377 { 3378 checkClassBinding!(typeof(this))(); 3379 return ptrcall!(Variant)(GDNativeClassBinding.materialGetParam, _godot_object, material, parameter); 3380 } 3381 /** 3382 Returns the default value for the param if available. Otherwise returns an empty $(D Variant). 3383 */ 3384 Variant materialGetParamDefault(in RID material, in String parameter) const 3385 { 3386 checkClassBinding!(typeof(this))(); 3387 return ptrcall!(Variant)(GDNativeClassBinding.materialGetParamDefault, _godot_object, material, parameter); 3388 } 3389 /** 3390 Returns the shader of a certain material's shader. Returns an empty RID if the material doesn't have a shader. 3391 */ 3392 RID materialGetShader(in RID shader_material) const 3393 { 3394 checkClassBinding!(typeof(this))(); 3395 return ptrcall!(RID)(GDNativeClassBinding.materialGetShader, _godot_object, shader_material); 3396 } 3397 /** 3398 Sets a material's line width. 3399 */ 3400 void materialSetLineWidth(in RID material, in double width) 3401 { 3402 checkClassBinding!(typeof(this))(); 3403 ptrcall!(void)(GDNativeClassBinding.materialSetLineWidth, _godot_object, material, width); 3404 } 3405 /** 3406 Sets an object's next material. 3407 */ 3408 void materialSetNextPass(in RID material, in RID next_material) 3409 { 3410 checkClassBinding!(typeof(this))(); 3411 ptrcall!(void)(GDNativeClassBinding.materialSetNextPass, _godot_object, material, next_material); 3412 } 3413 /** 3414 Sets a material's parameter. 3415 */ 3416 void materialSetParam(VariantArg2)(in RID material, in String parameter, in VariantArg2 value) 3417 { 3418 checkClassBinding!(typeof(this))(); 3419 ptrcall!(void)(GDNativeClassBinding.materialSetParam, _godot_object, material, parameter, value); 3420 } 3421 /** 3422 Sets a material's render priority. 3423 */ 3424 void materialSetRenderPriority(in RID material, in long priority) 3425 { 3426 checkClassBinding!(typeof(this))(); 3427 ptrcall!(void)(GDNativeClassBinding.materialSetRenderPriority, _godot_object, material, priority); 3428 } 3429 /** 3430 Sets a shader material's shader. 3431 */ 3432 void materialSetShader(in RID shader_material, in RID shader) 3433 { 3434 checkClassBinding!(typeof(this))(); 3435 ptrcall!(void)(GDNativeClassBinding.materialSetShader, _godot_object, shader_material, shader); 3436 } 3437 /** 3438 Adds a surface generated from the Arrays to a mesh. See $(D primitivetype) constants for types. 3439 */ 3440 void meshAddSurfaceFromArrays(in RID mesh, in long primitive, in Array arrays, in Array blend_shapes = Array.make(), in long compress_format = 97280) 3441 { 3442 checkClassBinding!(typeof(this))(); 3443 ptrcall!(void)(GDNativeClassBinding.meshAddSurfaceFromArrays, _godot_object, mesh, primitive, arrays, blend_shapes, compress_format); 3444 } 3445 /** 3446 Removes all surfaces from a mesh. 3447 */ 3448 void meshClear(in RID mesh) 3449 { 3450 checkClassBinding!(typeof(this))(); 3451 ptrcall!(void)(GDNativeClassBinding.meshClear, _godot_object, mesh); 3452 } 3453 /** 3454 Creates a new mesh and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `mesh_*` VisualServer functions. 3455 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 3456 To place in a scene, attach this mesh to an instance using $(D instanceSetBase) using the returned RID. 3457 */ 3458 RID meshCreate() 3459 { 3460 checkClassBinding!(typeof(this))(); 3461 return ptrcall!(RID)(GDNativeClassBinding.meshCreate, _godot_object); 3462 } 3463 /** 3464 Returns a mesh's blend shape count. 3465 */ 3466 long meshGetBlendShapeCount(in RID mesh) const 3467 { 3468 checkClassBinding!(typeof(this))(); 3469 return ptrcall!(long)(GDNativeClassBinding.meshGetBlendShapeCount, _godot_object, mesh); 3470 } 3471 /** 3472 Returns a mesh's blend shape mode. 3473 */ 3474 VisualServer.BlendShapeMode meshGetBlendShapeMode(in RID mesh) const 3475 { 3476 checkClassBinding!(typeof(this))(); 3477 return ptrcall!(VisualServer.BlendShapeMode)(GDNativeClassBinding.meshGetBlendShapeMode, _godot_object, mesh); 3478 } 3479 /** 3480 Returns a mesh's custom aabb. 3481 */ 3482 AABB meshGetCustomAabb(in RID mesh) const 3483 { 3484 checkClassBinding!(typeof(this))(); 3485 return ptrcall!(AABB)(GDNativeClassBinding.meshGetCustomAabb, _godot_object, mesh); 3486 } 3487 /** 3488 Returns a mesh's number of surfaces. 3489 */ 3490 long meshGetSurfaceCount(in RID mesh) const 3491 { 3492 checkClassBinding!(typeof(this))(); 3493 return ptrcall!(long)(GDNativeClassBinding.meshGetSurfaceCount, _godot_object, mesh); 3494 } 3495 /** 3496 Removes a mesh's surface. 3497 */ 3498 void meshRemoveSurface(in RID mesh, in long index) 3499 { 3500 checkClassBinding!(typeof(this))(); 3501 ptrcall!(void)(GDNativeClassBinding.meshRemoveSurface, _godot_object, mesh, index); 3502 } 3503 /** 3504 Sets a mesh's blend shape count. 3505 */ 3506 void meshSetBlendShapeCount(in RID mesh, in long amount) 3507 { 3508 checkClassBinding!(typeof(this))(); 3509 ptrcall!(void)(GDNativeClassBinding.meshSetBlendShapeCount, _godot_object, mesh, amount); 3510 } 3511 /** 3512 Sets a mesh's blend shape mode. 3513 */ 3514 void meshSetBlendShapeMode(in RID mesh, in long mode) 3515 { 3516 checkClassBinding!(typeof(this))(); 3517 ptrcall!(void)(GDNativeClassBinding.meshSetBlendShapeMode, _godot_object, mesh, mode); 3518 } 3519 /** 3520 Sets a mesh's custom aabb. 3521 */ 3522 void meshSetCustomAabb(in RID mesh, in AABB aabb) 3523 { 3524 checkClassBinding!(typeof(this))(); 3525 ptrcall!(void)(GDNativeClassBinding.meshSetCustomAabb, _godot_object, mesh, aabb); 3526 } 3527 /** 3528 Returns a mesh's surface's aabb. 3529 */ 3530 AABB meshSurfaceGetAabb(in RID mesh, in long surface) const 3531 { 3532 checkClassBinding!(typeof(this))(); 3533 return ptrcall!(AABB)(GDNativeClassBinding.meshSurfaceGetAabb, _godot_object, mesh, surface); 3534 } 3535 /** 3536 Returns a mesh's surface's vertex buffer. 3537 */ 3538 PoolByteArray meshSurfaceGetArray(in RID mesh, in long surface) const 3539 { 3540 checkClassBinding!(typeof(this))(); 3541 return ptrcall!(PoolByteArray)(GDNativeClassBinding.meshSurfaceGetArray, _godot_object, mesh, surface); 3542 } 3543 /** 3544 Returns a mesh's surface's amount of indices. 3545 */ 3546 long meshSurfaceGetArrayIndexLen(in RID mesh, in long surface) const 3547 { 3548 checkClassBinding!(typeof(this))(); 3549 return ptrcall!(long)(GDNativeClassBinding.meshSurfaceGetArrayIndexLen, _godot_object, mesh, surface); 3550 } 3551 /** 3552 Returns a mesh's surface's amount of vertices. 3553 */ 3554 long meshSurfaceGetArrayLen(in RID mesh, in long surface) const 3555 { 3556 checkClassBinding!(typeof(this))(); 3557 return ptrcall!(long)(GDNativeClassBinding.meshSurfaceGetArrayLen, _godot_object, mesh, surface); 3558 } 3559 /** 3560 Returns a mesh's surface's buffer arrays. 3561 */ 3562 Array meshSurfaceGetArrays(in RID mesh, in long surface) const 3563 { 3564 checkClassBinding!(typeof(this))(); 3565 return ptrcall!(Array)(GDNativeClassBinding.meshSurfaceGetArrays, _godot_object, mesh, surface); 3566 } 3567 /** 3568 Returns a mesh's surface's arrays for blend shapes. 3569 */ 3570 Array meshSurfaceGetBlendShapeArrays(in RID mesh, in long surface) const 3571 { 3572 checkClassBinding!(typeof(this))(); 3573 return ptrcall!(Array)(GDNativeClassBinding.meshSurfaceGetBlendShapeArrays, _godot_object, mesh, surface); 3574 } 3575 /** 3576 Returns the format of a mesh's surface. 3577 */ 3578 long meshSurfaceGetFormat(in RID mesh, in long surface) const 3579 { 3580 checkClassBinding!(typeof(this))(); 3581 return ptrcall!(long)(GDNativeClassBinding.meshSurfaceGetFormat, _godot_object, mesh, surface); 3582 } 3583 /** 3584 Function is unused in Godot 3.x. 3585 */ 3586 long meshSurfaceGetFormatOffset(in long format, in long vertex_len, in long index_len, in long array_index) const 3587 { 3588 checkClassBinding!(typeof(this))(); 3589 return ptrcall!(long)(GDNativeClassBinding.meshSurfaceGetFormatOffset, _godot_object, format, vertex_len, index_len, array_index); 3590 } 3591 /** 3592 Function is unused in Godot 3.x. 3593 */ 3594 long meshSurfaceGetFormatStride(in long format, in long vertex_len, in long index_len) const 3595 { 3596 checkClassBinding!(typeof(this))(); 3597 return ptrcall!(long)(GDNativeClassBinding.meshSurfaceGetFormatStride, _godot_object, format, vertex_len, index_len); 3598 } 3599 /** 3600 Returns a mesh's surface's index buffer. 3601 */ 3602 PoolByteArray meshSurfaceGetIndexArray(in RID mesh, in long surface) const 3603 { 3604 checkClassBinding!(typeof(this))(); 3605 return ptrcall!(PoolByteArray)(GDNativeClassBinding.meshSurfaceGetIndexArray, _godot_object, mesh, surface); 3606 } 3607 /** 3608 Returns a mesh's surface's material. 3609 */ 3610 RID meshSurfaceGetMaterial(in RID mesh, in long surface) const 3611 { 3612 checkClassBinding!(typeof(this))(); 3613 return ptrcall!(RID)(GDNativeClassBinding.meshSurfaceGetMaterial, _godot_object, mesh, surface); 3614 } 3615 /** 3616 Returns the primitive type of a mesh's surface. 3617 */ 3618 VisualServer.PrimitiveType meshSurfaceGetPrimitiveType(in RID mesh, in long surface) const 3619 { 3620 checkClassBinding!(typeof(this))(); 3621 return ptrcall!(VisualServer.PrimitiveType)(GDNativeClassBinding.meshSurfaceGetPrimitiveType, _godot_object, mesh, surface); 3622 } 3623 /** 3624 Returns the aabb of a mesh's surface's skeleton. 3625 */ 3626 Array meshSurfaceGetSkeletonAabb(in RID mesh, in long surface) const 3627 { 3628 checkClassBinding!(typeof(this))(); 3629 return ptrcall!(Array)(GDNativeClassBinding.meshSurfaceGetSkeletonAabb, _godot_object, mesh, surface); 3630 } 3631 /** 3632 Sets a mesh's surface's material. 3633 */ 3634 void meshSurfaceSetMaterial(in RID mesh, in long surface, in RID material) 3635 { 3636 checkClassBinding!(typeof(this))(); 3637 ptrcall!(void)(GDNativeClassBinding.meshSurfaceSetMaterial, _godot_object, mesh, surface, material); 3638 } 3639 /** 3640 Updates a specific region of a vertex buffer for the specified surface. Warning: this function alters the vertex buffer directly with no safety mechanisms, you can easily corrupt your mesh. 3641 */ 3642 void meshSurfaceUpdateRegion(in RID mesh, in long surface, in long offset, in PoolByteArray data) 3643 { 3644 checkClassBinding!(typeof(this))(); 3645 ptrcall!(void)(GDNativeClassBinding.meshSurfaceUpdateRegion, _godot_object, mesh, surface, offset, data); 3646 } 3647 /** 3648 Allocates space for the multimesh data. Format parameters determine how the data will be stored by OpenGL. See $(D multimeshtransformformat), $(D multimeshcolorformat), and $(D multimeshcustomdataformat) for usage. Equivalent to $(D MultiMesh.instanceCount). 3649 */ 3650 void multimeshAllocate(in RID multimesh, in long instances, in long transform_format, in long color_format, in long custom_data_format = 0) 3651 { 3652 checkClassBinding!(typeof(this))(); 3653 ptrcall!(void)(GDNativeClassBinding.multimeshAllocate, _godot_object, multimesh, instances, transform_format, color_format, custom_data_format); 3654 } 3655 /** 3656 Creates a new multimesh on the VisualServer and returns an $(D RID) handle. This RID will be used in all `multimesh_*` VisualServer functions. 3657 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 3658 To place in a scene, attach this multimesh to an instance using $(D instanceSetBase) using the returned RID. 3659 */ 3660 RID multimeshCreate() 3661 { 3662 checkClassBinding!(typeof(this))(); 3663 return ptrcall!(RID)(GDNativeClassBinding.multimeshCreate, _godot_object); 3664 } 3665 /** 3666 Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh. 3667 */ 3668 AABB multimeshGetAabb(in RID multimesh) const 3669 { 3670 checkClassBinding!(typeof(this))(); 3671 return ptrcall!(AABB)(GDNativeClassBinding.multimeshGetAabb, _godot_object, multimesh); 3672 } 3673 /** 3674 Returns the number of instances allocated for this multimesh. 3675 */ 3676 long multimeshGetInstanceCount(in RID multimesh) const 3677 { 3678 checkClassBinding!(typeof(this))(); 3679 return ptrcall!(long)(GDNativeClassBinding.multimeshGetInstanceCount, _godot_object, multimesh); 3680 } 3681 /** 3682 Returns the RID of the mesh that will be used in drawing this multimesh. 3683 */ 3684 RID multimeshGetMesh(in RID multimesh) const 3685 { 3686 checkClassBinding!(typeof(this))(); 3687 return ptrcall!(RID)(GDNativeClassBinding.multimeshGetMesh, _godot_object, multimesh); 3688 } 3689 /** 3690 Returns the number of visible instances for this multimesh. 3691 */ 3692 long multimeshGetVisibleInstances(in RID multimesh) const 3693 { 3694 checkClassBinding!(typeof(this))(); 3695 return ptrcall!(long)(GDNativeClassBinding.multimeshGetVisibleInstances, _godot_object, multimesh); 3696 } 3697 /** 3698 Returns the color by which the specified instance will be modulated. 3699 */ 3700 Color multimeshInstanceGetColor(in RID multimesh, in long index) const 3701 { 3702 checkClassBinding!(typeof(this))(); 3703 return ptrcall!(Color)(GDNativeClassBinding.multimeshInstanceGetColor, _godot_object, multimesh, index); 3704 } 3705 /** 3706 Returns the custom data associated with the specified instance. 3707 */ 3708 Color multimeshInstanceGetCustomData(in RID multimesh, in long index) const 3709 { 3710 checkClassBinding!(typeof(this))(); 3711 return ptrcall!(Color)(GDNativeClassBinding.multimeshInstanceGetCustomData, _godot_object, multimesh, index); 3712 } 3713 /** 3714 Returns the $(D Transform) of the specified instance. 3715 */ 3716 Transform multimeshInstanceGetTransform(in RID multimesh, in long index) const 3717 { 3718 checkClassBinding!(typeof(this))(); 3719 return ptrcall!(Transform)(GDNativeClassBinding.multimeshInstanceGetTransform, _godot_object, multimesh, index); 3720 } 3721 /** 3722 Returns the $(D Transform2D) of the specified instance. For use when the multimesh is set to use 2D transforms. 3723 */ 3724 Transform2D multimeshInstanceGetTransform2d(in RID multimesh, in long index) const 3725 { 3726 checkClassBinding!(typeof(this))(); 3727 return ptrcall!(Transform2D)(GDNativeClassBinding.multimeshInstanceGetTransform2d, _godot_object, multimesh, index); 3728 } 3729 /** 3730 Sets the color by which this instance will be modulated. Equivalent to $(D MultiMesh.setInstanceColor). 3731 */ 3732 void multimeshInstanceSetColor(in RID multimesh, in long index, in Color color) 3733 { 3734 checkClassBinding!(typeof(this))(); 3735 ptrcall!(void)(GDNativeClassBinding.multimeshInstanceSetColor, _godot_object, multimesh, index, color); 3736 } 3737 /** 3738 Sets the custom data for this instance. Custom data is passed as a $(D Color), but is interpreted as a `vec4` in the shader. Equivalent to $(D MultiMesh.setInstanceCustomData). 3739 */ 3740 void multimeshInstanceSetCustomData(in RID multimesh, in long index, in Color custom_data) 3741 { 3742 checkClassBinding!(typeof(this))(); 3743 ptrcall!(void)(GDNativeClassBinding.multimeshInstanceSetCustomData, _godot_object, multimesh, index, custom_data); 3744 } 3745 /** 3746 Sets the $(D Transform) for this instance. Equivalent to $(D MultiMesh.setInstanceTransform). 3747 */ 3748 void multimeshInstanceSetTransform(in RID multimesh, in long index, in Transform transform) 3749 { 3750 checkClassBinding!(typeof(this))(); 3751 ptrcall!(void)(GDNativeClassBinding.multimeshInstanceSetTransform, _godot_object, multimesh, index, transform); 3752 } 3753 /** 3754 Sets the $(D Transform2D) for this instance. For use when multimesh is used in 2D. Equivalent to $(D MultiMesh.setInstanceTransform2d). 3755 */ 3756 void multimeshInstanceSetTransform2d(in RID multimesh, in long index, in Transform2D transform) 3757 { 3758 checkClassBinding!(typeof(this))(); 3759 ptrcall!(void)(GDNativeClassBinding.multimeshInstanceSetTransform2d, _godot_object, multimesh, index, transform); 3760 } 3761 /** 3762 Sets all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative. 3763 3764 All data is packed in one large float array. An array may look like this: Transform for instance 1, color data for instance 1, custom data for instance 1, transform for instance 2, color data for instance 2, etc. 3765 3766 $(D Transform) is stored as 12 floats, $(D Transform2D) is stored as 8 floats, `COLOR_8BIT` / `CUSTOM_DATA_8BIT` is stored as 1 float (4 bytes as is) and `COLOR_FLOAT` / `CUSTOM_DATA_FLOAT` is stored as 4 floats. 3767 */ 3768 void multimeshSetAsBulkArray(in RID multimesh, in PoolRealArray array) 3769 { 3770 checkClassBinding!(typeof(this))(); 3771 ptrcall!(void)(GDNativeClassBinding.multimeshSetAsBulkArray, _godot_object, multimesh, array); 3772 } 3773 /** 3774 Sets the mesh to be drawn by the multimesh. Equivalent to $(D MultiMesh.mesh). 3775 */ 3776 void multimeshSetMesh(in RID multimesh, in RID mesh) 3777 { 3778 checkClassBinding!(typeof(this))(); 3779 ptrcall!(void)(GDNativeClassBinding.multimeshSetMesh, _godot_object, multimesh, mesh); 3780 } 3781 /** 3782 Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to $(D MultiMesh.visibleInstanceCount). 3783 */ 3784 void multimeshSetVisibleInstances(in RID multimesh, in long visible) 3785 { 3786 checkClassBinding!(typeof(this))(); 3787 ptrcall!(void)(GDNativeClassBinding.multimeshSetVisibleInstances, _godot_object, multimesh, visible); 3788 } 3789 /** 3790 Creates a new omni light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most `light_*` VisualServer functions. 3791 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 3792 To place in a scene, attach this omni light to an instance using $(D instanceSetBase) using the returned RID. 3793 */ 3794 RID omniLightCreate() 3795 { 3796 checkClassBinding!(typeof(this))(); 3797 return ptrcall!(RID)(GDNativeClassBinding.omniLightCreate, _godot_object); 3798 } 3799 /** 3800 Creates a particle system and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `particles_*` VisualServer functions. 3801 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 3802 To place in a scene, attach these particles to an instance using $(D instanceSetBase) using the returned RID. 3803 */ 3804 RID particlesCreate() 3805 { 3806 checkClassBinding!(typeof(this))(); 3807 return ptrcall!(RID)(GDNativeClassBinding.particlesCreate, _godot_object); 3808 } 3809 /** 3810 Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to $(D Particles.captureAabb). 3811 */ 3812 AABB particlesGetCurrentAabb(in RID particles) 3813 { 3814 checkClassBinding!(typeof(this))(); 3815 return ptrcall!(AABB)(GDNativeClassBinding.particlesGetCurrentAabb, _godot_object, particles); 3816 } 3817 /** 3818 Returns `true` if particles are currently set to emitting. 3819 */ 3820 bool particlesGetEmitting(in RID particles) 3821 { 3822 checkClassBinding!(typeof(this))(); 3823 return ptrcall!(bool)(GDNativeClassBinding.particlesGetEmitting, _godot_object, particles); 3824 } 3825 /** 3826 Returns `true` if particles are not emitting and particles are set to inactive. 3827 */ 3828 bool particlesIsInactive(in RID particles) 3829 { 3830 checkClassBinding!(typeof(this))(); 3831 return ptrcall!(bool)(GDNativeClassBinding.particlesIsInactive, _godot_object, particles); 3832 } 3833 /** 3834 Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to $(D instancesCullAabb), $(D instancesCullConvex), or $(D instancesCullRay). 3835 */ 3836 void particlesRequestProcess(in RID particles) 3837 { 3838 checkClassBinding!(typeof(this))(); 3839 ptrcall!(void)(GDNativeClassBinding.particlesRequestProcess, _godot_object, particles); 3840 } 3841 /** 3842 Reset the particles on the next update. Equivalent to $(D Particles.restart). 3843 */ 3844 void particlesRestart(in RID particles) 3845 { 3846 checkClassBinding!(typeof(this))(); 3847 ptrcall!(void)(GDNativeClassBinding.particlesRestart, _godot_object, particles); 3848 } 3849 /** 3850 Sets the number of particles to be drawn and allocates the memory for them. Equivalent to $(D Particles.amount). 3851 */ 3852 void particlesSetAmount(in RID particles, in long amount) 3853 { 3854 checkClassBinding!(typeof(this))(); 3855 ptrcall!(void)(GDNativeClassBinding.particlesSetAmount, _godot_object, particles, amount); 3856 } 3857 /** 3858 Sets a custom axis-aligned bounding box for the particle system. Equivalent to $(D Particles.visibilityAabb). 3859 */ 3860 void particlesSetCustomAabb(in RID particles, in AABB aabb) 3861 { 3862 checkClassBinding!(typeof(this))(); 3863 ptrcall!(void)(GDNativeClassBinding.particlesSetCustomAabb, _godot_object, particles, aabb); 3864 } 3865 /** 3866 Sets the draw order of the particles to one of the named enums from $(D particlesdraworder). See $(D particlesdraworder) for options. Equivalent to $(D Particles.drawOrder). 3867 */ 3868 void particlesSetDrawOrder(in RID particles, in long order) 3869 { 3870 checkClassBinding!(typeof(this))(); 3871 ptrcall!(void)(GDNativeClassBinding.particlesSetDrawOrder, _godot_object, particles, order); 3872 } 3873 /** 3874 Sets the mesh to be used for the specified draw pass. Equivalent to $(D Particles.drawPass1), $(D Particles.drawPass2), $(D Particles.drawPass3), and $(D Particles.drawPass4). 3875 */ 3876 void particlesSetDrawPassMesh(in RID particles, in long pass, in RID mesh) 3877 { 3878 checkClassBinding!(typeof(this))(); 3879 ptrcall!(void)(GDNativeClassBinding.particlesSetDrawPassMesh, _godot_object, particles, pass, mesh); 3880 } 3881 /** 3882 Sets the number of draw passes to use. Equivalent to $(D Particles.drawPasses). 3883 */ 3884 void particlesSetDrawPasses(in RID particles, in long count) 3885 { 3886 checkClassBinding!(typeof(this))(); 3887 ptrcall!(void)(GDNativeClassBinding.particlesSetDrawPasses, _godot_object, particles, count); 3888 } 3889 /** 3890 Sets the $(D Transform) that will be used by the particles when they first emit. 3891 */ 3892 void particlesSetEmissionTransform(in RID particles, in Transform transform) 3893 { 3894 checkClassBinding!(typeof(this))(); 3895 ptrcall!(void)(GDNativeClassBinding.particlesSetEmissionTransform, _godot_object, particles, transform); 3896 } 3897 /** 3898 If `true`, particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to $(D Particles.emitting). 3899 */ 3900 void particlesSetEmitting(in RID particles, in bool emitting) 3901 { 3902 checkClassBinding!(typeof(this))(); 3903 ptrcall!(void)(GDNativeClassBinding.particlesSetEmitting, _godot_object, particles, emitting); 3904 } 3905 /** 3906 Sets the explosiveness ratio. Equivalent to $(D Particles.explosiveness). 3907 */ 3908 void particlesSetExplosivenessRatio(in RID particles, in double ratio) 3909 { 3910 checkClassBinding!(typeof(this))(); 3911 ptrcall!(void)(GDNativeClassBinding.particlesSetExplosivenessRatio, _godot_object, particles, ratio); 3912 } 3913 /** 3914 Sets the frame rate that the particle system rendering will be fixed to. Equivalent to $(D Particles.fixedFps). 3915 */ 3916 void particlesSetFixedFps(in RID particles, in long fps) 3917 { 3918 checkClassBinding!(typeof(this))(); 3919 ptrcall!(void)(GDNativeClassBinding.particlesSetFixedFps, _godot_object, particles, fps); 3920 } 3921 /** 3922 If `true`, uses fractional delta which smooths the movement of the particles. Equivalent to $(D Particles.fractDelta). 3923 */ 3924 void particlesSetFractionalDelta(in RID particles, in bool enable) 3925 { 3926 checkClassBinding!(typeof(this))(); 3927 ptrcall!(void)(GDNativeClassBinding.particlesSetFractionalDelta, _godot_object, particles, enable); 3928 } 3929 /** 3930 Sets the lifetime of each particle in the system. Equivalent to $(D Particles.lifetime). 3931 */ 3932 void particlesSetLifetime(in RID particles, in double lifetime) 3933 { 3934 checkClassBinding!(typeof(this))(); 3935 ptrcall!(void)(GDNativeClassBinding.particlesSetLifetime, _godot_object, particles, lifetime); 3936 } 3937 /** 3938 If `true`, particles will emit once and then stop. Equivalent to $(D Particles.oneShot). 3939 */ 3940 void particlesSetOneShot(in RID particles, in bool one_shot) 3941 { 3942 checkClassBinding!(typeof(this))(); 3943 ptrcall!(void)(GDNativeClassBinding.particlesSetOneShot, _godot_object, particles, one_shot); 3944 } 3945 /** 3946 Sets the preprocess time for the particles' animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to $(D Particles.preprocess). 3947 */ 3948 void particlesSetPreProcessTime(in RID particles, in double time) 3949 { 3950 checkClassBinding!(typeof(this))(); 3951 ptrcall!(void)(GDNativeClassBinding.particlesSetPreProcessTime, _godot_object, particles, time); 3952 } 3953 /** 3954 Sets the material for processing the particles. Note: this is not the material used to draw the materials. Equivalent to $(D Particles.processMaterial). 3955 */ 3956 void particlesSetProcessMaterial(in RID particles, in RID material) 3957 { 3958 checkClassBinding!(typeof(this))(); 3959 ptrcall!(void)(GDNativeClassBinding.particlesSetProcessMaterial, _godot_object, particles, material); 3960 } 3961 /** 3962 Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to $(D Particles.randomness). 3963 */ 3964 void particlesSetRandomnessRatio(in RID particles, in double ratio) 3965 { 3966 checkClassBinding!(typeof(this))(); 3967 ptrcall!(void)(GDNativeClassBinding.particlesSetRandomnessRatio, _godot_object, particles, ratio); 3968 } 3969 /** 3970 Sets the speed scale of the particle system. Equivalent to $(D Particles.speedScale). 3971 */ 3972 void particlesSetSpeedScale(in RID particles, in double scale) 3973 { 3974 checkClassBinding!(typeof(this))(); 3975 ptrcall!(void)(GDNativeClassBinding.particlesSetSpeedScale, _godot_object, particles, scale); 3976 } 3977 /** 3978 If `true`, particles use local coordinates. If `false` they use global coordinates. Equivalent to $(D Particles.localCoords). 3979 */ 3980 void particlesSetUseLocalCoordinates(in RID particles, in bool enable) 3981 { 3982 checkClassBinding!(typeof(this))(); 3983 ptrcall!(void)(GDNativeClassBinding.particlesSetUseLocalCoordinates, _godot_object, particles, enable); 3984 } 3985 /** 3986 Creates a reflection probe and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `reflection_probe_*` VisualServer functions. 3987 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 3988 To place in a scene, attach this reflection probe to an instance using $(D instanceSetBase) using the returned RID. 3989 */ 3990 RID reflectionProbeCreate() 3991 { 3992 checkClassBinding!(typeof(this))(); 3993 return ptrcall!(RID)(GDNativeClassBinding.reflectionProbeCreate, _godot_object); 3994 } 3995 /** 3996 If `true`, reflections will ignore sky contribution. Equivalent to $(D ReflectionProbe.interiorEnable). 3997 */ 3998 void reflectionProbeSetAsInterior(in RID probe, in bool enable) 3999 { 4000 checkClassBinding!(typeof(this))(); 4001 ptrcall!(void)(GDNativeClassBinding.reflectionProbeSetAsInterior, _godot_object, probe, enable); 4002 } 4003 /** 4004 Sets the render cull mask for this reflection probe. Only instances with a matching cull mask will be rendered by this probe. Equivalent to $(D ReflectionProbe.cullMask). 4005 */ 4006 void reflectionProbeSetCullMask(in RID probe, in long layers) 4007 { 4008 checkClassBinding!(typeof(this))(); 4009 ptrcall!(void)(GDNativeClassBinding.reflectionProbeSetCullMask, _godot_object, probe, layers); 4010 } 4011 /** 4012 If `true`, uses box projection. This can make reflections look more correct in certain situations. Equivalent to $(D ReflectionProbe.boxProjection). 4013 */ 4014 void reflectionProbeSetEnableBoxProjection(in RID probe, in bool enable) 4015 { 4016 checkClassBinding!(typeof(this))(); 4017 ptrcall!(void)(GDNativeClassBinding.reflectionProbeSetEnableBoxProjection, _godot_object, probe, enable); 4018 } 4019 /** 4020 If `true`, computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to $(D ReflectionProbe.enableShadows). 4021 */ 4022 void reflectionProbeSetEnableShadows(in RID probe, in bool enable) 4023 { 4024 checkClassBinding!(typeof(this))(); 4025 ptrcall!(void)(GDNativeClassBinding.reflectionProbeSetEnableShadows, _godot_object, probe, enable); 4026 } 4027 /** 4028 Sets the size of the area that the reflection probe will capture. Equivalent to $(D ReflectionProbe.extents). 4029 */ 4030 void reflectionProbeSetExtents(in RID probe, in Vector3 extents) 4031 { 4032 checkClassBinding!(typeof(this))(); 4033 ptrcall!(void)(GDNativeClassBinding.reflectionProbeSetExtents, _godot_object, probe, extents); 4034 } 4035 /** 4036 Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to $(D ReflectionProbe.intensity). 4037 */ 4038 void reflectionProbeSetIntensity(in RID probe, in double intensity) 4039 { 4040 checkClassBinding!(typeof(this))(); 4041 ptrcall!(void)(GDNativeClassBinding.reflectionProbeSetIntensity, _godot_object, probe, intensity); 4042 } 4043 /** 4044 Sets the ambient light color for this reflection probe when set to interior mode. Equivalent to $(D ReflectionProbe.interiorAmbientColor). 4045 */ 4046 void reflectionProbeSetInteriorAmbient(in RID probe, in Color color) 4047 { 4048 checkClassBinding!(typeof(this))(); 4049 ptrcall!(void)(GDNativeClassBinding.reflectionProbeSetInteriorAmbient, _godot_object, probe, color); 4050 } 4051 /** 4052 Sets the energy multiplier for this reflection probes ambient light contribution when set to interior mode. Equivalent to $(D ReflectionProbe.interiorAmbientEnergy). 4053 */ 4054 void reflectionProbeSetInteriorAmbientEnergy(in RID probe, in double energy) 4055 { 4056 checkClassBinding!(typeof(this))(); 4057 ptrcall!(void)(GDNativeClassBinding.reflectionProbeSetInteriorAmbientEnergy, _godot_object, probe, energy); 4058 } 4059 /** 4060 Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to interior mode. Useful so that ambient light matches the color of the room. Equivalent to $(D ReflectionProbe.interiorAmbientContrib). 4061 */ 4062 void reflectionProbeSetInteriorAmbientProbeContribution(in RID probe, in double contrib) 4063 { 4064 checkClassBinding!(typeof(this))(); 4065 ptrcall!(void)(GDNativeClassBinding.reflectionProbeSetInteriorAmbientProbeContribution, _godot_object, probe, contrib); 4066 } 4067 /** 4068 Sets the max distance away from the probe an object can be before it is culled. Equivalent to $(D ReflectionProbe.maxDistance). 4069 */ 4070 void reflectionProbeSetMaxDistance(in RID probe, in double distance) 4071 { 4072 checkClassBinding!(typeof(this))(); 4073 ptrcall!(void)(GDNativeClassBinding.reflectionProbeSetMaxDistance, _godot_object, probe, distance); 4074 } 4075 /** 4076 Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to $(D ReflectionProbe.originOffset). 4077 */ 4078 void reflectionProbeSetOriginOffset(in RID probe, in Vector3 offset) 4079 { 4080 checkClassBinding!(typeof(this))(); 4081 ptrcall!(void)(GDNativeClassBinding.reflectionProbeSetOriginOffset, _godot_object, probe, offset); 4082 } 4083 /** 4084 Sets how often the reflection probe updates. Can either be once or every frame. See $(D reflectionprobeupdatemode) for options. 4085 */ 4086 void reflectionProbeSetUpdateMode(in RID probe, in long mode) 4087 { 4088 checkClassBinding!(typeof(this))(); 4089 ptrcall!(void)(GDNativeClassBinding.reflectionProbeSetUpdateMode, _godot_object, probe, mode); 4090 } 4091 /** 4092 Schedules a callback to the corresponding named `method` on `where` after a frame has been drawn. 4093 The callback method must use only 1 argument which will be called with `userdata`. 4094 */ 4095 void requestFrameDrawnCallback(VariantArg2)(GodotObject where, in String method, in VariantArg2 userdata) 4096 { 4097 checkClassBinding!(typeof(this))(); 4098 ptrcall!(void)(GDNativeClassBinding.requestFrameDrawnCallback, _godot_object, where, method, userdata); 4099 } 4100 /** 4101 Creates a scenario and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `scenario_*` VisualServer functions. 4102 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 4103 The scenario is the 3D world that all the visual instances exist in. 4104 */ 4105 RID scenarioCreate() 4106 { 4107 checkClassBinding!(typeof(this))(); 4108 return ptrcall!(RID)(GDNativeClassBinding.scenarioCreate, _godot_object); 4109 } 4110 /** 4111 Sets the $(D scenariodebugmode) for this scenario. See $(D scenariodebugmode) for options. 4112 */ 4113 void scenarioSetDebug(in RID scenario, in long debug_mode) 4114 { 4115 checkClassBinding!(typeof(this))(); 4116 ptrcall!(void)(GDNativeClassBinding.scenarioSetDebug, _godot_object, scenario, debug_mode); 4117 } 4118 /** 4119 Sets the environment that will be used with this scenario. 4120 */ 4121 void scenarioSetEnvironment(in RID scenario, in RID environment) 4122 { 4123 checkClassBinding!(typeof(this))(); 4124 ptrcall!(void)(GDNativeClassBinding.scenarioSetEnvironment, _godot_object, scenario, environment); 4125 } 4126 /** 4127 Sets the fallback environment to be used by this scenario. The fallback environment is used if no environment is set. Internally, this is used by the editor to provide a default environment. 4128 */ 4129 void scenarioSetFallbackEnvironment(in RID scenario, in RID environment) 4130 { 4131 checkClassBinding!(typeof(this))(); 4132 ptrcall!(void)(GDNativeClassBinding.scenarioSetFallbackEnvironment, _godot_object, scenario, environment); 4133 } 4134 /** 4135 Sets the size of the reflection atlas shared by all reflection probes in this scenario. 4136 */ 4137 void scenarioSetReflectionAtlasSize(in RID scenario, in long size, in long subdiv) 4138 { 4139 checkClassBinding!(typeof(this))(); 4140 ptrcall!(void)(GDNativeClassBinding.scenarioSetReflectionAtlasSize, _godot_object, scenario, size, subdiv); 4141 } 4142 /** 4143 Sets a boot image. The color defines the background color. If `scale` is `true`, the image will be scaled to fit the screen size. If `use_filter` is `true`, the image will be scaled with linear interpolation. If `use_filter` is `false`, the image will be scaled with nearest-neighbor interpolation. 4144 */ 4145 void setBootImage(Image image, in Color color, in bool scale, in bool use_filter = true) 4146 { 4147 checkClassBinding!(typeof(this))(); 4148 ptrcall!(void)(GDNativeClassBinding.setBootImage, _godot_object, image, color, scale, use_filter); 4149 } 4150 /** 4151 If `true`, the engine will generate wireframes for use with the wireframe debug mode. 4152 */ 4153 void setDebugGenerateWireframes(in bool generate) 4154 { 4155 checkClassBinding!(typeof(this))(); 4156 ptrcall!(void)(GDNativeClassBinding.setDebugGenerateWireframes, _godot_object, generate); 4157 } 4158 /** 4159 Sets the default clear color which is used when a specific clear color has not been selected. 4160 */ 4161 void setDefaultClearColor(in Color color) 4162 { 4163 checkClassBinding!(typeof(this))(); 4164 ptrcall!(void)(GDNativeClassBinding.setDefaultClearColor, _godot_object, color); 4165 } 4166 /** 4167 4168 */ 4169 void setRenderLoopEnabled(in bool enabled) 4170 { 4171 checkClassBinding!(typeof(this))(); 4172 ptrcall!(void)(GDNativeClassBinding.setRenderLoopEnabled, _godot_object, enabled); 4173 } 4174 /** 4175 Sets the scale to apply to the passage of time for the shaders' `TIME` builtin. 4176 The default value is `1.0`, which means `TIME` will count the real time as it goes by, without narrowing or stretching it. 4177 */ 4178 void setShaderTimeScale(in double scale) 4179 { 4180 checkClassBinding!(typeof(this))(); 4181 ptrcall!(void)(GDNativeClassBinding.setShaderTimeScale, _godot_object, scale); 4182 } 4183 /** 4184 Creates an empty shader and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `shader_*` VisualServer functions. 4185 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 4186 */ 4187 RID shaderCreate() 4188 { 4189 checkClassBinding!(typeof(this))(); 4190 return ptrcall!(RID)(GDNativeClassBinding.shaderCreate, _godot_object); 4191 } 4192 /** 4193 Returns a shader's code. 4194 */ 4195 String shaderGetCode(in RID shader) const 4196 { 4197 checkClassBinding!(typeof(this))(); 4198 return ptrcall!(String)(GDNativeClassBinding.shaderGetCode, _godot_object, shader); 4199 } 4200 /** 4201 Returns a default texture from a shader searched by name. 4202 */ 4203 RID shaderGetDefaultTextureParam(in RID shader, in String name) const 4204 { 4205 checkClassBinding!(typeof(this))(); 4206 return ptrcall!(RID)(GDNativeClassBinding.shaderGetDefaultTextureParam, _godot_object, shader, name); 4207 } 4208 /** 4209 Returns the parameters of a shader. 4210 */ 4211 Array shaderGetParamList(in RID shader) const 4212 { 4213 checkClassBinding!(typeof(this))(); 4214 return ptrcall!(Array)(GDNativeClassBinding.shaderGetParamList, _godot_object, shader); 4215 } 4216 /** 4217 Sets a shader's code. 4218 */ 4219 void shaderSetCode(in RID shader, in String code) 4220 { 4221 checkClassBinding!(typeof(this))(); 4222 ptrcall!(void)(GDNativeClassBinding.shaderSetCode, _godot_object, shader, code); 4223 } 4224 /** 4225 Sets a shader's default texture. Overwrites the texture given by name. 4226 */ 4227 void shaderSetDefaultTextureParam(in RID shader, in String name, in RID texture) 4228 { 4229 checkClassBinding!(typeof(this))(); 4230 ptrcall!(void)(GDNativeClassBinding.shaderSetDefaultTextureParam, _godot_object, shader, name, texture); 4231 } 4232 /** 4233 Allocates the GPU buffers for this skeleton. 4234 */ 4235 void skeletonAllocate(in RID skeleton, in long bones, in bool is_2d_skeleton = false) 4236 { 4237 checkClassBinding!(typeof(this))(); 4238 ptrcall!(void)(GDNativeClassBinding.skeletonAllocate, _godot_object, skeleton, bones, is_2d_skeleton); 4239 } 4240 /** 4241 Returns the $(D Transform) set for a specific bone of this skeleton. 4242 */ 4243 Transform skeletonBoneGetTransform(in RID skeleton, in long bone) const 4244 { 4245 checkClassBinding!(typeof(this))(); 4246 return ptrcall!(Transform)(GDNativeClassBinding.skeletonBoneGetTransform, _godot_object, skeleton, bone); 4247 } 4248 /** 4249 Returns the $(D Transform2D) set for a specific bone of this skeleton. 4250 */ 4251 Transform2D skeletonBoneGetTransform2d(in RID skeleton, in long bone) const 4252 { 4253 checkClassBinding!(typeof(this))(); 4254 return ptrcall!(Transform2D)(GDNativeClassBinding.skeletonBoneGetTransform2d, _godot_object, skeleton, bone); 4255 } 4256 /** 4257 Sets the $(D Transform) for a specific bone of this skeleton. 4258 */ 4259 void skeletonBoneSetTransform(in RID skeleton, in long bone, in Transform transform) 4260 { 4261 checkClassBinding!(typeof(this))(); 4262 ptrcall!(void)(GDNativeClassBinding.skeletonBoneSetTransform, _godot_object, skeleton, bone, transform); 4263 } 4264 /** 4265 Sets the $(D Transform2D) for a specific bone of this skeleton. 4266 */ 4267 void skeletonBoneSetTransform2d(in RID skeleton, in long bone, in Transform2D transform) 4268 { 4269 checkClassBinding!(typeof(this))(); 4270 ptrcall!(void)(GDNativeClassBinding.skeletonBoneSetTransform2d, _godot_object, skeleton, bone, transform); 4271 } 4272 /** 4273 Creates a skeleton and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `skeleton_*` VisualServer functions. 4274 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 4275 */ 4276 RID skeletonCreate() 4277 { 4278 checkClassBinding!(typeof(this))(); 4279 return ptrcall!(RID)(GDNativeClassBinding.skeletonCreate, _godot_object); 4280 } 4281 /** 4282 Returns the number of bones allocated for this skeleton. 4283 */ 4284 long skeletonGetBoneCount(in RID skeleton) const 4285 { 4286 checkClassBinding!(typeof(this))(); 4287 return ptrcall!(long)(GDNativeClassBinding.skeletonGetBoneCount, _godot_object, skeleton); 4288 } 4289 /** 4290 Creates an empty sky and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `sky_*` VisualServer functions. 4291 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 4292 */ 4293 RID skyCreate() 4294 { 4295 checkClassBinding!(typeof(this))(); 4296 return ptrcall!(RID)(GDNativeClassBinding.skyCreate, _godot_object); 4297 } 4298 /** 4299 Sets a sky's texture. 4300 */ 4301 void skySetTexture(in RID sky, in RID cube_map, in long radiance_size) 4302 { 4303 checkClassBinding!(typeof(this))(); 4304 ptrcall!(void)(GDNativeClassBinding.skySetTexture, _godot_object, sky, cube_map, radiance_size); 4305 } 4306 /** 4307 Creates a spot light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most `light_*` VisualServer functions. 4308 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 4309 To place in a scene, attach this spot light to an instance using $(D instanceSetBase) using the returned RID. 4310 */ 4311 RID spotLightCreate() 4312 { 4313 checkClassBinding!(typeof(this))(); 4314 return ptrcall!(RID)(GDNativeClassBinding.spotLightCreate, _godot_object); 4315 } 4316 /** 4317 Not implemented in Godot 3.x. 4318 */ 4319 void sync() 4320 { 4321 checkClassBinding!(typeof(this))(); 4322 ptrcall!(void)(GDNativeClassBinding.sync, _godot_object); 4323 } 4324 /** 4325 Allocates the GPU memory for the texture. 4326 */ 4327 void textureAllocate(in RID texture, in long width, in long height, in long depth_3d, in long format, in long type, in long flags = 7) 4328 { 4329 checkClassBinding!(typeof(this))(); 4330 ptrcall!(void)(GDNativeClassBinding.textureAllocate, _godot_object, texture, width, height, depth_3d, format, type, flags); 4331 } 4332 /** 4333 Binds the texture to a texture slot. 4334 */ 4335 void textureBind(in RID texture, in long number) 4336 { 4337 checkClassBinding!(typeof(this))(); 4338 ptrcall!(void)(GDNativeClassBinding.textureBind, _godot_object, texture, number); 4339 } 4340 /** 4341 Creates an empty texture and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `texture_*` VisualServer functions. 4342 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 4343 */ 4344 RID textureCreate() 4345 { 4346 checkClassBinding!(typeof(this))(); 4347 return ptrcall!(RID)(GDNativeClassBinding.textureCreate, _godot_object); 4348 } 4349 /** 4350 Creates a texture, allocates the space for an image, and fills in the image. 4351 */ 4352 RID textureCreateFromImage(Image image, in long flags = 7) 4353 { 4354 checkClassBinding!(typeof(this))(); 4355 return ptrcall!(RID)(GDNativeClassBinding.textureCreateFromImage, _godot_object, image, flags); 4356 } 4357 /** 4358 Returns a list of all the textures and their information. 4359 */ 4360 Array textureDebugUsage() 4361 { 4362 checkClassBinding!(typeof(this))(); 4363 return ptrcall!(Array)(GDNativeClassBinding.textureDebugUsage, _godot_object); 4364 } 4365 /** 4366 Returns a copy of a texture's image unless it's a CubeMap, in which case it returns the $(D RID) of the image at one of the cubes sides. 4367 */ 4368 Ref!Image textureGetData(in RID texture, in long cube_side = 0) const 4369 { 4370 checkClassBinding!(typeof(this))(); 4371 return ptrcall!(Image)(GDNativeClassBinding.textureGetData, _godot_object, texture, cube_side); 4372 } 4373 /** 4374 Returns the depth of the texture. 4375 */ 4376 long textureGetDepth(in RID texture) const 4377 { 4378 checkClassBinding!(typeof(this))(); 4379 return ptrcall!(long)(GDNativeClassBinding.textureGetDepth, _godot_object, texture); 4380 } 4381 /** 4382 Returns the flags of a texture. 4383 */ 4384 long textureGetFlags(in RID texture) const 4385 { 4386 checkClassBinding!(typeof(this))(); 4387 return ptrcall!(long)(GDNativeClassBinding.textureGetFlags, _godot_object, texture); 4388 } 4389 /** 4390 Returns the format of the texture's image. 4391 */ 4392 Image.Format textureGetFormat(in RID texture) const 4393 { 4394 checkClassBinding!(typeof(this))(); 4395 return ptrcall!(Image.Format)(GDNativeClassBinding.textureGetFormat, _godot_object, texture); 4396 } 4397 /** 4398 Returns the texture's height. 4399 */ 4400 long textureGetHeight(in RID texture) const 4401 { 4402 checkClassBinding!(typeof(this))(); 4403 return ptrcall!(long)(GDNativeClassBinding.textureGetHeight, _godot_object, texture); 4404 } 4405 /** 4406 Returns the texture's path. 4407 */ 4408 String textureGetPath(in RID texture) const 4409 { 4410 checkClassBinding!(typeof(this))(); 4411 return ptrcall!(String)(GDNativeClassBinding.textureGetPath, _godot_object, texture); 4412 } 4413 /** 4414 Returns the opengl id of the texture's image. 4415 */ 4416 long textureGetTexid(in RID texture) const 4417 { 4418 checkClassBinding!(typeof(this))(); 4419 return ptrcall!(long)(GDNativeClassBinding.textureGetTexid, _godot_object, texture); 4420 } 4421 /** 4422 Returns the type of the texture, can be any of the $(D texturetype). 4423 */ 4424 VisualServer.TextureType textureGetType(in RID texture) const 4425 { 4426 checkClassBinding!(typeof(this))(); 4427 return ptrcall!(VisualServer.TextureType)(GDNativeClassBinding.textureGetType, _godot_object, texture); 4428 } 4429 /** 4430 Returns the texture's width. 4431 */ 4432 long textureGetWidth(in RID texture) const 4433 { 4434 checkClassBinding!(typeof(this))(); 4435 return ptrcall!(long)(GDNativeClassBinding.textureGetWidth, _godot_object, texture); 4436 } 4437 /** 4438 Sets the texture's image data. If it's a CubeMap, it sets the image data at a cube side. 4439 */ 4440 void textureSetData(in RID texture, Image image, in long layer = 0) 4441 { 4442 checkClassBinding!(typeof(this))(); 4443 ptrcall!(void)(GDNativeClassBinding.textureSetData, _godot_object, texture, image, layer); 4444 } 4445 /** 4446 Sets a part of the data for a texture. Warning: this function calls the underlying graphics API directly and may corrupt your texture if used improperly. 4447 */ 4448 void textureSetDataPartial(in RID texture, Image image, in long src_x, in long src_y, in long src_w, in long src_h, in long dst_x, in long dst_y, in long dst_mip, in long layer = 0) 4449 { 4450 checkClassBinding!(typeof(this))(); 4451 ptrcall!(void)(GDNativeClassBinding.textureSetDataPartial, _godot_object, texture, image, src_x, src_y, src_w, src_h, dst_x, dst_y, dst_mip, layer); 4452 } 4453 /** 4454 Sets the texture's flags. See $(D textureflags) for options. 4455 */ 4456 void textureSetFlags(in RID texture, in long flags) 4457 { 4458 checkClassBinding!(typeof(this))(); 4459 ptrcall!(void)(GDNativeClassBinding.textureSetFlags, _godot_object, texture, flags); 4460 } 4461 /** 4462 Sets the texture's path. 4463 */ 4464 void textureSetPath(in RID texture, in String path) 4465 { 4466 checkClassBinding!(typeof(this))(); 4467 ptrcall!(void)(GDNativeClassBinding.textureSetPath, _godot_object, texture, path); 4468 } 4469 /** 4470 If `true`, sets internal processes to shrink all image data to half the size. 4471 */ 4472 void textureSetShrinkAllX2OnSetData(in bool shrink) 4473 { 4474 checkClassBinding!(typeof(this))(); 4475 ptrcall!(void)(GDNativeClassBinding.textureSetShrinkAllX2OnSetData, _godot_object, shrink); 4476 } 4477 /** 4478 Resizes the texture to the specified dimensions. 4479 */ 4480 void textureSetSizeOverride(in RID texture, in long width, in long height, in long depth) 4481 { 4482 checkClassBinding!(typeof(this))(); 4483 ptrcall!(void)(GDNativeClassBinding.textureSetSizeOverride, _godot_object, texture, width, height, depth); 4484 } 4485 /** 4486 If `true`, the image will be stored in the texture's images array if overwritten. 4487 */ 4488 void texturesKeepOriginal(in bool enable) 4489 { 4490 checkClassBinding!(typeof(this))(); 4491 ptrcall!(void)(GDNativeClassBinding.texturesKeepOriginal, _godot_object, enable); 4492 } 4493 /** 4494 Sets a viewport's camera. 4495 */ 4496 void viewportAttachCamera(in RID viewport, in RID camera) 4497 { 4498 checkClassBinding!(typeof(this))(); 4499 ptrcall!(void)(GDNativeClassBinding.viewportAttachCamera, _godot_object, viewport, camera); 4500 } 4501 /** 4502 Sets a viewport's canvas. 4503 */ 4504 void viewportAttachCanvas(in RID viewport, in RID canvas) 4505 { 4506 checkClassBinding!(typeof(this))(); 4507 ptrcall!(void)(GDNativeClassBinding.viewportAttachCanvas, _godot_object, viewport, canvas); 4508 } 4509 /** 4510 Copies viewport to a region of the screen specified by `rect`. If $(D Viewport.renderDirectToScreen) is `true`, then 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. 4511 For example, you can set the root viewport to not render at all with the following code: 4512 4513 4514 func _ready(): 4515 get_viewport().set_attach_to_screen_rect(Rect2()) 4516 $Viewport.set_attach_to_screen_rect(Rect2(0, 0, 600, 600)) 4517 4518 4519 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 a further optimization see, $(D viewportSetRenderDirectToScreen). 4520 */ 4521 void viewportAttachToScreen(in RID viewport, in Rect2 rect = Rect2(0, 0, 0, 0), in long screen = 0) 4522 { 4523 checkClassBinding!(typeof(this))(); 4524 ptrcall!(void)(GDNativeClassBinding.viewportAttachToScreen, _godot_object, viewport, rect, screen); 4525 } 4526 /** 4527 Creates an empty viewport and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all `viewport_*` VisualServer functions. 4528 Once finished with your RID, you will want to free the RID using the VisualServer's $(D freeRid) static method. 4529 */ 4530 RID viewportCreate() 4531 { 4532 checkClassBinding!(typeof(this))(); 4533 return ptrcall!(RID)(GDNativeClassBinding.viewportCreate, _godot_object); 4534 } 4535 /** 4536 Detaches the viewport from the screen. 4537 */ 4538 void viewportDetach(in RID viewport) 4539 { 4540 checkClassBinding!(typeof(this))(); 4541 ptrcall!(void)(GDNativeClassBinding.viewportDetach, _godot_object, viewport); 4542 } 4543 /** 4544 Returns a viewport's render information. For options, see the $(D viewportrenderinfo) constants. 4545 */ 4546 long viewportGetRenderInfo(in RID viewport, in long info) 4547 { 4548 checkClassBinding!(typeof(this))(); 4549 return ptrcall!(long)(GDNativeClassBinding.viewportGetRenderInfo, _godot_object, viewport, info); 4550 } 4551 /** 4552 Returns the viewport's last rendered frame. 4553 */ 4554 RID viewportGetTexture(in RID viewport) const 4555 { 4556 checkClassBinding!(typeof(this))(); 4557 return ptrcall!(RID)(GDNativeClassBinding.viewportGetTexture, _godot_object, viewport); 4558 } 4559 /** 4560 Detaches a viewport from a canvas and vice versa. 4561 */ 4562 void viewportRemoveCanvas(in RID viewport, in RID canvas) 4563 { 4564 checkClassBinding!(typeof(this))(); 4565 ptrcall!(void)(GDNativeClassBinding.viewportRemoveCanvas, _godot_object, viewport, canvas); 4566 } 4567 /** 4568 If `true`, sets the viewport active, else sets it inactive. 4569 */ 4570 void viewportSetActive(in RID viewport, in bool active) 4571 { 4572 checkClassBinding!(typeof(this))(); 4573 ptrcall!(void)(GDNativeClassBinding.viewportSetActive, _godot_object, viewport, active); 4574 } 4575 /** 4576 Sets the stacking order for a viewport's canvas. 4577 `layer` is the actual canvas layer, while `sublayer` specifies the stacking order of the canvas among those in the same layer. 4578 */ 4579 void viewportSetCanvasStacking(in RID viewport, in RID canvas, in long layer, in long sublayer) 4580 { 4581 checkClassBinding!(typeof(this))(); 4582 ptrcall!(void)(GDNativeClassBinding.viewportSetCanvasStacking, _godot_object, viewport, canvas, layer, sublayer); 4583 } 4584 /** 4585 Sets the transformation of a viewport's canvas. 4586 */ 4587 void viewportSetCanvasTransform(in RID viewport, in RID canvas, in Transform2D offset) 4588 { 4589 checkClassBinding!(typeof(this))(); 4590 ptrcall!(void)(GDNativeClassBinding.viewportSetCanvasTransform, _godot_object, viewport, canvas, offset); 4591 } 4592 /** 4593 Sets the clear mode of a viewport. See $(D viewportclearmode) for options. 4594 */ 4595 void viewportSetClearMode(in RID viewport, in long clear_mode) 4596 { 4597 checkClassBinding!(typeof(this))(); 4598 ptrcall!(void)(GDNativeClassBinding.viewportSetClearMode, _godot_object, viewport, clear_mode); 4599 } 4600 /** 4601 Sets the debug draw mode of a viewport. See $(D viewportdebugdraw) for options. 4602 */ 4603 void viewportSetDebugDraw(in RID viewport, in long draw) 4604 { 4605 checkClassBinding!(typeof(this))(); 4606 ptrcall!(void)(GDNativeClassBinding.viewportSetDebugDraw, _godot_object, viewport, draw); 4607 } 4608 /** 4609 If `true`, a viewport's 3D rendering is disabled. 4610 */ 4611 void viewportSetDisable3d(in RID viewport, in bool disabled) 4612 { 4613 checkClassBinding!(typeof(this))(); 4614 ptrcall!(void)(GDNativeClassBinding.viewportSetDisable3d, _godot_object, viewport, disabled); 4615 } 4616 /** 4617 If `true`, rendering of a viewport's environment is disabled. 4618 */ 4619 void viewportSetDisableEnvironment(in RID viewport, in bool disabled) 4620 { 4621 checkClassBinding!(typeof(this))(); 4622 ptrcall!(void)(GDNativeClassBinding.viewportSetDisableEnvironment, _godot_object, viewport, disabled); 4623 } 4624 /** 4625 Sets the viewport's global transformation matrix. 4626 */ 4627 void viewportSetGlobalCanvasTransform(in RID viewport, in Transform2D transform) 4628 { 4629 checkClassBinding!(typeof(this))(); 4630 ptrcall!(void)(GDNativeClassBinding.viewportSetGlobalCanvasTransform, _godot_object, viewport, transform); 4631 } 4632 /** 4633 If `true`, the viewport renders to hdr. 4634 */ 4635 void viewportSetHdr(in RID viewport, in bool enabled) 4636 { 4637 checkClassBinding!(typeof(this))(); 4638 ptrcall!(void)(GDNativeClassBinding.viewportSetHdr, _godot_object, viewport, enabled); 4639 } 4640 /** 4641 If `true`, the viewport's canvas is not rendered. 4642 */ 4643 void viewportSetHideCanvas(in RID viewport, in bool hidden) 4644 { 4645 checkClassBinding!(typeof(this))(); 4646 ptrcall!(void)(GDNativeClassBinding.viewportSetHideCanvas, _godot_object, viewport, hidden); 4647 } 4648 /** 4649 Currently unimplemented in Godot 3.x. 4650 */ 4651 void viewportSetHideScenario(in RID viewport, in bool hidden) 4652 { 4653 checkClassBinding!(typeof(this))(); 4654 ptrcall!(void)(GDNativeClassBinding.viewportSetHideScenario, _godot_object, viewport, hidden); 4655 } 4656 /** 4657 Sets the anti-aliasing mode. See $(D viewportmsaa) for options. 4658 */ 4659 void viewportSetMsaa(in RID viewport, in long msaa) 4660 { 4661 checkClassBinding!(typeof(this))(); 4662 ptrcall!(void)(GDNativeClassBinding.viewportSetMsaa, _godot_object, viewport, msaa); 4663 } 4664 /** 4665 Sets the viewport's parent to another viewport. 4666 */ 4667 void viewportSetParentViewport(in RID viewport, in RID parent_viewport) 4668 { 4669 checkClassBinding!(typeof(this))(); 4670 ptrcall!(void)(GDNativeClassBinding.viewportSetParentViewport, _godot_object, viewport, parent_viewport); 4671 } 4672 /** 4673 If `true`, render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the `SCREEN_TEXTURE`. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size. 4674 */ 4675 void viewportSetRenderDirectToScreen(in RID viewport, in bool enabled) 4676 { 4677 checkClassBinding!(typeof(this))(); 4678 ptrcall!(void)(GDNativeClassBinding.viewportSetRenderDirectToScreen, _godot_object, viewport, enabled); 4679 } 4680 /** 4681 Sets a viewport's scenario. 4682 The scenario contains information about the $(D scenariodebugmode), environment information, reflection atlas etc. 4683 */ 4684 void viewportSetScenario(in RID viewport, in RID scenario) 4685 { 4686 checkClassBinding!(typeof(this))(); 4687 ptrcall!(void)(GDNativeClassBinding.viewportSetScenario, _godot_object, viewport, scenario); 4688 } 4689 /** 4690 Sets the shadow atlas quadrant's subdivision. 4691 */ 4692 void viewportSetShadowAtlasQuadrantSubdivision(in RID viewport, in long quadrant, in long subdivision) 4693 { 4694 checkClassBinding!(typeof(this))(); 4695 ptrcall!(void)(GDNativeClassBinding.viewportSetShadowAtlasQuadrantSubdivision, _godot_object, viewport, quadrant, subdivision); 4696 } 4697 /** 4698 Sets the size of the shadow atlas's images (used for omni and spot lights). The value will be rounded up to the nearest power of 2. 4699 */ 4700 void viewportSetShadowAtlasSize(in RID viewport, in long size) 4701 { 4702 checkClassBinding!(typeof(this))(); 4703 ptrcall!(void)(GDNativeClassBinding.viewportSetShadowAtlasSize, _godot_object, viewport, size); 4704 } 4705 /** 4706 Sets the viewport's width and height. 4707 */ 4708 void viewportSetSize(in RID viewport, in long width, in long height) 4709 { 4710 checkClassBinding!(typeof(this))(); 4711 ptrcall!(void)(GDNativeClassBinding.viewportSetSize, _godot_object, viewport, width, height); 4712 } 4713 /** 4714 If `true`, the viewport renders its background as transparent. 4715 */ 4716 void viewportSetTransparentBackground(in RID viewport, in bool enabled) 4717 { 4718 checkClassBinding!(typeof(this))(); 4719 ptrcall!(void)(GDNativeClassBinding.viewportSetTransparentBackground, _godot_object, viewport, enabled); 4720 } 4721 /** 4722 Sets when the viewport should be updated. See $(D viewportupdatemode) constants for options. 4723 */ 4724 void viewportSetUpdateMode(in RID viewport, in long update_mode) 4725 { 4726 checkClassBinding!(typeof(this))(); 4727 ptrcall!(void)(GDNativeClassBinding.viewportSetUpdateMode, _godot_object, viewport, update_mode); 4728 } 4729 /** 4730 Sets the viewport's 2D/3D mode. See $(D viewportusage) constants for options. 4731 */ 4732 void viewportSetUsage(in RID viewport, in long usage) 4733 { 4734 checkClassBinding!(typeof(this))(); 4735 ptrcall!(void)(GDNativeClassBinding.viewportSetUsage, _godot_object, viewport, usage); 4736 } 4737 /** 4738 If `true`, the viewport uses augmented or virtual reality technologies. See $(D ARVRInterface). 4739 */ 4740 void viewportSetUseArvr(in RID viewport, in bool use_arvr) 4741 { 4742 checkClassBinding!(typeof(this))(); 4743 ptrcall!(void)(GDNativeClassBinding.viewportSetUseArvr, _godot_object, viewport, use_arvr); 4744 } 4745 /** 4746 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. 4747 $(B Note:) Only available on the GLES3 backend. $(D Viewport.hdr) must also be `true` for debanding to be effective. 4748 */ 4749 void viewportSetUseDebanding(in RID viewport, in bool debanding) 4750 { 4751 checkClassBinding!(typeof(this))(); 4752 ptrcall!(void)(GDNativeClassBinding.viewportSetUseDebanding, _godot_object, viewport, debanding); 4753 } 4754 /** 4755 Enables fast approximate antialiasing for this viewport. 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. 4756 */ 4757 void viewportSetUseFxaa(in RID viewport, in bool fxaa) 4758 { 4759 checkClassBinding!(typeof(this))(); 4760 ptrcall!(void)(GDNativeClassBinding.viewportSetUseFxaa, _godot_object, viewport, fxaa); 4761 } 4762 /** 4763 If `true`, the viewport's rendering is flipped vertically. 4764 */ 4765 void viewportSetVflip(in RID viewport, in bool enabled) 4766 { 4767 checkClassBinding!(typeof(this))(); 4768 ptrcall!(void)(GDNativeClassBinding.viewportSetVflip, _godot_object, viewport, enabled); 4769 } 4770 /** 4771 If `false`, disables rendering completely, but the engine logic is still being processed. You can call $(D forceDraw) to draw a frame even with rendering disabled. 4772 */ 4773 @property bool renderLoopEnabled() 4774 { 4775 return isRenderLoopEnabled(); 4776 } 4777 /// ditto 4778 @property void renderLoopEnabled(bool v) 4779 { 4780 setRenderLoopEnabled(v); 4781 } 4782 } 4783 /// Returns: the VisualServerSingleton 4784 @property @nogc nothrow pragma(inline, true) 4785 VisualServerSingleton VisualServer() 4786 { 4787 checkClassBinding!VisualServerSingleton(); 4788 return VisualServerSingleton(VisualServerSingleton.GDNativeClassBinding._singleton); 4789 }