Class VkApplicationInfo

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

    public class VkApplicationInfo
    extends Struct
    implements NativeResource
    Structure specifying application info.
    Description

    Vulkan 1.0 implementations were required to return ERROR_INCOMPATIBLE_DRIVER if apiVersion was larger than 1.0. Implementations that support Vulkan 1.1 or later must not return ERROR_INCOMPATIBLE_DRIVER for any value of apiVersion.

    Note

    Because Vulkan 1.0 implementations may fail with ERROR_INCOMPATIBLE_DRIVER, applications should determine the version of Vulkan available before calling CreateInstance. If the GetInstanceProcAddr returns NULL for EnumerateInstanceVersion, it is a Vulkan 1.0 implementation. Otherwise, the application can call EnumerateInstanceVersion to determine the version of Vulkan.

    Implicit layers must be disabled if they do not support a version at least as high as apiVersion. See the "Vulkan Loader Specification and Architecture Overview" document for additional information.

    Note

    Providing a NULL VkInstanceCreateInfo::pApplicationInfo or providing an apiVersion of 0 is equivalent to providing an apiVersion of VK_MAKE_VERSION(1,0,0).

    Valid Usage (Implicit)
    • sType must be STRUCTURE_TYPE_APPLICATION_INFO
    • pNext must be NULL
    • If pApplicationName is not NULL, pApplicationName must be a null-terminated UTF-8 string
    • If pEngineName is not NULL, pEngineName must be a null-terminated UTF-8 string
    See Also

    VkInstanceCreateInfo

    Member documentation

    • sType – the type of this structure.
    • pNextNULL or a pointer to an extension-specific structure.
    • pApplicationNameNULL or is a pointer to a null-terminated UTF-8 string containing the name of the application.
    • applicationVersion – an unsigned integer variable containing the developer-supplied version number of the application.
    • pEngineNameNULL or is a pointer to a null-terminated UTF-8 string containing the name of the engine (if any) used to create the application.
    • engineVersion – an unsigned integer variable containing the developer-supplied version number of the engine used to create the application.
    • apiVersionmust be the highest version of Vulkan that the application is designed to use, encoded as described in the API Version Numbers and Semantics section. The patch version number specified in apiVersion is ignored when creating an instance object. Only the major and minor versions of the instance must match those requested in apiVersion.

    Layout

    
     struct VkApplicationInfo {
         VkStructureType sType;
         void const * pNext;
         char const * pApplicationName;
         uint32_t applicationVersion;
         char const * pEngineName;
         uint32_t engineVersion;
         uint32_t apiVersion;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, PAPPLICATIONNAME, APPLICATIONVERSION, PENGINENAME, ENGINEVERSION, APIVERSION

        The struct member offsets.
    • Constructor Detail

      • VkApplicationInfo

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

        public int sType()
        Returns the value of the sType field.
      • pNext

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

        @Nullable
        public java.nio.ByteBuffer pApplicationName()
        Returns a ByteBuffer view of the null-terminated string pointed to by the pApplicationName field.
      • pApplicationNameString

        @Nullable
        public java.lang.String pApplicationNameString()
        Decodes the null-terminated string pointed to by the pApplicationName field.
      • applicationVersion

        public int applicationVersion()
        Returns the value of the applicationVersion field.
      • pEngineName

        @Nullable
        public java.nio.ByteBuffer pEngineName()
        Returns a ByteBuffer view of the null-terminated string pointed to by the pEngineName field.
      • pEngineNameString

        @Nullable
        public java.lang.String pEngineNameString()
        Decodes the null-terminated string pointed to by the pEngineName field.
      • engineVersion

        public int engineVersion()
        Returns the value of the engineVersion field.
      • apiVersion

        public int apiVersion()
        Returns the value of the apiVersion field.
      • sType

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

        public VkApplicationInfo pNext​(long value)
        Sets the specified value to the pNext field.
      • pApplicationName

        public VkApplicationInfo pApplicationName​(@Nullable
                                                  java.nio.ByteBuffer value)
        Sets the address of the specified encoded string to the pApplicationName field.
      • applicationVersion

        public VkApplicationInfo applicationVersion​(int value)
        Sets the specified value to the applicationVersion field.
      • pEngineName

        public VkApplicationInfo pEngineName​(@Nullable
                                             java.nio.ByteBuffer value)
        Sets the address of the specified encoded string to the pEngineName field.
      • engineVersion

        public VkApplicationInfo engineVersion​(int value)
        Sets the specified value to the engineVersion field.
      • apiVersion

        public VkApplicationInfo apiVersion​(int value)
        Sets the specified value to the apiVersion field.
      • set

        public VkApplicationInfo set​(int sType,
                                     long pNext,
                                     @Nullable
                                     java.nio.ByteBuffer pApplicationName,
                                     int applicationVersion,
                                     @Nullable
                                     java.nio.ByteBuffer pEngineName,
                                     int engineVersion,
                                     int apiVersion)
        Initializes this struct with the specified values.
      • createSafe

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

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

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

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

        @Nullable
        public static java.nio.ByteBuffer npApplicationName​(long struct)
        Unsafe version of pApplicationName().
      • npApplicationNameString

        @Nullable
        public static java.lang.String npApplicationNameString​(long struct)
        Unsafe version of pApplicationNameString().
      • napplicationVersion

        public static int napplicationVersion​(long struct)
        Unsafe version of applicationVersion().
      • npEngineName

        @Nullable
        public static java.nio.ByteBuffer npEngineName​(long struct)
        Unsafe version of pEngineName().
      • npEngineNameString

        @Nullable
        public static java.lang.String npEngineNameString​(long struct)
        Unsafe version of pEngineNameString().
      • nengineVersion

        public static int nengineVersion​(long struct)
        Unsafe version of engineVersion().
      • napiVersion

        public static int napiVersion​(long struct)
        Unsafe version of apiVersion().
      • 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.
      • npApplicationName

        public static void npApplicationName​(long struct,
                                             @Nullable
                                             java.nio.ByteBuffer value)
        Unsafe version of pApplicationName.
      • napplicationVersion

        public static void napplicationVersion​(long struct,
                                               int value)
        Unsafe version of applicationVersion.
      • npEngineName

        public static void npEngineName​(long struct,
                                        @Nullable
                                        java.nio.ByteBuffer value)
        Unsafe version of pEngineName.
      • nengineVersion

        public static void nengineVersion​(long struct,
                                          int value)
        Unsafe version of engineVersion.
      • napiVersion

        public static void napiVersion​(long struct,
                                       int value)
        Unsafe version of apiVersion.