<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.15"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>My Project: SDL_vulkan.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">My Project </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.15 --> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ var searchBox = new SearchBox("searchBox", "search",false,'Search'); /* @license-end */ </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); /* @license-end */</script> <div id="main-nav"></div> </div><!-- top --> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="header"> <div class="headertitle"> <div class="title">SDL_vulkan.h</div> </div> </div><!--header--> <div class="contents"> <a href="SDL__vulkan_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> Simple DirectMedia Layer</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> Copyright (C) 2017, Mark Callow</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"></span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> This software is provided 'as-is', without any express or implied</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> warranty. In no event will the authors be held liable for any damages</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> arising from the use of this software.</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"></span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> Permission is granted to anyone to use this software for any purpose,</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> including commercial applications, and to alter it and redistribute it</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> freely, subject to the following restrictions:</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"></span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> 1. The origin of this software must not be misrepresented; you must not</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> claim that you wrote the original software. If you use this software</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> in a product, an acknowledgment in the product documentation would be</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> appreciated but is not required.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> 2. Altered source versions must be plainly marked as such, and must not be</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> misrepresented as being the original software.</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> 3. This notice may not be removed or altered from any source distribution.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment">*/</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#ifndef SDL_vulkan_h_</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#define SDL_vulkan_h_</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include "<a class="code" href="SDL__video_8h.html">SDL_video.h</a>"</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#include "<a class="code" href="begin__code_8h.html">begin_code.h</a>"</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="comment">/* Set up for C function definitions, even when using C++ */</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment">/* Avoid including vulkan.h, don't define VkInstance if it's already included */</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="preprocessor">#ifdef VULKAN_H_</span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="preprocessor">#define NO_SDL_VULKAN_TYPEDEFS</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="preprocessor">#ifndef NO_SDL_VULKAN_TYPEDEFS</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="preprocessor">#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="preprocessor">#if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)</span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="preprocessor">#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="preprocessor">#else</span></div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="preprocessor">#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;</span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> </div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> VK_DEFINE_HANDLE(VkInstance)</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="preprocessor">#endif </span><span class="comment">/* !NO_SDL_VULKAN_TYPEDEFS */</span><span class="preprocessor"></span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> </div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="keyword">typedef</span> VkInstance SDL_vulkanInstance;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="keyword">typedef</span> VkSurfaceKHR SDL_vulkanSurface; <span class="comment">/* for compatibility with Tizen */</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="comment">/* @{ */</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="keyword">extern</span> DECLSPEC <span class="keywordtype">int</span> SDLCALL <a class="code" href="SDL__vulkan_8h.html#a9fcc0942c8eaa67c3eff2e3526304b5b">SDL_Vulkan_LoadLibrary</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *path);</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span> </div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="keyword">extern</span> DECLSPEC <span class="keywordtype">void</span> *SDLCALL <a class="code" href="SDL__vulkan_8h.html#aee3a196487ad045f8c2b5a0708f5bf55">SDL_Vulkan_GetVkGetInstanceProcAddr</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span> </div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="keyword">extern</span> DECLSPEC <span class="keywordtype">void</span> SDLCALL <a class="code" href="SDL__vulkan_8h.html#a92970fb6bc833a8cc65217638d599ff2">SDL_Vulkan_UnloadLibrary</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span> </div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span> <span class="keyword">extern</span> DECLSPEC SDL_bool SDLCALL <a class="code" href="SDL__vulkan_8h.html#a46d6b686f9154e972d6254fc3757bd0d">SDL_Vulkan_GetInstanceExtensions</a>(</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <a class="code" href="SDL__video_8h.html#a55a196c7d3b8497538632c79ae1e6392">SDL_Window</a> *window,</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *pCount,</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> **pNames);</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span> </div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span> <span class="keyword">extern</span> DECLSPEC SDL_bool SDLCALL <a class="code" href="SDL__vulkan_8h.html#a1613884948ea2b2671cea8f43462642b">SDL_Vulkan_CreateSurface</a>(</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  <a class="code" href="SDL__video_8h.html#a55a196c7d3b8497538632c79ae1e6392">SDL_Window</a> *window,</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  VkInstance instance,</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  VkSurfaceKHR* surface);</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span> </div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span> <span class="keyword">extern</span> DECLSPEC <span class="keywordtype">void</span> SDLCALL <a class="code" href="SDL__vulkan_8h.html#a170ea51b623cbda9f945b37c037d7974">SDL_Vulkan_GetDrawableSize</a>(<a class="code" href="SDL__video_8h.html#a55a196c7d3b8497538632c79ae1e6392">SDL_Window</a> * window,</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  <span class="keywordtype">int</span> *w, <span class="keywordtype">int</span> *h);</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span> </div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span> <span class="comment">/* @} */</span><span class="comment">/* Vulkan support functions */</span></div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span> </div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span> <span class="comment">/* Ends C function definitions when using C++ */</span></div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span> }</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span> <span class="preprocessor">#include "<a class="code" href="close__code_8h.html">close_code.h</a>"</span></div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span> </div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span> <span class="preprocessor">#endif </span><span class="comment">/* SDL_vulkan_h_ */</span><span class="preprocessor"></span></div><div class="ttc" id="SDL__video_8h_html_a55a196c7d3b8497538632c79ae1e6392"><div class="ttname"><a href="SDL__video_8h.html#a55a196c7d3b8497538632c79ae1e6392">SDL_Window</a></div><div class="ttdeci">struct SDL_Window SDL_Window</div><div class="ttdoc">The type used to identify a window.</div><div class="ttdef"><b>Definition:</b> SDL_video.h:90</div></div> <div class="ttc" id="SDL__video_8h_html"><div class="ttname"><a href="SDL__video_8h.html">SDL_video.h</a></div></div> <div class="ttc" id="SDL__vulkan_8h_html_a170ea51b623cbda9f945b37c037d7974"><div class="ttname"><a href="SDL__vulkan_8h.html#a170ea51b623cbda9f945b37c037d7974">SDL_Vulkan_GetDrawableSize</a></div><div class="ttdeci">DECLSPEC void SDLCALL SDL_Vulkan_GetDrawableSize(SDL_Window *window, int *w, int *h)</div><div class="ttdoc">Get the size of a window's underlying drawable in pixels (for use with setting viewport,...</div></div> <div class="ttc" id="begin__code_8h_html"><div class="ttname"><a href="begin__code_8h.html">begin_code.h</a></div></div> <div class="ttc" id="close__code_8h_html"><div class="ttname"><a href="close__code_8h.html">close_code.h</a></div></div> <div class="ttc" id="SDL__vulkan_8h_html_a9fcc0942c8eaa67c3eff2e3526304b5b"><div class="ttname"><a href="SDL__vulkan_8h.html#a9fcc0942c8eaa67c3eff2e3526304b5b">SDL_Vulkan_LoadLibrary</a></div><div class="ttdeci">DECLSPEC int SDLCALL SDL_Vulkan_LoadLibrary(const char *path)</div><div class="ttdoc">Dynamically load a Vulkan loader library.</div></div> <div class="ttc" id="SDL__vulkan_8h_html_a46d6b686f9154e972d6254fc3757bd0d"><div class="ttname"><a href="SDL__vulkan_8h.html#a46d6b686f9154e972d6254fc3757bd0d">SDL_Vulkan_GetInstanceExtensions</a></div><div class="ttdeci">DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(SDL_Window *window, unsigned int *pCount, const char **pNames)</div><div class="ttdoc">Get the names of the Vulkan instance extensions needed to create a surface with SDL_Vulkan_CreateSurf...</div></div> <div class="ttc" id="SDL__vulkan_8h_html_a1613884948ea2b2671cea8f43462642b"><div class="ttname"><a href="SDL__vulkan_8h.html#a1613884948ea2b2671cea8f43462642b">SDL_Vulkan_CreateSurface</a></div><div class="ttdeci">DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(SDL_Window *window, VkInstance instance, VkSurfaceKHR *surface)</div><div class="ttdoc">Create a Vulkan rendering surface for a window.</div></div> <div class="ttc" id="SDL__vulkan_8h_html_aee3a196487ad045f8c2b5a0708f5bf55"><div class="ttname"><a href="SDL__vulkan_8h.html#aee3a196487ad045f8c2b5a0708f5bf55">SDL_Vulkan_GetVkGetInstanceProcAddr</a></div><div class="ttdeci">DECLSPEC void *SDLCALL SDL_Vulkan_GetVkGetInstanceProcAddr(void)</div><div class="ttdoc">Get the address of the vkGetInstanceProcAddr function.</div></div> <div class="ttc" id="SDL__vulkan_8h_html_a92970fb6bc833a8cc65217638d599ff2"><div class="ttname"><a href="SDL__vulkan_8h.html#a92970fb6bc833a8cc65217638d599ff2">SDL_Vulkan_UnloadLibrary</a></div><div class="ttdeci">DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void)</div><div class="ttdoc">Unload the Vulkan loader library previously loaded by SDL_Vulkan_LoadLibrary().</div></div> </div><!-- fragment --></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.15 </small></address> </body> </html>