# Interface VulkanInstanceType

All Superinterfaces:
  `AutoCloseable`, `VulkanHandleDispatchableType`, `VulkanHandleType`

All Known Implementing Classes:
  `VulkanLWJGLInstance`

public interface VulkanInstanceType extends VulkanHandleDispatchableType
An initialized instance.

See Also:
  - "VkInstance"

- ## Method Summary

  Modifier and Type
  Method
  Description
  `VulkanVersion`
  `apiVersionMaximumSupported()`
  Find the maximum API version supported.
  `VulkanVersion`
  `apiVersionUsed()`
  Return the API version that this instance will support.
  `void`
  `close()`
  Destroy the object.
  `Map<String,VulkanExtensionType>`
  `enabledExtensions()`
  `Stream<VulkanPhysicalDeviceType>`
  `enumeratePhysicalDevices()`
  `default <T extends VulkanExtensionType>
  Optional<T>`
  `findEnabledExtension(String name, Class<T> clazz)`
  Find and cast an extension with a given name to the correct API type.
  `default List<VulkanPhysicalDeviceType>`
  `physicalDevices()`

  ### Methods inherited from interface com.io7m.jcoronado.api.VulkanHandleType

  `isClosed`

- ## Method Details

  - ### close

    void close() throws VulkanException
    Description copied from interface: `VulkanHandleType`
    Destroy the object.
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `VulkanHandleType`
    Throws:
      `VulkanException` - On errors

  - ### enumeratePhysicalDevices

    Stream<VulkanPhysicalDeviceType> enumeratePhysicalDevices() throws VulkanException
    Returns:
      The available physical devices
    Throws:
      `VulkanException` - On errors

  - ### physicalDevices

    default List<VulkanPhysicalDeviceType> physicalDevices() throws VulkanException
    Returns:
      The available physical devices
    Throws:
      `VulkanException` - On errors

  - ### apiVersionMaximumSupported

    VulkanVersion apiVersionMaximumSupported()
    Find the maximum API version supported. This is essentially the same as `VulkanInstanceProviderType.findSupportedInstanceVersion()`, and does not indicate that this particular instance will allow function calls that require that version.
    Returns:
      The maximum API version supported
    See Also:
      - `apiVersionUsed()`

  - ### apiVersionUsed

    VulkanVersion apiVersionUsed()
    Return the API version that this instance will support. This is the version that the user actually requested, and therefore defines the upper bound for the Vulkan API version that can be used with this instance.
    Returns:
      The API version that this instance is configured to use

  - ### enabledExtensions

    Map<String,VulkanExtensionType> enabledExtensions() throws VulkanException
    Returns:
      The enabled extensions for the instance
    Throws:
      `VulkanException` - On errors

  - ### findEnabledExtension

    default <T extends VulkanExtensionType> Optional<T> findEnabledExtension(String name, Class<T> clazz) throws VulkanException
    Find and cast an extension with a given name to the correct API type.
    Type Parameters:
      `T` - The precise type
    Parameters:
      `name` - The extension name
      `clazz` - The intended extension type
    Returns:
      The extension with the correct type, or nothing if the extension either did not exist or did not have the right type
    Throws:
      `VulkanException` - On errors