Description
To use a Vulkan extension supporting a platform-specific window system, header files for that window systems must be included at compile time, or platform-specific types must be forward-declared. The Vulkan header files cannot determine whether or not an external header is available at compile time, so platform-specific extensions are provided in separate headers from the core API and platform-independent extensions, allowing applications to decide which ones should be defined and how the external headers are included.
Extensions dependent on particular sets of platform headers, or that
forward-declare platform-specific types, are declared in a header named for
that platform.
Before including these platform-specific Vulkan headers, applications must
include both {core_header}
and any external native headers the platform
extensions depend on.
As a convenience for applications that do not need the flexibility of
separate platform-specific Vulkan headers, {full_header}
includes
{core_header}
, and then conditionally includes platform-specific Vulkan
headers and the external headers they depend on.
Applications control which platform-specific headers are included by
#defining macros before including {full_header}
.
The correspondence between platform-specific extensions, external headers
they require, the platform-specific header which declares them, and the
preprocessor macros which enable inclusion by {full_header}
are shown in
the following table.
Extension Name | Window System Name | Platform-specific Header | Required External Headers | Controlling {full_header} Macro |
---|---|---|---|---|
Android |
|
None |
|
|
Wayland |
|
|
|
|
|
Microsoft Windows |
|
|
|
X11 Xcb |
|
|
|
|
X11 Xlib |
|
|
|
|
DirectFB |
|
|
|
|
X11 XRAndR |
|
|
|
|
Google Games Platform |
|
<ggp_c/vulkan_types.h> |
|
|
iOS |
|
None |
|
|
macOS |
|
None |
|
|
VI |
|
None |
|
|
Fuchsia |
|
|
|
|
Metal on CoreAnimation |
|
None |
|
|
QNX Screen |
|
|
|
Note
This section describes the purpose of the headers independently of the specific underlying functionality of the window system extensions themselves. Each extension name will only link to a description of that extension when viewing a specification built with that extension included. |
See Also
provisional-headers
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.