feat: xorg text overlays, font atlas generator, v4l2_view_cli
- tools/gen_font_atlas: Python/Pillow build tool — skyline packs DejaVu Sans glyphs 32-255 into a grayscale atlas, emits build/gen/font_atlas.h with pixel data and Font_Glyph[256] metrics table - xorg: bitmap font atlas text overlay rendering (GL_R8 atlas texture, alpha-blended glyph quads, dark background rect per overlay) - xorg: add xorg_viewer_set_overlay_text / clear_overlays API - xorg: add xorg_viewer_handle_events for streaming use (events only, no redundant render) - xorg_cli: show today's date as white text overlay - v4l2_view_cli: new tool — V4L2 capture with format auto-selection (highest FPS then largest resolution), MJPEG/YUYV, measured FPS overlay - docs: update README, planning, architecture to reflect current status Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -56,11 +56,27 @@ bool xorg_viewer_push_mjpeg(Xorg_Viewer *v,
|
||||
void xorg_viewer_set_scale(Xorg_Viewer *v, Xorg_Scale scale);
|
||||
void xorg_viewer_set_anchor(Xorg_Viewer *v, Xorg_Anchor anchor);
|
||||
|
||||
/*
|
||||
* Set a text overlay at window-pixel position (x, y) — top-left of the text.
|
||||
* Up to 8 overlays (idx 0..7); calling with the same idx replaces it.
|
||||
* r, g, b are in [0, 1].
|
||||
*/
|
||||
void xorg_viewer_set_overlay_text(Xorg_Viewer *v, int idx, int x, int y,
|
||||
const char *text, float r, float g, float b);
|
||||
|
||||
/* Remove all text overlays. */
|
||||
void xorg_viewer_clear_overlays(Xorg_Viewer *v);
|
||||
|
||||
/*
|
||||
* Process pending window events.
|
||||
* Returns false when the user has closed the window.
|
||||
* Must be called from the thread that created the viewer.
|
||||
*
|
||||
* poll() — processes events then re-renders; use for static images.
|
||||
* handle_events() — processes events only, no render; use when push_* drives
|
||||
* rendering (e.g. live camera feed).
|
||||
*/
|
||||
bool xorg_viewer_poll(Xorg_Viewer *v);
|
||||
bool xorg_viewer_handle_events(Xorg_Viewer *v);
|
||||
|
||||
void xorg_viewer_close(Xorg_Viewer *v);
|
||||
|
||||
Reference in New Issue
Block a user