.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the VisualServer.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_VisualServer: VisualServer ============ **Inherits:** :ref:`Object` **Category:** Core Brief Description ----------------- Server for anything visible. Member Functions ---------------- +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`black_bars_set_images` **(** :ref:`RID` left, :ref:`RID` top, :ref:`RID` right, :ref:`RID` bottom **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`black_bars_set_margins` **(** :ref:`int` left, :ref:`int` top, :ref:`int` right, :ref:`int` bottom **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`canvas_create` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_circle` **(** :ref:`RID` item, :ref:`Vector2` pos, :ref:`float` radius, :ref:`Color` color **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_clip_ignore` **(** :ref:`RID` item, :ref:`bool` ignore **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_line` **(** :ref:`RID` item, :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_mesh` **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`RID` skeleton **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_multimesh` **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`RID` skeleton **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_nine_patch` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Rect2` source, :ref:`RID` texture, :ref:`Vector2` topleft, :ref:`Vector2` bottomright, :ref:`int` x_axis_mode=0, :ref:`int` y_axis_mode=0, :ref:`bool` draw_center=true, :ref:`Color` modulate=Color( 1, 1, 1, 1 ), :ref:`RID` normal_map **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_particles` **(** :ref:`RID` item, :ref:`RID` particles, :ref:`RID` texture, :ref:`RID` normal_map, :ref:`int` h_frames, :ref:`int` v_frames **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_polygon` **(** :ref:`RID` item, :ref:`PoolVector2Array` points, :ref:`PoolColorArray` colors, :ref:`PoolVector2Array` uvs=PoolVector2Array( ), :ref:`RID` texture, :ref:`RID` normal_map, :ref:`bool` antialiased=false **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_polyline` **(** :ref:`RID` item, :ref:`PoolVector2Array` points, :ref:`PoolColorArray` colors, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_primitive` **(** :ref:`RID` item, :ref:`PoolVector2Array` points, :ref:`PoolColorArray` colors, :ref:`PoolVector2Array` uvs, :ref:`RID` texture, :ref:`float` width=1.0, :ref:`RID` normal_map **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_rect` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Color` color **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_set_transform` **(** :ref:`RID` item, :ref:`Transform2D` transform **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_texture_rect` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`bool` tile=false, :ref:`Color` modulate=Color( 1, 1, 1, 1 ), :ref:`bool` transpose=false, :ref:`RID` normal_map **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_texture_rect_region` **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color( 1, 1, 1, 1 ), :ref:`bool` transpose=false, :ref:`RID` normal_map, :ref:`bool` clip_uv=true **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_add_triangle_array` **(** :ref:`RID` item, :ref:`PoolIntArray` indices, :ref:`PoolVector2Array` points, :ref:`PoolColorArray` colors, :ref:`PoolVector2Array` uvs=PoolVector2Array( ), :ref:`RID` texture, :ref:`int` count=-1, :ref:`RID` normal_map **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_clear` **(** :ref:`RID` item **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`canvas_item_create` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_set_clip` **(** :ref:`RID` item, :ref:`bool` clip **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_set_copy_to_backbuffer` **(** :ref:`RID` item, :ref:`bool` enabled, :ref:`Rect2` rect **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_set_custom_rect` **(** :ref:`RID` item, :ref:`bool` use_custom_rect, :ref:`Rect2` rect=Rect2( 0, 0, 0, 0 ) **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_set_distance_field_mode` **(** :ref:`RID` item, :ref:`bool` enabled **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_set_draw_behind_parent` **(** :ref:`RID` item, :ref:`bool` enabled **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_set_draw_index` **(** :ref:`RID` item, :ref:`int` index **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_set_light_mask` **(** :ref:`RID` item, :ref:`int` mask **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_set_material` **(** :ref:`RID` item, :ref:`RID` material **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_set_modulate` **(** :ref:`RID` item, :ref:`Color` color **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_set_parent` **(** :ref:`RID` item, :ref:`RID` parent **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_set_self_modulate` **(** :ref:`RID` item, :ref:`Color` color **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_set_sort_children_by_y` **(** :ref:`RID` item, :ref:`bool` enabled **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_set_transform` **(** :ref:`RID` item, :ref:`Transform2D` transform **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_set_use_parent_material` **(** :ref:`RID` item, :ref:`bool` enabled **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_set_visible` **(** :ref:`RID` item, :ref:`bool` visible **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_set_z_as_relative_to_parent` **(** :ref:`RID` item, :ref:`bool` enabled **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_item_set_z_index` **(** :ref:`RID` item, :ref:`int` z_index **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_attach_to_canvas` **(** :ref:`RID` light, :ref:`RID` canvas **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`canvas_light_create` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_occluder_attach_to_canvas` **(** :ref:`RID` occluder, :ref:`RID` canvas **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`canvas_light_occluder_create` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_occluder_set_enabled` **(** :ref:`RID` occluder, :ref:`bool` enabled **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_occluder_set_light_mask` **(** :ref:`RID` occluder, :ref:`int` mask **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_occluder_set_polygon` **(** :ref:`RID` occluder, :ref:`RID` polygon **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_occluder_set_transform` **(** :ref:`RID` occluder, :ref:`Transform2D` transform **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_color` **(** :ref:`RID` light, :ref:`Color` color **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_enabled` **(** :ref:`RID` light, :ref:`bool` enabled **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_energy` **(** :ref:`RID` light, :ref:`float` energy **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_height` **(** :ref:`RID` light, :ref:`float` height **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_item_cull_mask` **(** :ref:`RID` light, :ref:`int` mask **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_item_shadow_cull_mask` **(** :ref:`RID` light, :ref:`int` mask **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_layer_range` **(** :ref:`RID` light, :ref:`int` min_layer, :ref:`int` max_layer **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_mode` **(** :ref:`RID` light, :ref:`int` mode **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_scale` **(** :ref:`RID` light, :ref:`float` scale **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_shadow_buffer_size` **(** :ref:`RID` light, :ref:`int` size **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_shadow_color` **(** :ref:`RID` light, :ref:`Color` color **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_shadow_enabled` **(** :ref:`RID` light, :ref:`bool` enabled **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_shadow_filter` **(** :ref:`RID` light, :ref:`int` filter **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_shadow_gradient_length` **(** :ref:`RID` light, :ref:`float` length **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_shadow_smooth` **(** :ref:`RID` light, :ref:`float` smooth **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_texture` **(** :ref:`RID` light, :ref:`RID` texture **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_texture_offset` **(** :ref:`RID` light, :ref:`Vector2` offset **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_transform` **(** :ref:`RID` light, :ref:`Transform2D` transform **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_light_set_z_range` **(** :ref:`RID` light, :ref:`int` min_z, :ref:`int` max_z **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`canvas_occluder_polygon_create` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_occluder_polygon_set_cull_mode` **(** :ref:`RID` occluder_polygon, :ref:`int` mode **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_occluder_polygon_set_shape` **(** :ref:`RID` occluder_polygon, :ref:`PoolVector2Array` shape, :ref:`bool` closed **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_occluder_polygon_set_shape_as_lines` **(** :ref:`RID` occluder_polygon, :ref:`PoolVector2Array` shape **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_set_item_mirroring` **(** :ref:`RID` canvas, :ref:`RID` item, :ref:`Vector2` mirroring **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`canvas_set_modulate` **(** :ref:`RID` canvas, :ref:`Color` color **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw` **(** :ref:`bool` swap_buffers=true **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`finish` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`force_draw` **(** :ref:`bool` swap_buffers=true **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`force_sync` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`free` **(** :ref:`RID` rid **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_render_info` **(** :ref:`int` info **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_test_cube` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_test_texture` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_white_texture` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_changed` **(** **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_feature` **(** :ref:`int` feature **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_os_feature` **(** :ref:`String` feature **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`init` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`make_sphere_mesh` **(** :ref:`int` latitudes, :ref:`int` longitudes, :ref:`float` radius **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`material_create` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`material_get_param` **(** :ref:`RID` material, :ref:`String` parameter **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`material_get_shader` **(** :ref:`RID` shader_material **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`material_set_line_width` **(** :ref:`RID` material, :ref:`float` width **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`material_set_next_pass` **(** :ref:`RID` material, :ref:`RID` next_material **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`material_set_param` **(** :ref:`RID` material, :ref:`String` parameter, :ref:`Variant` value **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`material_set_render_priority` **(** :ref:`RID` material, :ref:`int` priority **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`material_set_shader` **(** :ref:`RID` shader_material, :ref:`RID` shader **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`mesh_add_surface_from_arrays` **(** :ref:`RID` mesh, :ref:`int` primtive, :ref:`Array` arrays, :ref:`Array` blend_shapes=[ ], :ref:`int` compress_format=97792 **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`mesh_clear` **(** :ref:`RID` mesh **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`mesh_create` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`mesh_get_blend_shape_count` **(** :ref:`RID` mesh **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`mesh_get_blend_shape_mode` **(** :ref:`RID` mesh **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AABB` | :ref:`mesh_get_custom_aabb` **(** :ref:`RID` mesh **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`mesh_get_surface_count` **(** :ref:`RID` mesh **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`mesh_remove_surface` **(** :ref:`RID` mesh, :ref:`int` index **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`mesh_set_blend_shape_count` **(** :ref:`RID` mesh, :ref:`int` amount **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`mesh_set_blend_shape_mode` **(** :ref:`RID` mesh, :ref:`int` mode **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`mesh_set_custom_aabb` **(** :ref:`RID` mesh, :ref:`AABB` aabb **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AABB` | :ref:`mesh_surface_get_aabb` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PoolByteArray` | :ref:`mesh_surface_get_array` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`mesh_surface_get_array_index_len` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`mesh_surface_get_array_len` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`mesh_surface_get_arrays` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`mesh_surface_get_blend_shape_arrays` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`mesh_surface_get_format` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PoolByteArray` | :ref:`mesh_surface_get_index_array` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`mesh_surface_get_material` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`mesh_surface_get_primitive_type` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`mesh_surface_get_skeleton_aabb` **(** :ref:`RID` mesh, :ref:`int` surface **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`mesh_surface_set_material` **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`RID` material **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`request_frame_drawn_callback` **(** :ref:`Object` where, :ref:`String` method, :ref:`Variant` userdata **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_boot_image` **(** :ref:`Image` image, :ref:`Color` color, :ref:`bool` scale **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_debug_generate_wireframes` **(** :ref:`bool` generate **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_default_clear_color` **(** :ref:`Color` color **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`shader_create` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`shader_get_code` **(** :ref:`RID` shader **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`shader_get_default_texture_param` **(** :ref:`RID` shader, :ref:`String` name **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`shader_get_param_list` **(** :ref:`RID` shader **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`shader_set_code` **(** :ref:`RID` shader, :ref:`String` code **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`shader_set_default_texture_param` **(** :ref:`RID` shader, :ref:`String` name, :ref:`RID` texture **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`sky_create` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`sky_set_texture` **(** :ref:`RID` sky, :ref:`RID` cube_map, :ref:`int` radiance_size **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`sync` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`texture_allocate` **(** :ref:`RID` texture, :ref:`int` width, :ref:`int` height, :ref:`int` format, :ref:`int` flags=7 **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`texture_create` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`texture_create_from_image` **(** :ref:`Image` image, :ref:`int` flags=7 **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`texture_debug_usage` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Image` | :ref:`texture_get_data` **(** :ref:`RID` texture, :ref:`int` cube_side=0 **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`texture_get_flags` **(** :ref:`RID` texture **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`texture_get_format` **(** :ref:`RID` texture **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`texture_get_height` **(** :ref:`RID` texture **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`texture_get_path` **(** :ref:`RID` texture **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`texture_get_texid` **(** :ref:`RID` texture **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`texture_get_width` **(** :ref:`RID` texture **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`texture_set_data` **(** :ref:`RID` texture, :ref:`Image` image, :ref:`int` cube_side=0 **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`texture_set_flags` **(** :ref:`RID` texture, :ref:`int` flags **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`texture_set_path` **(** :ref:`RID` texture, :ref:`String` path **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`texture_set_shrink_all_x2_on_set_data` **(** :ref:`bool` shrink **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`texture_set_size_override` **(** :ref:`RID` texture, :ref:`int` width, :ref:`int` height **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`textures_keep_original` **(** :ref:`bool` enable **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_attach_camera` **(** :ref:`RID` viewport, :ref:`RID` camera **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_attach_canvas` **(** :ref:`RID` viewport, :ref:`RID` canvas **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_attach_to_screen` **(** :ref:`RID` viewport, :ref:`Rect2` rect=Rect2( 0, 0, 0, 0 ), :ref:`int` screen=0 **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`viewport_create` **(** **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_detach` **(** :ref:`RID` viewport **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`viewport_get_render_info` **(** :ref:`RID` viewport, :ref:`int` info **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`viewport_get_texture` **(** :ref:`RID` viewport **)** const | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_remove_canvas` **(** :ref:`RID` viewport, :ref:`RID` canvas **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_active` **(** :ref:`RID` viewport, :ref:`bool` active **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_canvas_layer` **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`int` layer **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_canvas_transform` **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`Transform2D` offset **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_clear_mode` **(** :ref:`RID` viewport, :ref:`int` clear_mode **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_debug_draw` **(** :ref:`RID` viewport, :ref:`int` draw **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_disable_3d` **(** :ref:`RID` viewport, :ref:`bool` disabled **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_disable_environment` **(** :ref:`RID` viewport, :ref:`bool` disabled **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_global_canvas_transform` **(** :ref:`RID` viewport, :ref:`Transform2D` transform **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_hdr` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_hide_canvas` **(** :ref:`RID` viewport, :ref:`bool` hidden **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_hide_scenario` **(** :ref:`RID` viewport, :ref:`bool` hidden **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_msaa` **(** :ref:`RID` viewport, :ref:`int` msaa **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_parent_viewport` **(** :ref:`RID` viewport, :ref:`RID` parent_viewport **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_scenario` **(** :ref:`RID` viewport, :ref:`RID` scenario **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_shadow_atlas_quadrant_subdivision` **(** :ref:`RID` viewport, :ref:`int` quadrant, :ref:`int` subdivision **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_shadow_atlas_size` **(** :ref:`RID` viewport, :ref:`int` size **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_size` **(** :ref:`RID` viewport, :ref:`int` width, :ref:`int` height **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_transparent_background` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_update_mode` **(** :ref:`RID` viewport, :ref:`int` update_mode **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_usage` **(** :ref:`RID` viewport, :ref:`int` usage **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_use_arvr` **(** :ref:`RID` viewport, :ref:`bool` use_arvr **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`viewport_set_vflip` **(** :ref:`RID` viewport, :ref:`bool` enabled **)** | +--------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- .. _class_VisualServer_frame_drawn_in_thread: - **frame_drawn_in_thread** **(** **)** Numeric Constants ----------------- - **NO_INDEX_ARRAY** = **-1** --- Marks an error that shows that the index array is empty. - **ARRAY_WEIGHTS_SIZE** = **4** - **CANVAS_ITEM_Z_MIN** = **-4096** --- The minimum Z-layer for canvas items. - **CANVAS_ITEM_Z_MAX** = **4096** --- The maximum Z-layer for canvas items. - **MAX_GLOW_LEVELS** = **7** - **MAX_CURSORS** = **8** - **MATERIAL_RENDER_PRIORITY_MIN** = **-128** --- The minimum renderpriority of all materials. - **MATERIAL_RENDER_PRIORITY_MAX** = **127** --- The maximum renderpriority of all materials. - **CUBEMAP_LEFT** = **0** --- Marks the left side of a cubemap. - **CUBEMAP_RIGHT** = **1** --- Marks the right side of a cubemap. - **CUBEMAP_BOTTOM** = **2** --- Marks the bottom side of a cubemap. - **CUBEMAP_TOP** = **3** --- Marks the top side of a cubemap. - **CUBEMAP_FRONT** = **4** --- Marks the front side of a cubemap. - **CUBEMAP_BACK** = **5** --- Marks the back side of a cubemap. - **TEXTURE_FLAG_MIPMAPS** = **1** --- Generate mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. - **TEXTURE_FLAG_REPEAT** = **2** --- Repeat (instead of clamp to edge). - **TEXTURE_FLAG_FILTER** = **4** --- Turn on magnifying filter, to enable smooth zooming in of the texture. - **TEXTURE_FLAG_ANISOTROPIC_FILTER** = **8** --- Anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios. More effective on planes often shown going to the horrizon as those textures (Walls or Ground for example) get squashed in the viewport to different aspect ratios and regular mipmaps keep the aspect ratio so they don't optimize storage that well in those cases. - **TEXTURE_FLAG_CONVERT_TO_LINEAR** = **16** --- Converts texture to SRGB color space. - **TEXTURE_FLAG_MIRRORED_REPEAT** = **32** --- Repeat texture with alternate sections mirrored. - **TEXTURE_FLAG_CUBEMAP** = **2048** --- Texture is a cubemap. - **TEXTURE_FLAG_USED_FOR_STREAMING** = **4096** --- Texture is a video surface. - **TEXTURE_FLAGS_DEFAULT** = **7** --- Default flags. Generate mipmaps, repeat, and filter are enabled. - **SHADER_SPATIAL** = **0** --- Shader is a 3D shader. - **SHADER_CANVAS_ITEM** = **1** --- Shader is a 2D shader. - **SHADER_PARTICLES** = **2** --- Shader is a particle shader. - **SHADER_MAX** = **3** --- Marks maximum of the shader types array. used internally. - **ARRAY_VERTEX** = **0** --- Array is a vertex array. - **ARRAY_NORMAL** = **1** --- Array is a normal array. - **ARRAY_TANGENT** = **2** --- Array is a tangent array. - **ARRAY_COLOR** = **3** --- Array is a color array. - **ARRAY_TEX_UV** = **4** --- Array is a uv coordinates array. - **ARRAY_TEX_UV2** = **5** --- Array is a uv coordinates array for the second uv coordinates. - **ARRAY_BONES** = **6** --- Array contains bone information. - **ARRAY_WEIGHTS** = **7** --- Array is weight information. - **ARRAY_INDEX** = **8** --- Array is index array. - **ARRAY_MAX** = **9** --- Marks the maximum of the array types. Used internally. - **ARRAY_FORMAT_VERTEX** = **1** --- Flag used to mark a vertex array. - **ARRAY_FORMAT_NORMAL** = **2** --- Flag used to mark a normal array. - **ARRAY_FORMAT_TANGENT** = **4** --- Flag used to mark a tangent array. - **ARRAY_FORMAT_COLOR** = **8** --- Flag used to mark a color array. - **ARRAY_FORMAT_TEX_UV** = **16** --- Flag used to mark a uv coordinates array. - **ARRAY_FORMAT_TEX_UV2** = **32** --- Flag used to mark a uv coordinates array for the second uv coordinates. - **ARRAY_FORMAT_BONES** = **64** --- Flag used to mark a bone information array. - **ARRAY_FORMAT_WEIGHTS** = **128** --- Flag used to mark a weights array. - **ARRAY_FORMAT_INDEX** = **256** --- Flag used to mark a index array. - **ARRAY_COMPRESS_VERTEX** = **512** --- Flag used to mark a compressed (half float) vertex array. - **ARRAY_COMPRESS_NORMAL** = **1024** --- Flag used to mark a compressed (half float) normal array. - **ARRAY_COMPRESS_TANGENT** = **2048** --- Flag used to mark a compressed (half float) tangent array. - **ARRAY_COMPRESS_COLOR** = **4096** --- Flag used to mark a compressed (half float) color array. - **ARRAY_COMPRESS_TEX_UV** = **8192** --- Flag used to mark a compressed (half float) uv coordinates array. - **ARRAY_COMPRESS_TEX_UV2** = **16384** --- Flag used to mark a compressed (half float) uv coordinates array for the second uv coordinates. - **ARRAY_COMPRESS_BONES** = **32768** - **ARRAY_COMPRESS_WEIGHTS** = **65536** --- Flag used to mark a compressed (half float) weight array. - **ARRAY_COMPRESS_INDEX** = **131072** - **ARRAY_FLAG_USE_2D_VERTICES** = **262144** --- Flag used to mark that the array contains 2D vertices. - **ARRAY_FLAG_USE_16_BIT_BONES** = **524288** --- Flag used to mark that the array uses 16 bit bones instead of 8 bit. - **ARRAY_COMPRESS_DEFAULT** = **97792** --- Used to set flags ARRAY_COMPRESS_VERTEX, ARRAY_COMPRESS_NORMAL, ARRAY_COMPRESS_TANGENT, ARRAY_COMPRESS_COLOR, ARRAY_COMPRESS_TEX_UV, ARRAY_COMPRESS_TEX_UV2 and ARRAY_COMPRESS_WEIGHTS quickly. - **PRIMITIVE_POINTS** = **0** --- Primitive to draw consists of points. - **PRIMITIVE_LINES** = **1** --- Primitive to draw consists of lines. - **PRIMITIVE_LINE_STRIP** = **2** --- Primitive to draw consists of a line strip from start to end. - **PRIMITIVE_LINE_LOOP** = **3** --- Primitive to draw consists of a line loop (a line strip with a line between the last and the first vertex). - **PRIMITIVE_TRIANGLES** = **4** --- Primitive to draw consists of triangles. - **PRIMITIVE_TRIANGLE_STRIP** = **5** --- Primitive to draw consists of a triangle strip (the last 3 verticies are always combined to make a triangle). - **PRIMITIVE_TRIANGLE_FAN** = **6** --- Primitive to draw consists of a triangle strip (the last 2 verticies are always combined with the first to make a triangle). - **PRIMITIVE_MAX** = **7** --- Marks the primitive types endpoint. used internally. - **BLEND_SHAPE_MODE_NORMALIZED** = **0** - **BLEND_SHAPE_MODE_RELATIVE** = **1** - **LIGHT_DIRECTIONAL** = **0** --- Is a directional (sun) light. - **LIGHT_OMNI** = **1** --- is an omni light. - **LIGHT_SPOT** = **2** --- is an spot light. - **LIGHT_PARAM_ENERGY** = **0** --- The light's energy. - **LIGHT_PARAM_SPECULAR** = **2** --- The light's influence on specularity. - **LIGHT_PARAM_RANGE** = **3** --- The light's range. - **LIGHT_PARAM_ATTENUATION** = **4** --- The light's attenuation. - **LIGHT_PARAM_SPOT_ANGLE** = **5** --- The spotlight's angle. - **LIGHT_PARAM_SPOT_ATTENUATION** = **6** --- The spotlight's attenuation. - **LIGHT_PARAM_CONTACT_SHADOW_SIZE** = **7** --- Scales the shadow color. - **LIGHT_PARAM_SHADOW_MAX_DISTANCE** = **8** - **LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET** = **9** - **LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET** = **10** - **LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET** = **11** - **LIGHT_PARAM_SHADOW_NORMAL_BIAS** = **12** - **LIGHT_PARAM_SHADOW_BIAS** = **13** - **LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE** = **14** - **LIGHT_PARAM_MAX** = **15** --- The light parameters endpoint. Used internally. - **VIEWPORT_UPDATE_DISABLED** = **0** - **VIEWPORT_UPDATE_ONCE** = **1** - **VIEWPORT_UPDATE_WHEN_VISIBLE** = **2** - **VIEWPORT_UPDATE_ALWAYS** = **3** - **VIEWPORT_CLEAR_ALWAYS** = **0** --- The viewport is always cleared before drawing. - **VIEWPORT_CLEAR_NEVER** = **1** --- The viewport is never cleared before drawing. - **VIEWPORT_CLEAR_ONLY_NEXT_FRAME** = **2** --- The viewport is cleared once, then the clear mode is set to VIEWPORT_CLEAR_NEVER. - **VIEWPORT_MSAA_DISABLED** = **0** --- Multisample antialiasing is disabled. - **VIEWPORT_MSAA_2X** = **1** --- Multisample antialiasing is set to 2X. - **VIEWPORT_MSAA_4X** = **2** --- Multisample antialiasing is set to 4X. - **VIEWPORT_MSAA_8X** = **3** --- Multisample antialiasing is set to 8X. - **VIEWPORT_MSAA_16X** = **4** --- Multisample antialiasing is set to 16X. - **VIEWPORT_USAGE_2D** = **0** --- The Viewport does not render 3D but samples. - **VIEWPORT_USAGE_2D_NO_SAMPLING** = **1** --- The Viewport does not render 3D and does not sample. - **VIEWPORT_USAGE_3D** = **2** --- The Viewport renders 3D with effects. - **VIEWPORT_USAGE_3D_NO_EFFECTS** = **3** --- The Viewport renders 3D but without effects. - **VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME** = **0** - **VIEWPORT_RENDER_INFO_VERTICES_IN_FRAME** = **1** - **VIEWPORT_RENDER_INFO_MATERIAL_CHANGES_IN_FRAME** = **2** - **VIEWPORT_RENDER_INFO_SHADER_CHANGES_IN_FRAME** = **3** - **VIEWPORT_RENDER_INFO_SURFACE_CHANGES_IN_FRAME** = **4** - **VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME** = **5** - **VIEWPORT_RENDER_INFO_MAX** = **6** --- Marks end of VIEWPORT_RENDER_INFO\* constants. Used internally. - **VIEWPORT_DEBUG_DRAW_DISABLED** = **0** --- Debug draw is disabled. Default setting. - **VIEWPORT_DEBUG_DRAW_UNSHADED** = **1** --- Debug draw sets objects to unshaded. - **VIEWPORT_DEBUG_DRAW_OVERDRAW** = **2** --- Overwrites clear color to ``(0,0,0,0)``. - **VIEWPORT_DEBUG_DRAW_WIREFRAME** = **3** --- Debug draw draws objects in wireframe. - **SCENARIO_DEBUG_DISABLED** = **0** - **SCENARIO_DEBUG_WIREFRAME** = **1** - **SCENARIO_DEBUG_OVERDRAW** = **2** - **SCENARIO_DEBUG_SHADELESS** = **3** - **INSTANCE_NONE** = **0** --- The instance does not have a type. - **INSTANCE_MESH** = **1** --- The instance is a mesh. - **INSTANCE_MULTIMESH** = **2** --- The instance is a multimesh. - **INSTANCE_IMMEDIATE** = **3** --- The instance is an immediate geometry. - **INSTANCE_PARTICLES** = **4** --- The instance is a particle emitter. - **INSTANCE_LIGHT** = **5** --- The instance is a light. - **INSTANCE_REFLECTION_PROBE** = **6** - **INSTANCE_GI_PROBE** = **7** - **INSTANCE_LIGHTMAP_CAPTURE** = **8** - **INSTANCE_MAX** = **9** --- The max value for INSTANCE\_\* constants, used internally. - **INSTANCE_GEOMETRY_MASK** = **30** --- A combination of the flags of geometry instances (mesh, multimesh, immediate and particles). - **NINE_PATCH_STRETCH** = **0** --- The nine patch gets stretched where needed. - **NINE_PATCH_TILE** = **1** --- The nine patch gets filled with tiles where needed. - **NINE_PATCH_TILE_FIT** = **2** --- The nine patch gets filled with tiles where needed and stretches them a bit if needed. - **CANVAS_LIGHT_MODE_ADD** = **0** --- Adds light color additive to the canvas. - **CANVAS_LIGHT_MODE_SUB** = **1** --- Adds light color subtractive to the canvas. - **CANVAS_LIGHT_MODE_MIX** = **2** --- The light adds color depending on transparency. - **CANVAS_LIGHT_MODE_MASK** = **3** --- The light adds color depending on mask. - **CANVAS_LIGHT_FILTER_NONE** = **0** - **CANVAS_LIGHT_FILTER_PCF3** = **1** - **CANVAS_LIGHT_FILTER_PCF5** = **2** - **CANVAS_LIGHT_FILTER_PCF7** = **3** - **CANVAS_LIGHT_FILTER_PCF9** = **4** - **CANVAS_LIGHT_FILTER_PCF13** = **5** - **CANVAS_OCCLUDER_POLYGON_CULL_DISABLED** = **0** --- Culling of the canvas occluder is disabled. - **CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE** = **1** --- Culling of the canvas occluder is clockwise. - **CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE** = **2** --- Culling of the canvas occluder is counterclockwise. - **INFO_OBJECTS_IN_FRAME** = **0** --- The amount of objects in the frame. - **INFO_VERTICES_IN_FRAME** = **1** --- The amount of vertices in the frame. - **INFO_MATERIAL_CHANGES_IN_FRAME** = **2** --- The amount of modified materials in the frame. - **INFO_SHADER_CHANGES_IN_FRAME** = **3** --- The amount of shader rebinds in the frame. - **INFO_SURFACE_CHANGES_IN_FRAME** = **4** --- The amount of surface changes in the frame. - **INFO_DRAW_CALLS_IN_FRAME** = **5** --- The amount of draw calls in frame. - **INFO_USAGE_VIDEO_MEM_TOTAL** = **6** - **INFO_VIDEO_MEM_USED** = **7** --- The amount of vertex memory and texture memory used. - **INFO_TEXTURE_MEM_USED** = **8** --- The amount of texture memory used. - **INFO_VERTEX_MEM_USED** = **9** --- The amount of vertex memory used. - **FEATURE_SHADERS** = **0** - **FEATURE_MULTITHREADED** = **1** Description ----------- Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display. The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed. Member Function Description --------------------------- .. _class_VisualServer_black_bars_set_images: - void **black_bars_set_images** **(** :ref:`RID` left, :ref:`RID` top, :ref:`RID` right, :ref:`RID` bottom **)** Sets images to be rendered in the window margin. .. _class_VisualServer_black_bars_set_margins: - void **black_bars_set_margins** **(** :ref:`int` left, :ref:`int` top, :ref:`int` right, :ref:`int` bottom **)** Sets margin size, where black bars (or images, if :ref:`black_bars_set_images` was used) are rendered. .. _class_VisualServer_canvas_create: - :ref:`RID` **canvas_create** **(** **)** Creates a canvas and returns the assigned :ref:`RID`. .. _class_VisualServer_canvas_item_add_circle: - void **canvas_item_add_circle** **(** :ref:`RID` item, :ref:`Vector2` pos, :ref:`float` radius, :ref:`Color` color **)** Adds a circle command to the :ref:`CanvasItem`'s draw commands. .. _class_VisualServer_canvas_item_add_clip_ignore: - void **canvas_item_add_clip_ignore** **(** :ref:`RID` item, :ref:`bool` ignore **)** If ignore is ``true``, the VisualServer does not perform clipping. .. _class_VisualServer_canvas_item_add_line: - void **canvas_item_add_line** **(** :ref:`RID` item, :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** Adds a line command to the :ref:`CanvasItem`'s draw commands. .. _class_VisualServer_canvas_item_add_mesh: - void **canvas_item_add_mesh** **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`RID` skeleton **)** Adds a :ref:`Mesh` to the :ref:`CanvasItem`'s draw commands. Only affects its aabb at the moment. .. _class_VisualServer_canvas_item_add_multimesh: - void **canvas_item_add_multimesh** **(** :ref:`RID` item, :ref:`RID` mesh, :ref:`RID` skeleton **)** Adds a :ref:`MultiMesh` to the :ref:`CanvasItem`'s draw commands. Only affects its aabb at the moment. .. _class_VisualServer_canvas_item_add_nine_patch: - void **canvas_item_add_nine_patch** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Rect2` source, :ref:`RID` texture, :ref:`Vector2` topleft, :ref:`Vector2` bottomright, :ref:`int` x_axis_mode=0, :ref:`int` y_axis_mode=0, :ref:`bool` draw_center=true, :ref:`Color` modulate=Color( 1, 1, 1, 1 ), :ref:`RID` normal_map **)** Adds a nine patch image to the :ref:`CanvasItem`'s draw commands. See :ref:`NinePatchRect` for more explanation. .. _class_VisualServer_canvas_item_add_particles: - void **canvas_item_add_particles** **(** :ref:`RID` item, :ref:`RID` particles, :ref:`RID` texture, :ref:`RID` normal_map, :ref:`int` h_frames, :ref:`int` v_frames **)** Adds a particles system to the :ref:`CanvasItem`'s draw commands. .. _class_VisualServer_canvas_item_add_polygon: - void **canvas_item_add_polygon** **(** :ref:`RID` item, :ref:`PoolVector2Array` points, :ref:`PoolColorArray` colors, :ref:`PoolVector2Array` uvs=PoolVector2Array( ), :ref:`RID` texture, :ref:`RID` normal_map, :ref:`bool` antialiased=false **)** Adds a polygon to the :ref:`CanvasItem`'s draw commands. .. _class_VisualServer_canvas_item_add_polyline: - void **canvas_item_add_polyline** **(** :ref:`RID` item, :ref:`PoolVector2Array` points, :ref:`PoolColorArray` colors, :ref:`float` width=1.0, :ref:`bool` antialiased=false **)** Adds a polyline, which is a line from mutliple points with a width, to the :ref:`CanvasItem`'s draw commands. .. _class_VisualServer_canvas_item_add_primitive: - void **canvas_item_add_primitive** **(** :ref:`RID` item, :ref:`PoolVector2Array` points, :ref:`PoolColorArray` colors, :ref:`PoolVector2Array` uvs, :ref:`RID` texture, :ref:`float` width=1.0, :ref:`RID` normal_map **)** Adds a primitive to the :ref:`CanvasItem`'s draw commands. .. _class_VisualServer_canvas_item_add_rect: - void **canvas_item_add_rect** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`Color` color **)** Adds a rectangle to the :ref:`CanvasItem`'s draw commands. .. _class_VisualServer_canvas_item_add_set_transform: - void **canvas_item_add_set_transform** **(** :ref:`RID` item, :ref:`Transform2D` transform **)** Adds a :ref:`Transform2D` command to the :ref:`CanvasItem`'s draw commands. This sets the extra_matrix uniform when executed. This affects the later command's of the canvas item. .. _class_VisualServer_canvas_item_add_texture_rect: - void **canvas_item_add_texture_rect** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`bool` tile=false, :ref:`Color` modulate=Color( 1, 1, 1, 1 ), :ref:`bool` transpose=false, :ref:`RID` normal_map **)** Adds a textured rect to the :ref:`CanvasItem`'s draw commands. .. _class_VisualServer_canvas_item_add_texture_rect_region: - void **canvas_item_add_texture_rect_region** **(** :ref:`RID` item, :ref:`Rect2` rect, :ref:`RID` texture, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color( 1, 1, 1, 1 ), :ref:`bool` transpose=false, :ref:`RID` normal_map, :ref:`bool` clip_uv=true **)** Adds a texture rect with region setting to the :ref:`CanvasItem`'s draw commands. .. _class_VisualServer_canvas_item_add_triangle_array: - void **canvas_item_add_triangle_array** **(** :ref:`RID` item, :ref:`PoolIntArray` indices, :ref:`PoolVector2Array` points, :ref:`PoolColorArray` colors, :ref:`PoolVector2Array` uvs=PoolVector2Array( ), :ref:`RID` texture, :ref:`int` count=-1, :ref:`RID` normal_map **)** Adds a triangle array to the :ref:`CanvasItem`'s draw commands. .. _class_VisualServer_canvas_item_clear: - void **canvas_item_clear** **(** :ref:`RID` item **)** Clears the :ref:`CanvasItem` and removes all commands in it. .. _class_VisualServer_canvas_item_create: - :ref:`RID` **canvas_item_create** **(** **)** Creates a new :ref:`CanvasItem` and returns its :ref:`RID`. .. _class_VisualServer_canvas_item_set_clip: - void **canvas_item_set_clip** **(** :ref:`RID` item, :ref:`bool` clip **)** Sets clipping for the :ref:`CanvasItem`. .. _class_VisualServer_canvas_item_set_copy_to_backbuffer: - void **canvas_item_set_copy_to_backbuffer** **(** :ref:`RID` item, :ref:`bool` enabled, :ref:`Rect2` rect **)** Sets the :ref:`CanvasItem` to copy a rect to the backbuffer. .. _class_VisualServer_canvas_item_set_custom_rect: - void **canvas_item_set_custom_rect** **(** :ref:`RID` item, :ref:`bool` use_custom_rect, :ref:`Rect2` rect=Rect2( 0, 0, 0, 0 ) **)** Defines a custom drawing rectangle for the :ref:`CanvasItem`. .. _class_VisualServer_canvas_item_set_distance_field_mode: - void **canvas_item_set_distance_field_mode** **(** :ref:`RID` item, :ref:`bool` enabled **)** .. _class_VisualServer_canvas_item_set_draw_behind_parent: - void **canvas_item_set_draw_behind_parent** **(** :ref:`RID` item, :ref:`bool` enabled **)** Sets :ref:`CanvasItem` to be drawn behind its parent. .. _class_VisualServer_canvas_item_set_draw_index: - void **canvas_item_set_draw_index** **(** :ref:`RID` item, :ref:`int` index **)** Sets the index for the :ref:`CanvasItem`. .. _class_VisualServer_canvas_item_set_light_mask: - void **canvas_item_set_light_mask** **(** :ref:`RID` item, :ref:`int` mask **)** The light mask. See :ref:`LightOccluder2D` for more information on light masks. .. _class_VisualServer_canvas_item_set_material: - void **canvas_item_set_material** **(** :ref:`RID` item, :ref:`RID` material **)** Sets a new material to the :ref:`CanvasItem`. .. _class_VisualServer_canvas_item_set_modulate: - void **canvas_item_set_modulate** **(** :ref:`RID` item, :ref:`Color` color **)** Sets the color that modulates the :ref:`CanvasItem` and its children. .. _class_VisualServer_canvas_item_set_parent: - void **canvas_item_set_parent** **(** :ref:`RID` item, :ref:`RID` parent **)** Sets the parent for the :ref:`CanvasItem`. .. _class_VisualServer_canvas_item_set_self_modulate: - void **canvas_item_set_self_modulate** **(** :ref:`RID` item, :ref:`Color` color **)** Sets the color that modulates the :ref:`CanvasItem` without children. .. _class_VisualServer_canvas_item_set_sort_children_by_y: - void **canvas_item_set_sort_children_by_y** **(** :ref:`RID` item, :ref:`bool` enabled **)** Sets if :ref:`CanvasItem`'s children should be sorted by y-position. .. _class_VisualServer_canvas_item_set_transform: - void **canvas_item_set_transform** **(** :ref:`RID` item, :ref:`Transform2D` transform **)** Sets the :ref:`CanvasItem`'s :ref:`Transform2D`. .. _class_VisualServer_canvas_item_set_use_parent_material: - void **canvas_item_set_use_parent_material** **(** :ref:`RID` item, :ref:`bool` enabled **)** Sets if the :ref:`CanvasItem` uses its parent's material. .. _class_VisualServer_canvas_item_set_visible: - void **canvas_item_set_visible** **(** :ref:`RID` item, :ref:`bool` visible **)** Sets if the canvas item (including its children) is visible. .. _class_VisualServer_canvas_item_set_z_as_relative_to_parent: - void **canvas_item_set_z_as_relative_to_parent** **(** :ref:`RID` item, :ref:`bool` enabled **)** If this is enabled, the z-index of the parent will be added to the children's z-index. .. _class_VisualServer_canvas_item_set_z_index: - void **canvas_item_set_z_index** **(** :ref:`RID` item, :ref:`int` z_index **)** Sets the :ref:`CanvasItem`'s z-index, i.e. its draw order (lower indexes are drawn first). .. _class_VisualServer_canvas_light_attach_to_canvas: - void **canvas_light_attach_to_canvas** **(** :ref:`RID` light, :ref:`RID` canvas **)** Attaches the canvas light to the canvas. Removes it from its previous canvas. .. _class_VisualServer_canvas_light_create: - :ref:`RID` **canvas_light_create** **(** **)** Creates a canvas light. .. _class_VisualServer_canvas_light_occluder_attach_to_canvas: - void **canvas_light_occluder_attach_to_canvas** **(** :ref:`RID` occluder, :ref:`RID` canvas **)** Attaches a light occluder to the canvas. Removes it from its previous canvas. .. _class_VisualServer_canvas_light_occluder_create: - :ref:`RID` **canvas_light_occluder_create** **(** **)** Creates a light occluder. .. _class_VisualServer_canvas_light_occluder_set_enabled: - void **canvas_light_occluder_set_enabled** **(** :ref:`RID` occluder, :ref:`bool` enabled **)** Enables or disables light occluder. .. _class_VisualServer_canvas_light_occluder_set_light_mask: - void **canvas_light_occluder_set_light_mask** **(** :ref:`RID` occluder, :ref:`int` mask **)** The light mask. See :ref:`LightOccluder2D` for more information on light masks .. _class_VisualServer_canvas_light_occluder_set_polygon: - void **canvas_light_occluder_set_polygon** **(** :ref:`RID` occluder, :ref:`RID` polygon **)** Sets a light occluder's polygon. .. _class_VisualServer_canvas_light_occluder_set_transform: - void **canvas_light_occluder_set_transform** **(** :ref:`RID` occluder, :ref:`Transform2D` transform **)** Sets a light occluder's :ref:`Transform2D`. .. _class_VisualServer_canvas_light_set_color: - void **canvas_light_set_color** **(** :ref:`RID` light, :ref:`Color` color **)** Sets the color for a light. .. _class_VisualServer_canvas_light_set_enabled: - void **canvas_light_set_enabled** **(** :ref:`RID` light, :ref:`bool` enabled **)** Enables or disables a canvas light. .. _class_VisualServer_canvas_light_set_energy: - void **canvas_light_set_energy** **(** :ref:`RID` light, :ref:`float` energy **)** Sets a canvas light's energy. .. _class_VisualServer_canvas_light_set_height: - void **canvas_light_set_height** **(** :ref:`RID` light, :ref:`float` height **)** Sets a canvas light's height. .. _class_VisualServer_canvas_light_set_item_cull_mask: - void **canvas_light_set_item_cull_mask** **(** :ref:`RID` light, :ref:`int` mask **)** The light mask. See :ref:`LightOccluder2D` for more information on light masks .. _class_VisualServer_canvas_light_set_item_shadow_cull_mask: - void **canvas_light_set_item_shadow_cull_mask** **(** :ref:`RID` light, :ref:`int` mask **)** The shadow mask. binary about wich layers this canvas light affects wich canvas item's shadows. See :ref:`LightOccluder2D` for more information on light masks. .. _class_VisualServer_canvas_light_set_layer_range: - void **canvas_light_set_layer_range** **(** :ref:`RID` light, :ref:`int` min_layer, :ref:`int` max_layer **)** The layer range that gets rendered with this light. .. _class_VisualServer_canvas_light_set_mode: - void **canvas_light_set_mode** **(** :ref:`RID` light, :ref:`int` mode **)** The mode of the light, see CANVAS_LIGHT_MODE\_\* constants. .. _class_VisualServer_canvas_light_set_scale: - void **canvas_light_set_scale** **(** :ref:`RID` light, :ref:`float` scale **)** .. _class_VisualServer_canvas_light_set_shadow_buffer_size: - void **canvas_light_set_shadow_buffer_size** **(** :ref:`RID` light, :ref:`int` size **)** Sets the width of the shadow buffer, size gets scaled to the next power of two for this. .. _class_VisualServer_canvas_light_set_shadow_color: - void **canvas_light_set_shadow_color** **(** :ref:`RID` light, :ref:`Color` color **)** Sets the color of the canvas light's shadow. .. _class_VisualServer_canvas_light_set_shadow_enabled: - void **canvas_light_set_shadow_enabled** **(** :ref:`RID` light, :ref:`bool` enabled **)** Enables or disables the canvas light's shadow. .. _class_VisualServer_canvas_light_set_shadow_filter: - void **canvas_light_set_shadow_filter** **(** :ref:`RID` light, :ref:`int` filter **)** Sets the canvas light's shadow's filter, see CANVAS_LIGHT_SHADOW_FILTER\_\* constants. .. _class_VisualServer_canvas_light_set_shadow_gradient_length: - void **canvas_light_set_shadow_gradient_length** **(** :ref:`RID` light, :ref:`float` length **)** Sets the length of the shadow's gradient. .. _class_VisualServer_canvas_light_set_shadow_smooth: - void **canvas_light_set_shadow_smooth** **(** :ref:`RID` light, :ref:`float` smooth **)** Smoothens the shadow. The lower, the more smooth. .. _class_VisualServer_canvas_light_set_texture: - void **canvas_light_set_texture** **(** :ref:`RID` light, :ref:`RID` texture **)** .. _class_VisualServer_canvas_light_set_texture_offset: - void **canvas_light_set_texture_offset** **(** :ref:`RID` light, :ref:`Vector2` offset **)** .. _class_VisualServer_canvas_light_set_transform: - void **canvas_light_set_transform** **(** :ref:`RID` light, :ref:`Transform2D` transform **)** Sets the canvas light's :ref:`Transform2D`. .. _class_VisualServer_canvas_light_set_z_range: - void **canvas_light_set_z_range** **(** :ref:`RID` light, :ref:`int` min_z, :ref:`int` max_z **)** .. _class_VisualServer_canvas_occluder_polygon_create: - :ref:`RID` **canvas_occluder_polygon_create** **(** **)** Creates a new light occluder polygon. .. _class_VisualServer_canvas_occluder_polygon_set_cull_mode: - void **canvas_occluder_polygon_set_cull_mode** **(** :ref:`RID` occluder_polygon, :ref:`int` mode **)** Sets an occluder polygons cull mode. See CANVAS_OCCLUDER_POLYGON_CULL_MODE\_\* constants. .. _class_VisualServer_canvas_occluder_polygon_set_shape: - void **canvas_occluder_polygon_set_shape** **(** :ref:`RID` occluder_polygon, :ref:`PoolVector2Array` shape, :ref:`bool` closed **)** Sets the shape of the occluder polygon. .. _class_VisualServer_canvas_occluder_polygon_set_shape_as_lines: - void **canvas_occluder_polygon_set_shape_as_lines** **(** :ref:`RID` occluder_polygon, :ref:`PoolVector2Array` shape **)** Sets the shape of the occluder polygon as lines. .. _class_VisualServer_canvas_set_item_mirroring: - void **canvas_set_item_mirroring** **(** :ref:`RID` canvas, :ref:`RID` item, :ref:`Vector2` mirroring **)** A copy of the canvas item will be drawn with a local offset of the mirroring :ref:`Vector2`. .. _class_VisualServer_canvas_set_modulate: - void **canvas_set_modulate** **(** :ref:`RID` canvas, :ref:`Color` color **)** Modulates all colors in the given canvas. .. _class_VisualServer_draw: - void **draw** **(** :ref:`bool` swap_buffers=true **)** Draws a frame. .. _class_VisualServer_finish: - void **finish** **(** **)** Removes buffers and clears testcubes. .. _class_VisualServer_force_draw: - void **force_draw** **(** :ref:`bool` swap_buffers=true **)** Draws a frame. Same as :ref:`draw`. .. _class_VisualServer_force_sync: - void **force_sync** **(** **)** Syncronizes threads. .. _class_VisualServer_free: - void **free** **(** :ref:`RID` rid **)** Tries to free an object in the VisualServer. .. _class_VisualServer_get_render_info: - :ref:`int` **get_render_info** **(** :ref:`int` info **)** Returns a certain information, see RENDER_INFO\_\* for options. .. _class_VisualServer_get_test_cube: - :ref:`RID` **get_test_cube** **(** **)** Returns the id of the test cube. Creates one if none exists. .. _class_VisualServer_get_test_texture: - :ref:`RID` **get_test_texture** **(** **)** Returns the id of the test texture. Creates one if none exists. .. _class_VisualServer_get_white_texture: - :ref:`RID` **get_white_texture** **(** **)** Returns the id of a white texture. Creates one if none exists. .. _class_VisualServer_has_changed: - :ref:`bool` **has_changed** **(** **)** const Returns ``true`` if changes have been made to the VisualServer's data. :ref:`draw` is usually called if this happens. .. _class_VisualServer_has_feature: - :ref:`bool` **has_feature** **(** :ref:`int` feature **)** const .. _class_VisualServer_has_os_feature: - :ref:`bool` **has_os_feature** **(** :ref:`String` feature **)** const Returns true, if the OS supports a certain feature. Features might be s3tc, etc, etc2 and pvrtc, .. _class_VisualServer_init: - void **init** **(** **)** Initializes the visual server. .. _class_VisualServer_make_sphere_mesh: - :ref:`RID` **make_sphere_mesh** **(** :ref:`int` latitudes, :ref:`int` longitudes, :ref:`float` radius **)** Returns a mesh of a sphere with the given amount of horizontal and vertical subdivisions. .. _class_VisualServer_material_create: - :ref:`RID` **material_create** **(** **)** Returns an empty material. .. _class_VisualServer_material_get_param: - :ref:`Variant` **material_get_param** **(** :ref:`RID` material, :ref:`String` parameter **)** const Returns the value of a certain material's parameter. .. _class_VisualServer_material_get_shader: - :ref:`RID` **material_get_shader** **(** :ref:`RID` shader_material **)** const Returns the shader of a certain material's shader. Returns an empty RID if the material doesn't have a shader. .. _class_VisualServer_material_set_line_width: - void **material_set_line_width** **(** :ref:`RID` material, :ref:`float` width **)** Sets a materials line width. .. _class_VisualServer_material_set_next_pass: - void **material_set_next_pass** **(** :ref:`RID` material, :ref:`RID` next_material **)** Sets an objects next material. .. _class_VisualServer_material_set_param: - void **material_set_param** **(** :ref:`RID` material, :ref:`String` parameter, :ref:`Variant` value **)** Sets a materials parameter. .. _class_VisualServer_material_set_render_priority: - void **material_set_render_priority** **(** :ref:`RID` material, :ref:`int` priority **)** Sets a material's render priority. .. _class_VisualServer_material_set_shader: - void **material_set_shader** **(** :ref:`RID` shader_material, :ref:`RID` shader **)** Sets a shader material's shader. .. _class_VisualServer_mesh_add_surface_from_arrays: - void **mesh_add_surface_from_arrays** **(** :ref:`RID` mesh, :ref:`int` primtive, :ref:`Array` arrays, :ref:`Array` blend_shapes=[ ], :ref:`int` compress_format=97792 **)** Adds a surface generated from the Arrays to a mesh. See PRIMITIVE_TYPE\_\* constants for types. .. _class_VisualServer_mesh_clear: - void **mesh_clear** **(** :ref:`RID` mesh **)** Removes all surfaces from a mesh. .. _class_VisualServer_mesh_create: - :ref:`RID` **mesh_create** **(** **)** Creates a new mesh. .. _class_VisualServer_mesh_get_blend_shape_count: - :ref:`int` **mesh_get_blend_shape_count** **(** :ref:`RID` mesh **)** const Returns a mesh's blend shape count. .. _class_VisualServer_mesh_get_blend_shape_mode: - :ref:`int` **mesh_get_blend_shape_mode** **(** :ref:`RID` mesh **)** const Returns a mesh's blend shape mode. .. _class_VisualServer_mesh_get_custom_aabb: - :ref:`AABB` **mesh_get_custom_aabb** **(** :ref:`RID` mesh **)** const Returns a mesh's custom aabb. .. _class_VisualServer_mesh_get_surface_count: - :ref:`int` **mesh_get_surface_count** **(** :ref:`RID` mesh **)** const Returns a mesh's number of surfaces. .. _class_VisualServer_mesh_remove_surface: - void **mesh_remove_surface** **(** :ref:`RID` mesh, :ref:`int` index **)** Removes a mesh's surface. .. _class_VisualServer_mesh_set_blend_shape_count: - void **mesh_set_blend_shape_count** **(** :ref:`RID` mesh, :ref:`int` amount **)** Sets a mesh's blend shape count. .. _class_VisualServer_mesh_set_blend_shape_mode: - void **mesh_set_blend_shape_mode** **(** :ref:`RID` mesh, :ref:`int` mode **)** Sets a mesh's blend shape mode. .. _class_VisualServer_mesh_set_custom_aabb: - void **mesh_set_custom_aabb** **(** :ref:`RID` mesh, :ref:`AABB` aabb **)** Sets a mesh's custom aabb. .. _class_VisualServer_mesh_surface_get_aabb: - :ref:`AABB` **mesh_surface_get_aabb** **(** :ref:`RID` mesh, :ref:`int` surface **)** const Returns a mesh's surface's aabb. .. _class_VisualServer_mesh_surface_get_array: - :ref:`PoolByteArray` **mesh_surface_get_array** **(** :ref:`RID` mesh, :ref:`int` surface **)** const Returns a mesh's surface's vertex buffer. .. _class_VisualServer_mesh_surface_get_array_index_len: - :ref:`int` **mesh_surface_get_array_index_len** **(** :ref:`RID` mesh, :ref:`int` surface **)** const Returns a mesh's surface's amount of indices. .. _class_VisualServer_mesh_surface_get_array_len: - :ref:`int` **mesh_surface_get_array_len** **(** :ref:`RID` mesh, :ref:`int` surface **)** const Returns a mesh's surface's amount of vertices. .. _class_VisualServer_mesh_surface_get_arrays: - :ref:`Array` **mesh_surface_get_arrays** **(** :ref:`RID` mesh, :ref:`int` surface **)** const Returns a mesh's surface's buffer arrays. .. _class_VisualServer_mesh_surface_get_blend_shape_arrays: - :ref:`Array` **mesh_surface_get_blend_shape_arrays** **(** :ref:`RID` mesh, :ref:`int` surface **)** const Returns a mesh's surface's arrays for blend shapes .. _class_VisualServer_mesh_surface_get_format: - :ref:`int` **mesh_surface_get_format** **(** :ref:`RID` mesh, :ref:`int` surface **)** const Returns the format of a mesh's surface. .. _class_VisualServer_mesh_surface_get_index_array: - :ref:`PoolByteArray` **mesh_surface_get_index_array** **(** :ref:`RID` mesh, :ref:`int` surface **)** const Returns a mesh's surface's index buffer. .. _class_VisualServer_mesh_surface_get_material: - :ref:`RID` **mesh_surface_get_material** **(** :ref:`RID` mesh, :ref:`int` surface **)** const Returns a mesh's surface's material. .. _class_VisualServer_mesh_surface_get_primitive_type: - :ref:`int` **mesh_surface_get_primitive_type** **(** :ref:`RID` mesh, :ref:`int` surface **)** const Returns the primitive type of a mesh's surface. .. _class_VisualServer_mesh_surface_get_skeleton_aabb: - :ref:`Array` **mesh_surface_get_skeleton_aabb** **(** :ref:`RID` mesh, :ref:`int` surface **)** const Returns the aabb of a mesh's surface's skeleton. .. _class_VisualServer_mesh_surface_set_material: - void **mesh_surface_set_material** **(** :ref:`RID` mesh, :ref:`int` surface, :ref:`RID` material **)** Sets a mesh's surface's material. .. _class_VisualServer_request_frame_drawn_callback: - void **request_frame_drawn_callback** **(** :ref:`Object` where, :ref:`String` method, :ref:`Variant` userdata **)** Schedules a callback to the corresponding named 'method' on 'where' after a frame has been drawn. The callback method must use only 1 argument which will be called with 'userdata'. .. _class_VisualServer_set_boot_image: - void **set_boot_image** **(** :ref:`Image` image, :ref:`Color` color, :ref:`bool` scale **)** Sets a boot image. The color defines the background color and if scale is ``true``, the image will be scaled to fit the screen size. .. _class_VisualServer_set_debug_generate_wireframes: - void **set_debug_generate_wireframes** **(** :ref:`bool` generate **)** .. _class_VisualServer_set_default_clear_color: - void **set_default_clear_color** **(** :ref:`Color` color **)** .. _class_VisualServer_shader_create: - :ref:`RID` **shader_create** **(** **)** Creates an empty shader. .. _class_VisualServer_shader_get_code: - :ref:`String` **shader_get_code** **(** :ref:`RID` shader **)** const Returns a shader's code. .. _class_VisualServer_shader_get_default_texture_param: - :ref:`RID` **shader_get_default_texture_param** **(** :ref:`RID` shader, :ref:`String` name **)** const Returns a default texture from a shader searched by name. .. _class_VisualServer_shader_get_param_list: - :ref:`Array` **shader_get_param_list** **(** :ref:`RID` shader **)** const Returns the parameters of a shader. .. _class_VisualServer_shader_set_code: - void **shader_set_code** **(** :ref:`RID` shader, :ref:`String` code **)** Sets a shader's code. .. _class_VisualServer_shader_set_default_texture_param: - void **shader_set_default_texture_param** **(** :ref:`RID` shader, :ref:`String` name, :ref:`RID` texture **)** Sets a shader's default texture. Overwrites the texture given by name. .. _class_VisualServer_sky_create: - :ref:`RID` **sky_create** **(** **)** Creates an empty sky. .. _class_VisualServer_sky_set_texture: - void **sky_set_texture** **(** :ref:`RID` sky, :ref:`RID` cube_map, :ref:`int` radiance_size **)** Sets a sky's texture. .. _class_VisualServer_sync: - void **sync** **(** **)** .. _class_VisualServer_texture_allocate: - void **texture_allocate** **(** :ref:`RID` texture, :ref:`int` width, :ref:`int` height, :ref:`int` format, :ref:`int` flags=7 **)** Allocates space for a texture's image or video. .. _class_VisualServer_texture_create: - :ref:`RID` **texture_create** **(** **)** Creates an empty texture. .. _class_VisualServer_texture_create_from_image: - :ref:`RID` **texture_create_from_image** **(** :ref:`Image` image, :ref:`int` flags=7 **)** Creates a texture, allocates the space for an image, and fills in the image. .. _class_VisualServer_texture_debug_usage: - :ref:`Array` **texture_debug_usage** **(** **)** Returns a list of all the textures and their information. .. _class_VisualServer_texture_get_data: - :ref:`Image` **texture_get_data** **(** :ref:`RID` texture, :ref:`int` cube_side=0 **)** const Returns a copy of a texture's image unless it's a CubeMap, in wich case it returns the :ref:`RID` of the image at one of the cubes sides. .. _class_VisualServer_texture_get_flags: - :ref:`int` **texture_get_flags** **(** :ref:`RID` texture **)** const Returns the flags of a texture. .. _class_VisualServer_texture_get_format: - :ref:`int` **texture_get_format** **(** :ref:`RID` texture **)** const Returns the format of the texture's image. .. _class_VisualServer_texture_get_height: - :ref:`int` **texture_get_height** **(** :ref:`RID` texture **)** const Returns the texture's height. .. _class_VisualServer_texture_get_path: - :ref:`String` **texture_get_path** **(** :ref:`RID` texture **)** const Returns the texture's path. .. _class_VisualServer_texture_get_texid: - :ref:`int` **texture_get_texid** **(** :ref:`RID` texture **)** const Returns the opengl id of the texture's image. .. _class_VisualServer_texture_get_width: - :ref:`int` **texture_get_width** **(** :ref:`RID` texture **)** const Returns the texture's width. .. _class_VisualServer_texture_set_data: - void **texture_set_data** **(** :ref:`RID` texture, :ref:`Image` image, :ref:`int` cube_side=0 **)** Sets the texture's image data. If it's a CubeMap, it sets the image data at a cube side. .. _class_VisualServer_texture_set_flags: - void **texture_set_flags** **(** :ref:`RID` texture, :ref:`int` flags **)** Sets the texture's flags. See enum TextureFlags for options .. _class_VisualServer_texture_set_path: - void **texture_set_path** **(** :ref:`RID` texture, :ref:`String` path **)** Sets the texture's path. .. _class_VisualServer_texture_set_shrink_all_x2_on_set_data: - void **texture_set_shrink_all_x2_on_set_data** **(** :ref:`bool` shrink **)** If ``true``, sets internal processes to shrink all image data to half the size. .. _class_VisualServer_texture_set_size_override: - void **texture_set_size_override** **(** :ref:`RID` texture, :ref:`int` width, :ref:`int` height **)** Overwrites the texture's width and height. .. _class_VisualServer_textures_keep_original: - void **textures_keep_original** **(** :ref:`bool` enable **)** If ``true``, the image will be stored in the texture's images array if overwritten. .. _class_VisualServer_viewport_attach_camera: - void **viewport_attach_camera** **(** :ref:`RID` viewport, :ref:`RID` camera **)** Sets a viewport's camera. .. _class_VisualServer_viewport_attach_canvas: - void **viewport_attach_canvas** **(** :ref:`RID` viewport, :ref:`RID` canvas **)** Sets a viewport's canvas. .. _class_VisualServer_viewport_attach_to_screen: - void **viewport_attach_to_screen** **(** :ref:`RID` viewport, :ref:`Rect2` rect=Rect2( 0, 0, 0, 0 ), :ref:`int` screen=0 **)** Attaches a viewport to a screen. .. _class_VisualServer_viewport_create: - :ref:`RID` **viewport_create** **(** **)** Creates an empty viewport. .. _class_VisualServer_viewport_detach: - void **viewport_detach** **(** :ref:`RID` viewport **)** Detaches the viewport from the screen. .. _class_VisualServer_viewport_get_render_info: - :ref:`int` **viewport_get_render_info** **(** :ref:`RID` viewport, :ref:`int` info **)** Returns a viewport's render info. for options see VIEWPORT_RENDER_INFO\* constants. .. _class_VisualServer_viewport_get_texture: - :ref:`RID` **viewport_get_texture** **(** :ref:`RID` viewport **)** const Returns the viewport's last rendered frame. .. _class_VisualServer_viewport_remove_canvas: - void **viewport_remove_canvas** **(** :ref:`RID` viewport, :ref:`RID` canvas **)** Detaches a viewport from a canvas and vice versa. .. _class_VisualServer_viewport_set_active: - void **viewport_set_active** **(** :ref:`RID` viewport, :ref:`bool` active **)** If ``true``, sets the viewport active, else sets it inactive. .. _class_VisualServer_viewport_set_canvas_layer: - void **viewport_set_canvas_layer** **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`int` layer **)** Sets the renderlayer for a viewport's canvas. .. _class_VisualServer_viewport_set_canvas_transform: - void **viewport_set_canvas_transform** **(** :ref:`RID` viewport, :ref:`RID` canvas, :ref:`Transform2D` offset **)** Sets the transformation of a viewport's canvas. .. _class_VisualServer_viewport_set_clear_mode: - void **viewport_set_clear_mode** **(** :ref:`RID` viewport, :ref:`int` clear_mode **)** Sets the clear mode of a viewport. See VIEWPORT_CLEAR_MODE\_\* constants for options. .. _class_VisualServer_viewport_set_debug_draw: - void **viewport_set_debug_draw** **(** :ref:`RID` viewport, :ref:`int` draw **)** Sets the debug draw mode of a viewport. See VIEWPORT_DEBUG_DRAW\_\* constants for options. .. _class_VisualServer_viewport_set_disable_3d: - void **viewport_set_disable_3d** **(** :ref:`RID` viewport, :ref:`bool` disabled **)** If ``true`` a viewport's 3D rendering should be disabled. .. _class_VisualServer_viewport_set_disable_environment: - void **viewport_set_disable_environment** **(** :ref:`RID` viewport, :ref:`bool` disabled **)** If ``true`` rendering of a viewport's environment should be disabled. .. _class_VisualServer_viewport_set_global_canvas_transform: - void **viewport_set_global_canvas_transform** **(** :ref:`RID` viewport, :ref:`Transform2D` transform **)** Sets the viewport's global transformation matrix. .. _class_VisualServer_viewport_set_hdr: - void **viewport_set_hdr** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** If ``true`` the viewport should render to hdr. .. _class_VisualServer_viewport_set_hide_canvas: - void **viewport_set_hide_canvas** **(** :ref:`RID` viewport, :ref:`bool` hidden **)** If ``true`` the viewport's canvas should not be rendered. .. _class_VisualServer_viewport_set_hide_scenario: - void **viewport_set_hide_scenario** **(** :ref:`RID` viewport, :ref:`bool` hidden **)** .. _class_VisualServer_viewport_set_msaa: - void **viewport_set_msaa** **(** :ref:`RID` viewport, :ref:`int` msaa **)** Sets the anti-aliasing mode. see enum ViewportMSAA for options. .. _class_VisualServer_viewport_set_parent_viewport: - void **viewport_set_parent_viewport** **(** :ref:`RID` viewport, :ref:`RID` parent_viewport **)** Sets the viewport's parent to another viewport. .. _class_VisualServer_viewport_set_scenario: - void **viewport_set_scenario** **(** :ref:`RID` viewport, :ref:`RID` scenario **)** Sets a viewport's scenario. The scenario contains information about the enum ScenarioDebugMode, environment information, reflection atlas etc. .. _class_VisualServer_viewport_set_shadow_atlas_quadrant_subdivision: - void **viewport_set_shadow_atlas_quadrant_subdivision** **(** :ref:`RID` viewport, :ref:`int` quadrant, :ref:`int` subdivision **)** Sets the shadow atlas quadrant's subdivision. .. _class_VisualServer_viewport_set_shadow_atlas_size: - void **viewport_set_shadow_atlas_size** **(** :ref:`RID` viewport, :ref:`int` size **)** Sets the size of the shadow atlas's images. .. _class_VisualServer_viewport_set_size: - void **viewport_set_size** **(** :ref:`RID` viewport, :ref:`int` width, :ref:`int` height **)** Sets the viewport's width and height. .. _class_VisualServer_viewport_set_transparent_background: - void **viewport_set_transparent_background** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** If ``true`` the viewport should render its background as transparent. .. _class_VisualServer_viewport_set_update_mode: - void **viewport_set_update_mode** **(** :ref:`RID` viewport, :ref:`int` update_mode **)** Sets when the viewport should be updated. See VIEWPORT_UPDATE_MODE\_\* constants for options. .. _class_VisualServer_viewport_set_usage: - void **viewport_set_usage** **(** :ref:`RID` viewport, :ref:`int` usage **)** Sets what should be rendered in the viewport. See VIEWPORT_USAGE\_\* constants for options. .. _class_VisualServer_viewport_set_use_arvr: - void **viewport_set_use_arvr** **(** :ref:`RID` viewport, :ref:`bool` use_arvr **)** If ``true`` the viewport should use augmented or virtual reality technologies. See :ref:`ARVRInterface`. .. _class_VisualServer_viewport_set_vflip: - void **viewport_set_vflip** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** If ``true`` the viewport's rendering should be flipped vertically.