class

Egui::DummyTextureRegistry

Inherits Egui::TextureRegistry < Reference < Object

Headless registry: hands out deterministic incrementing ids so specs can assert ImageCmd flow without a GPU. Caches loads.

Instance methods

create_stream(width : Int32, height : Int32) : UInt64

Create an EMPTY updatable RGBA8 texture for pixels that change every frame (decoded video, camera frames); 0 = failure. Content is undefined until the first #update.

Source
destroy(id : UInt64) : Nil

Release a texture from #register_rgba, #load or #create_stream.

Source
load(path : String) : UInt64

Load an image file (PNG/JPEG/…) from disk; 0 = failure.

Source
register_rgba(width : Int32, height : Int32, data : Bytes) : UInt64

Upload RGBA8 pixel data; returns a texture id (0 = failure).

Source
update(id : UInt64, width : Int32, height : Int32, data : Bytes) : Nil

Push fresh RGBA8 pixels into a texture created by #create_stream (same size it was created with).

Source