ogl_beamforming

Ultrasound Beamforming Implemented with OpenGL
git clone anongit@rnpnr.xyz:ogl_beamforming.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

Commit: 85cc9ab7f67b73234821a022ac7751cf021464be
Parent: 30fe5bbb816298ff3d48bf3b6c198f96a777852b
Author: Randy Palamar
Date:   Mon, 23 Jun 2025 13:56:26 -0600

ui: truncate text positions to fix some rendering jank

I definitely thought I was doing this before but I guess I forgot.

Diffstat:
Mui.c | 2+-
Mutil.c | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ui.c b/ui.c @@ -1352,7 +1352,7 @@ push_custom_view_title(Stream *s, Variable *var) function v2 draw_text_base(Font font, s8 text, v2 pos, Color colour) { - v2 off = pos; + v2 off = floor_v2(pos); for (iz i = 0; i < text.len; i++) { /* NOTE: assumes font glyphs are ordered ASCII */ i32 idx = text.data[i] - 0x20; diff --git a/util.c b/util.c @@ -636,8 +636,8 @@ function v2 floor_v2(v2 a) { v2 result; - result.x = (u32)a.x; - result.y = (u32)a.y; + result.x = (i32)a.x; + result.y = (i32)a.y; return result; }