Crate polystrip[][src]

Polystrip is an accelerated 2D graphics library built on gfx_hal, which intends to be a pure-rust replacement for SDL2.

Quick breakdown

  • Renderer: Contains data types from the gfx_hal backend.
  • WindowTarget: Holds data for rendering to a raw_window_handle window.
  • Frame: The struct everything is drawn onto, generally created from a WindowTarget
  • *Shape: Primitives to be rendered to Frames
  • Texture: An image in GPU memory, ready to be rendered to a frame

Quick example

An example with winit is available in the documentation for WindowTarget.

Re-exports

pub use gpu_alloc;

Modules

pixel

Methods for converting between screen space and pixel coordinates

vertex

Vertices and shapes, the core of the rendering process.

Structs

DepthTexture

Wrapper for a depth texture, necessary for custom RenderTargets

Frame

A frame to be drawn to. The frame gets presented on drop.

Renderer
RendererBuilder

Customization options for building a Renderer. Options are detailed on builder methods.

Texture

A texture which can be copied to and rendered by a Frame.

WindowTarget

A target for drawing to a raw_window_handle window.

Traits

HasRenderer

Holds a shared Renderer

RenderDrop

Cleanup for a RenderTarget.

RenderTarget

Can be rendered to by a Frame

Functions

default_memory_config