From c797b3bff5d2b93e10535783417464a52cccdbdb Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 17 Dec 2022 18:38:40 -0800 Subject: [PATCH] opengl: fix bottom and right edge of clip rect --- src/hardware/hw_draw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_draw.c b/src/hardware/hw_draw.c index e79860261..76cc2e289 100644 --- a/src/hardware/hw_draw.c +++ b/src/hardware/hw_draw.c @@ -249,7 +249,7 @@ void HWR_DrawStretchyFixedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t p if ((cx + fwidth) > clip->right) { - const float n = (clip->right - clip->left); + const float n = (clip->right - cx); s_max = (s_min + ((n / fwidth) * s_max)); fwidth = n; @@ -257,7 +257,7 @@ void HWR_DrawStretchyFixedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t p if ((cy + fheight) > clip->bottom) { - const float n = (clip->bottom - clip->top); + const float n = (clip->bottom - cy); t_max = (t_min + ((n / fheight) * t_max)); fheight = n;