aboutsummaryrefslogtreecommitdiff
path: root/contrib/glfw/glfw-3.3.5.bin.WIN64/docs/html/group__vulkan.html
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/glfw/glfw-3.3.5.bin.WIN64/docs/html/group__vulkan.html')
-rw-r--r--contrib/glfw/glfw-3.3.5.bin.WIN64/docs/html/group__vulkan.html354
1 files changed, 354 insertions, 0 deletions
diff --git a/contrib/glfw/glfw-3.3.5.bin.WIN64/docs/html/group__vulkan.html b/contrib/glfw/glfw-3.3.5.bin.WIN64/docs/html/group__vulkan.html
new file mode 100644
index 0000000..b0cb71a
--- /dev/null
+++ b/contrib/glfw/glfw-3.3.5.bin.WIN64/docs/html/group__vulkan.html
@@ -0,0 +1,354 @@
1<!DOCTYPE html>
2<html lang="en">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<meta name="viewport" content="width=device-width, initial-scale=1.0">
6<meta http-equiv="X-UA-Compatible" content="IE=9"/>
7<meta name="generator" content="Doxygen 1.9.2"/>
8<title>GLFW: Vulkan support reference</title>
9<link href="tabs.css" rel="stylesheet" type="text/css"/>
10<script type="text/javascript" src="jquery.js"></script>
11<script type="text/javascript" src="dynsections.js"></script>
12<link href="search/search.css" rel="stylesheet" type="text/css"/>
13<script type="text/javascript" src="search/searchdata.js"></script>
14<script type="text/javascript" src="search/search.js"></script>
15<link href="doxygen.css" rel="stylesheet" type="text/css" />
16<link href="extra.css" rel="stylesheet" type="text/css"/>
17</head>
18<body>
19<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
20<div id="titlearea">
21 <div class="glfwheader">
22 <a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
23 <ul class="glfwnavbar">
24 <li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
25 <li><a href="https://www.glfw.org/download.html">Download</a></li>
26 <li><a href="https://www.glfw.org/community.html">Community</a></li>
27 </ul>
28 </div>
29</div>
30<!-- end header part -->
31<!-- Generated by Doxygen 1.9.2 -->
32<script type="text/javascript">
33/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
34var searchBox = new SearchBox("searchBox", "search",'Search','.html');
35/* @license-end */
36</script>
37<script type="text/javascript" src="menudata.js"></script>
38<script type="text/javascript" src="menu.js"></script>
39<script type="text/javascript">
40/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
41$(function() {
42 initMenu('',true,false,'search.php','Search');
43 $(document).ready(function() { init_search(); });
44});
45/* @license-end */
46</script>
47<div id="main-nav"></div>
48</div><!-- top -->
49<!-- window showing the filter options -->
50<div id="MSearchSelectWindow"
51 onmouseover="return searchBox.OnSearchSelectShow()"
52 onmouseout="return searchBox.OnSearchSelectHide()"
53 onkeydown="return searchBox.OnSearchSelectKey(event)">
54</div>
55
56<!-- iframe showing the search results (closed by default) -->
57<div id="MSearchResultsWindow">
58<iframe src="javascript:void(0)" frameborder="0"
59 name="MSearchResults" id="MSearchResults">
60</iframe>
61</div>
62
63<div class="header">
64 <div class="summary">
65<a href="#typedef-members">Typedefs</a> &#124;
66<a href="#func-members">Functions</a> </div>
67 <div class="headertitle"><div class="title">Vulkan support reference</div></div>
68</div><!--header-->
69<div class="contents">
70<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
71<p >This is the reference documentation for Vulkan related functions and types. For more task-oriented information, see the <a class="el" href="vulkan_guide.html">Vulkan guide</a>. </p>
72<table class="memberdecls">
73<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
74Typedefs</h2></td></tr>
75<tr class="memitem:ga70c01918dc9d233a4fbe0681a43018af"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af">GLFWvkproc</a>) (void)</td></tr>
76<tr class="memdesc:ga70c01918dc9d233a4fbe0681a43018af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Vulkan API function pointer type. <a href="group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af">More...</a><br /></td></tr>
77<tr class="separator:ga70c01918dc9d233a4fbe0681a43018af"><td class="memSeparator" colspan="2">&#160;</td></tr>
78</table><table class="memberdecls">
79<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
80Functions</h2></td></tr>
81<tr class="memitem:ga2e7f30931e02464b5bc8d0d4b6f9fe2b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> (void)</td></tr>
82<tr class="memdesc:ga2e7f30931e02464b5bc8d0d4b6f9fe2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether the Vulkan loader and an ICD have been found. <a href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">More...</a><br /></td></tr>
83<tr class="separator:ga2e7f30931e02464b5bc8d0d4b6f9fe2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
84<tr class="memitem:ga99ad342d82f4a3421e2864978cb6d1d6"><td class="memItemLeft" align="right" valign="top">const char **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> (uint32_t *count)</td></tr>
85<tr class="memdesc:ga99ad342d82f4a3421e2864978cb6d1d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the Vulkan instance extensions required by GLFW. <a href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">More...</a><br /></td></tr>
86<tr class="separator:ga99ad342d82f4a3421e2864978cb6d1d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
87<tr class="memitem:gadf228fac94c5fd8f12423ec9af9ff1e9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af">GLFWvkproc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9">glfwGetInstanceProcAddress</a> (VkInstance instance, const char *procname)</td></tr>
88<tr class="memdesc:gadf228fac94c5fd8f12423ec9af9ff1e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the address of the specified Vulkan instance function. <a href="group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9">More...</a><br /></td></tr>
89<tr class="separator:gadf228fac94c5fd8f12423ec9af9ff1e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
90<tr class="memitem:gaff3823355cdd7e2f3f9f4d9ea9518d92"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92">glfwGetPhysicalDevicePresentationSupport</a> (VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily)</td></tr>
91<tr class="memdesc:gaff3823355cdd7e2f3f9f4d9ea9518d92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether the specified queue family can present images. <a href="group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92">More...</a><br /></td></tr>
92<tr class="separator:gaff3823355cdd7e2f3f9f4d9ea9518d92"><td class="memSeparator" colspan="2">&#160;</td></tr>
93<tr class="memitem:ga1a24536bec3f80b08ead18e28e6ae965"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965">glfwCreateWindowSurface</a> (VkInstance instance, <a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface)</td></tr>
94<tr class="memdesc:ga1a24536bec3f80b08ead18e28e6ae965"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a Vulkan surface for the specified window. <a href="group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965">More...</a><br /></td></tr>
95<tr class="separator:ga1a24536bec3f80b08ead18e28e6ae965"><td class="memSeparator" colspan="2">&#160;</td></tr>
96</table>
97<h2 class="groupheader">Typedef Documentation</h2>
98<a id="ga70c01918dc9d233a4fbe0681a43018af" name="ga70c01918dc9d233a4fbe0681a43018af"></a>
99<h2 class="memtitle"><span class="permalink"><a href="#ga70c01918dc9d233a4fbe0681a43018af">&#9670;&nbsp;</a></span>GLFWvkproc</h2>
100
101<div class="memitem">
102<div class="memproto">
103 <table class="memname">
104 <tr>
105 <td class="memname">typedef void(* GLFWvkproc) (void)</td>
106 </tr>
107 </table>
108</div><div class="memdoc">
109<p >Generic function pointer used for returning Vulkan API function pointers without forcing a cast from a regular pointer.</p>
110<dl class="section see"><dt>See also</dt><dd><a class="el" href="vulkan_guide.html#vulkan_proc">Querying Vulkan function pointers</a> </dd>
111<dd>
112<a class="el" href="group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9">glfwGetInstanceProcAddress</a></dd></dl>
113<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
114
115</div>
116</div>
117<h2 class="groupheader">Function Documentation</h2>
118<a id="ga2e7f30931e02464b5bc8d0d4b6f9fe2b" name="ga2e7f30931e02464b5bc8d0d4b6f9fe2b"></a>
119<h2 class="memtitle"><span class="permalink"><a href="#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">&#9670;&nbsp;</a></span>glfwVulkanSupported()</h2>
120
121<div class="memitem">
122<div class="memproto">
123 <table class="memname">
124 <tr>
125 <td class="memname">int glfwVulkanSupported </td>
126 <td>(</td>
127 <td class="paramtype">void&#160;</td>
128 <td class="paramname"></td><td>)</td>
129 <td></td>
130 </tr>
131 </table>
132</div><div class="memdoc">
133<p >This function returns whether the Vulkan loader and any minimally functional ICD have been found.</p>
134<p >The availability of a Vulkan loader and even an ICD does not by itself guarantee that surface creation or even instance creation is possible. Call <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> to check whether the extensions necessary for Vulkan surface creation are available and <a class="el" href="group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92">glfwGetPhysicalDevicePresentationSupport</a> to check whether a queue family of a physical device supports image presentation.</p>
135<dl class="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if Vulkan is minimally available, or <code>GLFW_FALSE</code> otherwise.</dd></dl>
136<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
137<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
138<dl class="section see"><dt>See also</dt><dd><a class="el" href="vulkan_guide.html#vulkan_support">Querying for Vulkan support</a></dd></dl>
139<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
140
141</div>
142</div>
143<a id="ga99ad342d82f4a3421e2864978cb6d1d6" name="ga99ad342d82f4a3421e2864978cb6d1d6"></a>
144<h2 class="memtitle"><span class="permalink"><a href="#ga99ad342d82f4a3421e2864978cb6d1d6">&#9670;&nbsp;</a></span>glfwGetRequiredInstanceExtensions()</h2>
145
146<div class="memitem">
147<div class="memproto">
148 <table class="memname">
149 <tr>
150 <td class="memname">const char ** glfwGetRequiredInstanceExtensions </td>
151 <td>(</td>
152 <td class="paramtype">uint32_t *&#160;</td>
153 <td class="paramname"><em>count</em></td><td>)</td>
154 <td></td>
155 </tr>
156 </table>
157</div><div class="memdoc">
158<p >This function returns an array of names of Vulkan instance extensions required by GLFW for creating Vulkan surfaces for GLFW windows. If successful, the list will always contain <code>VK_KHR_surface</code>, so if you don't require any additional extensions you can pass this list directly to the <code>VkInstanceCreateInfo</code> struct.</p>
159<p >If Vulkan is not available on the machine, this function returns <code>NULL</code> and generates a <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> to check whether Vulkan is at least minimally available.</p>
160<p >If Vulkan is available but no set of extensions allowing window surface creation was found, this function returns <code>NULL</code>. You may still use Vulkan for off-screen rendering and compute work.</p>
161<dl class="params"><dt>Parameters</dt><dd>
162 <table class="params">
163 <tr><td class="paramdir">[out]</td><td class="paramname">count</td><td>Where to store the number of extensions in the returned array. This is set to zero if an error occurred. </td></tr>
164 </table>
165 </dd>
166</dl>
167<dl class="section return"><dt>Returns</dt><dd>An array of ASCII encoded extension names, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
168<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a>.</dd></dl>
169<dl class="section remark"><dt>Remarks</dt><dd>Additional extensions may be required by future versions of GLFW. You should check if any extensions you wish to enable are already in the returned array, as it is an error to specify an extension more than once in the <code>VkInstanceCreateInfo</code> struct.</dd>
170<dd>
171<b>macOS:</b> GLFW currently supports both the <code>VK_MVK_macos_surface</code> and the newer <code>VK_EXT_metal_surface</code> extensions.</dd></dl>
172<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the library is terminated.</dd></dl>
173<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
174<dl class="section see"><dt>See also</dt><dd><a class="el" href="vulkan_guide.html#vulkan_ext">Querying required Vulkan extensions</a> </dd>
175<dd>
176<a class="el" href="group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965">glfwCreateWindowSurface</a></dd></dl>
177<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
178
179</div>
180</div>
181<a id="gadf228fac94c5fd8f12423ec9af9ff1e9" name="gadf228fac94c5fd8f12423ec9af9ff1e9"></a>
182<h2 class="memtitle"><span class="permalink"><a href="#gadf228fac94c5fd8f12423ec9af9ff1e9">&#9670;&nbsp;</a></span>glfwGetInstanceProcAddress()</h2>
183
184<div class="memitem">
185<div class="memproto">
186 <table class="memname">
187 <tr>
188 <td class="memname"><a class="el" href="group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af">GLFWvkproc</a> glfwGetInstanceProcAddress </td>
189 <td>(</td>
190 <td class="paramtype">VkInstance&#160;</td>
191 <td class="paramname"><em>instance</em>, </td>
192 </tr>
193 <tr>
194 <td class="paramkey"></td>
195 <td></td>
196 <td class="paramtype">const char *&#160;</td>
197 <td class="paramname"><em>procname</em>&#160;</td>
198 </tr>
199 <tr>
200 <td></td>
201 <td>)</td>
202 <td></td><td></td>
203 </tr>
204 </table>
205</div><div class="memdoc">
206<p >This function returns the address of the specified Vulkan core or extension function for the specified instance. If instance is set to <code>NULL</code> it can return any function exported from the Vulkan loader, including at least the following functions:</p>
207<ul>
208<li><code>vkEnumerateInstanceExtensionProperties</code></li>
209<li><code>vkEnumerateInstanceLayerProperties</code></li>
210<li><code>vkCreateInstance</code></li>
211<li><code>vkGetInstanceProcAddr</code></li>
212</ul>
213<p >If Vulkan is not available on the machine, this function returns <code>NULL</code> and generates a <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> to check whether Vulkan is at least minimally available.</p>
214<p >This function is equivalent to calling <code>vkGetInstanceProcAddr</code> with a platform-specific query of the Vulkan loader as a fallback.</p>
215<dl class="params"><dt>Parameters</dt><dd>
216 <table class="params">
217 <tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>The Vulkan instance to query, or <code>NULL</code> to retrieve functions related to instance creation. </td></tr>
218 <tr><td class="paramdir">[in]</td><td class="paramname">procname</td><td>The ASCII encoded name of the function. </td></tr>
219 </table>
220 </dd>
221</dl>
222<dl class="section return"><dt>Returns</dt><dd>The address of the function, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
223<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a>.</dd></dl>
224<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned function pointer is valid until the library is terminated.</dd></dl>
225<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
226<dl class="section see"><dt>See also</dt><dd><a class="el" href="vulkan_guide.html#vulkan_proc">Querying Vulkan function pointers</a></dd></dl>
227<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
228
229</div>
230</div>
231<a id="gaff3823355cdd7e2f3f9f4d9ea9518d92" name="gaff3823355cdd7e2f3f9f4d9ea9518d92"></a>
232<h2 class="memtitle"><span class="permalink"><a href="#gaff3823355cdd7e2f3f9f4d9ea9518d92">&#9670;&nbsp;</a></span>glfwGetPhysicalDevicePresentationSupport()</h2>
233
234<div class="memitem">
235<div class="memproto">
236 <table class="memname">
237 <tr>
238 <td class="memname">int glfwGetPhysicalDevicePresentationSupport </td>
239 <td>(</td>
240 <td class="paramtype">VkInstance&#160;</td>
241 <td class="paramname"><em>instance</em>, </td>
242 </tr>
243 <tr>
244 <td class="paramkey"></td>
245 <td></td>
246 <td class="paramtype">VkPhysicalDevice&#160;</td>
247 <td class="paramname"><em>device</em>, </td>
248 </tr>
249 <tr>
250 <td class="paramkey"></td>
251 <td></td>
252 <td class="paramtype">uint32_t&#160;</td>
253 <td class="paramname"><em>queuefamily</em>&#160;</td>
254 </tr>
255 <tr>
256 <td></td>
257 <td>)</td>
258 <td></td><td></td>
259 </tr>
260 </table>
261</div><div class="memdoc">
262<p >This function returns whether the specified queue family of the specified physical device supports presentation to the platform GLFW was built for.</p>
263<p >If Vulkan or the required window surface creation instance extensions are not available on the machine, or if the specified instance was not created with the required extensions, this function returns <code>GLFW_FALSE</code> and generates a <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> to check whether Vulkan is at least minimally available and <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> to check what instance extensions are required.</p>
264<dl class="params"><dt>Parameters</dt><dd>
265 <table class="params">
266 <tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>The instance that the physical device belongs to. </td></tr>
267 <tr><td class="paramdir">[in]</td><td class="paramname">device</td><td>The physical device that the queue family belongs to. </td></tr>
268 <tr><td class="paramdir">[in]</td><td class="paramname">queuefamily</td><td>The index of the queue family to query. </td></tr>
269 </table>
270 </dd>
271</dl>
272<dl class="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if the queue family supports presentation, or <code>GLFW_FALSE</code> otherwise.</dd></dl>
273<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
274<dl class="section remark"><dt>Remarks</dt><dd><b>macOS:</b> This function currently always returns <code>GLFW_TRUE</code>, as the <code>VK_MVK_macos_surface</code> and <code>VK_EXT_metal_surface</code> extensions do not provide a <code>vkGetPhysicalDevice*PresentationSupport</code> type function.</dd></dl>
275<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. For synchronization details of Vulkan objects, see the Vulkan specification.</dd></dl>
276<dl class="section see"><dt>See also</dt><dd><a class="el" href="vulkan_guide.html#vulkan_present">Querying for Vulkan presentation support</a></dd></dl>
277<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
278
279</div>
280</div>
281<a id="ga1a24536bec3f80b08ead18e28e6ae965" name="ga1a24536bec3f80b08ead18e28e6ae965"></a>
282<h2 class="memtitle"><span class="permalink"><a href="#ga1a24536bec3f80b08ead18e28e6ae965">&#9670;&nbsp;</a></span>glfwCreateWindowSurface()</h2>
283
284<div class="memitem">
285<div class="memproto">
286 <table class="memname">
287 <tr>
288 <td class="memname">VkResult glfwCreateWindowSurface </td>
289 <td>(</td>
290 <td class="paramtype">VkInstance&#160;</td>
291 <td class="paramname"><em>instance</em>, </td>
292 </tr>
293 <tr>
294 <td class="paramkey"></td>
295 <td></td>
296 <td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *&#160;</td>
297 <td class="paramname"><em>window</em>, </td>
298 </tr>
299 <tr>
300 <td class="paramkey"></td>
301 <td></td>
302 <td class="paramtype">const VkAllocationCallbacks *&#160;</td>
303 <td class="paramname"><em>allocator</em>, </td>
304 </tr>
305 <tr>
306 <td class="paramkey"></td>
307 <td></td>
308 <td class="paramtype">VkSurfaceKHR *&#160;</td>
309 <td class="paramname"><em>surface</em>&#160;</td>
310 </tr>
311 <tr>
312 <td></td>
313 <td>)</td>
314 <td></td><td></td>
315 </tr>
316 </table>
317</div><div class="memdoc">
318<p >This function creates a Vulkan surface for the specified window.</p>
319<p >If the Vulkan loader or at least one minimally functional ICD were not found, this function returns <code>VK_ERROR_INITIALIZATION_FAILED</code> and generates a <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> to check whether Vulkan is at least minimally available.</p>
320<p >If the required window surface creation instance extensions are not available or if the specified instance was not created with these extensions enabled, this function returns <code>VK_ERROR_EXTENSION_NOT_PRESENT</code> and generates a <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> to check what instance extensions are required.</p>
321<p >The window surface cannot be shared with another API so the window must have been created with the <a class="el" href="window_guide.html#GLFW_CLIENT_API_attrib">client api hint</a> set to <code>GLFW_NO_API</code> otherwise it generates a <a class="el" href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a> error and returns <code>VK_ERROR_NATIVE_WINDOW_IN_USE_KHR</code>.</p>
322<p >The window surface must be destroyed before the specified Vulkan instance. It is the responsibility of the caller to destroy the window surface. GLFW does not destroy it for you. Call <code>vkDestroySurfaceKHR</code> to destroy the surface.</p>
323<dl class="params"><dt>Parameters</dt><dd>
324 <table class="params">
325 <tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>The Vulkan instance to create the surface in. </td></tr>
326 <tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window to create the surface for. </td></tr>
327 <tr><td class="paramdir">[in]</td><td class="paramname">allocator</td><td>The allocator to use, or <code>NULL</code> to use the default allocator. </td></tr>
328 <tr><td class="paramdir">[out]</td><td class="paramname">surface</td><td>Where to store the handle of the surface. This is set to <code>VK_NULL_HANDLE</code> if an error occurred. </td></tr>
329 </table>
330 </dd>
331</dl>
332<dl class="section return"><dt>Returns</dt><dd><code>VK_SUCCESS</code> if successful, or a Vulkan error code if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
333<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a>, <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a> and <a class="el" href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a></dd></dl>
334<dl class="section remark"><dt>Remarks</dt><dd>If an error occurs before the creation call is made, GLFW returns the Vulkan error code most appropriate for the error. Appropriate use of <a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> and <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> should eliminate almost all occurrences of these errors.</dd>
335<dd>
336<b>macOS:</b> This function currently only supports the <code>VK_MVK_macos_surface</code> extension from MoltenVK.</dd>
337<dd>
338<b>macOS:</b> This function creates and sets a <code>CAMetalLayer</code> instance for the window content view, which is required for MoltenVK to function.</dd></dl>
339<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. For synchronization details of Vulkan objects, see the Vulkan specification.</dd></dl>
340<dl class="section see"><dt>See also</dt><dd><a class="el" href="vulkan_guide.html#vulkan_surface">Creating a Vulkan window surface</a> </dd>
341<dd>
342<a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a></dd></dl>
343<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
344
345</div>
346</div>
347</div><!-- contents -->
348<address class="footer">
349<p>
350Last update on Thu Oct 28 2021 for GLFW 3.3.5
351</p>
352</address>
353</body>
354</html>