Struct VisualServer

Source
pub struct VisualServer { /* private fields */ }
Expand description

core singleton class VisualServer inherits Object (unsafe).

§Official documentation

See the documentation of this class in the Godot engine’s official documentation.

§Feature flag

This type is behind the gdnative crate’s graphics feature flag.

§Class hierarchy

VisualServer inherits methods from:

Implementations§

Source§

impl VisualServer

Source

pub fn godot_singleton() -> Self

Source

pub fn force_sync(&mut self)

Source

pub fn force_draw(&mut self, swap_buffers: bool, frame_step: f64)

Source

pub fn sync(&mut self)

Source

pub fn draw(&mut self, swap_buffers: bool, frame_step: f64)

Source

pub fn texture_create(&mut self) -> Rid

Source

pub fn texture_create_from_image( &mut self, image: Option<Image>, flags: i64, ) -> Rid

Source

pub fn texture_allocate( &mut self, texture: Rid, width: i64, height: i64, format: i64, flags: i64, )

Source

pub fn texture_set_data( &mut self, texture: Rid, image: Option<Image>, cube_side: i64, )

Source

pub fn texture_set_data_partial( &mut self, texture: Rid, image: Option<Image>, src_x: i64, src_y: i64, src_w: i64, src_h: i64, dst_x: i64, dst_y: i64, dst_mip: i64, cube_side: i64, )

Source

pub fn texture_get_data(&self, texture: Rid, cube_side: i64) -> Option<Image>

Source

pub fn texture_set_flags(&mut self, texture: Rid, flags: i64)

Source

pub fn texture_get_flags(&self, texture: Rid) -> i64

Source

pub fn texture_get_format(&self, texture: Rid) -> ImageFormat

Source

pub fn texture_get_texid(&self, texture: Rid) -> i64

Source

pub fn texture_get_width(&self, texture: Rid) -> i64

Source

pub fn texture_get_height(&self, texture: Rid) -> i64

Source

pub fn texture_set_size_override( &mut self, texture: Rid, width: i64, height: i64, )

Source

pub fn texture_set_path(&mut self, texture: Rid, path: GodotString)

Source

pub fn texture_get_path(&self, texture: Rid) -> GodotString

Source

pub fn texture_set_shrink_all_x2_on_set_data(&mut self, shrink: bool)

Source

pub fn texture_debug_usage(&mut self) -> VariantArray

Source

pub fn textures_keep_original(&mut self, enable: bool)

Source

pub fn sky_create(&mut self) -> Rid

Source

pub fn sky_set_texture(&mut self, sky: Rid, cube_map: Rid, radiance_size: i64)

Source

pub fn shader_create(&mut self) -> Rid

Source

pub fn shader_set_code(&mut self, shader: Rid, code: GodotString)

Source

pub fn shader_get_code(&self, shader: Rid) -> GodotString

Source

pub fn shader_get_param_list(&self, shader: Rid) -> VariantArray

Source

pub fn shader_set_default_texture_param( &mut self, shader: Rid, name: GodotString, texture: Rid, )

Source

pub fn shader_get_default_texture_param( &self, shader: Rid, name: GodotString, ) -> Rid

Source

pub fn material_create(&mut self) -> Rid

Source

pub fn material_set_shader(&mut self, shader_material: Rid, shader: Rid)

Source

pub fn material_get_shader(&self, shader_material: Rid) -> Rid

Source

pub fn material_set_param( &mut self, material: Rid, parameter: GodotString, value: Variant, )

Source

pub fn material_get_param( &self, material: Rid, parameter: GodotString, ) -> Variant

Source

pub fn material_set_render_priority(&mut self, material: Rid, priority: i64)

Source

pub fn material_set_line_width(&mut self, material: Rid, width: f64)

Source

pub fn material_set_next_pass(&mut self, material: Rid, next_material: Rid)

Source

pub fn mesh_create(&mut self) -> Rid

Source

pub fn mesh_surface_get_format_offset( &self, format: i64, vertex_len: i64, index_len: i64, array_index: i64, ) -> i64

Source

pub fn mesh_surface_get_format_stride( &self, format: i64, vertex_len: i64, index_len: i64, ) -> i64

Source

pub fn mesh_add_surface_from_arrays( &mut self, mesh: Rid, primtive: i64, arrays: VariantArray, blend_shapes: VariantArray, compress_format: i64, )

Source

pub fn mesh_set_blend_shape_count(&mut self, mesh: Rid, amount: i64)

Source

pub fn mesh_get_blend_shape_count(&self, mesh: Rid) -> i64

Source

pub fn mesh_set_blend_shape_mode(&mut self, mesh: Rid, mode: i64)

Source

pub fn mesh_get_blend_shape_mode(&self, mesh: Rid) -> VisualServerBlendShapeMode

Source

pub fn mesh_surface_update_region( &mut self, mesh: Rid, surface: i64, offset: i64, data: ByteArray, )

Source

pub fn mesh_surface_set_material( &mut self, mesh: Rid, surface: i64, material: Rid, )

Source

pub fn mesh_surface_get_material(&self, mesh: Rid, surface: i64) -> Rid

Source

pub fn mesh_surface_get_array_len(&self, mesh: Rid, surface: i64) -> i64

Source

pub fn mesh_surface_get_array_index_len(&self, mesh: Rid, surface: i64) -> i64

Source

pub fn mesh_surface_get_array(&self, mesh: Rid, surface: i64) -> ByteArray

Source

pub fn mesh_surface_get_index_array(&self, mesh: Rid, surface: i64) -> ByteArray

Source

pub fn mesh_surface_get_arrays(&self, mesh: Rid, surface: i64) -> VariantArray

Source

pub fn mesh_surface_get_blend_shape_arrays( &self, mesh: Rid, surface: i64, ) -> VariantArray

Source

pub fn mesh_surface_get_format(&self, mesh: Rid, surface: i64) -> i64

Source

pub fn mesh_surface_get_primitive_type( &self, mesh: Rid, surface: i64, ) -> VisualServerPrimitiveType

Source

pub fn mesh_surface_get_aabb(&self, mesh: Rid, surface: i64) -> Aabb

Source

pub fn mesh_surface_get_skeleton_aabb( &self, mesh: Rid, surface: i64, ) -> VariantArray

Source

pub fn mesh_remove_surface(&mut self, mesh: Rid, index: i64)

Source

pub fn mesh_get_surface_count(&self, mesh: Rid) -> i64

Source

pub fn mesh_set_custom_aabb(&mut self, mesh: Rid, aabb: Aabb)

Source

pub fn mesh_get_custom_aabb(&self, mesh: Rid) -> Aabb

Source

pub fn mesh_clear(&mut self, mesh: Rid)

Source

pub fn multimesh_allocate( &mut self, multimesh: Rid, instances: i64, transform_format: i64, color_format: i64, custom_data_format: i64, )

Source

pub fn multimesh_get_instance_count(&self, multimesh: Rid) -> i64

Source

pub fn multimesh_set_mesh(&mut self, multimesh: Rid, mesh: Rid)

Source

pub fn multimesh_instance_set_transform( &mut self, multimesh: Rid, index: i64, transform: Transform, )

Source

pub fn multimesh_instance_set_transform_2d( &mut self, multimesh: Rid, index: i64, transform: Transform2D, )

Source

pub fn multimesh_instance_set_color( &mut self, multimesh: Rid, index: i64, color: Color, )

Source

pub fn multimesh_instance_set_custom_data( &mut self, multimesh: Rid, index: i64, custom_data: Color, )

Source

pub fn multimesh_get_mesh(&self, multimesh: Rid) -> Rid

Source

pub fn multimesh_get_aabb(&self, multimesh: Rid) -> Aabb

Source

pub fn multimesh_instance_get_transform( &self, multimesh: Rid, index: i64, ) -> Transform

Source

pub fn multimesh_instance_get_transform_2d( &self, multimesh: Rid, index: i64, ) -> Transform2D

Source

pub fn multimesh_instance_get_color(&self, multimesh: Rid, index: i64) -> Color

Source

pub fn multimesh_instance_get_custom_data( &self, multimesh: Rid, index: i64, ) -> Color

Source

pub fn multimesh_set_visible_instances(&mut self, multimesh: Rid, visible: i64)

Source

pub fn multimesh_get_visible_instances(&self, multimesh: Rid) -> i64

Source

pub fn multimesh_set_as_bulk_array( &mut self, multimesh: Rid, array: Float32Array, )

Source

pub fn immediate_create(&mut self) -> Rid

Source

pub fn immediate_begin(&mut self, immediate: Rid, primitive: i64, texture: Rid)

Source

pub fn immediate_vertex(&mut self, immediate: Rid, vertex: Vector3)

Source

pub fn immediate_vertex_2d(&mut self, immediate: Rid, vertex: Vector2)

Source

pub fn immediate_normal(&mut self, immediate: Rid, normal: Vector3)

Source

pub fn immediate_tangent(&mut self, immediate: Rid, tangent: Plane)

Source

pub fn immediate_color(&mut self, immediate: Rid, color: Color)

Source

pub fn immediate_uv(&mut self, immediate: Rid, tex_uv: Vector2)

Source

pub fn immediate_uv2(&mut self, immediate: Rid, tex_uv: Vector2)

Source

pub fn immediate_end(&mut self, immediate: Rid)

Source

pub fn immediate_clear(&mut self, immediate: Rid)

Source

pub fn immediate_set_material(&mut self, immediate: Rid, material: Rid)

Source

pub fn immediate_get_material(&self, immediate: Rid) -> Rid

Source

pub fn skeleton_create(&mut self) -> Rid

Source

pub fn skeleton_allocate( &mut self, skeleton: Rid, bones: i64, is_2d_skeleton: bool, )

Source

pub fn skeleton_get_bone_count(&self, skeleton: Rid) -> i64

Source

pub fn skeleton_bone_set_transform( &mut self, skeleton: Rid, bone: i64, transform: Transform, )

Source

pub fn skeleton_bone_get_transform(&self, skeleton: Rid, bone: i64) -> Transform

Source

pub fn skeleton_bone_set_transform_2d( &mut self, skeleton: Rid, bone: i64, transform: Transform2D, )

Source

pub fn skeleton_bone_get_transform_2d( &self, skeleton: Rid, bone: i64, ) -> Transform2D

Source

pub fn directional_light_create(&mut self) -> Rid

Source

pub fn omni_light_create(&mut self) -> Rid

Source

pub fn spot_light_create(&mut self) -> Rid

Source

pub fn light_set_color(&mut self, light: Rid, color: Color)

Source

pub fn light_set_param(&mut self, light: Rid, param: i64, value: f64)

Source

pub fn light_set_shadow(&mut self, light: Rid, enabled: bool)

Source

pub fn light_set_shadow_color(&mut self, light: Rid, color: Color)

Source

pub fn light_set_projector(&mut self, light: Rid, texture: Rid)

Source

pub fn light_set_negative(&mut self, light: Rid, enable: bool)

Source

pub fn light_set_cull_mask(&mut self, light: Rid, mask: i64)

Source

pub fn light_set_reverse_cull_face_mode(&mut self, light: Rid, enabled: bool)

Source

pub fn light_omni_set_shadow_mode(&mut self, light: Rid, mode: i64)

Source

pub fn light_omni_set_shadow_detail(&mut self, light: Rid, detail: i64)

Source

pub fn light_directional_set_shadow_mode(&mut self, light: Rid, mode: i64)

Source

pub fn light_directional_set_blend_splits(&mut self, light: Rid, enable: bool)

Source

pub fn light_directional_set_shadow_depth_range_mode( &mut self, light: Rid, range_mode: i64, )

Source

pub fn reflection_probe_create(&mut self) -> Rid

Source

pub fn reflection_probe_set_update_mode(&mut self, probe: Rid, mode: i64)

Source

pub fn reflection_probe_set_intensity(&mut self, probe: Rid, intensity: f64)

Source

pub fn reflection_probe_set_interior_ambient( &mut self, probe: Rid, color: Color, )

Source

pub fn reflection_probe_set_interior_ambient_energy( &mut self, probe: Rid, energy: f64, )

Source

pub fn reflection_probe_set_interior_ambient_probe_contribution( &mut self, probe: Rid, contrib: f64, )

Source

pub fn reflection_probe_set_max_distance(&mut self, probe: Rid, distance: f64)

Source

pub fn reflection_probe_set_extents(&mut self, probe: Rid, extents: Vector3)

Source

pub fn reflection_probe_set_origin_offset( &mut self, probe: Rid, offset: Vector3, )

Source

pub fn reflection_probe_set_as_interior(&mut self, probe: Rid, enable: bool)

Source

pub fn reflection_probe_set_enable_box_projection( &mut self, probe: Rid, enable: bool, )

Source

pub fn reflection_probe_set_enable_shadows(&mut self, probe: Rid, enable: bool)

Source

pub fn reflection_probe_set_cull_mask(&mut self, probe: Rid, layers: i64)

Source

pub fn gi_probe_create(&mut self) -> Rid

Source

pub fn gi_probe_set_bounds(&mut self, probe: Rid, bounds: Aabb)

Source

pub fn gi_probe_get_bounds(&self, probe: Rid) -> Aabb

Source

pub fn gi_probe_set_cell_size(&mut self, probe: Rid, range: f64)

Source

pub fn gi_probe_get_cell_size(&self, probe: Rid) -> f64

Source

pub fn gi_probe_set_to_cell_xform(&mut self, xform: Rid, arg1: Transform)

Source

pub fn gi_probe_get_to_cell_xform(&self, arg0: Rid) -> Transform

Source

pub fn gi_probe_set_dynamic_data(&mut self, data: Rid, arg1: Int32Array)

Source

pub fn gi_probe_get_dynamic_data(&self, arg0: Rid) -> Int32Array

Source

pub fn gi_probe_set_dynamic_range(&mut self, range: Rid, arg1: i64)

Source

pub fn gi_probe_get_dynamic_range(&self, arg0: Rid) -> i64

Source

pub fn gi_probe_set_energy(&mut self, energy: Rid, arg1: f64)

Source

pub fn gi_probe_get_energy(&self, arg0: Rid) -> f64

Source

pub fn gi_probe_set_bias(&mut self, bias: Rid, arg1: f64)

Source

pub fn gi_probe_get_bias(&self, arg0: Rid) -> f64

Source

pub fn gi_probe_set_normal_bias(&mut self, bias: Rid, arg1: f64)

Source

pub fn gi_probe_get_normal_bias(&self, arg0: Rid) -> f64

Source

pub fn gi_probe_set_propagation(&mut self, propagation: Rid, arg1: f64)

Source

pub fn gi_probe_get_propagation(&self, arg0: Rid) -> f64

Source

pub fn gi_probe_set_interior(&mut self, enable: Rid, arg1: bool)

Source

pub fn gi_probe_is_interior(&self, arg0: Rid) -> bool

Source

pub fn gi_probe_set_compress(&mut self, enable: Rid, arg1: bool)

Source

pub fn gi_probe_is_compressed(&self, arg0: Rid) -> bool

Source

pub fn lightmap_capture_create(&mut self) -> Rid

Source

pub fn lightmap_capture_set_bounds(&mut self, capture: Rid, bounds: Aabb)

Source

pub fn lightmap_capture_get_bounds(&self, capture: Rid) -> Aabb

Source

pub fn lightmap_capture_set_octree(&mut self, capture: Rid, octree: ByteArray)

Source

pub fn lightmap_capture_set_octree_cell_transform( &mut self, capture: Rid, xform: Transform, )

Source

pub fn lightmap_capture_get_octree_cell_transform( &self, capture: Rid, ) -> Transform

Source

pub fn lightmap_capture_set_octree_cell_subdiv( &mut self, capture: Rid, subdiv: i64, )

Source

pub fn lightmap_capture_get_octree_cell_subdiv(&self, capture: Rid) -> i64

Source

pub fn lightmap_capture_get_octree(&self, capture: Rid) -> ByteArray

Source

pub fn lightmap_capture_set_energy(&mut self, capture: Rid, energy: f64)

Source

pub fn lightmap_capture_get_energy(&self, capture: Rid) -> f64

Source

pub fn particles_create(&mut self) -> Rid

Source

pub fn particles_set_emitting(&mut self, particles: Rid, emitting: bool)

Source

pub fn particles_get_emitting(&mut self, particles: Rid) -> bool

Source

pub fn particles_set_amount(&mut self, particles: Rid, amount: i64)

Source

pub fn particles_set_lifetime(&mut self, particles: Rid, lifetime: f64)

Source

pub fn particles_set_one_shot(&mut self, particles: Rid, one_shot: bool)

Source

pub fn particles_set_pre_process_time(&mut self, particles: Rid, time: f64)

Source

pub fn particles_set_explosiveness_ratio(&mut self, particles: Rid, ratio: f64)

Source

pub fn particles_set_randomness_ratio(&mut self, particles: Rid, ratio: f64)

Source

pub fn particles_set_custom_aabb(&mut self, particles: Rid, aabb: Aabb)

Source

pub fn particles_set_speed_scale(&mut self, particles: Rid, scale: f64)

Source

pub fn particles_set_use_local_coordinates( &mut self, particles: Rid, enable: bool, )

Source

pub fn particles_set_process_material(&mut self, particles: Rid, material: Rid)

Source

pub fn particles_set_fixed_fps(&mut self, particles: Rid, fps: i64)

Source

pub fn particles_set_fractional_delta(&mut self, particles: Rid, enable: bool)

Source

pub fn particles_restart(&mut self, particles: Rid)

Source

pub fn particles_set_draw_order(&mut self, particles: Rid, order: i64)

Source

pub fn particles_set_draw_passes(&mut self, particles: Rid, count: i64)

Source

pub fn particles_set_draw_pass_mesh( &mut self, particles: Rid, pass: i64, mesh: Rid, )

Source

pub fn particles_get_current_aabb(&mut self, particles: Rid) -> Aabb

Source

pub fn particles_set_emission_transform( &mut self, particles: Rid, transform: Transform, )

Source

pub fn camera_create(&mut self) -> Rid

Source

pub fn camera_set_perspective( &mut self, camera: Rid, fovy_degrees: f64, z_near: f64, z_far: f64, )

Source

pub fn camera_set_orthogonal( &mut self, camera: Rid, size: f64, z_near: f64, z_far: f64, )

Source

pub fn camera_set_transform(&mut self, camera: Rid, transform: Transform)

Source

pub fn camera_set_cull_mask(&mut self, camera: Rid, layers: i64)

Source

pub fn camera_set_environment(&mut self, camera: Rid, env: Rid)

Source

pub fn camera_set_use_vertical_aspect(&mut self, camera: Rid, enable: bool)

Source

pub fn viewport_create(&mut self) -> Rid

Source

pub fn viewport_set_use_arvr(&mut self, viewport: Rid, use_arvr: bool)

Source

pub fn viewport_set_size(&mut self, viewport: Rid, width: i64, height: i64)

Source

pub fn viewport_set_active(&mut self, viewport: Rid, active: bool)

Source

pub fn viewport_set_parent_viewport( &mut self, viewport: Rid, parent_viewport: Rid, )

Source

pub fn viewport_attach_to_screen( &mut self, viewport: Rid, rect: Rect2, screen: i64, )

Source

pub fn viewport_detach(&mut self, viewport: Rid)

Source

pub fn viewport_set_update_mode(&mut self, viewport: Rid, update_mode: i64)

Source

pub fn viewport_set_vflip(&mut self, viewport: Rid, enabled: bool)

Source

pub fn viewport_set_clear_mode(&mut self, viewport: Rid, clear_mode: i64)

Source

pub fn viewport_get_texture(&self, viewport: Rid) -> Rid

Source

pub fn viewport_set_hide_scenario(&mut self, viewport: Rid, hidden: bool)

Source

pub fn viewport_set_hide_canvas(&mut self, viewport: Rid, hidden: bool)

Source

pub fn viewport_set_disable_environment( &mut self, viewport: Rid, disabled: bool, )

Source

pub fn viewport_set_disable_3d(&mut self, viewport: Rid, disabled: bool)

Source

pub fn viewport_attach_camera(&mut self, viewport: Rid, camera: Rid)

Source

pub fn viewport_set_scenario(&mut self, viewport: Rid, scenario: Rid)

Source

pub fn viewport_attach_canvas(&mut self, viewport: Rid, canvas: Rid)

Source

pub fn viewport_remove_canvas(&mut self, viewport: Rid, canvas: Rid)

Source

pub fn viewport_set_canvas_transform( &mut self, viewport: Rid, canvas: Rid, offset: Transform2D, )

Source

pub fn viewport_set_transparent_background( &mut self, viewport: Rid, enabled: bool, )

Source

pub fn viewport_set_global_canvas_transform( &mut self, viewport: Rid, transform: Transform2D, )

Source

pub fn viewport_set_canvas_layer( &mut self, viewport: Rid, canvas: Rid, layer: i64, )

Source

pub fn viewport_set_shadow_atlas_size(&mut self, viewport: Rid, size: i64)

Source

pub fn viewport_set_shadow_atlas_quadrant_subdivision( &mut self, viewport: Rid, quadrant: i64, subdivision: i64, )

Source

pub fn viewport_set_msaa(&mut self, viewport: Rid, msaa: i64)

Source

pub fn viewport_set_hdr(&mut self, viewport: Rid, enabled: bool)

Source

pub fn viewport_set_usage(&mut self, viewport: Rid, usage: i64)

Source

pub fn viewport_get_render_info(&mut self, viewport: Rid, info: i64) -> i64

Source

pub fn viewport_set_debug_draw(&mut self, viewport: Rid, draw: i64)

Source

pub fn environment_create(&mut self) -> Rid

Source

pub fn environment_set_background(&mut self, env: Rid, bg: i64)

Source

pub fn environment_set_sky(&mut self, env: Rid, sky: Rid)

Source

pub fn environment_set_sky_custom_fov(&mut self, env: Rid, scale: f64)

Source

pub fn environment_set_bg_color(&mut self, env: Rid, color: Color)

Source

pub fn environment_set_bg_energy(&mut self, env: Rid, energy: f64)

Source

pub fn environment_set_canvas_max_layer(&mut self, env: Rid, max_layer: i64)

Source

pub fn environment_set_ambient_light( &mut self, env: Rid, color: Color, energy: f64, sky_contibution: f64, )

Source

pub fn environment_set_dof_blur_near( &mut self, env: Rid, enable: bool, distance: f64, transition: f64, far_amount: f64, quality: i64, )

Source

pub fn environment_set_dof_blur_far( &mut self, env: Rid, enable: bool, distance: f64, transition: f64, far_amount: f64, quality: i64, )

Source

pub fn environment_set_glow( &mut self, env: Rid, enable: bool, level_flags: i64, intensity: f64, strength: f64, bloom_threshold: f64, blend_mode: i64, hdr_bleed_threshold: f64, hdr_bleed_scale: f64, bicubic_upscale: bool, )

Source

pub fn environment_set_tonemap( &mut self, env: Rid, tone_mapper: i64, exposure: f64, white: f64, auto_exposure: bool, min_luminance: f64, max_luminance: f64, auto_exp_speed: f64, auto_exp_grey: f64, )

Source

pub fn environment_set_adjustment( &mut self, env: Rid, enable: bool, brightness: f64, contrast: f64, saturation: f64, ramp: Rid, )

Source

pub fn environment_set_ssr( &mut self, env: Rid, enable: bool, max_steps: i64, fade_in: f64, fade_out: f64, depth_tolerance: f64, roughness: bool, )

Source

pub fn environment_set_ssao( &mut self, env: Rid, enable: bool, radius: f64, intensity: f64, radius2: f64, intensity2: f64, bias: f64, light_affect: f64, color: f64, quality: Color, blur: i64, bilateral_sharpness: i64, arg12: f64, )

Source

pub fn environment_set_fog( &mut self, env: Rid, enable: bool, color: Color, sun_color: Color, sun_amount: f64, )

Source

pub fn environment_set_fog_depth( &mut self, env: Rid, enable: bool, depth_begin: f64, depth_curve: f64, transmit: bool, transmit_curve: f64, )

Source

pub fn environment_set_fog_height( &mut self, env: Rid, enable: bool, min_height: f64, max_height: f64, height_curve: f64, )

Source

pub fn scenario_create(&mut self) -> Rid

Source

pub fn scenario_set_debug(&mut self, scenario: Rid, debug_mode: i64)

Source

pub fn scenario_set_environment(&mut self, scenario: Rid, environment: Rid)

Source

pub fn scenario_set_reflection_atlas_size( &mut self, scenario: Rid, p_size: i64, subdiv: i64, )

Source

pub fn scenario_set_fallback_environment( &mut self, scenario: Rid, environment: Rid, )

Source

pub fn instance_create2(&mut self, base: Rid, scenario: Rid) -> Rid

Source

pub fn instance_create(&mut self) -> Rid

Source

pub fn instance_set_base(&mut self, instance: Rid, base: Rid)

Source

pub fn instance_set_scenario(&mut self, instance: Rid, scenario: Rid)

Source

pub fn instance_set_layer_mask(&mut self, instance: Rid, mask: i64)

Source

pub fn instance_set_transform(&mut self, instance: Rid, transform: Transform)

Source

pub fn instance_attach_object_instance_id(&mut self, instance: Rid, id: i64)

Source

pub fn instance_set_blend_shape_weight( &mut self, instance: Rid, shape: i64, weight: f64, )

Source

pub fn instance_set_surface_material( &mut self, instance: Rid, surface: i64, material: Rid, )

Source

pub fn instance_set_visible(&mut self, instance: Rid, visible: bool)

Source

pub fn instance_set_use_lightmap( &mut self, instance: Rid, lightmap_instance: Rid, lightmap: Rid, )

Source

pub fn instance_set_custom_aabb(&mut self, instance: Rid, aabb: Aabb)

Source

pub fn instance_attach_skeleton(&mut self, instance: Rid, skeleton: Rid)

Source

pub fn instance_set_exterior(&mut self, instance: Rid, enabled: bool)

Source

pub fn instance_set_extra_visibility_margin( &mut self, instance: Rid, margin: f64, )

Source

pub fn instance_geometry_set_flag( &mut self, instance: Rid, flag: i64, enabled: bool, )

Source

pub fn instance_geometry_set_cast_shadows_setting( &mut self, instance: Rid, shadow_casting_setting: i64, )

Source

pub fn instance_geometry_set_material_override( &mut self, instance: Rid, material: Rid, )

Source

pub fn instance_geometry_set_draw_range( &mut self, instance: Rid, min: f64, max: f64, min_margin: f64, max_margin: f64, )

Source

pub fn instance_geometry_set_as_instance_lod( &mut self, instance: Rid, as_lod_of_instance: Rid, )

Source

pub fn instances_cull_aabb(&self, aabb: Aabb, scenario: Rid) -> VariantArray

Source

pub fn instances_cull_ray( &self, from: Vector3, to: Vector3, scenario: Rid, ) -> VariantArray

Source

pub fn instances_cull_convex( &self, convex: VariantArray, scenario: Rid, ) -> VariantArray

Source

pub fn canvas_create(&mut self) -> Rid

Source

pub fn canvas_set_item_mirroring( &mut self, canvas: Rid, item: Rid, mirroring: Vector2, )

Source

pub fn canvas_set_modulate(&mut self, canvas: Rid, color: Color)

Source

pub fn canvas_item_create(&mut self) -> Rid

Source

pub fn canvas_item_set_parent(&mut self, item: Rid, parent: Rid)

Source

pub fn canvas_item_set_visible(&mut self, item: Rid, visible: bool)

Source

pub fn canvas_item_set_light_mask(&mut self, item: Rid, mask: i64)

Source

pub fn canvas_item_set_transform(&mut self, item: Rid, transform: Transform2D)

Source

pub fn canvas_item_set_clip(&mut self, item: Rid, clip: bool)

Source

pub fn canvas_item_set_distance_field_mode(&mut self, item: Rid, enabled: bool)

Source

pub fn canvas_item_set_custom_rect( &mut self, item: Rid, use_custom_rect: bool, rect: Rect2, )

Source

pub fn canvas_item_set_modulate(&mut self, item: Rid, color: Color)

Source

pub fn canvas_item_set_self_modulate(&mut self, item: Rid, color: Color)

Source

pub fn canvas_item_set_draw_behind_parent(&mut self, item: Rid, enabled: bool)

Source

pub fn canvas_item_add_line( &mut self, item: Rid, from: Vector2, to: Vector2, color: Color, width: f64, antialiased: bool, )

Source

pub fn canvas_item_add_polyline( &mut self, item: Rid, points: Vector2Array, colors: ColorArray, width: f64, antialiased: bool, )

Source

pub fn canvas_item_add_rect(&mut self, item: Rid, rect: Rect2, color: Color)

Source

pub fn canvas_item_add_circle( &mut self, item: Rid, pos: Vector2, radius: f64, color: Color, )

Source

pub fn canvas_item_add_texture_rect( &mut self, item: Rid, rect: Rect2, texture: Rid, tile: bool, modulate: Color, transpose: bool, normal_map: Rid, )

Source

pub fn canvas_item_add_texture_rect_region( &mut self, item: Rid, rect: Rect2, texture: Rid, src_rect: Rect2, modulate: Color, transpose: bool, normal_map: Rid, clip_uv: bool, )

Source

pub fn canvas_item_add_nine_patch( &mut self, item: Rid, rect: Rect2, source: Rect2, texture: Rid, topleft: Vector2, bottomright: Vector2, x_axis_mode: i64, y_axis_mode: i64, draw_center: bool, modulate: Color, normal_map: Rid, )

Source

pub fn canvas_item_add_primitive( &mut self, item: Rid, points: Vector2Array, colors: ColorArray, uvs: Vector2Array, texture: Rid, width: f64, normal_map: Rid, )

Source

pub fn canvas_item_add_polygon( &mut self, item: Rid, points: Vector2Array, colors: ColorArray, uvs: Vector2Array, texture: Rid, normal_map: Rid, antialiased: bool, )

Source

pub fn canvas_item_add_triangle_array( &mut self, item: Rid, indices: Int32Array, points: Vector2Array, colors: ColorArray, uvs: Vector2Array, bones: Int32Array, weights: Float32Array, texture: Rid, count: i64, normal_map: Rid, )

Source

pub fn canvas_item_add_mesh( &mut self, item: Rid, mesh: Rid, texture: Rid, normal_map: Rid, )

Source

pub fn canvas_item_add_multimesh( &mut self, item: Rid, mesh: Rid, texture: Rid, normal_map: Rid, )

Source

pub fn canvas_item_add_particles( &mut self, item: Rid, particles: Rid, texture: Rid, normal_map: Rid, h_frames: i64, v_frames: i64, )

Source

pub fn canvas_item_add_set_transform( &mut self, item: Rid, transform: Transform2D, )

Source

pub fn canvas_item_add_clip_ignore(&mut self, item: Rid, ignore: bool)

Source

pub fn canvas_item_set_sort_children_by_y(&mut self, item: Rid, enabled: bool)

Source

pub fn canvas_item_set_z_index(&mut self, item: Rid, z_index: i64)

Source

pub fn canvas_item_set_z_as_relative_to_parent( &mut self, item: Rid, enabled: bool, )

Source

pub fn canvas_item_set_copy_to_backbuffer( &mut self, item: Rid, enabled: bool, rect: Rect2, )

Source

pub fn canvas_item_clear(&mut self, item: Rid)

Source

pub fn canvas_item_set_draw_index(&mut self, item: Rid, index: i64)

Source

pub fn canvas_item_set_material(&mut self, item: Rid, material: Rid)

Source

pub fn canvas_item_set_use_parent_material(&mut self, item: Rid, enabled: bool)

Source

pub fn canvas_light_create(&mut self) -> Rid

Source

pub fn canvas_light_attach_to_canvas(&mut self, light: Rid, canvas: Rid)

Source

pub fn canvas_light_set_enabled(&mut self, light: Rid, enabled: bool)

Source

pub fn canvas_light_set_scale(&mut self, light: Rid, scale: f64)

Source

pub fn canvas_light_set_transform(&mut self, light: Rid, transform: Transform2D)

Source

pub fn canvas_light_set_texture(&mut self, light: Rid, texture: Rid)

Source

pub fn canvas_light_set_texture_offset(&mut self, light: Rid, offset: Vector2)

Source

pub fn canvas_light_set_color(&mut self, light: Rid, color: Color)

Source

pub fn canvas_light_set_height(&mut self, light: Rid, height: f64)

Source

pub fn canvas_light_set_energy(&mut self, light: Rid, energy: f64)

Source

pub fn canvas_light_set_z_range(&mut self, light: Rid, min_z: i64, max_z: i64)

Source

pub fn canvas_light_set_layer_range( &mut self, light: Rid, min_layer: i64, max_layer: i64, )

Source

pub fn canvas_light_set_item_cull_mask(&mut self, light: Rid, mask: i64)

Source

pub fn canvas_light_set_item_shadow_cull_mask(&mut self, light: Rid, mask: i64)

Source

pub fn canvas_light_set_mode(&mut self, light: Rid, mode: i64)

Source

pub fn canvas_light_set_shadow_enabled(&mut self, light: Rid, enabled: bool)

Source

pub fn canvas_light_set_shadow_buffer_size(&mut self, light: Rid, size: i64)

Source

pub fn canvas_light_set_shadow_gradient_length( &mut self, light: Rid, length: f64, )

Source

pub fn canvas_light_set_shadow_filter(&mut self, light: Rid, filter: i64)

Source

pub fn canvas_light_set_shadow_color(&mut self, light: Rid, color: Color)

Source

pub fn canvas_light_set_shadow_smooth(&mut self, light: Rid, smooth: f64)

Source

pub fn canvas_light_occluder_create(&mut self) -> Rid

Source

pub fn canvas_light_occluder_attach_to_canvas( &mut self, occluder: Rid, canvas: Rid, )

Source

pub fn canvas_light_occluder_set_enabled( &mut self, occluder: Rid, enabled: bool, )

Source

pub fn canvas_light_occluder_set_polygon(&mut self, occluder: Rid, polygon: Rid)

Source

pub fn canvas_light_occluder_set_transform( &mut self, occluder: Rid, transform: Transform2D, )

Source

pub fn canvas_light_occluder_set_light_mask(&mut self, occluder: Rid, mask: i64)

Source

pub fn canvas_occluder_polygon_create(&mut self) -> Rid

Source

pub fn canvas_occluder_polygon_set_shape( &mut self, occluder_polygon: Rid, shape: Vector2Array, closed: bool, )

Source

pub fn canvas_occluder_polygon_set_shape_as_lines( &mut self, occluder_polygon: Rid, shape: Vector2Array, )

Source

pub fn canvas_occluder_polygon_set_cull_mode( &mut self, occluder_polygon: Rid, mode: i64, )

Source

pub fn black_bars_set_margins( &mut self, left: i64, top: i64, right: i64, bottom: i64, )

Source

pub fn black_bars_set_images( &mut self, left: Rid, top: Rid, right: Rid, bottom: Rid, )

Source

pub fn free_rid(&mut self, rid: Rid)

Source

pub fn request_frame_drawn_callback( &mut self, _where: Option<Object>, method: GodotString, userdata: Variant, )

Source

pub fn has_changed(&self) -> bool

Source

pub fn init(&mut self)

Source

pub fn finish(&mut self)

Source

pub fn get_render_info(&mut self, info: i64) -> i64

Source

pub fn make_sphere_mesh( &mut self, latitudes: i64, longitudes: i64, radius: f64, ) -> Rid

Source

pub fn get_test_cube(&mut self) -> Rid

Source

pub fn get_test_texture(&mut self) -> Rid

Source

pub fn get_white_texture(&mut self) -> Rid

Source

pub fn set_boot_image( &mut self, image: Option<Image>, color: Color, scale: bool, )

Source

pub fn set_default_clear_color(&mut self, color: Color)

Source

pub fn has_feature(&self, feature: i64) -> bool

Source

pub fn has_os_feature(&self, feature: GodotString) -> bool

Source

pub fn set_debug_generate_wireframes(&mut self, generate: bool)

Source

pub fn _notification(&mut self, what: i64)

Inherited from Object.

Source

pub fn _set(&mut self, property: GodotString, value: Variant) -> bool

Inherited from Object.

Source

pub fn _get(&mut self, property: GodotString) -> Variant

Inherited from Object.

Source

pub fn _get_property_list(&mut self) -> VariantArray

Inherited from Object.

Source

pub fn _init(&mut self)

Inherited from Object.

Source

pub fn get_class(&self) -> GodotString

Inherited from Object.

Source

pub fn is_class(&self, _type: GodotString) -> bool

Inherited from Object.

Source

pub fn set(&mut self, property: GodotString, value: Variant)

Inherited from Object.

Source

pub fn get(&self, property: GodotString) -> Variant

Inherited from Object.

Source

pub fn set_indexed(&mut self, property: NodePath, value: Variant)

Inherited from Object.

Source

pub fn get_indexed(&self, property: NodePath) -> Variant

Inherited from Object.

Source

pub fn get_property_list(&self) -> VariantArray

Inherited from Object.

Source

pub fn get_method_list(&self) -> VariantArray

Inherited from Object.

Source

pub fn notification(&mut self, what: i64, reversed: bool)

Inherited from Object.

Source

pub fn get_instance_id(&self) -> i64

Inherited from Object.

Source

pub fn set_script(&mut self, script: Option<Reference>)

Inherited from Object.

Source

pub fn get_script(&self) -> Option<Reference>

Inherited from Object.

Source

pub fn set_meta(&mut self, name: GodotString, value: Variant)

Inherited from Object.

Source

pub fn get_meta(&self, name: GodotString) -> Variant

Inherited from Object.

Source

pub fn has_meta(&self, name: GodotString) -> bool

Inherited from Object.

Source

pub fn get_meta_list(&self) -> StringArray

Inherited from Object.

Source

pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray)

Inherited from Object.

Source

pub fn has_user_signal(&self, signal: GodotString) -> bool

Inherited from Object.

Source

pub fn emit_signal( &mut self, signal: GodotString, varargs: &[Variant], ) -> Variant

Inherited from Object.

Source

pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant

Inherited from Object.

Source

pub fn call_deferred( &mut self, method: GodotString, varargs: &[Variant], ) -> Variant

Inherited from Object.

Source

pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant

Inherited from Object.

Source

pub fn has_method(&self, method: GodotString) -> bool

Inherited from Object.

Source

pub fn get_signal_list(&self) -> VariantArray

Inherited from Object.

Source

pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray

Inherited from Object.

Source

pub fn get_incoming_connections(&self) -> VariantArray

Inherited from Object.

Source

pub fn connect( &mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64, ) -> GodotResult

Inherited from Object.

Source

pub fn disconnect( &mut self, signal: GodotString, target: Option<Object>, method: GodotString, )

Inherited from Object.

Source

pub fn is_connected( &self, signal: GodotString, target: Option<Object>, method: GodotString, ) -> bool

Inherited from Object.

Source

pub fn set_block_signals(&mut self, enable: bool)

Inherited from Object.

Source

pub fn is_blocking_signals(&self) -> bool

Inherited from Object.

Source

pub fn property_list_changed_notify(&mut self)

Inherited from Object.

Source

pub fn set_message_translation(&mut self, enable: bool)

Inherited from Object.

Source

pub fn can_translate_messages(&self) -> bool

Inherited from Object.

Source

pub fn tr(&self, message: GodotString) -> GodotString

Inherited from Object.

Source

pub fn is_queued_for_deletion(&self) -> bool

Inherited from Object.

Source

pub fn to_object(&self) -> Object

Up-cast.

Source

pub fn cast<T: GodotObject>(&self) -> Option<T>

Generic dynamic cast.

Trait Implementations§

Source§

impl Clone for VisualServer

Source§

fn clone(&self) -> VisualServer

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VisualServer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl GodotObject for VisualServer

Source§

fn class_name() -> &'static str

Source§

impl ToVariant for VisualServer

Source§

fn to_variant(&self) -> Variant

Source§

fn from_variant(variant: &Variant) -> Option<Self>

Source§

impl Copy for VisualServer

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.