Platformer in OpenGL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

366 lines
24 KiB

5 years ago
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.11"/>
  7. <title>GLFW: Initialization, version and error reference</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  12. <script type="text/javascript" src="search/searchdata.js"></script>
  13. <script type="text/javascript" src="search/search.js"></script>
  14. <script type="text/javascript">
  15. $(document).ready(function() { init_search(); });
  16. </script>
  17. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  18. <link href="extra.css" rel="stylesheet" type="text/css"/>
  19. </head>
  20. <body>
  21. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  22. <div id="titlearea">
  23. <div class="glfwheader">
  24. <a href="http://www.glfw.org/" id="glfwhome">GLFW</a>
  25. <ul class="glfwnavbar">
  26. <li><a href="http://www.glfw.org/documentation.html">Documentation</a></li>
  27. <li><a href="http://www.glfw.org/download.html">Download</a></li>
  28. <li><a href="http://www.glfw.org/media.html">Media</a></li>
  29. <li><a href="http://www.glfw.org/community.html">Community</a></li>
  30. </ul>
  31. </div>
  32. </div>
  33. <!-- end header part -->
  34. <!-- Generated by Doxygen 1.8.11 -->
  35. <script type="text/javascript">
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. </script>
  38. <div id="navrow1" class="tabs">
  39. <ul class="tablist">
  40. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  41. <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
  42. <li class="current"><a href="modules.html"><span>Modules</span></a></li>
  43. <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
  44. <li><a href="files.html"><span>Files</span></a></li>
  45. <li>
  46. <div id="MSearchBox" class="MSearchBoxInactive">
  47. <span class="left">
  48. <img id="MSearchSelect" src="search/mag_sel.png"
  49. onmouseover="return searchBox.OnSearchSelectShow()"
  50. onmouseout="return searchBox.OnSearchSelectHide()"
  51. alt=""/>
  52. <input type="text" id="MSearchField" value="Search" accesskey="S"
  53. onfocus="searchBox.OnSearchFieldFocus(true)"
  54. onblur="searchBox.OnSearchFieldFocus(false)"
  55. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  56. </span><span class="right">
  57. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  58. </span>
  59. </div>
  60. </li>
  61. </ul>
  62. </div>
  63. </div><!-- top -->
  64. <!-- window showing the filter options -->
  65. <div id="MSearchSelectWindow"
  66. onmouseover="return searchBox.OnSearchSelectShow()"
  67. onmouseout="return searchBox.OnSearchSelectHide()"
  68. onkeydown="return searchBox.OnSearchSelectKey(event)">
  69. </div>
  70. <!-- iframe showing the search results (closed by default) -->
  71. <div id="MSearchResultsWindow">
  72. <iframe src="javascript:void(0)" frameborder="0"
  73. name="MSearchResults" id="MSearchResults">
  74. </iframe>
  75. </div>
  76. <div class="header">
  77. <div class="summary">
  78. <a href="#groups">Modules</a> &#124;
  79. <a href="#typedef-members">Typedefs</a> &#124;
  80. <a href="#func-members">Functions</a> </div>
  81. <div class="headertitle">
  82. <div class="title">Initialization, version and error reference</div> </div>
  83. </div><!--header-->
  84. <div class="contents">
  85. <table class="memberdecls">
  86. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
  87. Modules</h2></td></tr>
  88. <tr class="memitem:group__errors"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html">Error codes</a></td></tr>
  89. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. </table><table class="memberdecls">
  91. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
  92. Typedefs</h2></td></tr>
  93. <tr class="memitem:ga6b8a2639706d5c409fc1287e8f55e928"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga6b8a2639706d5c409fc1287e8f55e928">GLFWerrorfun</a>) (int, const char *)</td></tr>
  94. <tr class="memdesc:ga6b8a2639706d5c409fc1287e8f55e928"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function signature for error callbacks. <a href="#ga6b8a2639706d5c409fc1287e8f55e928">More...</a><br /></td></tr>
  95. <tr class="separator:ga6b8a2639706d5c409fc1287e8f55e928"><td class="memSeparator" colspan="2">&#160;</td></tr>
  96. </table><table class="memberdecls">
  97. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  98. Functions</h2></td></tr>
  99. <tr class="memitem:ga317aac130a235ab08c6db0834907d85e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a> (void)</td></tr>
  100. <tr class="memdesc:ga317aac130a235ab08c6db0834907d85e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the GLFW library. <a href="#ga317aac130a235ab08c6db0834907d85e">More...</a><br /></td></tr>
  101. <tr class="separator:ga317aac130a235ab08c6db0834907d85e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  102. <tr class="memitem:gaaae48c0a18607ea4a4ba951d939f0901"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a> (void)</td></tr>
  103. <tr class="memdesc:gaaae48c0a18607ea4a4ba951d939f0901"><td class="mdescLeft">&#160;</td><td class="mdescRight">Terminates the GLFW library. <a href="#gaaae48c0a18607ea4a4ba951d939f0901">More...</a><br /></td></tr>
  104. <tr class="separator:gaaae48c0a18607ea4a4ba951d939f0901"><td class="memSeparator" colspan="2">&#160;</td></tr>
  105. <tr class="memitem:ga9f8ffaacf3c269cc48eafbf8b9b71197"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197">glfwGetVersion</a> (int *major, int *minor, int *rev)</td></tr>
  106. <tr class="memdesc:ga9f8ffaacf3c269cc48eafbf8b9b71197"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the version of the GLFW library. <a href="#ga9f8ffaacf3c269cc48eafbf8b9b71197">More...</a><br /></td></tr>
  107. <tr class="separator:ga9f8ffaacf3c269cc48eafbf8b9b71197"><td class="memSeparator" colspan="2">&#160;</td></tr>
  108. <tr class="memitem:ga23d47dc013fce2bf58036da66079a657"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga23d47dc013fce2bf58036da66079a657">glfwGetVersionString</a> (void)</td></tr>
  109. <tr class="memdesc:ga23d47dc013fce2bf58036da66079a657"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a string describing the compile-time configuration. <a href="#ga23d47dc013fce2bf58036da66079a657">More...</a><br /></td></tr>
  110. <tr class="separator:ga23d47dc013fce2bf58036da66079a657"><td class="memSeparator" colspan="2">&#160;</td></tr>
  111. <tr class="memitem:gaa5d796c3cf7c1a7f02f845486333fb5f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__init.html#ga6b8a2639706d5c409fc1287e8f55e928">GLFWerrorfun</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#gaa5d796c3cf7c1a7f02f845486333fb5f">glfwSetErrorCallback</a> (<a class="el" href="group__init.html#ga6b8a2639706d5c409fc1287e8f55e928">GLFWerrorfun</a> cbfun)</td></tr>
  112. <tr class="memdesc:gaa5d796c3cf7c1a7f02f845486333fb5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the error callback. <a href="#gaa5d796c3cf7c1a7f02f845486333fb5f">More...</a><br /></td></tr>
  113. <tr class="separator:gaa5d796c3cf7c1a7f02f845486333fb5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  114. </table><table class="memberdecls">
  115. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
  116. GLFW version macros</h2></td></tr>
  117. <tr class="memitem:ga6337d9ea43b22fc529b2bba066b4a576"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga6337d9ea43b22fc529b2bba066b4a576">GLFW_VERSION_MAJOR</a>&#160;&#160;&#160;3</td></tr>
  118. <tr class="memdesc:ga6337d9ea43b22fc529b2bba066b4a576"><td class="mdescLeft">&#160;</td><td class="mdescRight">The major version number of the GLFW library. <a href="#ga6337d9ea43b22fc529b2bba066b4a576">More...</a><br /></td></tr>
  119. <tr class="separator:ga6337d9ea43b22fc529b2bba066b4a576"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:gaf80d40f0aea7088ff337606e9c48f7a3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#gaf80d40f0aea7088ff337606e9c48f7a3">GLFW_VERSION_MINOR</a>&#160;&#160;&#160;2</td></tr>
  121. <tr class="memdesc:gaf80d40f0aea7088ff337606e9c48f7a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">The minor version number of the GLFW library. <a href="#gaf80d40f0aea7088ff337606e9c48f7a3">More...</a><br /></td></tr>
  122. <tr class="separator:gaf80d40f0aea7088ff337606e9c48f7a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <tr class="memitem:gab72ae2e2035d9ea461abc3495eac0502"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#gab72ae2e2035d9ea461abc3495eac0502">GLFW_VERSION_REVISION</a>&#160;&#160;&#160;1</td></tr>
  124. <tr class="memdesc:gab72ae2e2035d9ea461abc3495eac0502"><td class="mdescLeft">&#160;</td><td class="mdescRight">The revision number of the GLFW library. <a href="#gab72ae2e2035d9ea461abc3495eac0502">More...</a><br /></td></tr>
  125. <tr class="separator:gab72ae2e2035d9ea461abc3495eac0502"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. </table>
  127. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  128. <p>This is the reference documentation for initialization and termination of the library, version management and error handling. For more task-oriented information, see the <a class="el" href="intro_guide.html">Introduction to the API</a>. </p>
  129. <h2 class="groupheader">Macro Definition Documentation</h2>
  130. <a class="anchor" id="ga6337d9ea43b22fc529b2bba066b4a576"></a>
  131. <div class="memitem">
  132. <div class="memproto">
  133. <table class="memname">
  134. <tr>
  135. <td class="memname">#define GLFW_VERSION_MAJOR&#160;&#160;&#160;3</td>
  136. </tr>
  137. </table>
  138. </div><div class="memdoc">
  139. <p>This is incremented when the API is changed in non-compatible ways. </p>
  140. </div>
  141. </div>
  142. <a class="anchor" id="gaf80d40f0aea7088ff337606e9c48f7a3"></a>
  143. <div class="memitem">
  144. <div class="memproto">
  145. <table class="memname">
  146. <tr>
  147. <td class="memname">#define GLFW_VERSION_MINOR&#160;&#160;&#160;2</td>
  148. </tr>
  149. </table>
  150. </div><div class="memdoc">
  151. <p>This is incremented when features are added to the API but it remains backward-compatible. </p>
  152. </div>
  153. </div>
  154. <a class="anchor" id="gab72ae2e2035d9ea461abc3495eac0502"></a>
  155. <div class="memitem">
  156. <div class="memproto">
  157. <table class="memname">
  158. <tr>
  159. <td class="memname">#define GLFW_VERSION_REVISION&#160;&#160;&#160;1</td>
  160. </tr>
  161. </table>
  162. </div><div class="memdoc">
  163. <p>This is incremented when a bug fix release is made that does not contain any API changes. </p>
  164. </div>
  165. </div>
  166. <h2 class="groupheader">Typedef Documentation</h2>
  167. <a class="anchor" id="ga6b8a2639706d5c409fc1287e8f55e928"></a>
  168. <div class="memitem">
  169. <div class="memproto">
  170. <table class="memname">
  171. <tr>
  172. <td class="memname">typedef void(* GLFWerrorfun) (int, const char *)</td>
  173. </tr>
  174. </table>
  175. </div><div class="memdoc">
  176. <p>This is the function signature for error callback functions.</p>
  177. <dl class="params"><dt>Parameters</dt><dd>
  178. <table class="params">
  179. <tr><td class="paramdir">[in]</td><td class="paramname">error</td><td>An <a class="el" href="group__errors.html">error code</a>. </td></tr>
  180. <tr><td class="paramdir">[in]</td><td class="paramname">description</td><td>A UTF-8 encoded string describing the error.</td></tr>
  181. </table>
  182. </dd>
  183. </dl>
  184. <dl class="section see"><dt>See also</dt><dd><a class="el" href="intro_guide.html#error_handling">Error handling</a> </dd>
  185. <dd>
  186. <a class="el" href="group__init.html#gaa5d796c3cf7c1a7f02f845486333fb5f" title="Sets the error callback. ">glfwSetErrorCallback</a></dd></dl>
  187. <dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
  188. </div>
  189. </div>
  190. <h2 class="groupheader">Function Documentation</h2>
  191. <a class="anchor" id="ga9f8ffaacf3c269cc48eafbf8b9b71197"></a>
  192. <div class="memitem">
  193. <div class="memproto">
  194. <table class="memname">
  195. <tr>
  196. <td class="memname">void glfwGetVersion </td>
  197. <td>(</td>
  198. <td class="paramtype">int *&#160;</td>
  199. <td class="paramname"><em>major</em>, </td>
  200. </tr>
  201. <tr>
  202. <td class="paramkey"></td>
  203. <td></td>
  204. <td class="paramtype">int *&#160;</td>
  205. <td class="paramname"><em>minor</em>, </td>
  206. </tr>
  207. <tr>
  208. <td class="paramkey"></td>
  209. <td></td>
  210. <td class="paramtype">int *&#160;</td>
  211. <td class="paramname"><em>rev</em>&#160;</td>
  212. </tr>
  213. <tr>
  214. <td></td>
  215. <td>)</td>
  216. <td></td><td></td>
  217. </tr>
  218. </table>
  219. </div><div class="memdoc">
  220. <p>This function retrieves the major, minor and revision numbers of the GLFW library. It is intended for when you are using GLFW as a shared library and want to ensure that you are using the minimum required version.</p>
  221. <p>Any or all of the version arguments may be <code>NULL</code>.</p>
  222. <dl class="params"><dt>Parameters</dt><dd>
  223. <table class="params">
  224. <tr><td class="paramdir">[out]</td><td class="paramname">major</td><td>Where to store the major version number, or <code>NULL</code>. </td></tr>
  225. <tr><td class="paramdir">[out]</td><td class="paramname">minor</td><td>Where to store the minor version number, or <code>NULL</code>. </td></tr>
  226. <tr><td class="paramdir">[out]</td><td class="paramname">rev</td><td>Where to store the revision number, or <code>NULL</code>.</td></tr>
  227. </table>
  228. </dd>
  229. </dl>
  230. <dl class="section user"><dt>Errors</dt><dd>None.</dd></dl>
  231. <dl class="section remark"><dt>Remarks</dt><dd>This function may be called before <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>.</dd></dl>
  232. <dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
  233. <dl class="section see"><dt>See also</dt><dd><a class="el" href="intro_guide.html#intro_version">Version management</a> </dd>
  234. <dd>
  235. <a class="el" href="group__init.html#ga23d47dc013fce2bf58036da66079a657" title="Returns a string describing the compile-time configuration. ">glfwGetVersionString</a></dd></dl>
  236. <dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
  237. </div>
  238. </div>
  239. <a class="anchor" id="ga23d47dc013fce2bf58036da66079a657"></a>
  240. <div class="memitem">
  241. <div class="memproto">
  242. <table class="memname">
  243. <tr>
  244. <td class="memname">const char* glfwGetVersionString </td>
  245. <td>(</td>
  246. <td class="paramtype">void&#160;</td>
  247. <td class="paramname"></td><td>)</td>
  248. <td></td>
  249. </tr>
  250. </table>
  251. </div><div class="memdoc">
  252. <p>This function returns the compile-time generated <a class="el" href="intro_guide.html#intro_version_string">version string</a> of the GLFW library binary. It describes the version, platform, compiler and any platform-specific compile-time options. It should not be confused with the OpenGL or OpenGL ES version string, queried with <code>glGetString</code>.</p>
  253. <p><b>Do not use the version string</b> to parse the GLFW library version. The <a class="el" href="group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197">glfwGetVersion</a> function provides the version of the running library binary in numerical format.</p>
  254. <dl class="section return"><dt>Returns</dt><dd>The ASCII encoded GLFW version string.</dd></dl>
  255. <dl class="section user"><dt>Errors</dt><dd>None.</dd></dl>
  256. <dl class="section remark"><dt>Remarks</dt><dd>This function may be called before <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>.</dd></dl>
  257. <dl class="section user"><dt>Pointer lifetime</dt><dd>The returned string is static and compile-time generated.</dd></dl>
  258. <dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
  259. <dl class="section see"><dt>See also</dt><dd><a class="el" href="intro_guide.html#intro_version">Version management</a> </dd>
  260. <dd>
  261. <a class="el" href="group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197" title="Retrieves the version of the GLFW library. ">glfwGetVersion</a></dd></dl>
  262. <dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
  263. </div>
  264. </div>
  265. <a class="anchor" id="ga317aac130a235ab08c6db0834907d85e"></a>
  266. <div class="memitem">
  267. <div class="memproto">
  268. <table class="memname">
  269. <tr>
  270. <td class="memname">int glfwInit </td>
  271. <td>(</td>
  272. <td class="paramtype">void&#160;</td>
  273. <td class="paramname"></td><td>)</td>
  274. <td></td>
  275. </tr>
  276. </table>
  277. </div><div class="memdoc">
  278. <p>This function initializes the GLFW library. Before most GLFW functions can be used, GLFW must be initialized, and before an application terminates GLFW should be terminated in order to free any resources allocated during or after initialization.</p>
  279. <p>If this function fails, it calls <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a> before returning. If it succeeds, you should call <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a> before the application exits.</p>
  280. <p>Additional calls to this function after successful initialization but before termination will return <code>GLFW_TRUE</code> immediately.</p>
  281. <dl class="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if successful, or <code>GLFW_FALSE</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
  282. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
  283. <dl class="section remark"><dt>Remarks</dt><dd><b>OS X:</b> This function will change the current directory of the application to the <code>Contents/Resources</code> subdirectory of the application's bundle, if present. This can be disabled with a <a class="el" href="compile_guide.html#compile_options_osx">compile-time option</a>.</dd></dl>
  284. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  285. <dl class="section see"><dt>See also</dt><dd><a class="el" href="intro_guide.html#intro_init">Initialization and termination</a> </dd>
  286. <dd>
  287. <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901" title="Terminates the GLFW library. ">glfwTerminate</a></dd></dl>
  288. <dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
  289. </div>
  290. </div>
  291. <a class="anchor" id="gaa5d796c3cf7c1a7f02f845486333fb5f"></a>
  292. <div class="memitem">
  293. <div class="memproto">
  294. <table class="memname">
  295. <tr>
  296. <td class="memname"><a class="el" href="group__init.html#ga6b8a2639706d5c409fc1287e8f55e928">GLFWerrorfun</a> glfwSetErrorCallback </td>
  297. <td>(</td>
  298. <td class="paramtype"><a class="el" href="group__init.html#ga6b8a2639706d5c409fc1287e8f55e928">GLFWerrorfun</a>&#160;</td>
  299. <td class="paramname"><em>cbfun</em></td><td>)</td>
  300. <td></td>
  301. </tr>
  302. </table>
  303. </div><div class="memdoc">
  304. <p>This function sets the error callback, which is called with an error code and a human-readable description each time a GLFW error occurs.</p>
  305. <p>The error callback is called on the thread where the error occurred. If you are using GLFW from multiple threads, your error callback needs to be written accordingly.</p>
  306. <p>Because the description string may have been generated specifically for that error, it is not guaranteed to be valid after the callback has returned. If you wish to use it after the callback returns, you need to make a copy.</p>
  307. <p>Once set, the error callback remains set even after the library has been terminated.</p>
  308. <dl class="params"><dt>Parameters</dt><dd>
  309. <table class="params">
  310. <tr><td class="paramdir">[in]</td><td class="paramname">cbfun</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
  311. </table>
  312. </dd>
  313. </dl>
  314. <dl class="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set.</dd></dl>
  315. <dl class="section user"><dt>Errors</dt><dd>None.</dd></dl>
  316. <dl class="section remark"><dt>Remarks</dt><dd>This function may be called before <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>.</dd></dl>
  317. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  318. <dl class="section see"><dt>See also</dt><dd><a class="el" href="intro_guide.html#error_handling">Error handling</a></dd></dl>
  319. <dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
  320. </div>
  321. </div>
  322. <a class="anchor" id="gaaae48c0a18607ea4a4ba951d939f0901"></a>
  323. <div class="memitem">
  324. <div class="memproto">
  325. <table class="memname">
  326. <tr>
  327. <td class="memname">void glfwTerminate </td>
  328. <td>(</td>
  329. <td class="paramtype">void&#160;</td>
  330. <td class="paramname"></td><td>)</td>
  331. <td></td>
  332. </tr>
  333. </table>
  334. </div><div class="memdoc">
  335. <p>This function destroys all remaining windows and cursors, restores any modified gamma ramps and frees any other allocated resources. Once this function is called, you must again call <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a> successfully before you will be able to use most GLFW functions.</p>
  336. <p>If GLFW has been successfully initialized, this function should be called before the application exits. If initialization fails, there is no need to call this function, as it is called by <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a> before it returns failure.</p>
  337. <dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
  338. <dl class="section remark"><dt>Remarks</dt><dd>This function may be called before <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>.</dd></dl>
  339. <dl class="section warning"><dt>Warning</dt><dd>The contexts of any remaining windows must not be current on any other thread when this function is called.</dd></dl>
  340. <dl class="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
  341. <dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
  342. <dl class="section see"><dt>See also</dt><dd><a class="el" href="intro_guide.html#intro_init">Initialization and termination</a> </dd>
  343. <dd>
  344. <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e" title="Initializes the GLFW library. ">glfwInit</a></dd></dl>
  345. <dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
  346. </div>
  347. </div>
  348. </div><!-- contents -->
  349. <address class="footer">
  350. <p>
  351. Last update on Thu Aug 18 2016 for GLFW 3.2.1
  352. </p>
  353. </address>
  354. </body>
  355. </html>