[{"data":1,"prerenderedAt":565},["ShallowReactive",2],{"$f6J15TEDWEaKJDa1GMm7BZQibOob7eB1-SmzDfCFUzvU":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":564,"_id":4},"vkCreateSurfaceOHOS","Create a slink:VkSurfaceKHR object for an Open Harmony OS native window","VK_OHOS_surface","protos",[],{"type":10,"children":11,"toc":562},"root",[12,29,362,433,556],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17,20,27],{"type":18,"value":19},"text","To create a ",{"type":13,"tag":21,"props":22,"children":24},"code",{"className":23},[],[25],{"type":18,"value":26},"VkSurfaceKHR",{"type":18,"value":28}," object on Open Harmony OS platform, call:",{"type":13,"tag":30,"props":31,"children":32},"code-group",{},[33,165],{"type":13,"tag":34,"props":35,"children":41},"pre",{"className":36,"code":37,"filename":38,"language":39,"meta":40,"style":40},"language-c shiki shiki-themes github-light-default github-dark-default","VkResult vkCreateSurfaceOHOS(\n VkInstance instance,\n const VkSurfaceCreateInfoOHOS* pCreateInfo,\n const VkAllocationCallbacks* pAllocator,\n VkSurfaceKHR* pSurface);\n","C","c","",[42],{"type":13,"tag":21,"props":43,"children":44},{"__ignoreMap":40},[45,67,87,116,142],{"type":13,"tag":46,"props":47,"children":50},"span",{"class":48,"line":49},"line",1,[51,57,62],{"type":13,"tag":46,"props":52,"children":54},{"style":53},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[55],{"type":18,"value":56},"VkResult ",{"type":13,"tag":46,"props":58,"children":60},{"style":59},"--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[61],{"type":18,"value":4},{"type":13,"tag":46,"props":63,"children":64},{"style":53},[65],{"type":18,"value":66},"(\n",{"type":13,"tag":46,"props":68,"children":70},{"class":48,"line":69},2,[71,76,82],{"type":13,"tag":46,"props":72,"children":73},{"style":53},[74],{"type":18,"value":75}," VkInstance ",{"type":13,"tag":46,"props":77,"children":79},{"style":78},"--shiki-default:#953800;--shiki-dark:#FFA657",[80],{"type":18,"value":81},"instance",{"type":13,"tag":46,"props":83,"children":84},{"style":53},[85],{"type":18,"value":86},",\n",{"type":13,"tag":46,"props":88,"children":90},{"class":48,"line":89},3,[91,97,102,107,112],{"type":13,"tag":46,"props":92,"children":94},{"style":93},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[95],{"type":18,"value":96}," const",{"type":13,"tag":46,"props":98,"children":99},{"style":53},[100],{"type":18,"value":101}," VkSurfaceCreateInfoOHOS",{"type":13,"tag":46,"props":103,"children":104},{"style":93},[105],{"type":18,"value":106},"*",{"type":13,"tag":46,"props":108,"children":109},{"style":78},[110],{"type":18,"value":111}," pCreateInfo",{"type":13,"tag":46,"props":113,"children":114},{"style":53},[115],{"type":18,"value":86},{"type":13,"tag":46,"props":117,"children":119},{"class":48,"line":118},4,[120,124,129,133,138],{"type":13,"tag":46,"props":121,"children":122},{"style":93},[123],{"type":18,"value":96},{"type":13,"tag":46,"props":125,"children":126},{"style":53},[127],{"type":18,"value":128}," VkAllocationCallbacks",{"type":13,"tag":46,"props":130,"children":131},{"style":93},[132],{"type":18,"value":106},{"type":13,"tag":46,"props":134,"children":135},{"style":78},[136],{"type":18,"value":137}," pAllocator",{"type":13,"tag":46,"props":139,"children":140},{"style":53},[141],{"type":18,"value":86},{"type":13,"tag":46,"props":143,"children":145},{"class":48,"line":144},5,[146,151,155,160],{"type":13,"tag":46,"props":147,"children":148},{"style":53},[149],{"type":18,"value":150}," VkSurfaceKHR",{"type":13,"tag":46,"props":152,"children":153},{"style":93},[154],{"type":18,"value":106},{"type":13,"tag":46,"props":156,"children":157},{"style":78},[158],{"type":18,"value":159}," pSurface",{"type":13,"tag":46,"props":161,"children":162},{"style":53},[163],{"type":18,"value":164},");\n",{"type":13,"tag":34,"props":166,"children":171},{"className":167,"code":168,"filename":169,"language":170,"meta":40,"style":40},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn create_surface_ohos(\n instance: vk::Instance,\n p_create_info: *const vk::SurfaceCreateInfoOHOS,\n p_allocator: *const vk::AllocationCallbacks,\n p_surface: *mut vk::SurfaceKHR,\n) -> vk::Result;\n","Rust","rs",[172],{"type":13,"tag":21,"props":173,"children":174},{"__ignoreMap":40},[175,197,229,263,296,330],{"type":13,"tag":46,"props":176,"children":177},{"class":48,"line":49},[178,183,188,193],{"type":13,"tag":46,"props":179,"children":180},{"style":93},[181],{"type":18,"value":182},"pub",{"type":13,"tag":46,"props":184,"children":185},{"style":93},[186],{"type":18,"value":187}," fn",{"type":13,"tag":46,"props":189,"children":190},{"style":59},[191],{"type":18,"value":192}," create_surface_ohos",{"type":13,"tag":46,"props":194,"children":195},{"style":53},[196],{"type":18,"value":66},{"type":13,"tag":46,"props":198,"children":199},{"class":48,"line":69},[200,205,210,215,220,225],{"type":13,"tag":46,"props":201,"children":202},{"style":53},[203],{"type":18,"value":204}," instance",{"type":13,"tag":46,"props":206,"children":207},{"style":93},[208],{"type":18,"value":209},":",{"type":13,"tag":46,"props":211,"children":212},{"style":78},[213],{"type":18,"value":214}," vk",{"type":13,"tag":46,"props":216,"children":217},{"style":93},[218],{"type":18,"value":219},"::",{"type":13,"tag":46,"props":221,"children":222},{"style":78},[223],{"type":18,"value":224},"Instance",{"type":13,"tag":46,"props":226,"children":227},{"style":53},[228],{"type":18,"value":86},{"type":13,"tag":46,"props":230,"children":231},{"class":48,"line":89},[232,237,241,246,250,254,259],{"type":13,"tag":46,"props":233,"children":234},{"style":53},[235],{"type":18,"value":236}," p_create_info",{"type":13,"tag":46,"props":238,"children":239},{"style":93},[240],{"type":18,"value":209},{"type":13,"tag":46,"props":242,"children":243},{"style":93},[244],{"type":18,"value":245}," *const",{"type":13,"tag":46,"props":247,"children":248},{"style":78},[249],{"type":18,"value":214},{"type":13,"tag":46,"props":251,"children":252},{"style":93},[253],{"type":18,"value":219},{"type":13,"tag":46,"props":255,"children":256},{"style":78},[257],{"type":18,"value":258},"SurfaceCreateInfoOHOS",{"type":13,"tag":46,"props":260,"children":261},{"style":53},[262],{"type":18,"value":86},{"type":13,"tag":46,"props":264,"children":265},{"class":48,"line":118},[266,271,275,279,283,287,292],{"type":13,"tag":46,"props":267,"children":268},{"style":53},[269],{"type":18,"value":270}," p_allocator",{"type":13,"tag":46,"props":272,"children":273},{"style":93},[274],{"type":18,"value":209},{"type":13,"tag":46,"props":276,"children":277},{"style":93},[278],{"type":18,"value":245},{"type":13,"tag":46,"props":280,"children":281},{"style":78},[282],{"type":18,"value":214},{"type":13,"tag":46,"props":284,"children":285},{"style":93},[286],{"type":18,"value":219},{"type":13,"tag":46,"props":288,"children":289},{"style":78},[290],{"type":18,"value":291},"AllocationCallbacks",{"type":13,"tag":46,"props":293,"children":294},{"style":53},[295],{"type":18,"value":86},{"type":13,"tag":46,"props":297,"children":298},{"class":48,"line":144},[299,304,308,313,317,321,326],{"type":13,"tag":46,"props":300,"children":301},{"style":53},[302],{"type":18,"value":303}," p_surface",{"type":13,"tag":46,"props":305,"children":306},{"style":93},[307],{"type":18,"value":209},{"type":13,"tag":46,"props":309,"children":310},{"style":93},[311],{"type":18,"value":312}," *mut",{"type":13,"tag":46,"props":314,"children":315},{"style":78},[316],{"type":18,"value":214},{"type":13,"tag":46,"props":318,"children":319},{"style":93},[320],{"type":18,"value":219},{"type":13,"tag":46,"props":322,"children":323},{"style":78},[324],{"type":18,"value":325},"SurfaceKHR",{"type":13,"tag":46,"props":327,"children":328},{"style":53},[329],{"type":18,"value":86},{"type":13,"tag":46,"props":331,"children":333},{"class":48,"line":332},6,[334,339,344,348,352,357],{"type":13,"tag":46,"props":335,"children":336},{"style":53},[337],{"type":18,"value":338},") ",{"type":13,"tag":46,"props":340,"children":341},{"style":93},[342],{"type":18,"value":343},"->",{"type":13,"tag":46,"props":345,"children":346},{"style":78},[347],{"type":18,"value":214},{"type":13,"tag":46,"props":349,"children":350},{"style":93},[351],{"type":18,"value":219},{"type":13,"tag":46,"props":353,"children":354},{"style":78},[355],{"type":18,"value":356},"Result",{"type":13,"tag":46,"props":358,"children":359},{"style":53},[360],{"type":18,"value":361},";\n",{"type":13,"tag":363,"props":364,"children":365},"ul",{},[366,377,397,416],{"type":13,"tag":367,"props":368,"children":369},"li",{},[370,375],{"type":13,"tag":21,"props":371,"children":373},{"className":372},[],[374],{"type":18,"value":81},{"type":18,"value":376}," is the instance to associate the surface with.",{"type":13,"tag":367,"props":378,"children":379},{},[380,386,388,395],{"type":13,"tag":21,"props":381,"children":383},{"className":382},[],[384],{"type":18,"value":385},"pCreateInfo",{"type":18,"value":387}," is a pointer to a ",{"type":13,"tag":389,"props":390,"children":392},"a",{"href":391},"/man/VkSurfaceCreateInfoOHOS",[393],{"type":18,"value":394},"VkSurfaceCreateInfoOHOS",{"type":18,"value":396},"\nstructure containing parameters affecting the creation of the surface\nobject.",{"type":13,"tag":367,"props":398,"children":399},{},[400,406,408,414],{"type":13,"tag":21,"props":401,"children":403},{"className":402},[],[404],{"type":18,"value":405},"pAllocator",{"type":18,"value":407}," is the allocator used for host memory allocated for the\nsurface object when there is no more specific allocator available (see\n",{"type":13,"tag":389,"props":409,"children":411},{"href":410},"/chapters/memory#memory-allocation",[412],{"type":18,"value":413},"Memory Allocation",{"type":18,"value":415},").",{"type":13,"tag":367,"props":417,"children":418},{},[419,425,426,431],{"type":13,"tag":21,"props":420,"children":422},{"className":421},[],[423],{"type":18,"value":424},"pSurface",{"type":18,"value":387},{"type":13,"tag":389,"props":427,"children":429},{"href":428},"/man/VkSurfaceKHR",[430],{"type":18,"value":26},{"type":18,"value":432}," handle in which the\ncreated surface object is returned.",{"type":13,"tag":434,"props":435,"children":437},"validity-group",{"name":436},"Valid Usage (Implicit)",[438,468,492,533],{"type":13,"tag":439,"props":440,"children":442},"validity-field",{"name":441},"VUID-vkCreateSurfaceOHOS-instance-parameter",[443],{"type":13,"tag":14,"props":444,"children":445},{},[446,451,453,458,460,466],{"type":13,"tag":21,"props":447,"children":449},{"className":448},[],[450],{"type":18,"value":81},{"type":18,"value":452}," ",{"type":13,"tag":454,"props":455,"children":457},"normative",{"type":456},"must",[],{"type":18,"value":459}," be a valid ",{"type":13,"tag":389,"props":461,"children":463},{"href":462},"/man/VkInstance",[464],{"type":18,"value":465},"VkInstance",{"type":18,"value":467}," handle",{"type":13,"tag":439,"props":469,"children":471},{"name":470},"VUID-vkCreateSurfaceOHOS-pCreateInfo-parameter",[472],{"type":13,"tag":14,"props":473,"children":474},{},[475,480,481,484,486,490],{"type":13,"tag":21,"props":476,"children":478},{"className":477},[],[479],{"type":18,"value":385},{"type":18,"value":452},{"type":13,"tag":454,"props":482,"children":483},{"type":456},[],{"type":18,"value":485}," be a valid pointer to a valid ",{"type":13,"tag":389,"props":487,"children":488},{"href":391},[489],{"type":18,"value":394},{"type":18,"value":491}," structure",{"type":13,"tag":439,"props":493,"children":495},{"name":494},"VUID-vkCreateSurfaceOHOS-pAllocator-parameter",[496],{"type":13,"tag":14,"props":497,"children":498},{},[499,501,506,508,514,516,521,522,525,526,532],{"type":18,"value":500},"If ",{"type":13,"tag":21,"props":502,"children":504},{"className":503},[],[505],{"type":18,"value":405},{"type":18,"value":507}," is not ",{"type":13,"tag":21,"props":509,"children":511},{"className":510},[],[512],{"type":18,"value":513},"NULL",{"type":18,"value":515},", ",{"type":13,"tag":21,"props":517,"children":519},{"className":518},[],[520],{"type":18,"value":405},{"type":18,"value":452},{"type":13,"tag":454,"props":523,"children":524},{"type":456},[],{"type":18,"value":485},{"type":13,"tag":389,"props":527,"children":529},{"href":528},"/man/VkAllocationCallbacks",[530],{"type":18,"value":531},"VkAllocationCallbacks",{"type":18,"value":491},{"type":13,"tag":439,"props":534,"children":536},{"name":535},"VUID-vkCreateSurfaceOHOS-pSurface-parameter",[537],{"type":13,"tag":14,"props":538,"children":539},{},[540,545,546,549,551,555],{"type":13,"tag":21,"props":541,"children":543},{"className":542},[],[544],{"type":18,"value":424},{"type":18,"value":452},{"type":13,"tag":454,"props":547,"children":548},{"type":456},[],{"type":18,"value":550}," be a valid pointer to a ",{"type":13,"tag":389,"props":552,"children":553},{"href":428},[554],{"type":18,"value":26},{"type":18,"value":467},{"type":13,"tag":557,"props":558,"children":559},"style",{},[560],{"type":18,"value":561},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":40,"searchDepth":69,"depth":69,"links":563},[],"markdown",1773165496859]