mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 01:19:19 +02:00
maintenance: glew update to v 2.1.0, glfw update to v3.3
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<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.11"/>
|
||||
<meta name="generator" content="Doxygen 1.8.15"/>
|
||||
<title>GLFW: Context reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
@@ -11,9 +11,6 @@
|
||||
<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>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() { init_search(); });
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
@@ -21,45 +18,31 @@
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="http://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="http://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="http://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="http://www.glfw.org/media.html">Media</a></li>
|
||||
<li><a href="http://www.glfw.org/community.html">Community</a></li>
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.11 -->
|
||||
<!-- 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>
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
||||
<li class="current"><a href="modules.html"><span>Modules</span></a></li>
|
||||
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||
<li><a href="files.html"><span>Files</span></a></li>
|
||||
<li>
|
||||
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<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"
|
||||
@@ -83,6 +66,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
<div class="title">Context reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
|
||||
<p>This is the reference documentation for OpenGL and OpenGL ES context related functions. For more task-oriented information, see the <a class="el" href="context_guide.html">Context guide</a>. </p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
|
||||
Typedefs</h2></td></tr>
|
||||
@@ -108,10 +93,10 @@ Functions</h2></td></tr>
|
||||
<tr class="memdesc:ga35f1837e6f666781842483937612f163"><td class="mdescLeft"> </td><td class="mdescRight">Returns the address of the specified function for the current context. <a href="#ga35f1837e6f666781842483937612f163">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga35f1837e6f666781842483937612f163"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<p>This is the reference documentation for OpenGL and OpenGL ES context related functions. For more task-oriented information, see the <a class="el" href="context_guide.html">Context guide</a>. </p>
|
||||
<h2 class="groupheader">Typedef Documentation</h2>
|
||||
<a class="anchor" id="ga3d47c2d2fbe0be9c505d0e04e91a133c"></a>
|
||||
<a id="ga3d47c2d2fbe0be9c505d0e04e91a133c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga3d47c2d2fbe0be9c505d0e04e91a133c">◆ </a></span>GLFWglproc</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
@@ -123,13 +108,112 @@ Functions</h2></td></tr>
|
||||
<p>Generic function pointer used for returning client API function pointers without forcing a cast from a regular pointer.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="context_guide.html#context_glext">OpenGL and OpenGL ES extensions</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__context.html#ga35f1837e6f666781842483937612f163" title="Returns the address of the specified function for the current context. ">glfwGetProcAddress</a></dd></dl>
|
||||
<a class="el" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a class="anchor" id="ga87425065c011cef1ebd6aac75e059dfa"></a>
|
||||
<a id="ga1c04dc242268f827290fe40aa1c91157"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga1c04dc242268f827290fe40aa1c91157">◆ </a></span>glfwMakeContextCurrent()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void glfwMakeContextCurrent </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * </td>
|
||||
<td class="paramname"><em>window</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>This function makes the OpenGL or OpenGL ES context of the specified window current on the calling thread. A context must only be made current on a single thread at a time and each thread can have only a single current context at a time.</p>
|
||||
<p>When moving a context between threads, you must make it non-current on the old thread before making it current on the new one.</p>
|
||||
<p>By default, making a context non-current implicitly forces a pipeline flush. On machines that support <code>GL_KHR_context_flush_control</code>, you can control whether a context performs this flush by setting the <a class="el" href="window_guide.html#GLFW_CONTEXT_RELEASE_BEHAVIOR_hint">GLFW_CONTEXT_RELEASE_BEHAVIOR</a> hint.</p>
|
||||
<p>The specified window must have an OpenGL or OpenGL ES context. Specifying a window without a context will generate a <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> error.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose context to make current, or <code>NULL</code> to detach the current context.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<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#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="context_guide.html#context_current">Current context</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__context.html#gac84759b1f6c2d271a4fea8ae89ec980d">glfwGetCurrentContext</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gac84759b1f6c2d271a4fea8ae89ec980d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gac84759b1f6c2d271a4fea8ae89ec980d">◆ </a></span>glfwGetCurrentContext()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* glfwGetCurrentContext </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>This function returns the window whose OpenGL or OpenGL ES context is current on the calling thread.</p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The window whose context is current, or <code>NULL</code> if no window's context is current.</dd></dl>
|
||||
<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>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="context_guide.html#context_current">Current context</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__context.html#ga1c04dc242268f827290fe40aa1c91157">glfwMakeContextCurrent</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga6d4e0cdf151b5e579bd67f13202994ed"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga6d4e0cdf151b5e579bd67f13202994ed">◆ </a></span>glfwSwapInterval()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void glfwSwapInterval </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>interval</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>This function sets the swap interval for the current OpenGL or OpenGL ES context, i.e. the number of screen updates to wait from the time <a class="el" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a> was called before swapping the buffers and returning. This is sometimes called <em>vertical synchronization</em>, <em>vertical retrace synchronization</em> or just <em>vsync</em>.</p>
|
||||
<p>A context that supports either of the <code>WGL_EXT_swap_control_tear</code> and <code>GLX_EXT_swap_control_tear</code> extensions also accepts <em>negative</em> swap intervals, which allows the driver to swap immediately even if a frame arrives a little bit late. You can check for these extensions with <a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a>.</p>
|
||||
<p>A context must be current on the calling thread. Calling this function without a current context will cause a <a class="el" href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> error.</p>
|
||||
<p>This function does not apply to Vulkan. If you are rendering with Vulkan, see the present mode of your swapchain instead.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">interval</td><td>The minimum number of screen updates to wait for until the buffers are swapped by <a class="el" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a>.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<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#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>This function is not called during context creation, leaving the swap interval set to whatever is the default on that platform. This is done because some swap interval extensions used by GLFW do not allow the swap interval to be reset to zero once it has been set to a non-zero value.</dd>
|
||||
<dd>
|
||||
Some GPU drivers do not honor the requested swap interval, either because of a user setting that overrides the application's request or due to bugs in the driver.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="window_guide.html#buffer_swap">Buffer swapping</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga87425065c011cef1ebd6aac75e059dfa"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga87425065c011cef1ebd6aac75e059dfa">◆ </a></span>glfwExtensionSupported()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
@@ -157,36 +241,14 @@ Functions</h2></td></tr>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="context_guide.html#context_glext">OpenGL and OpenGL ES extensions</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__context.html#ga35f1837e6f666781842483937612f163" title="Returns the address of the specified function for the current context. ">glfwGetProcAddress</a></dd></dl>
|
||||
<a class="el" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="gac84759b1f6c2d271a4fea8ae89ec980d"></a>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* glfwGetCurrentContext </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>This function returns the window whose OpenGL or OpenGL ES context is current on the calling thread.</p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The window whose context is current, or <code>NULL</code> if no window's context is current.</dd></dl>
|
||||
<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>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="context_guide.html#context_current">Current context</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__context.html#ga1c04dc242268f827290fe40aa1c91157" title="Makes the context of the specified window current for the calling thread. ">glfwMakeContextCurrent</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
<a id="ga35f1837e6f666781842483937612f163"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga35f1837e6f666781842483937612f163">◆ </a></span>glfwGetProcAddress()</h2>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="ga35f1837e6f666781842483937612f163"></a>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
@@ -217,73 +279,7 @@ This function may return a non-<code>NULL</code> address despite the associated
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="context_guide.html#context_glext">OpenGL and OpenGL ES extensions</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa" title="Returns whether the specified extension is available. ">glfwExtensionSupported</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="ga1c04dc242268f827290fe40aa1c91157"></a>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void glfwMakeContextCurrent </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * </td>
|
||||
<td class="paramname"><em>window</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>This function makes the OpenGL or OpenGL ES context of the specified window current on the calling thread. A context can only be made current on a single thread at a time and each thread can have only a single current context at a time.</p>
|
||||
<p>By default, making a context non-current implicitly forces a pipeline flush. On machines that support <code>GL_KHR_context_flush_control</code>, you can control whether a context performs this flush by setting the <a class="el" href="window_guide.html#window_hints_ctx">GLFW_CONTEXT_RELEASE_BEHAVIOR</a> window hint.</p>
|
||||
<p>The specified window must have an OpenGL or OpenGL ES context. Specifying a window without a context will generate a <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> error.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose context to make current, or <code>NULL</code> to detach the current context.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<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#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="context_guide.html#context_current">Current context</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__context.html#gac84759b1f6c2d271a4fea8ae89ec980d" title="Returns the window whose context is current on the calling thread. ">glfwGetCurrentContext</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a class="anchor" id="ga6d4e0cdf151b5e579bd67f13202994ed"></a>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void glfwSwapInterval </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>interval</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>This function sets the swap interval for the current OpenGL or OpenGL ES context, i.e. the number of screen updates to wait from the time <a class="el" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a> was called before swapping the buffers and returning. This is sometimes called <em>vertical synchronization</em>, <em>vertical retrace synchronization</em> or just <em>vsync</em>.</p>
|
||||
<p>Contexts that support either of the <code>WGL_EXT_swap_control_tear</code> and <code>GLX_EXT_swap_control_tear</code> extensions also accept negative swap intervals, which allow the driver to swap even if a frame arrives a little bit late. You can check for the presence of these extensions using <a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a>. For more information about swap tearing, see the extension specifications.</p>
|
||||
<p>A context must be current on the calling thread. Calling this function without a current context will cause a <a class="el" href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> error.</p>
|
||||
<p>This function does not apply to Vulkan. If you are rendering with Vulkan, see the present mode of your swapchain instead.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">interval</td><td>The minimum number of screen updates to wait for until the buffers are swapped by <a class="el" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a>.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<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#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>This function is not called during context creation, leaving the swap interval set to whatever is the default on that platform. This is done because some swap interval extensions used by GLFW do not allow the swap interval to be reset to zero once it has been set to a non-zero value.</dd>
|
||||
<dd>
|
||||
Some GPU drivers do not honor the requested swap interval, either because of a user setting that overrides the application's request or due to bugs in the driver.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="window_guide.html#buffer_swap">Buffer swapping</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14" title="Swaps the front and back buffers of the specified window. ">glfwSwapBuffers</a></dd></dl>
|
||||
<a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
@@ -291,7 +287,7 @@ Some GPU drivers do not honor the requested swap interval, either because of a u
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Thu Aug 18 2016 for GLFW 3.2.1
|
||||
Last update on Tue Apr 16 2019 for GLFW 3.3.0
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user