// Copyright (c) 2021 BlackBerry Limited.
//
// SPDX-License-Identifier: CC-BY-4.0

[[platformCreateSurface_screen,platformCreateSurface_screen]]
=== QNX Screen Platform

[open,refpage='vkCreateScreenSurfaceQNX',desc='Create a slink:VkSurfaceKHR object for a QNX Screen window',type='protos']
--
To create a sname:VkSurfaceKHR object for a QNX Screen surface, call:

include::{generated}/api/protos/vkCreateScreenSurfaceQNX.txt[]

  * pname:instance is the instance to associate the surface with.
  * pname:pCreateInfo is a pointer to a slink:VkScreenSurfaceCreateInfoQNX
    structure containing parameters affecting the creation of the surface
    object.
  * pname:pAllocator is the allocator used for host memory allocated for the
    surface object when there is no more specific allocator available (see
    <<memory-allocation,Memory Allocation>>).
  * pname:pSurface is a pointer to a slink:VkSurfaceKHR handle in which the
    created surface object is returned.

include::{generated}/validity/protos/vkCreateScreenSurfaceQNX.txt[]
--

[open,refpage='VkScreenSurfaceCreateInfoQNX',desc='Structure specifying parameters of a newly created QNX Screen surface object',type='structs']
--
The sname:VkScreenSurfaceCreateInfoQNX structure is defined as:

include::{generated}/api/structs/VkScreenSurfaceCreateInfoQNX.txt[]

  * pname:sType is the type of this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:flags is reserved for future use.
  * pname:context and pname:window are QNX Screen code:context and
    code:window to associate the surface with.

.Valid Usage
****
  * [[VUID-VkScreenSurfaceCreateInfoQNX-context-04741]]
    pname:context must: point to a valid QNX Screen code:struct
    _screen_context
  * [[VUID-VkScreenSurfaceCreateInfoQNX-window-04742]]
    pname:window must: point to a valid QNX Screen code:struct
    _screen_window
****

include::{generated}/validity/structs/VkScreenSurfaceCreateInfoQNX.txt[]
--

[open,refpage='VkScreenSurfaceCreateFlagsQNX',desc='Reserved for future use',type='flags']
--
include::{generated}/api/flags/VkScreenSurfaceCreateFlagsQNX.txt[]

tname:VkScreenSurfaceCreateFlagsQNX is a bitmask type for setting a mask,
but is currently reserved for future use.
--
