[−][src]Struct duku::Target
Active render target.
Records rendering commands and settings. Received from the draw or draw_on_window functions.
Fields
clear_color: Color
the clear color of the framebuffer (background)
transform: Transform
the current transform used when doing a render command
shadow_split_coef: f32
coefficient used to calculate shadow map splits (0 - 1). use smaller number to achieve better shadow detail up close.
shadow_depth: f32
maximum shadow distance in the scene. the smaller the value, the better the shadow quality.
shadow_pcf: Pcf
setting for shadow softening
shadows: bool
controlls whether to use the PBR shader
lights: [Light; 4]
the lights used in the scene
max_white_point: f32
maximum white value for HDR tone mapping
ambient_color: Color
the ambient color of the scene
line_color: Color
color used for lines
line_width: f32
width used for non-debug lines
shape_color: Color
color used for shapes
shape_mode: ShapeMode
shape positioning mode
border_color: Color
color used for shape borders
border_mode: BorderMode
border positioning mode
border_width: f32
width used for shape borders
font_size: u32
font size used for text
text_color: Color
color used for text
texture_filter: Filter
filter used for texture sampling
texture_wrap: Wrap
wrap mode used for texture sampling
texture_mipmaps: bool
whether to use mipmaps in texture sampling
Implementations
impl Target
[src]
pub fn push(&mut self)
[src]
Save target settings to stack
pub fn pop(&mut self)
[src]
Restore target settings from stack
pub fn set_material(&mut self, material: &Handle<Material>)
[src]
Set currently used material for mesh rendering
pub fn unset_material(&mut self)
[src]
Set material to default for mesh rendering
pub fn set_shader(&mut self, shader: &Handle<Shader>)
[src]
Set currently used shader for mesh rendering
pub fn unset_shader(&mut self)
[src]
Set shader to default for mesh rendering
pub fn set_skybox(&mut self, cubemap: &Handle<Cubemap>)
[src]
Set cubemap to be used as a skybox
pub fn draw_mesh(&mut self, mesh: &Handle<Mesh>)
[src]
Draw custom mesh
pub fn draw_mesh_wireframe(&mut self, mesh: &Handle<Mesh>)
[src]
Draw wireframes for custom mesh
pub fn draw_cube(&mut self)
[src]
Draw a cube
pub fn draw_sphere_ico(&mut self)
[src]
Draw an ico-sphere
pub fn draw_sphere_uv(&mut self)
[src]
Draw a uv-sphere
pub fn draw_surface(&mut self)
[src]
Draw a flat surface
pub fn draw_fullscreen(&mut self)
[src]
Draw a fullscreen quad
pub fn draw_grid(&mut self)
[src]
Draw a XY line grid
pub fn draw_text(&mut self, text: impl AsRef<str>)
[src]
Draw a string of text
pub fn new_line(&mut self)
[src]
Move transform down one line's heigth for the current font
pub fn draw_line_debug(
&mut self,
point_1: impl Into<Vector3>,
point_2: impl Into<Vector3>
)
[src]
&mut self,
point_1: impl Into<Vector3>,
point_2: impl Into<Vector3>
)
Draw a debug 1-pixel wide line
pub fn draw_shape(&mut self, points: &[Vector2])
[src]
Draw a custom shape from points
pub fn draw_lines(&mut self, points: &[Vector2], closed: bool)
[src]
Draw mitered line from points
pub fn draw_rectangle(&mut self, size: impl Into<Vector2>)
[src]
Draw a rectangle
pub fn draw_square(&mut self, size: f32)
[src]
Draw a square
pub fn draw_ellipse(&mut self, size: impl Into<Vector2>)
[src]
Draw an ellipse
pub fn draw_circle(&mut self, size: f32)
[src]
Draw a circle
pub fn draw_texture(
&mut self,
texture: &Handle<Texture>,
size: impl Into<Vector2>
)
[src]
&mut self,
texture: &Handle<Texture>,
size: impl Into<Vector2>
)
Draw a textured quad
pub fn draw_model(&mut self, model: &Handle<Model>)
[src]
Draw all of the meshes of a model
Auto Trait Implementations
impl RefUnwindSafe for Target
impl !Send for Target
impl !Sync for Target
impl Unpin for Target
impl UnwindSafe for Target
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,