Package org.lwjgl.ovr

Class OVRFovStencilMeshBuffer

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

    public class OVRFovStencilMeshBuffer
    extends Struct
    implements 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.

    Member documentation

    • AllocVertexCount – to be filled in by caller of GetFovStencil
    • UsedVertexCount – to be filled in by SDK and returned to caller
    • VertexBuffer – to be allocated by caller and filled in by SDK
    • AllocIndexCount – to be filled in by caller of GetFovStencil
    • UsedIndexCount – to be filled in by SDK and returned to caller
    • IndexBuffer – to be allocated by caller and filled in by 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()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • AllocVertexCount

        public int AllocVertexCount()
        Returns the value of the AllocVertexCount field.
      • UsedVertexCount

        public int UsedVertexCount()
        Returns the value of the UsedVertexCount field.
      • AllocIndexCount

        public int AllocIndexCount()
        Returns the value of the AllocIndexCount field.
      • UsedIndexCount

        public int UsedIndexCount()
        Returns the value of the UsedIndexCount field.
      • IndexBuffer

        @Nullable
        public java.nio.ShortBuffer IndexBuffer()
        Returns a ShortBuffer view of the data pointed to by the IndexBuffer field.
      • AllocVertexCount

        public OVRFovStencilMeshBuffer AllocVertexCount​(int value)
        Sets the specified value to the AllocVertexCount field.
      • UsedVertexCount

        public OVRFovStencilMeshBuffer UsedVertexCount​(int value)
        Sets the specified value to the UsedVertexCount field.
      • AllocIndexCount

        public OVRFovStencilMeshBuffer AllocIndexCount​(int value)
        Sets the specified value to the AllocIndexCount field.
      • UsedIndexCount

        public OVRFovStencilMeshBuffer UsedIndexCount​(int value)
        Sets the specified value to the UsedIndexCount field.
      • IndexBuffer

        public OVRFovStencilMeshBuffer IndexBuffer​(@Nullable
                                                   java.nio.ShortBuffer value)
        Sets the address of the specified ShortBuffer to the IndexBuffer field.
      • 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​(long address)
        Returns a new OVRFovStencilMeshBuffer instance for the specified memory address.
      • callocStack

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

        public static OVRFovStencilMeshBuffer mallocStack​(MemoryStack stack)
        Returns a new OVRFovStencilMeshBuffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static OVRFovStencilMeshBuffer callocStack​(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
      • 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.