Class XrPassthroughColorLutCreateInfoMETA
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
Description
resolution must be a power of 2, otherwise the runtime must return ERROR_VALIDATION_FAILURE. The runtime may impose a limit on the maximum supported resolution, which is indicated in XrSystemPassthroughColorLutPropertiesMETA. If resolution exceeds that limit, the runtime must return ERROR_VALIDATION_FAILURE.
data contains a 3-dimensional array which defines an output color for each RGB input color. The input color is scaled to be in the range [0, resolution]. For an RGBA LUT, the RGBA tuple of output colors for an input color (Rin, Gin, Bin) is found in the four bytes starting at the offset 4 * (Rin + Gin * resolution + Bin * resolution2). For an RGB LUT, the RGB tuple of output colors for an input color (Rin, Gin, Bin) is found in the three bytes starting at the offset 3 * (Rin + Gin * resolution + Bin * resolution2).
Color LUT data must be specified and interpreted in sRGB color space.
Runtimes must employ trilinear interpolation of neighboring color values if the resolution of the color LUT is smaller than the bit depth of the input colors.
The value of XrPassthroughColorLutDataMETA::bufferSize in data must be equal to resolution3 * bytesPerElement, where bytesPerElement is either 3 or 4 depending on channels. Otherwise, the runtime must return ERROR_PASSTHROUGH_COLOR_LUT_BUFFER_SIZE_MISMATCH_META.
Valid Usage (Implicit)
- The
XR_META_passthrough_color_lutextension must be enabled prior to usingXrPassthroughColorLutCreateInfoMETA typemust beTYPE_PASSTHROUGH_COLOR_LUT_CREATE_INFO_METAnextmust beNULLor a valid pointer to the next structure in a structure chainchannelsmust be a validXrPassthroughColorLutChannelsMETAvaluedatamust be a validXrPassthroughColorLutDataMETAstructure
See Also
XrPassthroughColorLutDataMETA, CreatePassthroughColorLutMETA
Layout
struct XrPassthroughColorLutCreateInfoMETA {
XrStructureType type();
void const * next();
XrPassthroughColorLutChannelsMETA channels();
uint32_t resolution();
XrPassthroughColorLutDataMETA data();
}-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn array ofXrPassthroughColorLutCreateInfoMETAstructs.Nested 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 size in bytes.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
ConstructorsConstructorDescriptionXrPassthroughColorLutCreateInfoMETA(ByteBuffer container) Creates aXrPassthroughColorLutCreateInfoMETAinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptioncalloc()Returns a newXrPassthroughColorLutCreateInfoMETAinstance allocated withmemCalloc.calloc(int capacity) Returns a newXrPassthroughColorLutCreateInfoMETA.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrPassthroughColorLutCreateInfoMETA.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.calloc(org.lwjgl.system.MemoryStack stack) Returns a newXrPassthroughColorLutCreateInfoMETAinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intchannels()defines the color channels expected in one LUT element.channels(int value) Sets the specified value to thechannels()field.create()Returns a newXrPassthroughColorLutCreateInfoMETAinstance allocated withBufferUtils.create(int capacity) Returns a newXrPassthroughColorLutCreateInfoMETA.Bufferinstance allocated withBufferUtils.create(long address) Returns a newXrPassthroughColorLutCreateInfoMETAinstance for the specified memory address.create(long address, int capacity) Create aXrPassthroughColorLutCreateInfoMETA.Bufferinstance at the specified memory.static @Nullable XrPassthroughColorLutCreateInfoMETAcreateSafe(long address) static @Nullable XrPassthroughColorLutCreateInfoMETA.BuffercreateSafe(long address, int capacity) data()contains the data the LUT is initialized with.data(Consumer<XrPassthroughColorLutDataMETA> consumer) Copies the specifiedXrPassthroughColorLutDataMETAto thedata()field.malloc()Returns a newXrPassthroughColorLutCreateInfoMETAinstance allocated withmemAlloc.malloc(int capacity) Returns a newXrPassthroughColorLutCreateInfoMETA.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrPassthroughColorLutCreateInfoMETA.Bufferinstance allocated on the specifiedMemoryStack.malloc(org.lwjgl.system.MemoryStack stack) Returns a newXrPassthroughColorLutCreateInfoMETAinstance allocated on the specifiedMemoryStack.static intnchannels(long struct) Unsafe version ofchannels().static voidnchannels(long struct, int value) Unsafe version ofchannels.ndata(long struct) Unsafe version ofdata().static voidndata(long struct, XrPassthroughColorLutDataMETA value) Unsafe version ofdata.longnext()NULLor a pointer to the next structure in a structure chain.next(long value) Sets the specified value to thenext()field.static longnnext(long struct) Unsafe version ofnext().static voidnnext(long struct, long value) Unsafe version ofnext.static intnresolution(long struct) Unsafe version ofresolution().static voidnresolution(long struct, int value) Unsafe version ofresolution.static intntype(long struct) Unsafe version oftype().static voidntype(long struct, int value) Unsafe version oftype.intthe number of LUT elements per input channel.resolution(int value) Sets the specified value to theresolution()field.set(int type, long next, int channels, int resolution, XrPassthroughColorLutDataMETA data) Initializes this struct with the specified values.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_PASSTHROUGH_COLOR_LUT_CREATE_INFO_METAvalue to thetype()field.static voidvalidate(long struct) Validates pointer members that should not beNULL.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. -
CHANNELS
public static final int CHANNELSThe struct member offsets. -
RESOLUTION
public static final int RESOLUTIONThe struct member offsets. -
DATA
public static final int DATAThe struct member offsets.
-
-
Constructor Details
-
XrPassthroughColorLutCreateInfoMETA
Creates aXrPassthroughColorLutCreateInfoMETAinstance 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<XrPassthroughColorLutCreateInfoMETA>
-
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. -
channels
public int channels()defines the color channels expected in one LUT element. The number of bytes expected per LUT element is 3 forPASSTHROUGH_COLOR_LUT_CHANNELS_RGB_METAand 4 forPASSTHROUGH_COLOR_LUT_CHANNELS_RGBA_META. -
resolution
public int resolution()the number of LUT elements per input channel. The total number of elements in the LUT isresolution3. -
data
contains the data the LUT is initialized with. -
type
Sets the specified value to thetype()field. -
type$Default
Sets theTYPE_PASSTHROUGH_COLOR_LUT_CREATE_INFO_METAvalue to thetype()field. -
next
Sets the specified value to thenext()field. -
channels
Sets the specified value to thechannels()field. -
resolution
Sets the specified value to theresolution()field. -
data
Copies the specifiedXrPassthroughColorLutDataMETAto thedata()field. -
data
-
set
public XrPassthroughColorLutCreateInfoMETA set(int type, long next, int channels, int resolution, XrPassthroughColorLutDataMETA data) 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 newXrPassthroughColorLutCreateInfoMETAinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newXrPassthroughColorLutCreateInfoMETAinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newXrPassthroughColorLutCreateInfoMETAinstance allocated withBufferUtils. -
create
Returns a newXrPassthroughColorLutCreateInfoMETAinstance for the specified memory address. -
createSafe
-
malloc
Returns a newXrPassthroughColorLutCreateInfoMETA.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newXrPassthroughColorLutCreateInfoMETA.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newXrPassthroughColorLutCreateInfoMETA.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aXrPassthroughColorLutCreateInfoMETA.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
public static @Nullable XrPassthroughColorLutCreateInfoMETA.Buffer createSafe(long address, int capacity) -
malloc
Returns a newXrPassthroughColorLutCreateInfoMETAinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newXrPassthroughColorLutCreateInfoMETAinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static XrPassthroughColorLutCreateInfoMETA.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrPassthroughColorLutCreateInfoMETA.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static XrPassthroughColorLutCreateInfoMETA.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newXrPassthroughColorLutCreateInfoMETA.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(). -
nchannels
public static int nchannels(long struct) Unsafe version ofchannels(). -
nresolution
public static int nresolution(long struct) Unsafe version ofresolution(). -
ndata
Unsafe version ofdata(). -
ntype
public static void ntype(long struct, int value) Unsafe version oftype. -
nnext
public static void nnext(long struct, long value) Unsafe version ofnext. -
nchannels
public static void nchannels(long struct, int value) Unsafe version ofchannels. -
nresolution
public static void nresolution(long struct, int value) Unsafe version ofresolution. -
ndata
Unsafe version ofdata. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-