Package org.lwjgl.ovr
Class OVRLayerEyeFovDepth
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
Describes a layer that specifies a monoscopic or stereoscopic view, with depth textures in addition to color textures. This is typically used to
support positional time warp. This struct is the same as
OVRLayerEyeFov
, but with the addition of DepthTexture
and ProjectionDesc
.
ProjectionDesc
can be created using TimewarpProjectionDesc_FromProjection
.
Three options exist with respect to mono/stereo texture usage:
ColorTexture[0]
andColorTexture[1]
contain the left and right stereo renderings, respectively.Viewport[0]
andViewport[1]
refer toColorTexture[0]
andColorTexture[1]
, respectively.ColorTexture[0]
contains both the left and right renderings,ColorTexture[1]
isNULL
, andViewport[0]
andViewport[1]
refer to sub-rects withColorTexture[0]
.ColorTexture[0]
contains a single monoscopic rendering, andViewport[0]
andViewport[1]
both refer to that rendering.
Layout
struct ovrLayerEyeFovDepth {
ovrLayerHeader
Header()
;
ovrTextureSwapChain ColorTexture()
[ovrEye_Count];
ovrRecti
Viewport()
[ovrEye_Count];
ovrFovPort
Fov()
[ovrEye_Count];
ovrPosef
RenderPose()
[ovrEye_Count];
double SensorSampleTime()
;
ovrTextureSwapChain DepthTexture()
[ovrEye_Count];
ovrTimewarpProjectionDesc
ProjectionDesc()
;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionOVRLayerEyeFovDepth
(ByteBuffer container) Creates aOVRLayerEyeFovDepth
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic OVRLayerEyeFovDepth
calloc()
Returns a newOVRLayerEyeFovDepth
instance allocated withmemCalloc
.static OVRLayerEyeFovDepth.Buffer
calloc
(int capacity) Returns a newOVRLayerEyeFovDepth.Buffer
instance allocated withmemCalloc
.static OVRLayerEyeFovDepth.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newOVRLayerEyeFovDepth.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRLayerEyeFovDepth
calloc
(MemoryStack stack) Returns a newOVRLayerEyeFovDepth
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static OVRLayerEyeFovDepth
Deprecated.static OVRLayerEyeFovDepth.Buffer
callocStack
(int capacity) Deprecated.static OVRLayerEyeFovDepth.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static OVRLayerEyeFovDepth
callocStack
(MemoryStack stack) Deprecated.ovrTextureSwapChains
for the left and right eye respectively.long
ColorTexture
(int index) ovrTextureSwapChains
for the left and right eye respectively.ColorTexture
(int index, long value) Sets the specified value at the specified index of theColorTexture()
field.ColorTexture
(PointerBuffer value) Copies the specifiedPointerBuffer
to theColorTexture()
field.static OVRLayerEyeFovDepth
create()
Returns a newOVRLayerEyeFovDepth
instance allocated withBufferUtils
.static OVRLayerEyeFovDepth.Buffer
create
(int capacity) Returns a newOVRLayerEyeFovDepth.Buffer
instance allocated withBufferUtils
.static OVRLayerEyeFovDepth
create
(long address) Returns a newOVRLayerEyeFovDepth
instance for the specified memory address.static OVRLayerEyeFovDepth.Buffer
create
(long address, int capacity) Create aOVRLayerEyeFovDepth.Buffer
instance at the specified memory.static OVRLayerEyeFovDepth
createSafe
(long address) static OVRLayerEyeFovDepth.Buffer
createSafe
(long address, int capacity) depth texture for depth composition with overlays.long
DepthTexture
(int index) depth texture for depth composition with overlays.DepthTexture
(int index, long value) Sets the specified value at the specified index of theDepthTexture()
field.DepthTexture
(PointerBuffer value) Copies the specifiedPointerBuffer
to theDepthTexture()
field.Fov()
the viewport field of viewFov
(int index) the viewport field of viewFov
(int index, Consumer<OVRFovPort> consumer) Fov
(int index, OVRFovPort value) Copies the specifiedOVRFovPort
at the specified index of theFov()
field.Fov
(Consumer<OVRFovPort.Buffer> consumer) Fov
(OVRFovPort.Buffer value) Copies the specifiedOVRFovPort.Buffer
to theFov()
field.Header()
Header.Type
must beLayerType_EyeFovDepth
Header
(Consumer<OVRLayerHeader> consumer) Header
(OVRLayerHeader value) Copies the specifiedOVRLayerHeader
to theHeader()
field.static OVRLayerEyeFovDepth
malloc()
Returns a newOVRLayerEyeFovDepth
instance allocated withmemAlloc
.static OVRLayerEyeFovDepth.Buffer
malloc
(int capacity) Returns a newOVRLayerEyeFovDepth.Buffer
instance allocated withmemAlloc
.static OVRLayerEyeFovDepth.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newOVRLayerEyeFovDepth.Buffer
instance allocated on the specifiedMemoryStack
.static OVRLayerEyeFovDepth
malloc
(MemoryStack stack) Returns a newOVRLayerEyeFovDepth
instance allocated on the specifiedMemoryStack
.static OVRLayerEyeFovDepth
Deprecated.static OVRLayerEyeFovDepth.Buffer
mallocStack
(int capacity) Deprecated.static OVRLayerEyeFovDepth.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static OVRLayerEyeFovDepth
mallocStack
(MemoryStack stack) Deprecated.static PointerBuffer
nColorTexture
(long struct) Unsafe version ofColorTexture()
.static long
nColorTexture
(long struct, int index) Unsafe version ofColorTexture
.static void
nColorTexture
(long struct, int index, long value) Unsafe version ofColorTexture
.static void
nColorTexture
(long struct, PointerBuffer value) Unsafe version ofColorTexture
.static PointerBuffer
nDepthTexture
(long struct) Unsafe version ofDepthTexture()
.static long
nDepthTexture
(long struct, int index) Unsafe version ofDepthTexture
.static void
nDepthTexture
(long struct, int index, long value) Unsafe version ofDepthTexture
.static void
nDepthTexture
(long struct, PointerBuffer value) Unsafe version ofDepthTexture
.static OVRFovPort.Buffer
nFov
(long struct) Unsafe version ofFov()
.static OVRFovPort
nFov
(long struct, int index) Unsafe version ofFov
.static void
nFov
(long struct, int index, OVRFovPort value) Unsafe version ofFov
.static void
nFov
(long struct, OVRFovPort.Buffer value) Unsafe version ofFov
.static OVRLayerHeader
nHeader
(long struct) Unsafe version ofHeader()
.static void
nHeader
(long struct, OVRLayerHeader value) Unsafe version ofHeader
.static OVRTimewarpProjectionDesc
nProjectionDesc
(long struct) Unsafe version ofProjectionDesc()
.static void
nProjectionDesc
(long struct, OVRTimewarpProjectionDesc value) Unsafe version ofProjectionDesc
.static OVRPosef.Buffer
nRenderPose
(long struct) Unsafe version ofRenderPose()
.static OVRPosef
nRenderPose
(long struct, int index) Unsafe version ofRenderPose
.static void
nRenderPose
(long struct, int index, OVRPosef value) Unsafe version ofRenderPose
.static void
nRenderPose
(long struct, OVRPosef.Buffer value) Unsafe version ofRenderPose
.static double
nSensorSampleTime
(long struct) Unsafe version ofSensorSampleTime()
.static void
nSensorSampleTime
(long struct, double value) Unsafe version ofSensorSampleTime
.static OVRRecti.Buffer
nViewport
(long struct) Unsafe version ofViewport()
.static OVRRecti
nViewport
(long struct, int index) Unsafe version ofViewport
.static void
Unsafe version ofViewport
.static void
nViewport
(long struct, OVRRecti.Buffer value) Unsafe version ofViewport
.specifies how to convertDepthTexture
information into metersCopies the specifiedOVRTimewarpProjectionDesc
to theProjectionDesc()
field.specifies the position and orientation of each eye view, with position specified in meters.RenderPose
(int index) specifies the position and orientation of each eye view, with position specified in meters.RenderPose
(int index, Consumer<OVRPosef> consumer) RenderPose
(int index, OVRPosef value) Copies the specifiedOVRPosef
at the specified index of theRenderPose()
field.RenderPose
(Consumer<OVRPosef.Buffer> consumer) Passes theRenderPose()
field to the specifiedConsumer
.RenderPose
(OVRPosef.Buffer value) Copies the specifiedOVRPosef.Buffer
to theRenderPose()
field.double
specifies the timestamp when the sourceOVRPosef
(used in calculatingRenderPose
) was sampled from the SDK.SensorSampleTime
(double value) Sets the specified value to theSensorSampleTime()
field.set
(OVRLayerEyeFovDepth src) Copies the specified struct data to this struct.set
(OVRLayerHeader Header, PointerBuffer ColorTexture, OVRRecti.Buffer Viewport, OVRFovPort.Buffer Fov, OVRPosef.Buffer RenderPose, double SensorSampleTime, PointerBuffer DepthTexture, OVRTimewarpProjectionDesc ProjectionDesc) Initializes this struct with the specified values.int
sizeof()
Returnssizeof(struct)
.static void
validate
(long struct) Validates pointer members that should not beNULL
.Viewport()
specifies theColorTexture
sub-rect UV coordinates.Viewport
(int index) specifies theColorTexture
sub-rect UV coordinates.Copies the specifiedOVRRecti
at the specified index of theViewport()
field.Viewport
(Consumer<OVRRecti.Buffer> consumer) Passes theViewport()
field to the specifiedConsumer
.Viewport
(OVRRecti.Buffer value) Copies the specifiedOVRRecti.Buffer
to theViewport()
field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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. -
HEADER
public static final int HEADERThe struct member offsets. -
COLORTEXTURE
public static final int COLORTEXTUREThe struct member offsets. -
VIEWPORT
public static final int VIEWPORTThe struct member offsets. -
FOV
public static final int FOVThe struct member offsets. -
RENDERPOSE
public static final int RENDERPOSEThe struct member offsets. -
SENSORSAMPLETIME
public static final int SENSORSAMPLETIMEThe struct member offsets. -
DEPTHTEXTURE
public static final int DEPTHTEXTUREThe struct member offsets. -
PROJECTIONDESC
public static final int PROJECTIONDESCThe struct member offsets.
-
-
Constructor Details
-
OVRLayerEyeFovDepth
Creates aOVRLayerEyeFovDepth
instance at the current position of the specifiedByteBuffer
container. 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()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<OVRLayerEyeFovDepth>
-
Header
Header.Type
must beLayerType_EyeFovDepth
-
ColorTexture
ovrTextureSwapChains
for the left and right eye respectively. The second one of which can beNULL
for cases described above. -
ColorTexture
public long ColorTexture(int index) ovrTextureSwapChains
for the left and right eye respectively. The second one of which can beNULL
for cases described above. -
Viewport
specifies theColorTexture
sub-rect UV coordinates. BothViewport[0]
andViewport[1]
must be valid. -
Viewport
specifies theColorTexture
sub-rect UV coordinates. BothViewport[0]
andViewport[1]
must be valid. -
Fov
the viewport field of view -
Fov
the viewport field of view -
RenderPose
specifies the position and orientation of each eye view, with position specified in meters.RenderPose
will typically be the value returned from_CalcEyePoses
, but can be different in special cases if a different head pose is used for rendering. -
RenderPose
specifies the position and orientation of each eye view, with position specified in meters.RenderPose
will typically be the value returned from_CalcEyePoses
, but can be different in special cases if a different head pose is used for rendering. -
SensorSampleTime
public double SensorSampleTime()specifies the timestamp when the sourceOVRPosef
(used in calculatingRenderPose
) was sampled from the SDK. Typically retrieved by callingGetTimeInSeconds
around the instant the application callsGetTrackingState
. The main purpose for this is to accurately track app tracking latency. -
DepthTexture
depth texture for depth composition with overlays. Must map 1:1 to theColorTexture
. -
DepthTexture
public long DepthTexture(int index) depth texture for depth composition with overlays. Must map 1:1 to theColorTexture
. -
ProjectionDesc
specifies how to convertDepthTexture
information into meters -
Header
Copies the specifiedOVRLayerHeader
to theHeader()
field. -
Header
-
ColorTexture
Copies the specifiedPointerBuffer
to theColorTexture()
field. -
ColorTexture
Sets the specified value at the specified index of theColorTexture()
field. -
Viewport
Copies the specifiedOVRRecti.Buffer
to theViewport()
field. -
Viewport
Copies the specifiedOVRRecti
at the specified index of theViewport()
field. -
Viewport
Passes theViewport()
field to the specifiedConsumer
. -
Viewport
-
Fov
Copies the specifiedOVRFovPort.Buffer
to theFov()
field. -
Fov
Copies the specifiedOVRFovPort
at the specified index of theFov()
field. -
Fov
-
Fov
-
RenderPose
Copies the specifiedOVRPosef.Buffer
to theRenderPose()
field. -
RenderPose
Copies the specifiedOVRPosef
at the specified index of theRenderPose()
field. -
RenderPose
Passes theRenderPose()
field to the specifiedConsumer
. -
RenderPose
-
SensorSampleTime
Sets the specified value to theSensorSampleTime()
field. -
DepthTexture
Copies the specifiedPointerBuffer
to theDepthTexture()
field. -
DepthTexture
Sets the specified value at the specified index of theDepthTexture()
field. -
ProjectionDesc
Copies the specifiedOVRTimewarpProjectionDesc
to theProjectionDesc()
field. -
set
public OVRLayerEyeFovDepth set(OVRLayerHeader Header, PointerBuffer ColorTexture, OVRRecti.Buffer Viewport, OVRFovPort.Buffer Fov, OVRPosef.Buffer RenderPose, double SensorSampleTime, PointerBuffer DepthTexture, OVRTimewarpProjectionDesc ProjectionDesc) 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 newOVRLayerEyeFovDepth
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newOVRLayerEyeFovDepth
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newOVRLayerEyeFovDepth
instance allocated withBufferUtils
. -
create
Returns a newOVRLayerEyeFovDepth
instance for the specified memory address. -
createSafe
-
malloc
Returns a newOVRLayerEyeFovDepth.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newOVRLayerEyeFovDepth.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newOVRLayerEyeFovDepth.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aOVRLayerEyeFovDepth.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newOVRLayerEyeFovDepth
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newOVRLayerEyeFovDepth
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newOVRLayerEyeFovDepth.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newOVRLayerEyeFovDepth.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nHeader
Unsafe version ofHeader()
. -
nColorTexture
Unsafe version ofColorTexture()
. -
nColorTexture
public static long nColorTexture(long struct, int index) Unsafe version ofColorTexture
. -
nViewport
Unsafe version ofViewport()
. -
nViewport
Unsafe version ofViewport
. -
nFov
Unsafe version ofFov()
. -
nFov
Unsafe version ofFov
. -
nRenderPose
Unsafe version ofRenderPose()
. -
nRenderPose
Unsafe version ofRenderPose
. -
nSensorSampleTime
public static double nSensorSampleTime(long struct) Unsafe version ofSensorSampleTime()
. -
nDepthTexture
Unsafe version ofDepthTexture()
. -
nDepthTexture
public static long nDepthTexture(long struct, int index) Unsafe version ofDepthTexture
. -
nProjectionDesc
Unsafe version ofProjectionDesc()
. -
nHeader
Unsafe version ofHeader
. -
nColorTexture
Unsafe version ofColorTexture
. -
nColorTexture
public static void nColorTexture(long struct, int index, long value) Unsafe version ofColorTexture
. -
nViewport
Unsafe version ofViewport
. -
nViewport
Unsafe version ofViewport
. -
nFov
Unsafe version ofFov
. -
nFov
Unsafe version ofFov
. -
nRenderPose
Unsafe version ofRenderPose
. -
nRenderPose
Unsafe version ofRenderPose
. -
nSensorSampleTime
public static void nSensorSampleTime(long struct, double value) Unsafe version ofSensorSampleTime
. -
nDepthTexture
Unsafe version ofDepthTexture
. -
nDepthTexture
public static void nDepthTexture(long struct, int index, long value) Unsafe version ofDepthTexture
. -
nProjectionDesc
Unsafe version ofProjectionDesc
. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-