Package org.lwjgl.ovr

Class OVRTextureLayoutOctilinear

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

    public class OVRTextureLayoutOctilinear
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.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

    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()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • WarpLeft

        public float WarpLeft()
        left W warping
      • WarpRight

        public float WarpRight()
        right W warping
      • WarpUp

        public float WarpUp()
        up W warping
      • WarpDown

        public float WarpDown()
        down W warping
      • SizeLeft

        public float SizeLeft()
        left W quadrant size
      • SizeRight

        public float SizeRight()
        right W quadrant size
      • SizeUp

        public float SizeUp()
        up W quadrant size
      • SizeDown

        public float SizeDown()
        down W quadrant size
      • 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()
        Returns a new OVRTextureLayoutOctilinear instance allocated with BufferUtils.
      • create

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

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

        public static OVRTextureLayoutOctilinear calloc​(org.lwjgl.system.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
      • calloc

        public static OVRTextureLayoutOctilinear.Buffer calloc​(int capacity,
                                                               org.lwjgl.system.MemoryStack stack)
        Returns a new OVRTextureLayoutOctilinear.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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.