mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-29 18:08:29 +00:00
st/oxr: Calculate normalized sub-image offsets and sizes
This commit is contained in:
parent
390b06b22a
commit
9e5df0f504
1
doc/changes/state_trackers/mr.847.3.md
Normal file
1
doc/changes/state_trackers/mr.847.3.md
Normal file
|
@ -0,0 +1 @@
|
|||
OpenXR: Fill in normalised sub-image offsets and sizes.
|
|
@ -149,6 +149,10 @@ fill_in_sub_image(const struct oxr_swapchain *sc, const XrSwapchainSubImage *oxr
|
|||
xsub->image_index = sc->released.index;
|
||||
xsub->array_index = oxr_sub->imageArrayIndex;
|
||||
xsub->rect = *rect;
|
||||
xsub->norm_rect.w = rect->extent.w / (double)sc->width;
|
||||
xsub->norm_rect.h = rect->extent.h / (double)sc->height;
|
||||
xsub->norm_rect.x = rect->offset.w / (double)sc->width;
|
||||
xsub->norm_rect.y = rect->offset.h / (double)sc->height;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue