The window space depth values minDepth and maxDepth are akin to the parameters of glDepthRange that specify the mapping from normalized device coordinates into window space.
A reversed mapping of depth, such that points closer to the view have a window space depth that is greater than points further away can be achieved by making nearZ > farZ.
XrCompositionLayerDepthInfoKHR contains the information needed to associate depth with the color information in a projection layer. When submitting depth images along with projection layers, add the XrCompositionLayerDepthInfoKHR to the next chain for all XrCompositionLayerProjectionView structures in the given layer.
The homogeneous transform from view space z to window space depth is given by the following matrix, where a = minDepth, b = maxDepth, n = nearZ, and f = farZ.
Homogeneous values are constructed from real values by appending a w component with value 1.0.
General homogeneous values are projected back to real space by dividing by the w component.
XR_KHR_composition_layer_depth extension must be enabled prior to using XrCompositionLayerDepthInfoKHRtype must be TYPE_COMPOSITION_LAYER_DEPTH_INFO_KHRnext must be NULL or a valid pointer to the next structure in a structure chainsubImage must be a valid XrSwapchainSubImage structureXrCompositionLayerBaseHeader, XrCompositionLayerProjection, XrCompositionLayerProjectionView, XrFrameEndInfo, XrSwapchainSubImage, EndFrame
struct XrCompositionLayerDepthInfoKHR {
XrStructureType type;
void const * next;
XrSwapchainSubImage subImage;
float minDepth;
float maxDepth;
float nearZ;
float farZ;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | XrCompositionLayerDepthInfoKHR.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | FARZ
The struct member offsets. |
| public static final int | MAXDEPTH
The struct member offsets. |
| public static final int | MINDEPTH
The struct member offsets. |
| public static final int | NEARZ
The struct member offsets. |
| public static final int | NEXT
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | SUBIMAGE
The struct member offsets. |
| public static final int | TYPE
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | XrCompositionLayerDepthInfoKHR(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public static XrCompositionLayerDepthInfoKHR | |
| public static XrCompositionLayerDepthInfoKHR. | calloc(int
the buffer capacity capacity)Returns a new |
| public static XrCompositionLayerDepthInfoKHR | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static XrCompositionLayerDepthInfoKHR. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| protected XrCompositionLayerDepthInfoKHR | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static XrCompositionLayerDepthInfoKHR | |
| public static XrCompositionLayerDepthInfoKHR | create(long address)
Returns a new |
| public static XrCompositionLayerDepthInfoKHR. | create(int
the buffer capacity capacity)Returns a new |
| public static XrCompositionLayerDepthInfoKHR. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static XrCompositionLayerDepthInfoKHR | |
| public static XrCompositionLayerDepthInfoKHR. | |
| public float | |
| public XrCompositionLayerDepthInfoKHR | |
| public static XrCompositionLayerDepthInfoKHR | |
| public static XrCompositionLayerDepthInfoKHR. | malloc(int
the buffer capacity capacity)Returns a new |
| public static XrCompositionLayerDepthInfoKHR | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static XrCompositionLayerDepthInfoKHR. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public float | |
| public XrCompositionLayerDepthInfoKHR | |
| public float | minDepth()
|
| public XrCompositionLayerDepthInfoKHR | |
| public float | nearZ()
|
| public XrCompositionLayerDepthInfoKHR | |
| public long | |
| public XrCompositionLayerDepthInfoKHR | |
| public static float | |
| public static void | |
| public static float | |
| public static void | |
| public static float | |
| public static void | |
| public static float | |
| public static void | |
| public static long | |
| public static void | |
| public static XrSwapchainSubImage | |
| public static void | |
| public static int | |
| public static void | |
| public XrCompositionLayerDepthInfoKHR | set(int type, long next, XrSwapchainSubImage subImage, float minDepth, float maxDepth, float nearZ, float farZ)
Initializes this struct with the specified values. |
| public XrCompositionLayerDepthInfoKHR | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public XrSwapchainSubImage | |
| public XrCompositionLayerDepthInfoKHR | |
| public XrCompositionLayerDepthInfoKHR | subImage(Consumer<XrSwapchainSubImage> consumer)
|
| public int | |
| public XrCompositionLayerDepthInfoKHR | |
| public XrCompositionLayerDepthInfoKHR | |
| public static void |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| FARZ | back to summary |
|---|---|
| public static final int FARZ The struct member offsets. | |
| MAXDEPTH | back to summary |
|---|---|
| public static final int MAXDEPTH The struct member offsets. | |
| MINDEPTH | back to summary |
|---|---|
| public static final int MINDEPTH The struct member offsets. | |
| NEARZ | back to summary |
|---|---|
| public static final int NEARZ The struct member offsets. | |
| NEXT | back to summary |
|---|---|
| public static final int NEXT The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| SUBIMAGE | back to summary |
|---|---|
| public static final int SUBIMAGE The struct member offsets. | |
| TYPE | back to summary |
|---|---|
| public static final int TYPE The struct member offsets. | |
| XrCompositionLayerDepthInfoKHR | back to summary |
|---|---|
| protected XrCompositionLayerDepthInfoKHR(long address, ByteBuffer container) | |
| XrCompositionLayerDepthInfoKHR | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| calloc | back to summary |
|---|---|
| public static XrCompositionLayerDepthInfoKHR calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static XrCompositionLayerDepthInfoKHR. Returns a new
| |
| calloc | back to summary |
|---|---|
| public static XrCompositionLayerDepthInfoKHR calloc(MemoryStack stack) Returns a new
| |
| calloc | back to summary |
|---|---|
| public static XrCompositionLayerDepthInfoKHR. Returns a new
| |
| create | back to summary |
|---|---|
| protected XrCompositionLayerDepthInfoKHR create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static XrCompositionLayerDepthInfoKHR create() Returns a new | |
| create | back to summary |
|---|---|
| public static XrCompositionLayerDepthInfoKHR create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static XrCompositionLayerDepthInfoKHR. Returns a new
| |
| create | back to summary |
|---|---|
| public static XrCompositionLayerDepthInfoKHR. Create a
| |
| createSafe | back to summary |
|---|---|
| public static XrCompositionLayerDepthInfoKHR createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static XrCompositionLayerDepthInfoKHR. Like
| |
| farZ | back to summary |
|---|---|
| public float farZ() see | |
| farZ | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR farZ(float value) Sets the specified value to the | |
| malloc | back to summary |
|---|---|
| public static XrCompositionLayerDepthInfoKHR malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static XrCompositionLayerDepthInfoKHR. Returns a new
| |
| malloc | back to summary |
|---|---|
| public static XrCompositionLayerDepthInfoKHR malloc(MemoryStack stack) Returns a new
| |
| malloc | back to summary |
|---|---|
| public static XrCompositionLayerDepthInfoKHR. Returns a new
| |
| maxDepth | back to summary |
|---|---|
| public float maxDepth() see | |
| maxDepth | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR maxDepth(float value) Sets the specified value to the | |
| minDepth | back to summary |
|---|---|
| public float minDepth()
| |
| minDepth | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR minDepth(float value) Sets the specified value to the | |
| nearZ | back to summary |
|---|---|
| public float nearZ()
| |
| nearZ | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR nearZ(float value) Sets the specified value to the | |
| next | back to summary |
|---|---|
| public long next()
| |
| next | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR next(long value) Sets the specified value to the | |
| nfarZ | back to summary |
|---|---|
| public static float nfarZ(long struct) Unsafe version of | |
| nfarZ | back to summary |
|---|---|
| public static void nfarZ(long struct, float value) Unsafe version of | |
| nmaxDepth | back to summary |
|---|---|
| public static float nmaxDepth(long struct) Unsafe version of | |
| nmaxDepth | back to summary |
|---|---|
| public static void nmaxDepth(long struct, float value) Unsafe version of | |
| nminDepth | back to summary |
|---|---|
| public static float nminDepth(long struct) Unsafe version of | |
| nminDepth | back to summary |
|---|---|
| public static void nminDepth(long struct, float value) Unsafe version of | |
| nnearZ | back to summary |
|---|---|
| public static float nnearZ(long struct) Unsafe version of | |
| nnearZ | back to summary |
|---|---|
| public static void nnearZ(long struct, float value) Unsafe version of | |
| nnext | back to summary |
|---|---|
| public static long nnext(long struct) Unsafe version of | |
| nnext | back to summary |
|---|---|
| public static void nnext(long struct, long value) Unsafe version of | |
| nsubImage | back to summary |
|---|---|
| public static XrSwapchainSubImage nsubImage(long struct) Unsafe version of | |
| nsubImage | back to summary |
|---|---|
| public static void nsubImage(long struct, XrSwapchainSubImage value) Unsafe version of | |
| ntype | back to summary |
|---|---|
| public static int ntype(long struct) Unsafe version of | |
| ntype | back to summary |
|---|---|
| public static void ntype(long struct, int value) Unsafe version of | |
| set | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR set(int type, long next, XrSwapchainSubImage subImage, float minDepth, float maxDepth, float nearZ, float farZ) Initializes this struct with the specified values. | |
| set | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR set(XrCompositionLayerDepthInfoKHR src) Copies the specified struct data to this struct.
| |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
| subImage | back to summary |
|---|---|
| public XrSwapchainSubImage subImage() identifies the depth image | |
| subImage | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR subImage(XrSwapchainSubImage value) Copies the specified | |
| subImage | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR subImage(Consumer<XrSwapchainSubImage> consumer) | |
| type | back to summary |
|---|---|
| public int type() the
| |
| type | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR type(int value) Sets the specified value to the | |
| type$Default | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR type$Default() Sets the | |
| validate | back to summary |
|---|---|
| public static void validate(long struct) Validates pointer members that should not be
| |
XrCompositionLayerDepthInfoKHR structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final XrCompositionLayerDepthInfoKHR |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final XrCompositionLayerDepthInfoKHR ELEMENT_FACTORY | |
| Buffer | back to summary |
|---|---|
| public Buffer(ByteBuffer container) Creates a new Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
by The created buffer instance holds a strong reference to the container object. | |
| Buffer | back to summary |
|---|---|
| public Buffer(long address, int cap) | |
| Buffer | back to summary |
|---|---|
| pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) | |
| farZ | back to summary |
|---|---|
public float farZ()
| |
| farZ | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR. Sets the specified value to the | |
| getElementFactory | back to summary |
|---|---|
| protected XrCompositionLayerDepthInfoKHR getElementFactory() Implements abstract org.
| |
| maxDepth | back to summary |
|---|---|
public float maxDepth()
| |
| maxDepth | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR. Sets the specified value to the | |
| minDepth | back to summary |
|---|---|
public float minDepth()
| |
| minDepth | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR. Sets the specified value to the | |
| nearZ | back to summary |
|---|---|
public float nearZ()
| |
| nearZ | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR. Sets the specified value to the | |
| next | back to summary |
|---|---|
public long next()
| |
| next | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR. Sets the specified value to the | |
| self | back to summary |
|---|---|
| protected XrCompositionLayerDepthInfoKHR. Implements abstract org.
| |
| subImage | back to summary |
|---|---|
public XrSwapchainSubImage subImage()
| |
| subImage | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR. Copies the specified | |
| subImage | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR. Passes the | |
| type | back to summary |
|---|---|
public int type()
| |
| type | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR. Sets the specified value to the | |
| type$Default | back to summary |
|---|---|
| public XrCompositionLayerDepthInfoKHR. Sets the | |