Package org.lwjgl.ovr

Class OVRTextureLayoutOctilinear

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class OVRTextureLayoutOctilinear
    extends Struct
    implements NativeResource
    Multiresolution descriptor for Octilinear.

    Usage of this layer must be successfully enabled via EnableExtension before it can be used.

    Size of W quadrants:

    
     SizeLeft + SizeRight <= Viewport.Size.w
     SizeUp   + sizeDown  <= Viewport.Size.h
     
     Clip space (0,0) is located at Viewport.Pos + (SizeLeft,SizeUp) where
     Viewport is given in the layer description.
     
     Viewport Top left
     +-----------------------------------------------------+
     |                        ^                       |    |
     |                        |                       |    |
     |           0          SizeUp         1          |    |
     |                        |                       |<--Portion of viewport
     |                        |                       |   determined by sizes
     |                        |                       |    |
     |<--------SizeLeft-------+-------SizeRight------>|    |
     |                        |                       |    |
     |                        |                       |    |
     |           2         SizeDown        3          |    |
     |                        |                       |    |
     |                        |                       |    |
     |                        v                       |    |
     +------------------------------------------------+    |
     |                                                     |
     +-----------------------------------------------------+
                                                           Viewport bottom right
     
     For example, when rendering quadrant 0 its scissor rectangle will be
     
      Top    = 0
      Left   = 0
      Right  = SizeLeft
      Bottom = SizeUp
     
     and the scissor rectangle for quadrant 1 will be:
     
      Top    = 0
      Left   = SizeLeft
      Right  = SizeLeft + SizeRight
      Bottom = SizeUp

    Member documentation

    • WarpLeft – left W warping
    • WarpRight – right W warping
    • WarpUp – up W warping
    • WarpDown – down W warping
    • SizeLeft – left W quadrant size
    • SizeRight – right W quadrant size
    • SizeUp – up W quadrant size
    • SizeDown – down W quadrant size

    Layout

    
     struct ovrTextureLayoutOctilinear {
         float WarpLeft;
         float WarpRight;
         float WarpUp;
         float WarpDown;
         float SizeLeft;
         float SizeRight;
         float SizeUp;
         float SizeDown;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • WARPLEFT, WARPRIGHT, WARPUP, WARPDOWN, SIZELEFT, SIZERIGHT, SIZEUP, SIZEDOWN

        The struct member offsets.
    • Constructor Detail

      • OVRTextureLayoutOctilinear

        public OVRTextureLayoutOctilinear​(java.nio.ByteBuffer container)
        Creates a OVRTextureLayoutOctilinear 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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • WarpLeft

        public float WarpLeft()
        Returns the value of the WarpLeft field.
      • WarpRight

        public float WarpRight()
        Returns the value of the WarpRight field.
      • WarpUp

        public float WarpUp()
        Returns the value of the WarpUp field.
      • WarpDown

        public float WarpDown()
        Returns the value of the WarpDown field.
      • SizeLeft

        public float SizeLeft()
        Returns the value of the SizeLeft field.
      • SizeRight

        public float SizeRight()
        Returns the value of the SizeRight field.
      • SizeUp

        public float SizeUp()
        Returns the value of the SizeUp field.
      • SizeDown

        public float SizeDown()
        Returns the value of the SizeDown field.
      • set

        public OVRTextureLayoutOctilinear set​(float WarpLeft,
                                              float WarpRight,
                                              float WarpUp,
                                              float WarpDown,
                                              float SizeLeft,
                                              float SizeRight,
                                              float SizeUp,
                                              float SizeDown)
        Initializes this struct with the specified values.
      • malloc

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

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

        public static OVRTextureLayoutOctilinear create​(long address)
        Returns a new OVRTextureLayoutOctilinear instance for the specified memory address.
      • callocStack

        public static OVRTextureLayoutOctilinear callocStack()
        Returns a new OVRTextureLayoutOctilinear instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • callocStack

        public static OVRTextureLayoutOctilinear callocStack​(MemoryStack stack)
        Returns a new OVRTextureLayoutOctilinear instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • nWarpLeft

        public static float nWarpLeft​(long struct)
        Unsafe version of WarpLeft().
      • nWarpRight

        public static float nWarpRight​(long struct)
        Unsafe version of WarpRight().
      • nWarpUp

        public static float nWarpUp​(long struct)
        Unsafe version of WarpUp().
      • nWarpDown

        public static float nWarpDown​(long struct)
        Unsafe version of WarpDown().
      • nSizeLeft

        public static float nSizeLeft​(long struct)
        Unsafe version of SizeLeft().
      • nSizeRight

        public static float nSizeRight​(long struct)
        Unsafe version of SizeRight().
      • nSizeUp

        public static float nSizeUp​(long struct)
        Unsafe version of SizeUp().
      • nSizeDown

        public static float nSizeDown​(long struct)
        Unsafe version of SizeDown().
      • nWarpLeft

        public static void nWarpLeft​(long struct,
                                     float value)
        Unsafe version of WarpLeft.
      • nWarpRight

        public static void nWarpRight​(long struct,
                                      float value)
        Unsafe version of WarpRight.
      • nWarpUp

        public static void nWarpUp​(long struct,
                                   float value)
        Unsafe version of WarpUp.
      • nWarpDown

        public static void nWarpDown​(long struct,
                                     float value)
        Unsafe version of WarpDown.
      • nSizeLeft

        public static void nSizeLeft​(long struct,
                                     float value)
        Unsafe version of SizeLeft.
      • nSizeRight

        public static void nSizeRight​(long struct,
                                      float value)
        Unsafe version of SizeRight.
      • nSizeUp

        public static void nSizeUp​(long struct,
                                   float value)
        Unsafe version of SizeUp.
      • nSizeDown

        public static void nSizeDown​(long struct,
                                     float value)
        Unsafe version of SizeDown.