Browse Source

Vk: document relation among various version queries.

pull/234/head
Vladimír Vondruš 6 years ago
parent
commit
20c06bb0c9
  1. 14
      src/Magnum/Vk/Device.h
  2. 14
      src/Magnum/Vk/Instance.h
  3. 2
      src/Magnum/Vk/Version.h

14
src/Magnum/Vk/Device.h

@ -392,10 +392,20 @@ class MAGNUM_VK_EXPORT Device {
/** @brief Handle flags */
HandleFlags handleFlags() const { return _flags; }
/** @brief Device version */
/**
* @brief Version supported by the device
*
* Unless overriden using `--magnum-vulkan-version` on the
* @ref Vk-Device-command-line "command line", corresponds to
* @ref DeviceProperties::apiVersion().
*/
Version version() const { return _version; }
/** @brief Whether given version is supported on the device */
/**
* @brief Whether given version is supported on the device
*
* Compares @p version against @ref version().
*/
bool isVersionSupported(Version version) const {
return _version >= version;
}

14
src/Magnum/Vk/Instance.h

@ -432,10 +432,20 @@ class MAGNUM_VK_EXPORT Instance {
/** @brief Handle flags */
HandleFlags handleFlags() const { return _flags; }
/** @brief Instance version */
/**
* @brief Version supported by the instance
*
* Unless overriden using `--magnum-vulkan-version` on the
* @ref Vk-Device-command-line "command line", corresponds to
* @ref enumerateInstanceVersion().
*/
Version version() const { return _version; }
/** @brief Whether given version is supported on the instance */
/**
* @brief Whether given version is supported on the instance
*
* Compares @p version against @ref version().
*/
bool isVersionSupported(Version version) const {
return _version >= version;
}

2
src/Magnum/Vk/Version.h

@ -132,7 +132,7 @@ as @cb{.shell-session} <major>.<minor> @ce if patch is zero.
MAGNUM_VK_EXPORT Debug& operator<<(Debug& debug, Version value);
/**
@brief Enumerate instance version
@brief Enumerate version supported by the instance
@m_since_latest
Note that the @fn_vk{EnumerateInstanceVersion} function isn't available in

Loading…
Cancel
Save