1e41f4b71Sopenharmony_ci# vulkan_ohos.h 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci 4e41f4b71Sopenharmony_ci## Overview 5e41f4b71Sopenharmony_ci 6e41f4b71Sopenharmony_ciThe **vulkan_ohos.h** file declares the Vulkan interfaces extended by OpenHarmony. File to include: <vulkan/vulkan.h> 7e41f4b71Sopenharmony_ci 8e41f4b71Sopenharmony_ci**Since** 9e41f4b71Sopenharmony_ci 10e41f4b71Sopenharmony_ci10 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ci**Related Modules** 13e41f4b71Sopenharmony_ci 14e41f4b71Sopenharmony_ci[Vulkan](_vulkan.md) 15e41f4b71Sopenharmony_ci 16e41f4b71Sopenharmony_ci 17e41f4b71Sopenharmony_ci## Summary 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_ci 20e41f4b71Sopenharmony_ci### Structs 21e41f4b71Sopenharmony_ci 22e41f4b71Sopenharmony_ci| Name| Description| 23e41f4b71Sopenharmony_ci| -------- | -------- | 24e41f4b71Sopenharmony_ci| [VkSurfaceCreateInfoOHOS](_vk_surface_create_info_o_h_o_s.md) | Defines the parameters required for creating a Vulkan surface.| 25e41f4b71Sopenharmony_ci| [VkNativeBufferUsageOHOS](_vk_native_buffer_usage_o_h_o_s.md) | Defines the usage of a **NativeBuffer**.| 26e41f4b71Sopenharmony_ci| [VkNativeBufferPropertiesOHOS](_vk_native_buffer_properties_o_h_o_s.md) | Defines the properties of a **NativeBuffer**.| 27e41f4b71Sopenharmony_ci| [VkNativeBufferFormatPropertiesOHOS](_vk_native_buffer_format_properties_o_h_o_s.md) | Defines the format properties of a **NativeBuffer**.| 28e41f4b71Sopenharmony_ci| [VkImportNativeBufferInfoOHOS](_vk_import_native_buffer_info_o_h_o_s.md) | Defines the pointer to an **OH_NativeBuffer** struct.| 29e41f4b71Sopenharmony_ci| [VkMemoryGetNativeBufferInfoOHOS](_vk_memory_get_native_buffer_info_o_h_o_s.md) | Defines a struct used to obtain an **OH_NativeBuffer** from the Vulkan memory.| 30e41f4b71Sopenharmony_ci| [VkExternalFormatOHOS](_vk_external_format_o_h_o_s.md) | Defines an externally defined format.| 31e41f4b71Sopenharmony_ci 32e41f4b71Sopenharmony_ci 33e41f4b71Sopenharmony_ci### Macros 34e41f4b71Sopenharmony_ci 35e41f4b71Sopenharmony_ci| Name| Description| 36e41f4b71Sopenharmony_ci| -------- | -------- | 37e41f4b71Sopenharmony_ci| [VK_OHOS_surface](_vulkan.md#vk_ohos_surface) 1 | Surface extension macro definition of OpenHarmony.| 38e41f4b71Sopenharmony_ci| [VK_OHOS_SURFACE_SPEC_VERSION](_vulkan.md#vk_ohos_surface_spec_version) 1 | Surface extension version of OpenHarmony.| 39e41f4b71Sopenharmony_ci| [VK_OHOS_SURFACE_EXTENSION_NAME](_vulkan.md#vk_ohos_surface_extension_name) "VK_OHOS_surface" | Surface extension name of OpenHarmony.| 40e41f4b71Sopenharmony_ci| [VK_OHOS_external_memory](_vulkan.md#vk_ohos_external_memory) 1 | External memory extension macro definition of OpenHarmony.| 41e41f4b71Sopenharmony_ci| [VK_OHOS_EXTERNAL_MEMORY_SPEC_VERSION](_vulkan.md#vk_ohos_external_memory_spec_version) 1 | External memory extension version of OpenHarmony.| 42e41f4b71Sopenharmony_ci| [VK_OHOS_EXTERNAL_MEMORY_EXTENSION_NAME](_vulkan.md#vk_ohos_external_memory_extension_name) "VK_OHOS_external_memory" | External memory extension name of OpenHarmony.| 43e41f4b71Sopenharmony_ci 44e41f4b71Sopenharmony_ci 45e41f4b71Sopenharmony_ci### Types 46e41f4b71Sopenharmony_ci 47e41f4b71Sopenharmony_ci| Name| Description| 48e41f4b71Sopenharmony_ci| -------- | -------- | 49e41f4b71Sopenharmony_ci| [OHNativeWindow](_vulkan.md#ohnativewindow) | Defines an **OHNativeWindow**.| 50e41f4b71Sopenharmony_ci| [VkSurfaceCreateFlagsOHOS](_vulkan.md#vksurfacecreateflagsohos) | Defines the bit mask of the VkFlags type used for the creation of a Vulkan surface. It is a reserved flag type.| 51e41f4b71Sopenharmony_ci| [VkSurfaceCreateInfoOHOS](_vulkan.md#vksurfacecreateinfoohos) | Defines the parameters required for creating a Vulkan surface.| 52e41f4b71Sopenharmony_ci| VkResult ([VKAPI_PTR *PFN_vkCreateSurfaceOHOS](_vulkan.md#pfn_vkcreatesurfaceohos)) (VkInstance instance, const [VkSurfaceCreateInfoOHOS](_vk_surface_create_info_o_h_o_s.md) \*pCreateInfo, const VkAllocationCallbacks \*pAllocator, VkSurfaceKHR \*pSurface) | Defines the function pointer for creating a Vulkan surface.| 53e41f4b71Sopenharmony_ci| [VkNativeBufferUsageOHOS](_vulkan.md#vknativebufferusageohos) | Defines the usage of a **NativeBuffer**.| 54e41f4b71Sopenharmony_ci| [VkNativeBufferPropertiesOHOS](_vulkan.md#vknativebufferpropertiesohos) | Defines the properties of a **NativeBuffer**.| 55e41f4b71Sopenharmony_ci| [VkNativeBufferFormatPropertiesOHOS](_vulkan.md#vknativebufferformatpropertiesohos) | Defines the format properties of a **NativeBuffer**.| 56e41f4b71Sopenharmony_ci| [VkImportNativeBufferInfoOHOS](_vulkan.md#vkimportnativebufferinfoohos) | Defines the pointer to an **OH_NativeBuffer** struct.| 57e41f4b71Sopenharmony_ci| [VkMemoryGetNativeBufferInfoOHOS](_vulkan.md#vkmemorygetnativebufferinfoohos) | Defines a struct used to obtain an **OH_NativeBuffer** from the Vulkan memory.| 58e41f4b71Sopenharmony_ci| [VkExternalFormatOHOS](_vulkan.md#vkexternalformatohos) | Defines an externally defined format.| 59e41f4b71Sopenharmony_ci| VkResult ([VKAPI_PTR *PFN_vkGetNativeBufferPropertiesOHOS](_vulkan.md#pfn_vkgetnativebufferpropertiesohos)) (VkDevice device, const struct OH_NativeBuffer \*buffer, [VkNativeBufferPropertiesOHOS](_vk_native_buffer_properties_o_h_o_s.md) \*pProperties) | Defines a function pointer used to obtain **OH_NativeBuffer** properties.| 60e41f4b71Sopenharmony_ci| VkResult ([VKAPI_PTR *PFN_vkGetMemoryNativeBufferOHOS](_vulkan.md#pfn_vkgetmemorynativebufferohos)) (VkDevice device, const [VkMemoryGetNativeBufferInfoOHOS](_vk_memory_get_native_buffer_info_o_h_o_s.md) \*pInfo, struct OH_NativeBuffer \*\*pBuffer) | Defines a function pointer used to obtain an **OH_NativeBuffer** instance.| 61e41f4b71Sopenharmony_ci 62e41f4b71Sopenharmony_ci 63e41f4b71Sopenharmony_ci### Functions 64e41f4b71Sopenharmony_ci 65e41f4b71Sopenharmony_ci| Name| Description| 66e41f4b71Sopenharmony_ci| -------- | -------- | 67e41f4b71Sopenharmony_ci| [vkCreateSurfaceOHOS](_vulkan.md#vkcreatesurfaceohos) (VkInstance instance, const [VkSurfaceCreateInfoOHOS](_vk_surface_create_info_o_h_o_s.md) \*pCreateInfo, const VkAllocationCallbacks \*pAllocator, VkSurfaceKHR \*pSurface) | Creates a Vulkan surface.| 68e41f4b71Sopenharmony_ci| [vkGetNativeBufferPropertiesOHOS](_vulkan.md#vkgetnativebufferpropertiesohos) (VkDevice device, const struct OH_NativeBuffer \*buffer, [VkNativeBufferPropertiesOHOS](_vk_native_buffer_properties_o_h_o_s.md) \*pProperties) | Obtains the properties of an **OH_NativeBuffer** instance.| 69e41f4b71Sopenharmony_ci| [vkGetMemoryNativeBufferOHOS](_vulkan.md#vkgetmemorynativebufferohos) (VkDevice device, const [VkMemoryGetNativeBufferInfoOHOS](_vk_memory_get_native_buffer_info_o_h_o_s.md) \*pInfo, struct OH_NativeBuffer \*\*pBuffer) | Obtains an **OH_NativeBuffer** instance.| 70