Package org.lwjgl.ovr

Class OVRLayerEyeMatrix

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<OVRLayerEyeMatrix>
org.lwjgl.ovr.OVRLayerEyeMatrix
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class OVRLayerEyeMatrix extends org.lwjgl.system.Struct<OVRLayerEyeMatrix> implements org.lwjgl.system.NativeResource
Describes a layer that specifies a monoscopic or stereoscopic view.

This uses a direct 3x4 matrix to map from view space to the UV coordinates. It is essentially the same thing as OVRLayerEyeFov but using a much lower level. This is mainly to provide compatibility with specific apps. Unless the application really requires this flexibility, it is usually better to use ovrLayerEyeFov.

Three options exist with respect to mono/stereo texture usage:

  • ColorTexture[0] and ColorTexture[1] contain the left and right stereo renderings, respectively. Viewport[0] and Viewport[1] refer to ColorTexture[0] and ColorTexture[1], respectively.
  • ColorTexture[0] contains both the left and right renderings, ColorTexture[1] is NULL, and Viewport[0] and Viewport[1] refer to sub-rects with ColorTexture[0].
  • ColorTexture[0] contains a single monoscopic rendering, and Viewport[0] and Viewport[1] both refer to that rendering.

Layout


 struct ovrLayerEyeMatrix {
     ovrLayerHeader Header();
     ovrTextureSwapChain ColorTexture()[ovrEye_Count];
     ovrRecti Viewport()[ovrEye_Count];
     ovrPosef RenderPose()[ovrEye_Count];
     ovrMatrix4f Matrix()[ovrEye_Count];
     double SensorSampleTime();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • COLORTEXTURE

      public static final int COLORTEXTURE
      The struct member offsets.
    • VIEWPORT

      public static final int VIEWPORT
      The struct member offsets.
    • RENDERPOSE

      public static final int RENDERPOSE
      The struct member offsets.
    • MATRIX

      public static final int MATRIX
      The struct member offsets.
    • SENSORSAMPLETIME

      public static final int SENSORSAMPLETIME
      The struct member offsets.
  • Constructor Details

    • OVRLayerEyeMatrix

      public OVRLayerEyeMatrix(ByteBuffer container)
      Creates a OVRLayerEyeMatrix instance at the current position of the specified ByteBuffer 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