Class VkBufferViewCreateInfo

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

    public class VkBufferViewCreateInfo
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure specifying parameters of a newly created buffer view.
    Valid Usage
    Valid Usage (Implicit)
    See Also

    CreateBufferView

    Member documentation

    • sType – the type of this structure.
    • pNextNULL or a pointer to an extension-specific structure.
    • flags – reserved for future use.
    • buffer – a VkBuffer on which the view will be created.
    • format – a VkFormat describing the format of the data elements in the buffer.
    • offset – an offset in bytes from the base address of the buffer. Accesses to the buffer view from shaders use addressing that is relative to this starting offset.
    • range – a size in bytes of the buffer view. If range is equal to WHOLE_SIZE, the range from offset to the end of the buffer is used. If WHOLE_SIZE is used and the remaining size of the buffer is not a multiple of the texel block size of format, the nearest smaller multiple is used.

    Layout

    
     struct VkBufferViewCreateInfo {
         VkStructureType sType;
         void const * pNext;
         VkBufferViewCreateFlags flags;
         VkBuffer buffer;
         VkFormat format;
         VkDeviceSize offset;
         VkDeviceSize range;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, FLAGS, BUFFER, FORMAT, OFFSET, RANGE

        The struct member offsets.
    • Constructor Detail

      • VkBufferViewCreateInfo

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

        public long pNext()
        Returns the value of the pNext field.
      • flags

        public int flags()
        Returns the value of the flags field.
      • buffer

        public long buffer()
        Returns the value of the buffer field.
      • format

        public int format()
        Returns the value of the format field.
      • offset

        public long offset()
        Returns the value of the offset field.
      • range

        public long range()
        Returns the value of the range field.
      • set

        public VkBufferViewCreateInfo set​(int sType,
                                          long pNext,
                                          int flags,
                                          long buffer,
                                          int format,
                                          long offset,
                                          long range)
        Initializes this struct with the specified values.
      • malloc

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

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

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

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

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

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

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

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

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

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

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

        public static long npNext​(long struct)
        Unsafe version of pNext().
      • nflags

        public static int nflags​(long struct)
        Unsafe version of flags().
      • nbuffer

        public static long nbuffer​(long struct)
        Unsafe version of buffer().
      • nformat

        public static int nformat​(long struct)
        Unsafe version of format().
      • noffset

        public static long noffset​(long struct)
        Unsafe version of offset().
      • nrange

        public static long nrange​(long struct)
        Unsafe version of range().
      • nsType

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

        public static void npNext​(long struct,
                                  long value)
        Unsafe version of pNext.
      • nflags

        public static void nflags​(long struct,
                                  int value)
        Unsafe version of flags.
      • nbuffer

        public static void nbuffer​(long struct,
                                   long value)
        Unsafe version of buffer.
      • nformat

        public static void nformat​(long struct,
                                   int value)
        Unsafe version of format.
      • noffset

        public static void noffset​(long struct,
                                   long value)
        Unsafe version of offset.
      • nrange

        public static void nrange​(long struct,
                                  long value)
        Unsafe version of range.