egui_software_backend

Crates.ioegui_software_backend
lib.rsegui_software_backend
version0.0.1
created_at2026-01-20 23:45:12.553942+00
updated_at2026-01-20 23:45:12.553942+00
descriptionA CPU software render backend for egui.
homepagehttps://github.com/DGriffin91/egui_software_backend
repositoryhttps://github.com/DGriffin91/egui_software_backend
max_upload_size
id2057860
size770,477
Griffin (DGriffin91)

documentation

README

CPU software render backend for egui

demo

use egui_software_backend::{BufferMutRef, ColorFieldOrder, EguiSoftwareRender};
let buffer = &mut vec![[0u8; 4]; 512 * 512];
let mut buffer_ref = BufferMutRef::new(buffer, 512, 512);
let ctx = egui::Context::default();
let mut demo = egui_demo_lib::DemoWindows::default();
let mut sw_render = EguiSoftwareRender::new(ColorFieldOrder::Bgra);

let out = ctx.run(egui::RawInput::default(), |ctx| {
    demo.ui(ctx);
});

let primitives = ctx.tessellate(out.shapes, out.pixels_per_point);

sw_render.render(
    &mut buffer_ref,
    &primitives,
    &out.textures_delta,
    out.pixels_per_point,
);

winit quickstart

use egui::vec2;
use egui_software_backend::{SoftwareBackend, SoftwareBackendAppConfiguration};

struct EguiApp {}

impl EguiApp {
    fn new(context: egui::Context) -> Self {
        egui_extras::install_image_loaders(&context);
        EguiApp {}
    }
}

impl egui_software_backend::App for EguiApp {
    fn update(&mut self, ctx: &egui::Context, _backend: &mut SoftwareBackend) {
        egui::CentralPanel::default().show(ctx, |ui| {
            ui.label("Hello World!");
        });
    }
}

fn main() {
    let settings = SoftwareBackendAppConfiguration::new()
        .inner_size(Some(vec2(500.0, 300.0)))
        .title(Some("Simple example".to_string()));

    egui_software_backend::run_app_with_software_backend(settings, EguiApp::new)
        //Can fail if winit fails to create the window
        .expect("Failed to run app")
}

Other examples

  • bevy + softbuffer see examples/bevy_example folder
Commit count: 142

cargo fmt