| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Vulkan.Extensions.VK_KHR_android_surface
Synopsis
- data ANativeWindow
- newtype VkAndroidSurfaceCreateFlagsKHR = VkAndroidSurfaceCreateFlagsKHR VkFlags
- pattern VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR :: VkStructureType
- pattern VK_KHR_ANDROID_SURFACE_SPEC_VERSION :: Integral a => a
- pattern VK_KHR_ANDROID_SURFACE_EXTENSION_NAME :: (Eq a, IsString a) => a
- vkCreateAndroidSurfaceKHR :: ("instance" ::: VkInstance) -> ("pCreateInfo" ::: Ptr VkAndroidSurfaceCreateInfoKHR) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pSurface" ::: Ptr VkSurfaceKHR) -> IO VkResult
- data VkAndroidSurfaceCreateInfoKHR = VkAndroidSurfaceCreateInfoKHR {}
Documentation
data ANativeWindow Source #
Opaque data
newtype VkAndroidSurfaceCreateFlagsKHR Source #
Constructors
| VkAndroidSurfaceCreateFlagsKHR VkFlags |
Instances
pattern VK_KHR_ANDROID_SURFACE_SPEC_VERSION :: Integral a => a Source #
pattern VK_KHR_ANDROID_SURFACE_EXTENSION_NAME :: (Eq a, IsString a) => a Source #
vkCreateAndroidSurfaceKHR :: ("instance" ::: VkInstance) -> ("pCreateInfo" ::: Ptr VkAndroidSurfaceCreateInfoKHR) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pSurface" ::: Ptr VkSurfaceKHR) -> IO VkResult Source #
vkCreateAndroidSurfaceKHR - Create a
VkSurfaceKHR object for an
Android native window
Parameters
instanceis the instance to associate the surface with.
pCreateInfois a pointer to an instance of theVkAndroidSurfaceCreateInfoKHRstructure containing parameters affecting the creation of the surface object.pAllocatoris the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).pSurfacepoints to aVkSurfaceKHRhandle in which the created surface object is returned.
Description
During the lifetime of a surface created using a particular
ANativeWindow handle any attempts to create another surface for the
same ANativeWindow and any attempts to connect to the same
ANativeWindow through other platform mechanisms will fail.
Note
In particular, only one VkSurfaceKHR can exist at a time for a given
window. Similarly, a native window cannot be used by both a
VkSurfaceKHR and EGLSurface simultaneously.
If successful, vkCreateAndroidSurfaceKHR increments the
ANativeWindow’s reference count, and vkDestroySurfaceKHR will
decrement it.
On Android, when a swapchain’s imageExtent does not match the
surface’s currentExtent, the presentable images will be scaled to the
surface’s dimensions during presentation. minImageExtent is (1,1), and
maxImageExtent is the maximum image size supported by the consumer.
For the system compositor, currentExtent is the window size (i.e. the
consumer’s preferred size).
Valid Usage (Implicit)
instancemust be a validVkInstancehandle
pCreateInfomust be a valid pointer to a validVkAndroidSurfaceCreateInfoKHRstructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure pSurfacemust be a valid pointer to aVkSurfaceKHRhandle
Return Codes
[Success]
- VK_SUCCESS
[Failure]
- VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_NATIVE_WINDOW_IN_USE_KHR
See Also
VkAllocationCallbacks,
VkAndroidSurfaceCreateInfoKHR,
VkInstance,
VkSurfaceKHR
data VkAndroidSurfaceCreateInfoKHR Source #
VkAndroidSurfaceCreateInfoKHR - Structure specifying parameters of a newly created Android surface object
Valid Usage
windowmust point to a valid AndroidANativeWindow.
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR
pNextmust beNULLflagsmust be0
See Also
VkAndroidSurfaceCreateFlagsKHR,
VkStructureType,
vkCreateAndroidSurfaceKHR
Constructors
| VkAndroidSurfaceCreateInfoKHR | |
Fields
| |