Class VkSurfaceFormat2KHR

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

    public class VkSurfaceFormat2KHR
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure describing a supported swapchain format tuple.
    Valid Usage (Implicit)
    See Also

    VkSurfaceFormatKHR, GetPhysicalDeviceSurfaceFormats2KHR

    Member documentation

    • sType – the type of this structure.
    • pNextNULL or a pointer to an extension-specific structure.
    • surfaceFormat – an instance of VkSurfaceFormatKHR describing a format-color space pair that is compatible with the specified surface.

    Layout

    
     struct VkSurfaceFormat2KHR {
         VkStructureType sType;
         void * pNext;
         VkSurfaceFormatKHR surfaceFormat;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, SURFACEFORMAT

        The struct member offsets.
    • Constructor Detail

      • VkSurfaceFormat2KHR

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

        public VkSurfaceFormat2KHR sType​(int value)
        Sets the specified value to the sType field.
      • pNext

        public VkSurfaceFormat2KHR pNext​(long value)
        Sets the specified value to the pNext field.
      • set

        public VkSurfaceFormat2KHR set​(int sType,
                                       long pNext)
        Initializes this struct with the specified values.
      • malloc

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

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

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

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

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

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

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

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

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

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

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