RMGui 0.15.0
C11 retained-mode UI library: layout kernel, style schema, widget painters, fonts, software framebuffer
Loading...
Searching...
No Matches
rmgui_fb_t Struct Reference

Software RGBA8 framebuffer. More...

#include <fb.h>

Data Fields

int width
int height
uint8_t * pixels

Detailed Description

Software RGBA8 framebuffer.

Rows are contiguous and unpadded; each pixel is four bytes in R, G, B, A order, not a packed integer.

  • Empty: zero width and height, pixels == NULL. Zero-initialized and freed framebuffers are empty; drawing and blitting paint nothing.
  • Allocated: positive dimensions and a library-owned pixel block from rmgui_fb_alloc() or rmgui_fb_resize(). Callers may write pixel bytes but must not assign the fields. Release it with rmgui_fb_free().
  • Borrowed source: the host sets positive dimensions and points pixels to tightly packed RGBA8 rows, repacking padded rows first. The header and bytes must stay alive and immutable for every const-source use. Never pass it to free, resize, or destination/drawing APIs.

Field Documentation

◆ width

int rmgui_fb_t::width

◆ height

int rmgui_fb_t::height

◆ pixels

uint8_t* rmgui_fb_t::pixels

The documentation for this struct was generated from the following file: