A tiny library providing a GPU-powered pixel buffer.
Pixels represents a 2D pixel buffer with an explicit image resolution, making it ideal for
prototyping simple pixel-based games, animations, and emulators. The pixel buffer is rendered
entirely on the GPU, allowing developers to easily incorporate special effects with shaders and
a customizable pipeline.
The GPU interface is offered by
wgpu, and is re-exported for
your convenience. Use a windowing framework or context manager of your choice;
winit is a good place to start. Any windowing framework that
raw-window-handle will work.
PIXELS_HIGH_PERF: Switch the default adapter to high performance.
PIXELS_LOW_POWER: Switch the default adapter to low power.
These variables change the default adapter to request either high performance or low power. (I.e. discrete or integrated GPUs.) The value is not checked, only the existence of the variable is relevant.
The order of precedence for choosing a power preference is:
- Application's specific adapter request through
wgpudefault power preference (usually low power)
Represents a 2D pixel buffer with an explicit image resolution.
A builder to help create customized pixel buffers.
Provides the internal state for custom shaders.
The default renderer that scales your frame to the screen size.
A logical texture size for a window surface.
A logical texture for a window surface.
All the ways in which creating a pixel buffer can fail.