Package org.lwjgl.openxr
Class XrSwapchainCreateInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.openxr.XrSwapchainCreateInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrSwapchainCreateInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceCreation info for a swapchain.Valid Usage (Implicit)
typemust beTYPE_SWAPCHAIN_CREATE_INFOnextmust beNULLor a valid pointer to the next structure in a structure chain. See also:XrSecondaryViewConfigurationSwapchainCreateInfoMSFT,XrSwapchainCreateInfoFoveationFBcreateFlagsmust be 0 or a valid combination ofXrSwapchainCreateFlagBitsvaluesusageFlagsmust be 0 or a valid combination ofXrSwapchainUsageFlagBitsvalues
See Also
CreateSession,CreateSwapchain,EnumerateSwapchainFormatsLayout
struct XrSwapchainCreateInfo { XrStructureTypetype(); void const *next(); XrSwapchainCreateFlagscreateFlags(); XrSwapchainUsageFlagsusageFlags(); int64_tformat(); uint32_tsampleCount(); uint32_twidth(); uint32_theight(); uint32_tfaceCount(); uint32_tarraySize(); uint32_tmipCount(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXrSwapchainCreateInfo.BufferAn array ofXrSwapchainCreateInfostructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intARRAYSIZE
CREATEFLAGS
FACECOUNT
FORMAT
HEIGHT
MIPCOUNT
NEXT
SAMPLECOUNTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intTYPE
USAGEFLAGS
WIDTHThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description XrSwapchainCreateInfo(java.nio.ByteBuffer container)Creates aXrSwapchainCreateInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intarraySize()the number of array layers in the image or 1 for a 2D image, must not be 0 or greater than the graphics API’s maximum limit.XrSwapchainCreateInfoarraySize(int value)Sets the specified value to thearraySize()field.static XrSwapchainCreateInfocalloc()Returns a newXrSwapchainCreateInfoinstance allocated withmemCalloc.static XrSwapchainCreateInfo.Buffercalloc(int capacity)Returns a newXrSwapchainCreateInfo.Bufferinstance allocated withmemCalloc.static XrSwapchainCreateInfo.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrSwapchainCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrSwapchainCreateInfocalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrSwapchainCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static XrSwapchainCreateInfocreate()Returns a newXrSwapchainCreateInfoinstance allocated withBufferUtils.static XrSwapchainCreateInfo.Buffercreate(int capacity)Returns a newXrSwapchainCreateInfo.Bufferinstance allocated withBufferUtils.static XrSwapchainCreateInfocreate(long address)Returns a newXrSwapchainCreateInfoinstance for the specified memory address.static XrSwapchainCreateInfo.Buffercreate(long address, int capacity)Create aXrSwapchainCreateInfo.Bufferinstance at the specified memory.longcreateFlags()a bitmask ofXrSwapchainCreateFlagBitsdescribing additional properties of the swapchain.XrSwapchainCreateInfocreateFlags(long value)Sets the specified value to thecreateFlags()field.static XrSwapchainCreateInfocreateSafe(long address)static XrSwapchainCreateInfo.BuffercreateSafe(long address, int capacity)intfaceCount()the number of faces, which can be either 6 (for cubemaps) or 1.XrSwapchainCreateInfofaceCount(int value)Sets the specified value to thefaceCount()field.longformat()a graphics API-specific texture format identifier.XrSwapchainCreateInfoformat(long value)Sets the specified value to theformat()field.intheight()the height of the image, must not be 0 or greater than the graphics API’s maximum limit.XrSwapchainCreateInfoheight(int value)Sets the specified value to theheight()field.static XrSwapchainCreateInfomalloc()Returns a newXrSwapchainCreateInfoinstance allocated withmemAlloc.static XrSwapchainCreateInfo.Buffermalloc(int capacity)Returns a newXrSwapchainCreateInfo.Bufferinstance allocated withmemAlloc.static XrSwapchainCreateInfo.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newXrSwapchainCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static XrSwapchainCreateInfomalloc(org.lwjgl.system.MemoryStack stack)Returns a newXrSwapchainCreateInfoinstance allocated on the specifiedMemoryStack.intmipCount()describes the number of levels of detail available for minified sampling of the image, must not be 0 or greater than the graphics API’s maximum limit.XrSwapchainCreateInfomipCount(int value)Sets the specified value to themipCount()field.static intnarraySize(long struct)Unsafe version ofarraySize().static voidnarraySize(long struct, int value)Unsafe version ofarraySize.static longncreateFlags(long struct)Unsafe version ofcreateFlags().static voidncreateFlags(long struct, long value)Unsafe version ofcreateFlags.longnext()NULLor a pointer to the next structure in a structure chain.XrSwapchainCreateInfonext(long value)Sets the specified value to thenext()field.XrSwapchainCreateInfonext(XrSecondaryViewConfigurationSwapchainCreateInfoMSFT value)Prepends the specifiedXrSecondaryViewConfigurationSwapchainCreateInfoMSFTvalue to thenextchain.XrSwapchainCreateInfonext(XrSwapchainCreateInfoFoveationFB value)Prepends the specifiedXrSwapchainCreateInfoFoveationFBvalue to thenextchain.static intnfaceCount(long struct)Unsafe version offaceCount().static voidnfaceCount(long struct, int value)Unsafe version offaceCount.static longnformat(long struct)Unsafe version offormat().static voidnformat(long struct, long value)Unsafe version offormat.static intnheight(long struct)Unsafe version ofheight().static voidnheight(long struct, int value)Unsafe version ofheight.static intnmipCount(long struct)Unsafe version ofmipCount().static voidnmipCount(long struct, int value)Unsafe version ofmipCount.static longnnext(long struct)Unsafe version ofnext().static voidnnext(long struct, long value)Unsafe version ofnext.static intnsampleCount(long struct)Unsafe version ofsampleCount().static voidnsampleCount(long struct, int value)Unsafe version ofsampleCount.static intntype(long struct)Unsafe version oftype().static voidntype(long struct, int value)Unsafe version oftype.static longnusageFlags(long struct)Unsafe version ofusageFlags().static voidnusageFlags(long struct, long value)Unsafe version ofusageFlags.static intnwidth(long struct)Unsafe version ofwidth().static voidnwidth(long struct, int value)Unsafe version ofwidth.intsampleCount()the number of sub-data element samples in the image, must not be 0 or greater than the graphics API’s maximum limit.XrSwapchainCreateInfosampleCount(int value)Sets the specified value to thesampleCount()field.XrSwapchainCreateInfoset(int type, long next, long createFlags, long usageFlags, long format, int sampleCount, int width, int height, int faceCount, int arraySize, int mipCount)Initializes this struct with the specified values.XrSwapchainCreateInfoset(XrSwapchainCreateInfo src)Copies the specified struct data to this struct.intsizeof()inttype()theXrStructureTypeof this structure.XrSwapchainCreateInfotype(int value)Sets the specified value to thetype()field.XrSwapchainCreateInfotype$Default()Sets theTYPE_SWAPCHAIN_CREATE_INFOvalue to thetype()field.longusageFlags()a bitmask ofXrSwapchainUsageFlagBitsdescribing the intended usage of the swapchain’s images.XrSwapchainCreateInfousageFlags(long value)Sets the specified value to theusageFlags()field.intwidth()the width of the image, must not be 0 or greater than the graphics API’s maximum limit.XrSwapchainCreateInfowidth(int value)Sets the specified value to thewidth()field.
-
-
-
Constructor Detail
-
XrSwapchainCreateInfo
public XrSwapchainCreateInfo(java.nio.ByteBuffer container)
Creates aXrSwapchainCreateInfoinstance 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.
-
createFlags
public long createFlags()
a bitmask ofXrSwapchainCreateFlagBitsdescribing additional properties of the swapchain.
-
usageFlags
public long usageFlags()
a bitmask ofXrSwapchainUsageFlagBitsdescribing the intended usage of the swapchain’s images. The usage flags define how the corresponding graphics API objects are created. A mismatch may result in swapchain images that do not support the application’s usage.
-
format
public long format()
a graphics API-specific texture format identifier. For example, if the graphics API specified inCreateSessionis Vulkan, then this format is a Vulkan format such asVK_FORMAT_R8G8B8A8_SRGB. The format identifies the format that the runtime will interpret the texture as upon submission. Valid formats are indicated byEnumerateSwapchainFormats.
-
sampleCount
public int sampleCount()
the number of sub-data element samples in the image, must not be 0 or greater than the graphics API’s maximum limit.
-
width
public int width()
the width of the image, must not be 0 or greater than the graphics API’s maximum limit.
-
height
public int height()
the height of the image, must not be 0 or greater than the graphics API’s maximum limit.
-
faceCount
public int faceCount()
the number of faces, which can be either 6 (for cubemaps) or 1.
-
arraySize
public int arraySize()
the number of array layers in the image or 1 for a 2D image, must not be 0 or greater than the graphics API’s maximum limit.
-
mipCount
public int mipCount()
describes the number of levels of detail available for minified sampling of the image, must not be 0 or greater than the graphics API’s maximum limit.
-
type
public XrSwapchainCreateInfo type(int value)
Sets the specified value to thetype()field.
-
type$Default
public XrSwapchainCreateInfo type$Default()
Sets theTYPE_SWAPCHAIN_CREATE_INFOvalue to thetype()field.
-
next
public XrSwapchainCreateInfo next(long value)
Sets the specified value to thenext()field.
-
next
public XrSwapchainCreateInfo next(XrSecondaryViewConfigurationSwapchainCreateInfoMSFT value)
Prepends the specifiedXrSecondaryViewConfigurationSwapchainCreateInfoMSFTvalue to thenextchain.
-
next
public XrSwapchainCreateInfo next(XrSwapchainCreateInfoFoveationFB value)
Prepends the specifiedXrSwapchainCreateInfoFoveationFBvalue to thenextchain.
-
createFlags
public XrSwapchainCreateInfo createFlags(long value)
Sets the specified value to thecreateFlags()field.
-
usageFlags
public XrSwapchainCreateInfo usageFlags(long value)
Sets the specified value to theusageFlags()field.
-
format
public XrSwapchainCreateInfo format(long value)
Sets the specified value to theformat()field.
-
sampleCount
public XrSwapchainCreateInfo sampleCount(int value)
Sets the specified value to thesampleCount()field.
-
width
public XrSwapchainCreateInfo width(int value)
Sets the specified value to thewidth()field.
-
height
public XrSwapchainCreateInfo height(int value)
Sets the specified value to theheight()field.
-
faceCount
public XrSwapchainCreateInfo faceCount(int value)
Sets the specified value to thefaceCount()field.
-
arraySize
public XrSwapchainCreateInfo arraySize(int value)
Sets the specified value to thearraySize()field.
-
mipCount
public XrSwapchainCreateInfo mipCount(int value)
Sets the specified value to themipCount()field.
-
set
public XrSwapchainCreateInfo set(int type, long next, long createFlags, long usageFlags, long format, int sampleCount, int width, int height, int faceCount, int arraySize, int mipCount)
Initializes this struct with the specified values.
-
set
public XrSwapchainCreateInfo set(XrSwapchainCreateInfo src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static XrSwapchainCreateInfo malloc()
Returns a newXrSwapchainCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static XrSwapchainCreateInfo calloc()
Returns a newXrSwapchainCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static XrSwapchainCreateInfo create()
Returns a newXrSwapchainCreateInfoinstance allocated withBufferUtils.
-
create
public static XrSwapchainCreateInfo create(long address)
Returns a newXrSwapchainCreateInfoinstance for the specified memory address.
-
createSafe
@Nullable public static XrSwapchainCreateInfo createSafe(long address)
-
malloc
public static XrSwapchainCreateInfo.Buffer malloc(int capacity)
Returns a newXrSwapchainCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static XrSwapchainCreateInfo.Buffer calloc(int capacity)
Returns a newXrSwapchainCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static XrSwapchainCreateInfo.Buffer create(int capacity)
Returns a newXrSwapchainCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static XrSwapchainCreateInfo.Buffer create(long address, int capacity)
Create aXrSwapchainCreateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static XrSwapchainCreateInfo.Buffer createSafe(long address, int capacity)
-
malloc
public static XrSwapchainCreateInfo malloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrSwapchainCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static XrSwapchainCreateInfo calloc(org.lwjgl.system.MemoryStack stack)
Returns a newXrSwapchainCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrSwapchainCreateInfo.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrSwapchainCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static XrSwapchainCreateInfo.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newXrSwapchainCreateInfo.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().
-
ncreateFlags
public static long ncreateFlags(long struct)
Unsafe version ofcreateFlags().
-
nusageFlags
public static long nusageFlags(long struct)
Unsafe version ofusageFlags().
-
nformat
public static long nformat(long struct)
Unsafe version offormat().
-
nsampleCount
public static int nsampleCount(long struct)
Unsafe version ofsampleCount().
-
nwidth
public static int nwidth(long struct)
Unsafe version ofwidth().
-
nheight
public static int nheight(long struct)
Unsafe version ofheight().
-
nfaceCount
public static int nfaceCount(long struct)
Unsafe version offaceCount().
-
narraySize
public static int narraySize(long struct)
Unsafe version ofarraySize().
-
nmipCount
public static int nmipCount(long struct)
Unsafe version ofmipCount().
-
ntype
public static void ntype(long struct, int value)Unsafe version oftype.
-
nnext
public static void nnext(long struct, long value)Unsafe version ofnext.
-
ncreateFlags
public static void ncreateFlags(long struct, long value)Unsafe version ofcreateFlags.
-
nusageFlags
public static void nusageFlags(long struct, long value)Unsafe version ofusageFlags.
-
nformat
public static void nformat(long struct, long value)Unsafe version offormat.
-
nsampleCount
public static void nsampleCount(long struct, int value)Unsafe version ofsampleCount.
-
nwidth
public static void nwidth(long struct, int value)Unsafe version ofwidth.
-
nheight
public static void nheight(long struct, int value)Unsafe version ofheight.
-
nfaceCount
public static void nfaceCount(long struct, int value)Unsafe version offaceCount.
-
narraySize
public static void narraySize(long struct, int value)Unsafe version ofarraySize.
-
nmipCount
public static void nmipCount(long struct, int value)Unsafe version ofmipCount.
-
-