Expand description
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 thegfx_hal
backend.WindowTarget
: Holds data for rendering to araw_window_handle
window.Frame
: The struct everything is drawn onto, generally created from aWindowTarget
*Shape
: Primitives to be rendered toFrame
sTexture
: 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§
- Depth
Texture - Wrapper for a depth texture, necessary for custom
RenderTarget
s - Frame
- A frame to be drawn to. The frame gets presented on drop.
- Renderer
- Renderer
Builder - 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
. - Window
Target - A target for drawing to a
raw_window_handle
window.
Traits§
- HasRenderer
- Holds a shared
Renderer
- Render
Drop - Cleanup for a
RenderTarget
. - Render
Target - Can be rendered to by a
Frame