Trait riddle_renderer_wgpu::CommonRenderer[][src]

pub trait CommonRenderer {
    type RenderContext: RenderContext<Self>;
    type Sprite: CommonSprite<Self>;
    type Texture;
    type Shader;
    type SpriteFont;
    pub fn dimensions(&self) -> Vector2<f32>;
pub fn render<R, F>(&self, f: F) -> Result<R, RendererError>
    where
        F: FnOnce(&mut Self::RenderContext) -> Result<R, RendererError>
; }

The root object of a renderer implementation, associated with a single display.

Associated Types

type RenderContext: RenderContext<Self>[src]

type Sprite: CommonSprite<Self>[src]

type Texture[src]

type Shader[src]

type SpriteFont[src]

Loading content...

Required methods

pub fn dimensions(&self) -> Vector2<f32>[src]

pub fn render<R, F>(&self, f: F) -> Result<R, RendererError> where
    F: FnOnce(&mut Self::RenderContext) -> Result<R, RendererError>, 
[src]

Loading content...

Implementors

impl<Device: WGPUDevice> CommonRenderer for Renderer<Device>[src]

type RenderContext = BufferedRenderer<Device, SwapChainFrameTarget<Device>>

type Sprite = Sprite<Device>

type Texture = Texture

type Shader = Shader

type SpriteFont = SpriteFont<Self>

Loading content...