Struct gfx_graphics::Gfx2d
[−]
[src]
pub struct Gfx2d<R: Resources> { // some fields omitted }
The data used for drawing 2D graphics.
Stores buffers and PSO objects needed for rendering 2D graphics.
Methods
impl<R: Resources> Gfx2d<R>
fn new<F>(opengl: OpenGL, factory: &mut F) -> Self where F: Factory<R>
Creates a new Gfx2d object.
fn draw<C, F, U>(&mut self, encoder: &mut Encoder<R, C>, output_color: &RenderTargetView<R, Srgba8>, output_stencil: &DepthStencilView<R, DepthStencil>, viewport: Viewport, f: F) -> U where C: CommandBuffer<R>, F: FnOnce(Context, &mut GfxGraphics<R, C>) -> U
Renders graphics to a Gfx renderer.