Class VkSurfaceFormatKHR

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

    public class VkSurfaceFormatKHR
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure describing a supported swapchain format-color space pair.

    Member documentation

    • format – a VkFormat that is compatible with the specified surface.
    • colorSpace – a presentation VkColorSpaceKHR that is compatible with the surface.

    Layout

    
     struct VkSurfaceFormatKHR {
         VkFormat format;
         VkColorSpaceKHR colorSpace;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • FORMAT, COLORSPACE

        The struct member offsets.
    • Constructor Detail

      • VkSurfaceFormatKHR

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

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

        public int colorSpace()
        Returns the value of the colorSpace field.
      • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public static int ncolorSpace​(long struct)
        Unsafe version of colorSpace().