Package org.lwjgl.openxr
Class XrCompositionLayerProjection
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openxr.XrCompositionLayerProjection
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrCompositionLayerProjection extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceComposition layer for projection.Description
Note
Because a runtime may reproject the layer over time, a projection layer should specify an
XrSpacein which to maximize stability of the layer content. For example, a projection layer containing world-locked content should use anXrSpacewhich is also world-locked, such as theLOCALorSTAGEreference spaces. In the case that the projection layer should be head-locked, such as a heads up display, theVIEWreference space would provide the highest quality layer reprojection.Valid Usage (Implicit)
typemust beTYPE_COMPOSITION_LAYER_PROJECTIONnextmust beNULLor a valid pointer to the next structure in a structure chain. See also:XrCompositionLayerDepthTestVARJO,XrCompositionLayerReprojectionInfoMSFT,XrCompositionLayerReprojectionPlaneOverrideMSFTlayerFlagsmust be 0 or a valid combination ofXrCompositionLayerFlagBitsvaluesspacemust be a validXrSpacehandleviewsmust be a pointer to an array ofviewCountvalidXrCompositionLayerProjectionViewstructures- The
viewCountparameter must be greater than 0
See Also
XrCompositionLayerBaseHeader,XrCompositionLayerProjectionView,XrSwapchainSubImageLayout
struct XrCompositionLayerProjection { XrStructureTypetype(); void const *next(); XrCompositionLayerFlagslayerFlags(); XrSpacespace(); uint32_tviewCount();XrCompositionLayerProjectionViewconst *views(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXrCompositionLayerProjection.BufferAn array ofXrCompositionLayerProjectionstructs.
-
Constructor Summary
Constructors Constructor Description XrCompositionLayerProjection(java.nio.ByteBuffer container)Creates aXrCompositionLayerProjectioninstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XrCompositionLayerProjectioncalloc()Returns a newXrCompositionLayerProjectioninstance allocated withmemCalloc.static XrCompositionLayerProjection.Buffercalloc(int capacity)Returns a newXrCompositionLayerProjection.Bufferinstance allocated withmemCalloc.static XrCompositionLayerProjection.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrCompositionLayerProjection.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrCompositionLayerProjectioncalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrCompositionLayerProjectioninstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrCompositionLayerProjectioncreate()Returns a newXrCompositionLayerProjectioninstance allocated withBufferUtils.static XrCompositionLayerProjection.Buffercreate(int capacity)Returns a newXrCompositionLayerProjection.Bufferinstance allocated withBufferUtils.static XrCompositionLayerProjectioncreate(long address)Returns a newXrCompositionLayerProjectioninstance for the specified memory address.static XrCompositionLayerProjection.Buffercreate(long address, int capacity)Create aXrCompositionLayerProjection.Bufferinstance at the specified memory.static XrCompositionLayerProjectioncreate(XrCompositionLayerBaseHeader value)Downcasts the specifiedXrCompositionLayerBaseHeaderinstance toXrCompositionLayerProjection.static XrCompositionLayerProjection.Buffercreate(XrCompositionLayerBaseHeader.Buffer value)Downcasts the specifiedXrCompositionLayerBaseHeader.Bufferinstance toXrCompositionLayerProjection.Buffer.static XrCompositionLayerProjectioncreateSafe(long address)static XrCompositionLayerProjection.BuffercreateSafe(long address, int capacity)longlayerFlags()a bitmask ofXrCompositionLayerFlagBitsdescribing flags to apply to the layer.XrCompositionLayerProjectionlayerFlags(long value)Sets the specified value to thelayerFlags()field.static XrCompositionLayerProjectionmalloc()Returns a newXrCompositionLayerProjectioninstance allocated withmemAlloc.static XrCompositionLayerProjection.Buffermalloc(int capacity)Returns a newXrCompositionLayerProjection.Bufferinstance allocated withmemAlloc.static XrCompositionLayerProjection.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrCompositionLayerProjection.Bufferinstance allocated on the specifiedMemoryStack.static XrCompositionLayerProjectionmalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrCompositionLayerProjectioninstance allocated on the specifiedMemoryStack.longnext()NULLor a pointer to the next structure in a structure chain.XrCompositionLayerProjectionnext(long value)Sets the specified value to thenext()field.XrCompositionLayerProjectionnext(XrCompositionLayerDepthTestVARJO value)Prepends the specifiedXrCompositionLayerDepthTestVARJOvalue to thenextchain.XrCompositionLayerProjectionnext(XrCompositionLayerReprojectionInfoMSFT value)Prepends the specifiedXrCompositionLayerReprojectionInfoMSFTvalue to thenextchain.XrCompositionLayerProjectionnext(XrCompositionLayerReprojectionPlaneOverrideMSFT value)Prepends the specifiedXrCompositionLayerReprojectionPlaneOverrideMSFTvalue to thenextchain.static longnlayerFlags(long struct)Unsafe version oflayerFlags().static voidnlayerFlags(long struct, long value)Unsafe version oflayerFlags.static longnnext(long struct)Unsafe version ofnext().static voidnnext(long struct, long value)Unsafe version ofnext.static longnspace(long struct)Unsafe version ofspace().static voidnspace(long struct, XrSpace value)Unsafe version ofspace.static intntype(long struct)Unsafe version oftype().static voidntype(long struct, int value)Unsafe version oftype.static intnviewCount(long struct)Unsafe version ofviewCount().static voidnviewCount(long struct, int value)Sets the specified value to theviewCountfield of the specifiedstruct.static XrCompositionLayerProjectionView.Buffernviews(long struct)Unsafe version ofviews().static voidnviews(long struct, XrCompositionLayerProjectionView.Buffer value)Unsafe version ofviews.XrCompositionLayerProjectionset(int type, long next, long layerFlags, XrSpace space, XrCompositionLayerProjectionView.Buffer views)Initializes this struct with the specified values.XrCompositionLayerProjectionset(XrCompositionLayerProjection src)Copies the specified struct data to this struct.intsizeof()longspace()theXrSpacein which theposeof eachXrCompositionLayerProjectionViewis evaluated over time by the compositor.XrCompositionLayerProjectionspace(XrSpace value)Sets the specified value to thespace()field.inttype()theXrStructureTypeof this structure.XrCompositionLayerProjectiontype(int value)Sets the specified value to thetype()field.XrCompositionLayerProjectiontype$Default()Sets theTYPE_COMPOSITION_LAYER_PROJECTIONvalue to thetype()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.intviewCount()the count of views in theviewsarray.XrCompositionLayerProjectionView.Bufferviews()the array of typeXrCompositionLayerProjectionViewcontaining each projection layer view.XrCompositionLayerProjectionviews(XrCompositionLayerProjectionView.Buffer value)Sets the address of the specifiedXrCompositionLayerProjectionView.Bufferto theviews()field.
-
-
-
Constructor Detail
-
XrCompositionLayerProjection
public XrCompositionLayerProjection(java.nio.ByteBuffer container)
Creates aXrCompositionLayerProjectioninstance 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.
-
layerFlags
public long layerFlags()
a bitmask ofXrCompositionLayerFlagBitsdescribing flags to apply to the layer.
-
space
public long space()
theXrSpacein which theposeof eachXrCompositionLayerProjectionViewis evaluated over time by the compositor.
-
viewCount
public int viewCount()
the count of views in theviewsarray. This must be equal to the number of view poses returned byLocateViews.
-
views
public XrCompositionLayerProjectionView.Buffer views()
the array of typeXrCompositionLayerProjectionViewcontaining each projection layer view.
-
type
public XrCompositionLayerProjection type(int value)
Sets the specified value to thetype()field.
-
type$Default
public XrCompositionLayerProjection type$Default()
Sets theTYPE_COMPOSITION_LAYER_PROJECTIONvalue to thetype()field.
-
next
public XrCompositionLayerProjection next(long value)
Sets the specified value to thenext()field.
-
next
public XrCompositionLayerProjection next(XrCompositionLayerDepthTestVARJO value)
Prepends the specifiedXrCompositionLayerDepthTestVARJOvalue to thenextchain.
-
next
public XrCompositionLayerProjection next(XrCompositionLayerReprojectionInfoMSFT value)
Prepends the specifiedXrCompositionLayerReprojectionInfoMSFTvalue to thenextchain.
-
next
public XrCompositionLayerProjection next(XrCompositionLayerReprojectionPlaneOverrideMSFT value)
Prepends the specifiedXrCompositionLayerReprojectionPlaneOverrideMSFTvalue to thenextchain.
-
layerFlags
public XrCompositionLayerProjection layerFlags(long value)
Sets the specified value to thelayerFlags()field.
-
space
public XrCompositionLayerProjection space(XrSpace value)
Sets the specified value to thespace()field.
-
views
public XrCompositionLayerProjection views(XrCompositionLayerProjectionView.Buffer value)
Sets the address of the specifiedXrCompositionLayerProjectionView.Bufferto theviews()field.
-
set
public XrCompositionLayerProjection set(int type, long next, long layerFlags, XrSpace space, XrCompositionLayerProjectionView.Buffer views)
Initializes this struct with the specified values.
-
set
public XrCompositionLayerProjection set(XrCompositionLayerProjection src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XrCompositionLayerProjection malloc()
Returns a newXrCompositionLayerProjectioninstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XrCompositionLayerProjection calloc()
Returns a newXrCompositionLayerProjectioninstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XrCompositionLayerProjection create()
Returns a newXrCompositionLayerProjectioninstance allocated withBufferUtils.
-
create
public static XrCompositionLayerProjection create(long address)
Returns a newXrCompositionLayerProjectioninstance for the specified memory address.
-
createSafe
@Nullable public static XrCompositionLayerProjection createSafe(long address)
-
create
public static XrCompositionLayerProjection create(XrCompositionLayerBaseHeader value)
Downcasts the specifiedXrCompositionLayerBaseHeaderinstance toXrCompositionLayerProjection.
-
malloc
public static XrCompositionLayerProjection.Buffer malloc(int capacity)
Returns a newXrCompositionLayerProjection.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XrCompositionLayerProjection.Buffer calloc(int capacity)
Returns a newXrCompositionLayerProjection.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XrCompositionLayerProjection.Buffer create(int capacity)
Returns a newXrCompositionLayerProjection.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XrCompositionLayerProjection.Buffer create(long address, int capacity)
Create aXrCompositionLayerProjection.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XrCompositionLayerProjection.Buffer createSafe(long address, int capacity)
-
create
public static XrCompositionLayerProjection.Buffer create(XrCompositionLayerBaseHeader.Buffer value)
Downcasts the specifiedXrCompositionLayerBaseHeader.Bufferinstance toXrCompositionLayerProjection.Buffer.
-
malloc
public static XrCompositionLayerProjection malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrCompositionLayerProjectioninstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XrCompositionLayerProjection calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrCompositionLayerProjectioninstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrCompositionLayerProjection.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrCompositionLayerProjection.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XrCompositionLayerProjection.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrCompositionLayerProjection.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().
-
nlayerFlags
public static long nlayerFlags(long struct)
Unsafe version oflayerFlags().
-
nspace
public static long nspace(long struct)
Unsafe version ofspace().
-
nviewCount
public static int nviewCount(long struct)
Unsafe version ofviewCount().
-
nviews
public static XrCompositionLayerProjectionView.Buffer nviews(long struct)
Unsafe version ofviews().
-
ntype
public static void ntype(long struct, int value)Unsafe version oftype.
-
nnext
public static void nnext(long struct, long value)Unsafe version ofnext.
-
nlayerFlags
public static void nlayerFlags(long struct, long value)Unsafe version oflayerFlags.
-
nviewCount
public static void nviewCount(long struct, int value)Sets the specified value to theviewCountfield of the specifiedstruct.
-
nviews
public static void nviews(long struct, XrCompositionLayerProjectionView.Buffer value)Unsafe version ofviews.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-