c/main: Round viewport to cover the same as scissors

This commit is contained in:
Jakob Bornecrantz 2020-10-11 03:19:39 +01:00
parent 32fd9398fe
commit 95bdcc0bd3

View file

@ -229,15 +229,15 @@ renderer_set_viewport_scissor(float scale_x,
VkRect2D *s,
struct xrt_view *view)
{
v->x = view->viewport.x_pixels * scale_x;
v->y = view->viewport.y_pixels * scale_y;
v->width = view->viewport.w_pixels * scale_x;
v->height = view->viewport.h_pixels * scale_y;
s->offset.x = (int32_t)(view->viewport.x_pixels * scale_x);
s->offset.y = (int32_t)(view->viewport.y_pixels * scale_y);
s->extent.width = (uint32_t)(view->viewport.w_pixels * scale_x);
s->extent.height = (uint32_t)(view->viewport.h_pixels * scale_y);
v->x = s->offset.x;
v->y = s->offset.y;
v->width = s->extent.width;
v->height = s->extent.height;
}
static void