Class VkDisplayPropertiesKHR

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

    public class VkDisplayPropertiesKHR
    extends Struct
    implements NativeResource
    Structure describing an available display device.

    Member documentation

    • display – a handle that is used to refer to the display described here. This handle will be valid for the lifetime of the Vulkan instance.
    • displayName – a pointer to a NULL-terminated string containing the name of the display. Generally, this will be the name provided by the display’s EDID. It can be NULL if no suitable name is available. If not NULL, the memory it points to must remain accessible as long as display is valid.
    • physicalDimensions – describes the physical width and height of the visible portion of the display, in millimeters.
    • physicalResolution – describes the physical, native, or preferred resolution of the display.
      Note

      For devices which have no natural value to return here, implementations should return the maximum resolution supported.

    • supportedTransforms – a bitmask of VkSurfaceTransformFlagBitsKHR describing which transforms are supported by this display.
    • planeReorderPossible – tells whether the planes on this display can have their z order changed. If this is TRUE, the application can re-arrange the planes on this display in any order relative to each other.
    • persistentContent – tells whether the display supports self-refresh/internal buffering. If this is true, the application can submit persistent present operations on swapchains created against this display.
      Note

      Persistent presents may have higher latency, and may use less power when the screen content is updated infrequently, or when only a portion of the screen needs to be updated in most frames.

    Layout

    
     struct VkDisplayPropertiesKHR {
         VkDisplayKHR display;
         char const * displayName;
         VkExtent2D physicalDimensions;
         VkExtent2D physicalResolution;
         VkSurfaceTransformFlagsKHR supportedTransforms;
         VkBool32 planeReorderPossible;
         VkBool32 persistentContent;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • DISPLAY, DISPLAYNAME, PHYSICALDIMENSIONS, PHYSICALRESOLUTION, SUPPORTEDTRANSFORMS, PLANEREORDERPOSSIBLE, PERSISTENTCONTENT

        The struct member offsets.
    • Constructor Detail

      • VkDisplayPropertiesKHR

        public VkDisplayPropertiesKHR​(java.nio.ByteBuffer container)
        Creates a VkDisplayPropertiesKHR 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()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • display

        public long display()
        Returns the value of the display field.
      • displayName

        public java.nio.ByteBuffer displayName()
        Returns a ByteBuffer view of the null-terminated string pointed to by the displayName field.
      • displayNameString

        public java.lang.String displayNameString()
        Decodes the null-terminated string pointed to by the displayName field.
      • physicalDimensions

        public VkExtent2D physicalDimensions()
        Returns a VkExtent2D view of the physicalDimensions field.
      • physicalResolution

        public VkExtent2D physicalResolution()
        Returns a VkExtent2D view of the physicalResolution field.
      • supportedTransforms

        public int supportedTransforms()
        Returns the value of the supportedTransforms field.
      • planeReorderPossible

        public boolean planeReorderPossible()
        Returns the value of the planeReorderPossible field.
      • persistentContent

        public boolean persistentContent()
        Returns the value of the persistentContent field.
      • malloc

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

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

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

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

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

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

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

        public static long ndisplay​(long struct)
        Unsafe version of display().
      • ndisplayName

        public static java.nio.ByteBuffer ndisplayName​(long struct)
        Unsafe version of displayName().
      • ndisplayNameString

        public static java.lang.String ndisplayNameString​(long struct)
        Unsafe version of displayNameString().
      • nsupportedTransforms

        public static int nsupportedTransforms​(long struct)
        Unsafe version of supportedTransforms().
      • nplaneReorderPossible

        public static int nplaneReorderPossible​(long struct)
        Unsafe version of planeReorderPossible().
      • npersistentContent

        public static int npersistentContent​(long struct)
        Unsafe version of persistentContent().