Package org.lwjgl.openxr
Class XrCompositionLayerDepthInfoKHR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openxr.XrCompositionLayerDepthInfoKHR
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrCompositionLayerDepthInfoKHR extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceDepth map layer info.Description
XrCompositionLayerDepthInfoKHRcontains the information needed to specify an extra layer with depth information. When submitting depth buffers along with projection layers, add theXrCompositionLayerDepthInfoKHRto thenextchain for allXrCompositionLayerProjectionViewstructures in the given layer.Valid Usage (Implicit)
- The
XR_KHR_composition_layer_depthextension must be enabled prior to usingXrCompositionLayerDepthInfoKHR typemust beTYPE_COMPOSITION_LAYER_DEPTH_INFO_KHRnextmust beNULLor a valid pointer to the next structure in a structure chainsubImagemust be a validXrSwapchainSubImagestructure
See Also
XrCompositionLayerBaseHeader,XrCompositionLayerProjection,XrCompositionLayerProjectionView,XrFrameEndInfo,XrSwapchainSubImage,EndFrameLayout
struct XrCompositionLayerDepthInfoKHR { XrStructureTypetype(); void const *next();XrSwapchainSubImagesubImage(); floatminDepth(); floatmaxDepth(); floatnearZ(); floatfarZ(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXrCompositionLayerDepthInfoKHR.BufferAn array ofXrCompositionLayerDepthInfoKHRstructs.
-
Constructor Summary
Constructors Constructor Description XrCompositionLayerDepthInfoKHR(java.nio.ByteBuffer container)Creates aXrCompositionLayerDepthInfoKHRinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XrCompositionLayerDepthInfoKHRcalloc()Returns a newXrCompositionLayerDepthInfoKHRinstance allocated withmemCalloc.static XrCompositionLayerDepthInfoKHR.Buffercalloc(int capacity)Returns a newXrCompositionLayerDepthInfoKHR.Bufferinstance allocated withmemCalloc.static XrCompositionLayerDepthInfoKHR.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrCompositionLayerDepthInfoKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrCompositionLayerDepthInfoKHRcalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrCompositionLayerDepthInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrCompositionLayerDepthInfoKHRcreate()Returns a newXrCompositionLayerDepthInfoKHRinstance allocated withBufferUtils.static XrCompositionLayerDepthInfoKHR.Buffercreate(int capacity)Returns a newXrCompositionLayerDepthInfoKHR.Bufferinstance allocated withBufferUtils.static XrCompositionLayerDepthInfoKHRcreate(long address)Returns a newXrCompositionLayerDepthInfoKHRinstance for the specified memory address.static XrCompositionLayerDepthInfoKHR.Buffercreate(long address, int capacity)Create aXrCompositionLayerDepthInfoKHR.Bufferinstance at the specified memory.static XrCompositionLayerDepthInfoKHRcreateSafe(long address)static XrCompositionLayerDepthInfoKHR.BuffercreateSafe(long address, int capacity)floatfarZ()the positive distance in meters of themaxDepthvalue in the depth swapchain.XrCompositionLayerDepthInfoKHRfarZ(float value)Sets the specified value to thefarZ()field.static XrCompositionLayerDepthInfoKHRmalloc()Returns a newXrCompositionLayerDepthInfoKHRinstance allocated withmemAlloc.static XrCompositionLayerDepthInfoKHR.Buffermalloc(int capacity)Returns a newXrCompositionLayerDepthInfoKHR.Bufferinstance allocated withmemAlloc.static XrCompositionLayerDepthInfoKHR.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrCompositionLayerDepthInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.static XrCompositionLayerDepthInfoKHRmalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrCompositionLayerDepthInfoKHRinstance allocated on the specifiedMemoryStack.floatmaxDepth()seeminDepthXrCompositionLayerDepthInfoKHRmaxDepth(float value)Sets the specified value to themaxDepth()field.floatminDepth()minDepthandmaxDepthare the range of depth values thedepthSwapchaincould have, in the range of[0.0,1.0].XrCompositionLayerDepthInfoKHRminDepth(float value)Sets the specified value to theminDepth()field.floatnearZ()the positive distance in meters of theminDepthvalue in the depth swapchain.XrCompositionLayerDepthInfoKHRnearZ(float value)Sets the specified value to thenearZ()field.longnext()NULLor a pointer to the next structure in a structure chain.XrCompositionLayerDepthInfoKHRnext(long value)Sets the specified value to thenext()field.static floatnfarZ(long struct)Unsafe version offarZ().static voidnfarZ(long struct, float value)Unsafe version offarZ.static floatnmaxDepth(long struct)Unsafe version ofmaxDepth().static voidnmaxDepth(long struct, float value)Unsafe version ofmaxDepth.static floatnminDepth(long struct)Unsafe version ofminDepth().static voidnminDepth(long struct, float value)Unsafe version ofminDepth.static floatnnearZ(long struct)Unsafe version ofnearZ().static voidnnearZ(long struct, float value)Unsafe version ofnearZ.static longnnext(long struct)Unsafe version ofnext().static voidnnext(long struct, long value)Unsafe version ofnext.static XrSwapchainSubImagensubImage(long struct)Unsafe version ofsubImage().static voidnsubImage(long struct, XrSwapchainSubImage value)Unsafe version ofsubImage.static intntype(long struct)Unsafe version oftype().static voidntype(long struct, int value)Unsafe version oftype.XrCompositionLayerDepthInfoKHRset(int type, long next, XrSwapchainSubImage subImage, float minDepth, float maxDepth, float nearZ, float farZ)Initializes this struct with the specified values.XrCompositionLayerDepthInfoKHRset(XrCompositionLayerDepthInfoKHR src)Copies the specified struct data to this struct.intsizeof()XrSwapchainSubImagesubImage()identifies the depth imageXrSwapchainSubImageto be associated with the color swapchain.XrCompositionLayerDepthInfoKHRsubImage(java.util.function.Consumer<XrSwapchainSubImage> consumer)Passes thesubImage()field to the specifiedConsumer.XrCompositionLayerDepthInfoKHRsubImage(XrSwapchainSubImage value)Copies the specifiedXrSwapchainSubImageto thesubImage()field.inttype()theXrStructureTypeof this structure.XrCompositionLayerDepthInfoKHRtype(int value)Sets the specified value to thetype()field.XrCompositionLayerDepthInfoKHRtype$Default()Sets theTYPE_COMPOSITION_LAYER_DEPTH_INFO_KHRvalue to thetype()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
XrCompositionLayerDepthInfoKHR
public XrCompositionLayerDepthInfoKHR(java.nio.ByteBuffer container)
Creates aXrCompositionLayerDepthInfoKHRinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
type
public int type()
theXrStructureTypeof this structure.
-
next
public long next()
NULLor a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR or this extension.
-
subImage
public XrSwapchainSubImage subImage()
identifies the depth imageXrSwapchainSubImageto be associated with the color swapchain. The containedimageRectspecifies the valid portion of the depth image to use, in pixels. It also implicitly defines the transform from normalized image coordinates into pixel coordinates. The containedimageArrayIndexis the depth image array index, with 0 meaning the first or only array element.
-
minDepth
public float minDepth()
minDepthandmaxDepthare the range of depth values thedepthSwapchaincould have, in the range of[0.0,1.0]. This is akin to min and max values of OpenGL’sglDepthRange, but with the requirement here thatmaxDepth ≥ minDepth.
-
maxDepth
public float maxDepth()
seeminDepth
-
nearZ
public float nearZ()
the positive distance in meters of theminDepthvalue in the depth swapchain. Applications may use anearZthat is greater thanfarZto indicate depth values are reversed.nearZcan be infinite.
-
farZ
public float farZ()
the positive distance in meters of themaxDepthvalue in the depth swapchain.farZcan be infinite. Applications must not use the same value asnearZ.
-
type
public XrCompositionLayerDepthInfoKHR type(int value)
Sets the specified value to thetype()field.
-
type$Default
public XrCompositionLayerDepthInfoKHR type$Default()
Sets theTYPE_COMPOSITION_LAYER_DEPTH_INFO_KHRvalue to thetype()field.
-
next
public XrCompositionLayerDepthInfoKHR next(long value)
Sets the specified value to thenext()field.
-
subImage
public XrCompositionLayerDepthInfoKHR subImage(XrSwapchainSubImage value)
Copies the specifiedXrSwapchainSubImageto thesubImage()field.
-
subImage
public XrCompositionLayerDepthInfoKHR subImage(java.util.function.Consumer<XrSwapchainSubImage> consumer)
Passes thesubImage()field to the specifiedConsumer.
-
minDepth
public XrCompositionLayerDepthInfoKHR minDepth(float value)
Sets the specified value to theminDepth()field.
-
maxDepth
public XrCompositionLayerDepthInfoKHR maxDepth(float value)
Sets the specified value to themaxDepth()field.
-
nearZ
public XrCompositionLayerDepthInfoKHR nearZ(float value)
Sets the specified value to thenearZ()field.
-
farZ
public XrCompositionLayerDepthInfoKHR farZ(float value)
Sets the specified value to thefarZ()field.
-
set
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
public XrCompositionLayerDepthInfoKHR set(XrCompositionLayerDepthInfoKHR src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XrCompositionLayerDepthInfoKHR malloc()
Returns a newXrCompositionLayerDepthInfoKHRinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XrCompositionLayerDepthInfoKHR calloc()
Returns a newXrCompositionLayerDepthInfoKHRinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XrCompositionLayerDepthInfoKHR create()
Returns a newXrCompositionLayerDepthInfoKHRinstance allocated withBufferUtils.
-
create
public static XrCompositionLayerDepthInfoKHR create(long address)
Returns a newXrCompositionLayerDepthInfoKHRinstance for the specified memory address.
-
createSafe
@Nullable public static XrCompositionLayerDepthInfoKHR createSafe(long address)
-
malloc
public static XrCompositionLayerDepthInfoKHR.Buffer malloc(int capacity)
Returns a newXrCompositionLayerDepthInfoKHR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XrCompositionLayerDepthInfoKHR.Buffer calloc(int capacity)
Returns a newXrCompositionLayerDepthInfoKHR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XrCompositionLayerDepthInfoKHR.Buffer create(int capacity)
Returns a newXrCompositionLayerDepthInfoKHR.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XrCompositionLayerDepthInfoKHR.Buffer create(long address, int capacity)
Create aXrCompositionLayerDepthInfoKHR.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XrCompositionLayerDepthInfoKHR.Buffer createSafe(long address, int capacity)
-
malloc
public static XrCompositionLayerDepthInfoKHR malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrCompositionLayerDepthInfoKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XrCompositionLayerDepthInfoKHR calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrCompositionLayerDepthInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrCompositionLayerDepthInfoKHR.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrCompositionLayerDepthInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XrCompositionLayerDepthInfoKHR.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrCompositionLayerDepthInfoKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
ntype
public static int ntype(long struct)
Unsafe version oftype().
-
nnext
public static long nnext(long struct)
Unsafe version ofnext().
-
nsubImage
public static XrSwapchainSubImage nsubImage(long struct)
Unsafe version ofsubImage().
-
nminDepth
public static float nminDepth(long struct)
Unsafe version ofminDepth().
-
nmaxDepth
public static float nmaxDepth(long struct)
Unsafe version ofmaxDepth().
-
nnearZ
public static float nnearZ(long struct)
Unsafe version ofnearZ().
-
nfarZ
public static float nfarZ(long struct)
Unsafe version offarZ().
-
ntype
public static void ntype(long struct, int value)Unsafe version oftype.
-
nnext
public static void nnext(long struct, long value)Unsafe version ofnext.
-
nsubImage
public static void nsubImage(long struct, XrSwapchainSubImage value)Unsafe version ofsubImage.
-
nminDepth
public static void nminDepth(long struct, float value)Unsafe version ofminDepth.
-
nmaxDepth
public static void nmaxDepth(long struct, float value)Unsafe version ofmaxDepth.
-
nnearZ
public static void nnearZ(long struct, float value)Unsafe version ofnearZ.
-
nfarZ
public static void nfarZ(long struct, float value)Unsafe version offarZ.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-