Class VkBaseInStructure

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

    public class VkBaseInStructure
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Base structure for a read-only pointer chain.
    Description

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

    See Also

    VkBaseInStructure

    Member documentation

    • sType – the structure type of the structure being iterated through.
    • pNextNULL or a pointer to the next structure in a structure chain.

    Layout

    
     struct VkBaseInStructure {
         VkStructureType sType;
         VkBaseInStructure * pNext;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT

        The struct member offsets.
    • Constructor Detail

      • VkBaseInStructure

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

        public int sType()
        Returns the value of the sType field.
      • sType

        public VkBaseInStructure sType​(int value)
        Sets the specified value to the sType field.
      • malloc

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

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

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

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

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

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

        public static VkBaseInStructure mallocStack()
        Returns a new VkBaseInStructure instance allocated on the thread-local MemoryStack.
      • callocStack

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

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

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

        public static VkBaseInStructure.Buffer callocStack​(int capacity)
        Returns a new VkBaseInStructure.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

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

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

        public static int nsType​(long struct)
        Unsafe version of sType().
      • nsType

        public static void nsType​(long struct,
                                  int value)
        Unsafe version of sType.
      • npNext

        public static void npNext​(long struct,
                                  @Nullable
                                  VkBaseInStructure value)
        Unsafe version of pNext.