Package org.lwjgl.openxr
Class XrSwapchainCreateInfo
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<XrSwapchainCreateInfo>
org.lwjgl.openxr.XrSwapchainCreateInfo
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class XrSwapchainCreateInfo
extends org.lwjgl.system.Struct<XrSwapchainCreateInfo>
implements org.lwjgl.system.NativeResource
Creation 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,XrSwapchainCreateInfoFoveationFB,XrVulkanSwapchainCreateInfoMETAcreateFlagsmust be 0 or a valid combination ofXrSwapchainCreateFlagBitsvaluesusageFlagsmust be 0 or a valid combination ofXrSwapchainUsageFlagBitsvalues
See Also
CreateSession, CreateSwapchain, EnumerateSwapchainFormats
Layout
struct XrSwapchainCreateInfo {
XrStructureType type();
void const * next();
XrSwapchainCreateFlags createFlags();
XrSwapchainUsageFlags usageFlags();
int64_t format();
uint32_t sampleCount();
uint32_t width();
uint32_t height();
uint32_t faceCount();
uint32_t arraySize();
uint32_t mipCount();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionXrSwapchainCreateInfo(ByteBuffer container) Creates aXrSwapchainCreateInfoinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionintthe 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.arraySize(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.longa bitmask ofXrSwapchainCreateFlagBitsdescribing additional properties of the swapchain.createFlags(long value) Sets the specified value to thecreateFlags()field.static @Nullable XrSwapchainCreateInfocreateSafe(long address) static @Nullable XrSwapchainCreateInfo.BuffercreateSafe(long address, int capacity) intthe number of faces, which must be either 6 (for cubemaps) or 1.faceCount(int value) Sets the specified value to thefaceCount()field.longformat()a graphics API-specific texture format identifier.format(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.height(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.mipCount(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.next(long value) Sets the specified value to thenext()field.Prepends the specifiedXrSecondaryViewConfigurationSwapchainCreateInfoMSFTvalue to thenextchain.Prepends the specifiedXrSwapchainCreateInfoFoveationFBvalue to thenextchain.Prepends the specifiedXrVulkanSwapchainCreateInfoMETAvalue 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.intthe number of sub-data element samples in the image, must not be 0 or greater than the graphics API’s maximum limit.sampleCount(int value) Sets the specified value to thesampleCount()field.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(XrSwapchainCreateInfo src) Copies the specified struct data to this struct.intsizeof()inttype()theXrStructureTypeof this structure.type(int value) Sets the specified value to thetype()field.Sets theTYPE_SWAPCHAIN_CREATE_INFOvalue to thetype()field.longa bitmask ofXrSwapchainUsageFlagBitsdescribing the intended usage of the swapchain’s images.usageFlags(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.width(int value) Sets the specified value to thewidth()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
TYPE
public static final int TYPEThe struct member offsets. -
NEXT
public static final int NEXTThe struct member offsets. -
CREATEFLAGS
public static final int CREATEFLAGSThe struct member offsets. -
USAGEFLAGS
public static final int USAGEFLAGSThe struct member offsets. -
FORMAT
public static final int FORMATThe struct member offsets. -
SAMPLECOUNT
public static final int SAMPLECOUNTThe struct member offsets. -
WIDTH
public static final int WIDTHThe struct member offsets. -
HEIGHT
public static final int HEIGHTThe struct member offsets. -
FACECOUNT
public static final int FACECOUNTThe struct member offsets. -
ARRAYSIZE
public static final int ARRAYSIZEThe struct member offsets. -
MIPCOUNT
public static final int MIPCOUNTThe struct member offsets.
-
-
Constructor Details
-
XrSwapchainCreateInfo
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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<XrSwapchainCreateInfo>
-
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 must 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
Sets the specified value to thetype()field. -
type$Default
Sets theTYPE_SWAPCHAIN_CREATE_INFOvalue to thetype()field. -
next
Sets the specified value to thenext()field. -
next
Prepends the specifiedXrSecondaryViewConfigurationSwapchainCreateInfoMSFTvalue to thenextchain. -
next
Prepends the specifiedXrSwapchainCreateInfoFoveationFBvalue to thenextchain. -
next
Prepends the specifiedXrVulkanSwapchainCreateInfoMETAvalue to thenextchain. -
createFlags
Sets the specified value to thecreateFlags()field. -
usageFlags
Sets the specified value to theusageFlags()field. -
format
Sets the specified value to theformat()field. -
sampleCount
Sets the specified value to thesampleCount()field. -
width
Sets the specified value to thewidth()field. -
height
Sets the specified value to theheight()field. -
faceCount
Sets the specified value to thefaceCount()field. -
arraySize
Sets the specified value to thearraySize()field. -
mipCount
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
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newXrSwapchainCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newXrSwapchainCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newXrSwapchainCreateInfoinstance allocated withBufferUtils. -
create
Returns a newXrSwapchainCreateInfoinstance for the specified memory address. -
createSafe
-
malloc
Returns a newXrSwapchainCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newXrSwapchainCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newXrSwapchainCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aXrSwapchainCreateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newXrSwapchainCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newXrSwapchainCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newXrSwapchainCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newXrSwapchainCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
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.
-