Package org.lwjgl.ovr

Class OVRFovStencilMeshBuffer

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

    public class OVRFovStencilMeshBuffer
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Contains the data for the fov-stencil mesh. Parts of the struct are filled by the caller while some parts are filled by the SDK.

    Layout

    
     struct ovrFovStencilMeshBuffer {
         int AllocVertexCount();
         int UsedVertexCount();
         ovrVector2f * VertexBuffer();
         int AllocIndexCount();
         int UsedIndexCount();
         uint16_t * IndexBuffer();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • ALLOCVERTEXCOUNT, USEDVERTEXCOUNT, VERTEXBUFFER, ALLOCINDEXCOUNT, USEDINDEXCOUNT, INDEXBUFFER

        The struct member offsets.
    • Constructor Detail

      • OVRFovStencilMeshBuffer

        public OVRFovStencilMeshBuffer​(java.nio.ByteBuffer container)
        Creates a OVRFovStencilMeshBuffer 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
      • AllocVertexCount

        public int AllocVertexCount()
        to be filled in by caller of GetFovStencil
      • UsedVertexCount

        public int UsedVertexCount()
        to be filled in by SDK and returned to caller
      • VertexBuffer

        @Nullable
        public OVRVector2f.Buffer VertexBuffer()
        to be allocated by caller and filled in by SDK
      • AllocIndexCount

        public int AllocIndexCount()
        to be filled in by caller of GetFovStencil
      • UsedIndexCount

        public int UsedIndexCount()
        to be filled in by SDK and returned to caller
      • IndexBuffer

        @Nullable
        public java.nio.ShortBuffer IndexBuffer()
        to be allocated by caller and filled in by SDK
      • set

        public OVRFovStencilMeshBuffer set​(int AllocVertexCount,
                                           int UsedVertexCount,
                                           @Nullable
                                           OVRVector2f.Buffer VertexBuffer,
                                           int AllocIndexCount,
                                           int UsedIndexCount,
                                           @Nullable
                                           java.nio.ShortBuffer IndexBuffer)
        Initializes this struct with the specified values.
      • malloc

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

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

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

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

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

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

        public static OVRFovStencilMeshBuffer.Buffer calloc​(int capacity,
                                                            org.lwjgl.system.MemoryStack stack)
        Returns a new OVRFovStencilMeshBuffer.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
      • nAllocVertexCount

        public static int nAllocVertexCount​(long struct)
        Unsafe version of AllocVertexCount().
      • nUsedVertexCount

        public static int nUsedVertexCount​(long struct)
        Unsafe version of UsedVertexCount().
      • nAllocIndexCount

        public static int nAllocIndexCount​(long struct)
        Unsafe version of AllocIndexCount().
      • nUsedIndexCount

        public static int nUsedIndexCount​(long struct)
        Unsafe version of UsedIndexCount().
      • nIndexBuffer

        @Nullable
        public static java.nio.ShortBuffer nIndexBuffer​(long struct)
        Unsafe version of IndexBuffer.
      • nAllocVertexCount

        public static void nAllocVertexCount​(long struct,
                                             int value)
        Sets the specified value to the AllocVertexCount field of the specified struct.
      • nUsedVertexCount

        public static void nUsedVertexCount​(long struct,
                                            int value)
        Unsafe version of UsedVertexCount.
      • nAllocIndexCount

        public static void nAllocIndexCount​(long struct,
                                            int value)
        Sets the specified value to the AllocIndexCount field of the specified struct.
      • nUsedIndexCount

        public static void nUsedIndexCount​(long struct,
                                           int value)
        Unsafe version of UsedIndexCount.
      • nIndexBuffer

        public static void nIndexBuffer​(long struct,
                                        @Nullable
                                        java.nio.ShortBuffer value)
        Unsafe version of IndexBuffer.