Struct gfx::extra::stream::OwnedStream [] [src]

pub struct OwnedStream<D: Device, O> {
    pub ren: Renderer<D::Resources, D::CommandBuffer>,
    pub out: O,
}

A stream that owns its components.

Fields

ren: Renderer<D::Resources, D::CommandBuffer>

Renderer

out: O

Output

Methods

impl<D: Device, W: Window<D::Resources>> OwnedStream<D, W>
[src]

fn present(&mut self, device: &mut D)

Show what we've been drawing all this time.

Trait Implementations

impl<D: Device, O: Output<D::Resources>> Stream<D::Resources> for OwnedStream<D, O>
[src]

type CommandBuffer = D::CommandBuffer

Command buffer type to constraint the Renderer.

type Output = O

Constrained Output type.

fn get_output(&self) -> &O

Get the output only.

fn access(&mut self) -> (&mut Renderer<D::Resources, D::CommandBuffer>, &O)

Access both of the stream components.

fn get_aspect_ratio(&self) -> f32

Get width/height aspect, needed for projections.

fn clear(&mut self, data: ClearData)

Clear the canvas.

fn blit_on<I: Output<R>>(&mut self, source: &I, source_rect: Rect, dest_rect: Rect, mirror: Mirror, mask: Mask) -> Result<()BlitError>

Blit on this stream from another Output.

fn blit_to<O: Output<R>>(&mut self, destination: &O, dest_rect: Rect, source_rect: Rect, mirror: Mirror, mask: Mask) -> Result<()BlitError>

Blit this stream to another Output.

fn draw<B: Batch<R> + ?Sized>(&mut self, batch: &B) -> Result<()DrawError<Error>>

Draw a simple Batch.

fn draw_instanced<B: Batch<R> + ?Sized>(&mut self, batch: &B, count: InstanceCount, base: VertexCount) -> Result<()DrawError<Error>>

Draw an instanced Batch. Read more

fn flush<D>(&mut self, device: &mut D) where D: Device<Resources=R, CommandBuffer=Self::CommandBuffer>

Execute everything and clear the command buffer.