Class VkBaseOutStructure

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

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

    VkBaseOutStructure can be used to facilitate iterating through a structure pointer chain that returns data back to the application.

    See Also

    VkBaseOutStructure

    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 VkBaseOutStructure {
         VkStructureType sType;
         VkBaseOutStructure * pNext;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT

        The struct member offsets.
    • Constructor Detail

      • VkBaseOutStructure

        public VkBaseOutStructure​(java.nio.ByteBuffer container)
        Creates a VkBaseOutStructure 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 VkBaseOutStructure sType​(int value)
        Sets the specified value to the sType field.
      • malloc

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

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

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

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

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

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

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

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

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

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

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

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

        public static VkBaseOutStructure.Buffer callocStack​(int capacity,
                                                            org.lwjgl.system.MemoryStack stack)
        Returns a new VkBaseOutStructure.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
                                  VkBaseOutStructure value)
        Unsafe version of pNext.