make shure that all changes were reflected in the .md file

This commit is contained in:
2026-06-20 22:42:02 -07:00
parent 200778af26
commit 2017732c1c
4 changed files with 253 additions and 2 deletions

View File

@@ -69,3 +69,57 @@ field:
instructs the user to use the 1 and 2 keyboard keys to select the radar. The 1 key
steps forward in a circle and the 2 key steps backward and the enter key makes the
selection
===============================================================================
CURRENT IMPLEMENTATION STATUS
This spec covers two related but distinct pieces of the 02_text_description component:
A. Text renderer engine
Files: include/02_text_description.h, src/02_text_description.cpp
Status: COMPLETE
Implements the TextRenderer class using FreeType. Loads printable ASCII glyphs
(codes 32-126) from a TTF font into individual GL_RED textures and renders them
as textured quads into whichever viewport is currently active.
Public methods:
initialize_shaders() — compiles/links shaders/02_text_description_{vert,frag}.glsl
initialize_font(path, size) — loads a TTF font at a given pixel height
render_text() — renders a string at a viewport-local pixel coordinate
render_text_wrapped() — renders with automatic word-wrapping at a max pixel width
get_text_width() — returns the pixel width of a string at a given scale
set_projection(w, h) — sets the orthographic projection for a viewport
cleanup() — releases all GL resources and glyph textures
Two global instances are defined in src/02_text_description.cpp and declared
extern in the header:
g_text_renderer — loaded at FONT_SIZE_NORMAL (body text, controls, status bar)
g_text_renderer_large — loaded at FONT_SIZE_TITLE (panel titles, scope headings)
Font path and sizes are defined in include/settings.h:
FONT_PATH "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"
FONT_SIZE_NORMAL 18 px
FONT_SIZE_TITLE 26 px
B. Left-panel text content for each radar
File: src/01_classes.cpp (render_left_panel() methods in each radar subclass)
Status: STUB — text content implemented; actual scope rendering is not yet done.
Each radar subclass in 01_classes renders:
- Radar title (large renderer, white)
- Location sub-header (small scale, white)
- 3-4 lines of description text (white)
- "--- CONTROLS ---" header (red) followed by per-control entries
(label in red, keystroke(s) in pink, on the same line)
- "1 - Return to Radar Selection" (yellow)
The intro scene (item 5 above) is rendered by render_intro_left_panel() in
src/main.cpp, which shows a welcome paragraph on the left panel and the
radar selection list centred in the scope viewport.
Status bar content for each radar is rendered by render_status_bar() in
src/01_classes.cpp, displaying current uniform values (intensity, sensitivity,
STC sensitivity/range, and radar-specific values such as max range, cursor
positions, radiogoniometer, or antenna bearing) in yellow.