include/SDL_vulkan.h
changeset 12151 5b9895d82ebe
parent 11906 d97ab6d12404
child 12242 df7260f149f2
     1.1 --- a/include/SDL_vulkan.h	Thu Aug 23 14:05:25 2018 -0700
     1.2 +++ b/include/SDL_vulkan.h	Fri Aug 24 09:49:48 2018 -0400
     1.3 @@ -135,7 +135,7 @@
     1.4   *  \brief Get the names of the Vulkan instance extensions needed to create
     1.5   *         a surface with \c SDL_Vulkan_CreateSurface().
     1.6   *
     1.7 - *  \param [in]     window Window for which the required Vulkan instance
     1.8 + *  \param [in]     \c NULL or window Window for which the required Vulkan instance
     1.9   *                  extensions should be retrieved
    1.10   *  \param [in,out] count pointer to an \c unsigned related to the number of
    1.11   *                  required Vulkan instance extensions
    1.12 @@ -153,6 +153,10 @@
    1.13   *  is smaller than the number of required extensions, \c SDL_FALSE will be
    1.14   *  returned instead of \c SDL_TRUE, to indicate that not all the required
    1.15   *  extensions were returned.
    1.16 + * 
    1.17 + *  \note If \c window is not NULL, it will be checked against its creation
    1.18 + *        flags to ensure that the Vulkan flag is present. This parameter
    1.19 + *        will be removed in a future major release.
    1.20   *
    1.21   *  \note The returned list of extensions will contain \c VK_KHR_surface
    1.22   *        and zero or more platform specific extensions
    1.23 @@ -160,12 +164,13 @@
    1.24   *  \note The extension names queried here must be enabled when calling
    1.25   *        VkCreateInstance, otherwise surface creation will fail.
    1.26   *
    1.27 - *  \note \c window should have been created with the \c SDL_WINDOW_VULKAN flag.
    1.28 + *  \note \c window should have been created with the \c SDL_WINDOW_VULKAN flag
    1.29 + *        or be \c NULL
    1.30   *
    1.31   *  \code
    1.32   *  unsigned int count;
    1.33   *  // get count of required extensions
    1.34 - *  if(!SDL_Vulkan_GetInstanceExtensions(window, &count, NULL))
    1.35 + *  if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, NULL))
    1.36   *      handle_error();
    1.37   *
    1.38   *  static const char *const additionalExtensions[] =
    1.39 @@ -179,7 +184,7 @@
    1.40   *      handle_error();
    1.41   *
    1.42   *  // get names of required extensions
    1.43 - *  if(!SDL_Vulkan_GetInstanceExtensions(window, &count, names))
    1.44 + *  if(!SDL_Vulkan_GetInstanceExtensions(NULL, &count, names))
    1.45   *      handle_error();
    1.46   *
    1.47   *  // copy additional extensions after required extensions