pub struct Renderer<D>where
D: Device,{
pub device: D,
pub stats: RenderStats,
pub debug_ui_presenter: DebugUIPresenter<D>,
/* private fields */
}
Fields§
§device: D
§stats: RenderStats
§debug_ui_presenter: DebugUIPresenter<D>
Implementations§
Source§impl<D> Renderer<D>where
D: Device,
impl<D> Renderer<D>where
D: Device,
pub fn new( device: D, resources: &dyn ResourceLoader, dest_framebuffer: DestFramebuffer<D>, options: RendererOptions, ) -> Renderer<D>
pub fn begin_scene(&mut self)
pub fn render_command(&mut self, command: &RenderCommand)
pub fn end_scene(&mut self)
pub fn draw_debug_ui(&self)
pub fn shift_rendering_time(&mut self) -> Option<RenderTime>
pub fn dest_framebuffer(&self) -> &DestFramebuffer<D>
pub fn replace_dest_framebuffer( &mut self, new_dest_framebuffer: DestFramebuffer<D>, ) -> DestFramebuffer<D>
pub fn set_options(&mut self, new_options: RendererOptions)
pub fn set_main_framebuffer_size(&mut self, new_framebuffer_size: Vector2I)
pub fn disable_depth(&mut self)
pub fn enable_depth(&mut self)
pub fn quad_vertex_positions_buffer(&self) -> &D::Buffer
pub fn quad_vertex_indices_buffer(&self) -> &D::Buffer
pub fn reproject_texture( &mut self, texture: &D::Texture, old_transform: &Transform4F, new_transform: &Transform4F, )
pub fn draw_render_target(&self) -> RenderTarget<'_, D>
pub fn draw_viewport(&self) -> RectI
Auto Trait Implementations§
impl<D> Freeze for Renderer<D>
impl<D> RefUnwindSafe for Renderer<D>where
D: RefUnwindSafe,
<D as Device>::Buffer: RefUnwindSafe,
<D as Device>::Framebuffer: RefUnwindSafe,
<D as Device>::Texture: RefUnwindSafe,
<D as Device>::Program: RefUnwindSafe,
<D as Device>::Uniform: RefUnwindSafe,
<D as Device>::VertexArray: RefUnwindSafe,
<D as Device>::TimerQuery: RefUnwindSafe,
impl<D> Send for Renderer<D>
impl<D> Sync for Renderer<D>
impl<D> Unpin for Renderer<D>
impl<D> UnwindSafe for Renderer<D>where
D: UnwindSafe,
<D as Device>::Buffer: UnwindSafe,
<D as Device>::Framebuffer: UnwindSafe,
<D as Device>::Texture: UnwindSafe,
<D as Device>::Program: UnwindSafe,
<D as Device>::Uniform: UnwindSafe,
<D as Device>::VertexArray: UnwindSafe,
<D as Device>::TimerQuery: UnwindSafe,
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