Class XrBaseInStructure

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

    public class XrBaseInStructure
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Convenience type for iterating (read only).
    Description

    XrBaseInStructure can be used to facilitate iterating through a read-only structure pointer chain.

    See Also

    XrBaseInStructure, XrBaseOutStructure

    Layout

    
     struct XrBaseInStructure {
         XrStructureType type();
         XrBaseInStructure const * next();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • TYPE, NEXT

        The struct member offsets.
    • Constructor Detail

      • XrBaseInStructure

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

        public int type()
        the XrStructureType of this structure. This base structure itself has no associated XrStructureType value.
      • next

        public XrBaseInStructure next()
        NULL or a pointer to the next structure in a structure chain. No such structures are defined in core OpenXR.
      • malloc

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

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

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

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

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

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

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

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

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

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

        public static int ntype​(long struct)
        Unsafe version of type().
      • ntype

        public static void ntype​(long struct,
                                 int value)
        Unsafe version of type.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate