mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-13 12:51:54 +00:00
[vulkan] Apply 2d scale to clipping bounds
It was a little off-putting getting an incorrectly clipped console when using non-unitary scale (especially since I was trying to show abbator something).
This commit is contained in:
parent
101c50e3e1
commit
dd11a7b378
1 changed files with 4 additions and 0 deletions
|
@ -1803,6 +1803,10 @@ Vulkan_Draw_SetClip (int x, int y, int w, int h, vulkan_ctx_t *ctx)
|
|||
h += y;
|
||||
y = 0;
|
||||
}
|
||||
x *= ctx->twod_scale;
|
||||
y *= ctx->twod_scale;
|
||||
w *= ctx->twod_scale;
|
||||
h *= ctx->twod_scale;
|
||||
auto cr = &dframe->clip_range.a[dframe->clip_range.size - 1];
|
||||
if (x != cr->clip.offset.x || y != cr->clip.offset.y
|
||||
|| (uint32_t) w != cr->clip.extent.width
|
||||
|
|
Loading…
Reference in a new issue