Package org.lwjgl.ovr

Class OVREyeRenderDesc

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

public class OVREyeRenderDesc extends org.lwjgl.system.Struct<OVREyeRenderDesc> implements org.lwjgl.system.NativeResource
rendering information for each eye. Computed by either GetRenderDesc based on the specified FOV. Note that the rendering viewport is not included here as it can be specified separately and modified per frame by passing different viewport values in the layer structure.

Layout


 struct ovrEyeRenderDesc {
     ovrEyeType Eye();
     ovrFovPort Fov();
     ovrRecti DistortedViewport();
     ovrVector2f PixelsPerTanAngleAtCenter();
     ovrPosef HmdToEyePose();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int EYE
      The struct member offsets.
    • FOV

      public static final int FOV
      The struct member offsets.
    • DISTORTEDVIEWPORT

      public static final int DISTORTEDVIEWPORT
      The struct member offsets.
    • PIXELSPERTANANGLEATCENTER

      public static final int PIXELSPERTANANGLEATCENTER
      The struct member offsets.
    • HMDTOEYEPOSE

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

    • OVREyeRenderDesc

      public OVREyeRenderDesc(ByteBuffer container)
      Creates a OVREyeRenderDesc 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

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<OVREyeRenderDesc>
    • Eye

      public int Eye()
      the eye index this instance corresponds to. One of:
      Eye_LeftEye_Right
    • Fov

      public OVRFovPort Fov()
      the field of view
    • DistortedViewport

      public OVRRecti DistortedViewport()
      distortion viewport
    • PixelsPerTanAngleAtCenter

      public OVRVector2f PixelsPerTanAngleAtCenter()
      wow many display pixels will fit in tan(angle) = 1
    • HmdToEyePose

      public OVRPosef HmdToEyePose()
      transform of eye from the HMD center, in meters
    • malloc

      public static OVREyeRenderDesc malloc()
      Returns a new OVREyeRenderDesc instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static OVREyeRenderDesc calloc()
      Returns a new OVREyeRenderDesc instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static OVREyeRenderDesc create()
      Returns a new OVREyeRenderDesc instance allocated with BufferUtils.
    • create

      public static OVREyeRenderDesc create(long address)
      Returns a new OVREyeRenderDesc instance for the specified memory address.
    • createSafe

      public static @Nullable OVREyeRenderDesc createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static OVREyeRenderDesc.Buffer malloc(int capacity)
      Returns a new OVREyeRenderDesc.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static OVREyeRenderDesc.Buffer calloc(int capacity)
      Returns a new OVREyeRenderDesc.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static OVREyeRenderDesc.Buffer create(int capacity)
      Returns a new OVREyeRenderDesc.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static OVREyeRenderDesc.Buffer create(long address, int capacity)
      Create a OVREyeRenderDesc.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable OVREyeRenderDesc.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • mallocStack

      @Deprecated public static OVREyeRenderDesc mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static OVREyeRenderDesc callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static OVREyeRenderDesc mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static OVREyeRenderDesc callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static OVREyeRenderDesc.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static OVREyeRenderDesc.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static OVREyeRenderDesc.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static OVREyeRenderDesc.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

      public static OVREyeRenderDesc malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new OVREyeRenderDesc instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static OVREyeRenderDesc calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new OVREyeRenderDesc instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static OVREyeRenderDesc.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new OVREyeRenderDesc.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static OVREyeRenderDesc.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new OVREyeRenderDesc.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nEye

      public static int nEye(long struct)
      Unsafe version of Eye().
    • nFov

      public static OVRFovPort nFov(long struct)
      Unsafe version of Fov().
    • nDistortedViewport

      public static OVRRecti nDistortedViewport(long struct)
      Unsafe version of DistortedViewport().
    • nPixelsPerTanAngleAtCenter

      public static OVRVector2f nPixelsPerTanAngleAtCenter(long struct)
      Unsafe version of PixelsPerTanAngleAtCenter().
    • nHmdToEyePose

      public static OVRPosef nHmdToEyePose(long struct)
      Unsafe version of HmdToEyePose().