mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 04:36:07 +00:00
xrt: Add normalized sub-image offset and size in layer data
This makes the compositor not have to care about texture size.
This commit is contained in:
parent
ff7033e8b8
commit
7bd1dba1d8
2
doc/changes/xrt/mr.847.md
Normal file
2
doc/changes/xrt/mr.847.md
Normal file
|
@ -0,0 +1,2 @@
|
|||
Send down sub-image offsets and sizes in normalised form, this makes it so that
|
||||
compositor does not need to track the size of swapchains.
|
|
@ -141,6 +141,8 @@ struct xrt_sub_image
|
|||
uint32_t array_index;
|
||||
//! The rectangle in the image to use
|
||||
struct xrt_rect rect;
|
||||
//! Normalized sub image coordinates and size.
|
||||
struct xrt_normalized_rect norm_rect;
|
||||
};
|
||||
|
||||
/*!
|
||||
|
|
|
@ -311,6 +311,16 @@ struct xrt_rect
|
|||
struct xrt_size extent;
|
||||
};
|
||||
|
||||
/*!
|
||||
* Normalized image rectangle, coordinates and size in 0 .. 1 range.
|
||||
*
|
||||
* @ingroup xrt_iface math
|
||||
*/
|
||||
struct xrt_normalized_rect
|
||||
{
|
||||
float x, y, w, h;
|
||||
};
|
||||
|
||||
/*!
|
||||
* A pose composed of a position and orientation.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue