[][src]Struct rg3d::renderer::Renderer

pub struct Renderer {
    pub debug_renderer: DebugRenderer,
    // some fields omitted
}

See module docs.

Fields

debug_renderer: DebugRenderer

Debug renderer instance can be used for debugging purposes

Implementations

impl Renderer[src]

pub fn set_ambient_color(&mut self, color: Color)[src]

Sets new ambient color. Ambient color is used to imitate ambient lighting.

pub fn get_ambient_color(&self) -> Color[src]

Returns current ambient color.

pub fn get_statistics(&self) -> Statistics[src]

Returns statistics for last frame.

pub fn set_backbuffer_clear_color(&mut self, color: Color)[src]

Sets color which will be used to fill screen when there is nothing to render.

pub fn set_frame_size(&mut self, new_size: (u32, u32))[src]

Sets new frame size, should be called when received a Resize event.

Notes

Input values will be set to 1 pixel if new size is 0. Rendering cannot be performed into 0x0 texture.

pub fn get_frame_size(&self) -> (u32, u32)[src]

Returns current (width, height) pair of back buffer size.

pub fn set_quality_settings(
    &mut self,
    settings: &QualitySettings
) -> Result<(), RendererError>
[src]

Sets new quality settings for renderer. Never call this method in a loop, otherwise you may get significant lags. Always check if current quality setting differs from new!

pub fn get_quality_settings(&self) -> QualitySettings[src]

Returns current quality settings.

pub fn flush(&mut self)[src]

Removes all cached GPU data, forces renderer to re-upload data to GPU. Do not call this method until you absolutely need! It may cause significant performance lag!

Auto Trait Implementations

impl !RefUnwindSafe for Renderer

impl !Send for Renderer

impl !Sync for Renderer

impl Unpin for Renderer

impl !UnwindSafe for Renderer

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,