sdlVulkanGetInstanceExtensions function

bool sdlVulkanGetInstanceExtensions(
  1. Pointer<SdlWindow> window,
  2. Pointer<Uint32> pCount,
  3. Pointer<Pointer<Int8>> pNames
)

Get the names of the Vulkan instance extensions needed to create a surface with SDL_Vulkan_CreateSurface.

If pNames is NULL, then the number of required Vulkan instance extensions is returned in pCount. Otherwise, pCount must point to a variable set to the number of elements in the pNames array, and on return the variable is overwritten with the number of names actually written to pNames. If pCount is less than the number of required extensions, at most pCount structures will be written. If pCount is smaller than the number of required extensions, SDL_FALSE will be returned instead of SDL_TRUE, to indicate that not all the required extensions were returned.

The window parameter is currently needed to be valid as of SDL 2.0.8, however, this parameter will likely be removed in future releases

\param window A window for which the required Vulkan instance extensions should be retrieved (will be deprecated in a future release) \param pCount A pointer to an unsigned int corresponding to the number of extensions to be returned \param pNames NULL or a pointer to an array to be filled with required Vulkan instance extensions \returns SDL_TRUE on success, SDL_FALSE on error.

\since This function is available since SDL 2.0.6.

\sa SDL_Vulkan_CreateSurface

extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(SDL_Window *window, unsigned int *pCount, const char **pNames)

Implementation

bool sdlVulkanGetInstanceExtensions(Pointer<SdlWindow> window,
    Pointer<Uint32> pCount, Pointer<Pointer<Int8>> pNames) {
  final sdlVulkanGetInstanceExtensionsLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Pointer<SdlWindow> window, Pointer<Uint32> pCount,
          Pointer<Pointer<Int8>> pNames),
      int Function(Pointer<SdlWindow> window, Pointer<Uint32> pCount,
          Pointer<Pointer<Int8>> pNames)>('SDL_Vulkan_GetInstanceExtensions');
  return sdlVulkanGetInstanceExtensionsLookupFunction(window, pCount, pNames) ==
      1;
}