pub struct Renderer {
pub shadow: ShadowType,
/* private fields */
}
Expand description
See Window::render.
Fields§
§shadow: ShadowType
ShadowType
of this Renderer
.
Implementations§
Source§impl Renderer
impl Renderer
Sourcepub fn reload(&mut self, pipeline_states: PipelineStates<Resources>)
pub fn reload(&mut self, pipeline_states: PipelineStates<Resources>)
Reloads the shaders.
Sourcepub fn aspect_ratio(&self) -> f32
pub fn aspect_ratio(&self) -> f32
Returns current viewport aspect ratio, i.e. width / height.
Sourcepub fn map_to_ndc<P: Into<Point2<f32>>>(&self, point: P) -> Point2<f32>
pub fn map_to_ndc<P: Into<Point2<f32>>>(&self, point: P) -> Point2<f32>
Map screen pixel coordinates to Normalized Display Coordinates. The lower left corner corresponds to (-1,-1), and the upper right corner corresponds to (1,1).
Sourcepub fn render(&mut self, scene: &Scene, camera: &Camera)
pub fn render(&mut self, scene: &Scene, camera: &Camera)
See Window::render
.
Sourcepub fn debug_shadow_quad(
&mut self,
map: &ShadowMap,
_num_components: u8,
pos: [i16; 2],
size: [u16; 2],
) -> DebugQuadHandle
pub fn debug_shadow_quad( &mut self, map: &ShadowMap, _num_components: u8, pos: [i16; 2], size: [u16; 2], ) -> DebugQuadHandle
Draw ShadowMap
for debug purposes.
Auto Trait Implementations§
impl Freeze for Renderer
impl !RefUnwindSafe for Renderer
impl !Send for Renderer
impl !Sync for Renderer
impl Unpin for Renderer
impl !UnwindSafe for Renderer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more