Struct Renderer

Source
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,

Source

pub fn new( device: D, resources: &dyn ResourceLoader, dest_framebuffer: DestFramebuffer<D>, options: RendererOptions, ) -> Renderer<D>

Source

pub fn begin_scene(&mut self)

Source

pub fn render_command(&mut self, command: &RenderCommand)

Source

pub fn end_scene(&mut self)

Source

pub fn draw_debug_ui(&self)

Source

pub fn shift_rendering_time(&mut self) -> Option<RenderTime>

Source

pub fn dest_framebuffer(&self) -> &DestFramebuffer<D>

Source

pub fn replace_dest_framebuffer( &mut self, new_dest_framebuffer: DestFramebuffer<D>, ) -> DestFramebuffer<D>

Source

pub fn set_options(&mut self, new_options: RendererOptions)

Source

pub fn set_main_framebuffer_size(&mut self, new_framebuffer_size: Vector2I)

Source

pub fn disable_depth(&mut self)

Source

pub fn enable_depth(&mut self)

Source

pub fn quad_vertex_positions_buffer(&self) -> &D::Buffer

Source

pub fn quad_vertex_indices_buffer(&self) -> &D::Buffer

Source

pub fn reproject_texture( &mut self, texture: &D::Texture, old_transform: &Transform4F, new_transform: &Transform4F, )

Source

pub fn draw_render_target(&self) -> RenderTarget<'_, D>

Source

pub fn draw_viewport(&self) -> RectI

Auto Trait Implementations§

§

impl<D> Freeze for Renderer<D>
where D: Freeze, <D as Device>::Buffer: Freeze, <D as Device>::Framebuffer: Freeze, <D as Device>::Texture: Freeze, <D as Device>::Program: Freeze, <D as Device>::Uniform: Freeze, <D as Device>::VertexArray: Freeze, <D as Device>::TimerQuery: Freeze,

§

impl<D> RefUnwindSafe for Renderer<D>

§

impl<D> Send for Renderer<D>
where D: Send, <D as Device>::Buffer: Send, <D as Device>::Framebuffer: Send, <D as Device>::Texture: Send, <D as Device>::Program: Send, <D as Device>::Uniform: Send, <D as Device>::VertexArray: Send, <D as Device>::TimerQuery: Send,

§

impl<D> Sync for Renderer<D>
where D: Sync, <D as Device>::Buffer: Sync, <D as Device>::Framebuffer: Sync, <D as Device>::Texture: Sync, <D as Device>::Program: Sync, <D as Device>::Uniform: Sync, <D as Device>::VertexArray: Sync, <D as Device>::TimerQuery: Sync,

§

impl<D> Unpin for Renderer<D>
where D: Unpin, <D as Device>::Buffer: Unpin, <D as Device>::Framebuffer: Unpin, <D as Device>::Texture: Unpin, <D as Device>::Program: Unpin, <D as Device>::Uniform: Unpin, <D as Device>::VertexArray: Unpin, <D as Device>::TimerQuery: Unpin,

§

impl<D> UnwindSafe for Renderer<D>

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> 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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. 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.