Class VkDisplaySurfaceCreateInfoKHR

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

    public class VkDisplaySurfaceCreateInfoKHR
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure specifying parameters of a newly created display plane surface object.
    Description
    Note

    Creating a display surface must not modify the state of the displays, planes, or other resources it names. For example, it must not apply the specified mode to be set on the associated display. Application of display configuration occurs as a side effect of presenting to a display surface.

    Valid Usage
    • planeIndex must be less than the number of display planes supported by the device as determined by calling vkGetPhysicalDeviceDisplayPlanePropertiesKHR
    • If the planeReorderPossible member of the VkDisplayPropertiesKHR structure returned by vkGetPhysicalDeviceDisplayPropertiesKHR for the display corresponding to displayMode is TRUE then planeStackIndex must be less than the number of display planes supported by the device as determined by calling vkGetPhysicalDeviceDisplayPlanePropertiesKHR; otherwise planeStackIndex must equal the currentStackIndex member of VkDisplayPlanePropertiesKHR returned by vkGetPhysicalDeviceDisplayPlanePropertiesKHR for the display plane corresponding to displayMode
    • If alphaMode is DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR then globalAlpha must be between 0 and 1, inclusive
    • alphaMode must be 0 or one of the bits present in the supportedAlpha member of VkDisplayPlaneCapabilitiesKHR returned by vkGetDisplayPlaneCapabilitiesKHR for the display plane corresponding to displayMode
    • The width and height members of imageExtent must be less than the maxImageDimensions2D member of VkPhysicalDeviceLimits
    Valid Usage (Implicit)
    • sType must be STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR
    • pNext must be NULL
    • flags must be 0
    • displayMode must be a valid VkDisplayModeKHR handle
    • transform must be a valid VkSurfaceTransformFlagBitsKHR value
    • alphaMode must be a valid VkDisplayPlaneAlphaFlagBitsKHR value
    See Also

    VkExtent2D, CreateDisplayPlaneSurfaceKHR

    Member documentation

    • sType – the type of this structure.
    • pNextNULL or a pointer to an extension-specific structure.
    • flags – reserved for future use, and must be zero.
    • displayMode – a VkDisplayModeKHR handle specifying the mode to use when displaying this surface.
    • planeIndex – the plane on which this surface appears.
    • planeStackIndex – the z-order of the plane.
    • transform – a VkSurfaceTransformFlagBitsKHR value specifying the transformation to apply to images as part of the scanout operation.
    • globalAlpha – the global alpha value. This value is ignored if alphaMode is not DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR.
    • alphaMode – a VkDisplayPlaneAlphaFlagBitsKHR value specifying the type of alpha blending to use.
    • imageExtent – The size of the presentable images to use with the surface.

    Layout

    
     struct VkDisplaySurfaceCreateInfoKHR {
         VkStructureType sType;
         void const * pNext;
         VkDisplaySurfaceCreateFlagsKHR flags;
         VkDisplayModeKHR displayMode;
         uint32_t planeIndex;
         uint32_t planeStackIndex;
         VkSurfaceTransformFlagBitsKHR transform;
         float globalAlpha;
         VkDisplayPlaneAlphaFlagBitsKHR alphaMode;
         VkExtent2D imageExtent;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, FLAGS, DISPLAYMODE, PLANEINDEX, PLANESTACKINDEX, TRANSFORM, GLOBALALPHA, ALPHAMODE, IMAGEEXTENT

        The struct member offsets.
    • Constructor Detail

      • VkDisplaySurfaceCreateInfoKHR

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

        public long displayMode()
        Returns the value of the displayMode field.
      • planeIndex

        public int planeIndex()
        Returns the value of the planeIndex field.
      • planeStackIndex

        public int planeStackIndex()
        Returns the value of the planeStackIndex field.
      • transform

        public int transform()
        Returns the value of the transform field.
      • globalAlpha

        public float globalAlpha()
        Returns the value of the globalAlpha field.
      • alphaMode

        public int alphaMode()
        Returns the value of the alphaMode field.
      • set

        public VkDisplaySurfaceCreateInfoKHR set​(int sType,
                                                 long pNext,
                                                 int flags,
                                                 long displayMode,
                                                 int planeIndex,
                                                 int planeStackIndex,
                                                 int transform,
                                                 float globalAlpha,
                                                 int alphaMode,
                                                 VkExtent2D imageExtent)
        Initializes this struct with the specified values.
      • malloc

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

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

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

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

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

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

        public static VkDisplaySurfaceCreateInfoKHR callocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new VkDisplaySurfaceCreateInfoKHR instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • 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().
      • ndisplayMode

        public static long ndisplayMode​(long struct)
        Unsafe version of displayMode().
      • nplaneIndex

        public static int nplaneIndex​(long struct)
        Unsafe version of planeIndex().
      • nplaneStackIndex

        public static int nplaneStackIndex​(long struct)
        Unsafe version of planeStackIndex().
      • ntransform

        public static int ntransform​(long struct)
        Unsafe version of transform().
      • nglobalAlpha

        public static float nglobalAlpha​(long struct)
        Unsafe version of globalAlpha().
      • nalphaMode

        public static int nalphaMode​(long struct)
        Unsafe version of alphaMode().
      • 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.
      • ndisplayMode

        public static void ndisplayMode​(long struct,
                                        long value)
        Unsafe version of displayMode.
      • nplaneIndex

        public static void nplaneIndex​(long struct,
                                       int value)
        Unsafe version of planeIndex.
      • nplaneStackIndex

        public static void nplaneStackIndex​(long struct,
                                            int value)
        Unsafe version of planeStackIndex.
      • ntransform

        public static void ntransform​(long struct,
                                      int value)
        Unsafe version of transform.
      • nglobalAlpha

        public static void nglobalAlpha​(long struct,
                                        float value)
        Unsafe version of globalAlpha.
      • nalphaMode

        public static void nalphaMode​(long struct,
                                      int value)
        Unsafe version of alphaMode.
      • nimageExtent

        public static void nimageExtent​(long struct,
                                        VkExtent2D value)
        Unsafe version of imageExtent.