Crate softbuffer_quickstart

Source

Structs§

SoftbufferWindow
Wrapper for Softbuffer and a Winit window.
WindowProperties
Simple struct that holds some properties (size, title) for windows

Functions§

buffer_mut
Gets a mutable reference to a buffer from a RawSurface. Colors are u32s. Accessing an array might look like softbuffer_quickstart::buffer_mut(&mut self.surface)[y * width + x] = 0xffffff. Keep in mind you have to keep track of the buffer width yourself–the RawBuffer type can’t do that.
close
Shorthand to listen for and handle WindowEvent::CloseRequested by closing windows
init
Initialises and returns a new RawWindow and RawSurface given an ActiveEventLoop and WindowProperties. For instance, implementation within ApplicationHandler::resumed may look like:
redraw
Redraws a RawSurface. Call this on WindowEvent::RedrawRequested inside ApplicationHandler::window_event, right after you’ve drawn everything to the RawSurface.
resize
Shorthand to listen for and handle WindowEvent::Resized by resizing a buffer (RawSurface)
run
Shorthand to run a struct that implements winit’s ApplicationHandler

Type Aliases§

RawSurface
RawWindow