mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-05 01:45:05 +01:00
291 lines
27 KiB
HTML
291 lines
27 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.3.1"/>
|
||
|
<title>GLFW: Moving from GLFW 2 to 3</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/search.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||
|
</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 style="padding-left: 0.5em;">
|
||
|
<div id="projectname">GLFW
|
||
|
 <span id="projectnumber">3.0.2</span>
|
||
|
</div>
|
||
|
<div id="projectbrief">A multi-platform library for OpenGL, window and input</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<!-- end header part -->
|
||
|
<!-- Generated by Doxygen 1.8.3.1 -->
|
||
|
<script type="text/javascript">
|
||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||
|
</script>
|
||
|
<div id="navrow1" class="tabs">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
<li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
|
||
|
<li><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>
|
||
|
<!-- window showing the filter options -->
|
||
|
<div id="MSearchSelectWindow"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Pages</a></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><!-- top -->
|
||
|
<div class="header">
|
||
|
<div class="headertitle">
|
||
|
<div class="title">Moving from GLFW 2 to 3 </div> </div>
|
||
|
</div><!--header-->
|
||
|
<div class="contents">
|
||
|
<div class="toc"><h3>Table of Contents</h3>
|
||
|
<ul><li class="level1"><a href="#moving_removed">Removed features</a><ul><li class="level2"><a href="#moving_threads">Threading functions</a></li>
|
||
|
<li class="level2"><a href="#moving_image">Image and texture loading</a></li>
|
||
|
<li class="level2"><a href="#moving_char_up">Character actions</a></li>
|
||
|
<li class="level2"><a href="#moving_wheel">Mouse wheel position</a></li>
|
||
|
<li class="level2"><a href="#moving_stdcall">GLFWCALL macro</a></li>
|
||
|
<li class="level2"><a href="#moving_mbcs">Win32 MBCS support</a></li>
|
||
|
<li class="level2"><a href="#moving_windows">Support for versions of Windows older than XP</a></li>
|
||
|
<li class="level2"><a href="#moving_syskeys">Capture of system-wide hotkeys</a></li>
|
||
|
<li class="level2"><a href="#moving_opened">Window open parameter</a></li>
|
||
|
<li class="level2"><a href="#moving_autopoll">Automatic polling of events</a></li>
|
||
|
<li class="level2"><a href="#moving_terminate">Automatic termination</a></li>
|
||
|
<li class="level2"><a href="#moving_glu">GLU header inclusion</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li class="level1"><a href="#moving_changed">Changes to existing features</a><ul><li class="level2"><a href="#moving_window_handles">Window handles</a></li>
|
||
|
<li class="level2"><a href="#moving_monitor">Multi-monitor support</a></li>
|
||
|
<li class="level2"><a href="#moving_window_close">Window closing</a></li>
|
||
|
<li class="level2"><a href="#moving_context">Explicit context management</a></li>
|
||
|
<li class="level2"><a href="#moving_repeat">Key repeat</a></li>
|
||
|
<li class="level2"><a href="#moving_keys">Physical key input</a></li>
|
||
|
<li class="level2"><a href="#moving_joystick">Joystick input</a></li>
|
||
|
<li class="level2"><a href="#moving_video_modes">Video mode enumeration</a></li>
|
||
|
<li class="level2"><a href="#moving_cursor">Cursor positioning</a></li>
|
||
|
<li class="level2"><a href="#moving_hints">Persistent window hints</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li class="level1"><a href="#moving_renamed">Name changes</a><ul><li class="level2"><a href="#moving_renamed_files">Library and header file</a></li>
|
||
|
<li class="level2"><a href="#moving_renamed_functions">Functions</a></li>
|
||
|
<li class="level2"><a href="#moving_renamed_tokens">Tokens</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="textblock"><p>This is a transition guide for moving from GLFW 2 to 3. It describes what has changed or been removed, but does <em>not</em> include <a class="el" href="news.html">new features</a> unless they are required when moving an existing code base onto the new API. For example, use of the new multi-monitor functions are required to create full screen windows with GLFW 3.</p>
|
||
|
<h1><a class="anchor" id="moving_removed"></a>
|
||
|
Removed features</h1>
|
||
|
<h2><a class="anchor" id="moving_threads"></a>
|
||
|
Threading functions</h2>
|
||
|
<p>The threading functions have been removed, including the sleep function. They were fairly primitive, under-used, poorly integrated and took time away from the focus of GLFW (i.e. context, input and window). There are better threading libraries available and native threading support is available in both C++11 and C11, both of which are gaining traction.</p>
|
||
|
<p>If you wish to use the C++11 or C11 facilities but your compiler doesn't yet support them, see the <a href="https://gitorious.org/tinythread/tinythreadpp">TinyThread++</a> and <a href="https://gitorious.org/tinythread/tinycthread">TinyCThread</a> projects created by the original author of GLFW. These libraries implement a usable subset of the threading APIs in C++11 and C11, and in fact some GLFW 3 test programs use TinyCThread.</p>
|
||
|
<p>However, GLFW 3 has better support for <em>use from multiple threads</em> than GLFW 2 had. Contexts can be made current on and rendered with from secondary threads, and the documentation explicitly states which functions may be used from secondary threads and which may only be used from the main thread, i.e. the thread that calls main.</p>
|
||
|
<h2><a class="anchor" id="moving_image"></a>
|
||
|
Image and texture loading</h2>
|
||
|
<p>The image and texture loading functions have been removed. They only supported the Targa image format, making them mostly useful for beginner level examples. To become of sufficiently high quality to warrant keeping them in GLFW 3, they would need not only to support other formats, but also modern extensions to the OpenGL texturing facilities. This would either add a number of external dependencies (libjpeg, libpng, etc.), or force GLFW to ship with inline versions of these libraries.</p>
|
||
|
<p>As there already are libraries doing this, it seems unnecessary both to duplicate this work and to tie this duplicate to GLFW. Projects similar to GLFW, such as freeglut, could also gain from such a library. Also, would be no platform-specific part of such a library, as both OpenGL and stdio are available wherever GLFW is.</p>
|
||
|
<h2><a class="anchor" id="moving_char_up"></a>
|
||
|
Character actions</h2>
|
||
|
<p>The action parameter of the <a class="el" href="group__input.html#ga1103f1876518acecb5976f6b307c51d1">character callback</a> has been removed. This was an artefact of the origin of GLFW, i.e. being developed in English by a Swede. However, many keyboard layouts require more than one key to produce characters with diacritical marks. Even the Swedish keyboard layout requires this for uncommon cases like ü.</p>
|
||
|
<p>Note that this is only the removal of the <em>action parameter</em> of the character callback, <em>not</em> the removal of the character callback itself.</p>
|
||
|
<h2><a class="anchor" id="moving_wheel"></a>
|
||
|
Mouse wheel position</h2>
|
||
|
<p>The <code>glfwGetMouseWheel</code> function has been removed. Scroll events do not represent an absolute state, but is instead an interpretation of a relative change in state, like character input. So, like character input, there is no sane 'current state' to return. The mouse wheel callback has been replaced by a <a class="el" href="group__input.html#ga6228cdf94d28fbd3a9a1fbb0e5922a8a">scroll callback</a> that receives two-dimensional scroll offsets.</p>
|
||
|
<h2><a class="anchor" id="moving_stdcall"></a>
|
||
|
GLFWCALL macro</h2>
|
||
|
<p>The <code>GLFWCALL</code> macro, which made callback functions use <a href="http://msdn.microsoft.com/en-us/library/zxk0tw93.aspx">__stdcall</a> on Windows, has been removed. GLFW is written in C, not Pascal. Removing this macro means there's one less thing for users of GLFW to remember, i.e. the requirement to mark all callback functions with <code>GLFWCALL</code>. It also simplifies the creation of DLLs and DLL link libraries, as there's no need to explicitly disable <code>@n</code> entry point suffixes.</p>
|
||
|
<h2><a class="anchor" id="moving_mbcs"></a>
|
||
|
Win32 MBCS support</h2>
|
||
|
<p>The Win32 port of GLFW 3 will not compile in <a href="http://msdn.microsoft.com/en-us/library/5z097dxa.aspx">MBCS mode</a>. However, because the use of the Unicode version of the Win32 API doesn't affect the process as a whole, but only those windows created using it, it's perfectly possible to call MBCS functions from other parts of the same application. Therefore, even if an application using GLFW has MBCS mode code, there's no need for GLFW itself to support it.</p>
|
||
|
<h2><a class="anchor" id="moving_windows"></a>
|
||
|
Support for versions of Windows older than XP</h2>
|
||
|
<p>All explicit support for version of Windows older than XP has been removed. There is no code that actively prevents GLFW 3 from running on these earlier versions, but it uses Win32 functions that those versions lack.</p>
|
||
|
<p>Windows XP was released in 2001, and by now (2013) it has not only replaced almost all earlier versions of Windows, but is itself rapidly being replaced by Windows 7 and 8. The MSDN library doesn't even provide documentation for version older than Windows 2000, making it difficult to maintain compatibility with these versions even if it was deemed worth the effort.</p>
|
||
|
<p>The Win32 API has also not stood still, and GLFW 3 uses many functions only present on Windows XP or later. Even supporting an OS as new as XP (new from the perspective of GLFW 2, which still supports Windows 95) requires runtime checking for a number of functions that are present only on modern version of Windows.</p>
|
||
|
<h2><a class="anchor" id="moving_syskeys"></a>
|
||
|
Capture of system-wide hotkeys</h2>
|
||
|
<p>The ability to disable and capture system-wide hotkeys like Alt+Tab has been removed. Modern applications, whether they're games, scientific visualisations or something else, are nowadays expected to be good desktop citizens and allow these hotkeys to function even when running in full screen mode.</p>
|
||
|
<h2><a class="anchor" id="moving_opened"></a>
|
||
|
Window open parameter</h2>
|
||
|
<p>The <code>GLFW_OPENED</code> window parameter has been removed. As long as the <a class="el" href="window.html#window_object">window object</a> is around, the window is "open". To detect when the user attempts to close the window, see <a class="el" href="group__window.html#ga24e02fbfefbb81fc45320989f8140ab5">glfwWindowShouldClose</a> and the <a class="el" href="group__window.html#ga07cff8bd3b3d573ecf49bb02d7669c1f">close callback</a>.</p>
|
||
|
<h2><a class="anchor" id="moving_autopoll"></a>
|
||
|
Automatic polling of events</h2>
|
||
|
<p>GLFW 3 does not automatically poll for events on <a class="el" href="group__context.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a>, which means you need to call <a class="el" href="group__window.html#ga37bd57223967b4211d60ca1a0bf3c832">glfwPollEvents</a> or <a class="el" href="group__window.html#ga554e37d781f0a997656c26b2c56c835e">glfwWaitEvents</a> yourself. Unlike buffer swap, the event processing functions act on all windows at once.</p>
|
||
|
<h2><a class="anchor" id="moving_terminate"></a>
|
||
|
Automatic termination</h2>
|
||
|
<p>GLFW 3 does not register <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a> with <code>atexit</code> at initialization. To properly release all resources allocated by GLFW, you should therefore call <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a> yourself before exiting.</p>
|
||
|
<h2><a class="anchor" id="moving_glu"></a>
|
||
|
GLU header inclusion</h2>
|
||
|
<p>GLFW 3 does not include the GLU header by default and GLU itself has been deprecated, but you can request that the GLFW 3 header includes it by defining <code>GLFW_INCLUDE_GLU</code> before the inclusion of the GLFW 3 header.</p>
|
||
|
<h1><a class="anchor" id="moving_changed"></a>
|
||
|
Changes to existing features</h1>
|
||
|
<h2><a class="anchor" id="moving_window_handles"></a>
|
||
|
Window handles</h2>
|
||
|
<p>Because GLFW 3 supports multiple windows, window handle parameters have been added to all window-related GLFW functions and callbacks. The handle of a newly created window is returned by <a class="el" href="group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344">glfwCreateWindow</a> (formerly <code>glfwOpenWindow</code>). Window handles are of the <code>GLFWwindow*</code> type, i.e. a pointer to an opaque struct.</p>
|
||
|
<h2><a class="anchor" id="moving_monitor"></a>
|
||
|
Multi-monitor support</h2>
|
||
|
<p>GLFW 3 provides support for multiple monitors, adding the <code>GLFWmonitor*</code> handle type and a set of related functions. To request a full screen mode window, instead of passing <code>GLFW_FULLSCREEN</code> you specify which monitor you wish the window to use. There is <a class="el" href="group__monitor.html#ga721867d84c6d18d6790d64d2847ca0b1">glfwGetPrimaryMonitor</a> that provides behaviour similar to that of GLFW 2.</p>
|
||
|
<h2><a class="anchor" id="moving_window_close"></a>
|
||
|
Window closing</h2>
|
||
|
<p>Window closing is now just an event like any other. GLFW 3 windows won't disappear from underfoot even when no close callback is set; instead the window's close flag is set. You can query this flag using <a class="el" href="group__window.html#ga24e02fbfefbb81fc45320989f8140ab5">glfwWindowShouldClose</a>, or capture close events by setting a close callback. The close flag can be modified from any point in your program using <a class="el" href="group__window.html#ga49c449dde2a6f87d996f4daaa09d6708">glfwSetWindowShouldClose</a>.</p>
|
||
|
<h2><a class="anchor" id="moving_context"></a>
|
||
|
Explicit context management</h2>
|
||
|
<p>Each GLFW 3 window has its own OpenGL context and only you, the user, can know which context should be current on which thread at any given time. Therefore, GLFW 3 makes no assumptions about when you want a certain context to be current, leaving that decision to you.</p>
|
||
|
<p>This means, among other things, that you need to call <a class="el" href="group__context.html#ga1c04dc242268f827290fe40aa1c91157">glfwMakeContextCurrent</a> after creating a window before you can call any OpenGL functions.</p>
|
||
|
<h2><a class="anchor" id="moving_repeat"></a>
|
||
|
Key repeat</h2>
|
||
|
<p>The <code>GLFW_KEY_REPEAT</code> enable has been removed and key repeat is always enabled for both keys and characters. A new key action, <code>GLFW_REPEAT</code>, has been added to allow the <a class="el" href="group__input.html#ga592dd1919f8a1dc7576b13cdd8b7b695">key callback</a> to distinguish an initial key press from a repeat. Note that <a class="el" href="group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2">glfwGetKey</a> still returns only <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</p>
|
||
|
<h2><a class="anchor" id="moving_keys"></a>
|
||
|
Physical key input</h2>
|
||
|
<p>GLFW 3 key tokens map to physical keys, unlike in GLFW 2 where they mapped to the values generated by the current keyboard layout. The tokens are named according to the values they would have using the standard US layout, but this is only a convenience, as most programmers are assumed to know that layout. This means that (for example) <code>GLFW_KEY_LEFT_BRACKET</code> is always a single key and is the same key in the same place regardless of what keyboard layouts the users of your program has.</p>
|
||
|
<p>The key input facility was never meant for text input, although using it that way worked slightly better in GLFW 2. If you were using it to input text, you should be using the character callback instead, on both GLFW 2 and 3. This will give you the characters being input, as opposed to the keys being pressed.</p>
|
||
|
<p>GLFW 3 has key tokens for all keys on a standard 105 key keyboard, so instead of having to remember whether to check for <code>'a'</code> or <code>'A'</code>, you now check for <code>GLFW_KEY_A</code>.</p>
|
||
|
<h2><a class="anchor" id="moving_joystick"></a>
|
||
|
Joystick input</h2>
|
||
|
<p>The <code>glfwGetJoystickPos</code> function has been renamed to <a class="el" href="group__input.html#ga6271d46a5901ec2c99601ccf4dd14731">glfwGetJoystickAxes</a>.</p>
|
||
|
<p>The <code>glfwGetJoystickParam</code> function and the <code>GLFW_PRESENT</code>, <code>GLFW_AXES</code> and <code>GLFW_BUTTONS</code> tokens have been replaced by the <a class="el" href="group__input.html#gaffcbd9ac8ee737fcdd25475123a3c790">glfwJoystickPresent</a> function as well as axis and button counts returned by the <a class="el" href="group__input.html#ga6271d46a5901ec2c99601ccf4dd14731">glfwGetJoystickAxes</a> and <a class="el" href="group__input.html#gace54cd930dcd502e118fe4021384ce1b">glfwGetJoystickButtons</a> functions.</p>
|
||
|
<h2><a class="anchor" id="moving_video_modes"></a>
|
||
|
Video mode enumeration</h2>
|
||
|
<p>Video mode enumeration is now per-monitor. The <a class="el" href="group__monitor.html#ga820b0ce9a5237d645ea7cbb4bd383458">glfwGetVideoModes</a> function now returns all available modes for a specific monitor instead of requiring you to guess how large an array you need. The <code>glfwGetDesktopMode</code> function, which had poorly defined behavior, has been replaced by <a class="el" href="group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52">glfwGetVideoMode</a>, which returns the current mode of a monitor.</p>
|
||
|
<h2><a class="anchor" id="moving_cursor"></a>
|
||
|
Cursor positioning</h2>
|
||
|
<p>GLFW 3 only allows you to position the cursor within a window using <a class="el" href="group__input.html#ga04b03af936d906ca123c8f4ee08b39e7">glfwSetCursorPos</a> (formerly <code>glfwSetMousePos</code>) when that window is active. Unless the window is active, the function fails silently.</p>
|
||
|
<h2><a class="anchor" id="moving_hints"></a>
|
||
|
Persistent window hints</h2>
|
||
|
<p>Window hints are no longer reset to their default values on window creation, but instead retain their values until modified by <a class="el" href="group__window.html#ga4fd9e504bb937e79588a0ffdca9f620b">glfwWindowHint</a> (formerly <code>glfwOpenWindowHint</code>) or <a class="el" href="group__window.html#gaa77c4898dfb83344a6b4f76aa16b9a4a">glfwDefaultWindowHints</a>, or until the library is terminated and re-initialized.</p>
|
||
|
<h1><a class="anchor" id="moving_renamed"></a>
|
||
|
Name changes</h1>
|
||
|
<h2><a class="anchor" id="moving_renamed_files"></a>
|
||
|
Library and header file</h2>
|
||
|
<p>The GLFW 3 header is named <a class="el" href="glfw3_8h.html">glfw3.h</a> and moved to the <code>GLFW</code> directory, to avoid collisions with the headers of other major versions. Similarly, the GLFW 3 library is named <code>glfw3,</code> except when it's installed as a shared library on Unix-like systems, where it uses the <a href="https://en.wikipedia.org/wiki/soname">soname</a> <code>libglfw.so.3</code>.</p>
|
||
|
<h2><a class="anchor" id="moving_renamed_functions"></a>
|
||
|
Functions</h2>
|
||
|
<table class="doxtable">
|
||
|
<tr>
|
||
|
<th>GLFW 2 </th><th>GLFW 3 </th><th>Notes </th></tr>
|
||
|
<tr>
|
||
|
<td><code>glfwOpenWindow</code> </td><td><a class="el" href="group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344">glfwCreateWindow</a> </td><td>All channel bit depths are now hints </td></tr>
|
||
|
<tr>
|
||
|
<td><code>glfwCloseWindow</code> </td><td><a class="el" href="group__window.html#gacdf43e51376051d2c091662e9fe3d7b2">glfwDestroyWindow</a> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>glfwOpenWindowHint</code> </td><td><a class="el" href="group__window.html#ga4fd9e504bb937e79588a0ffdca9f620b">glfwWindowHint</a> </td><td>Now accepts all <code>GLFW_*_BITS</code> tokens </td></tr>
|
||
|
<tr>
|
||
|
<td><code>glfwEnable</code> </td><td><a class="el" href="group__input.html#gaa92336e173da9c8834558b54ee80563b">glfwSetInputMode</a> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>glfwDisable</code> </td><td><a class="el" href="group__input.html#gaa92336e173da9c8834558b54ee80563b">glfwSetInputMode</a> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>glfwGetMousePos</code> </td><td><a class="el" href="group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc">glfwGetCursorPos</a> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>glfwSetMousePos</code> </td><td><a class="el" href="group__input.html#ga04b03af936d906ca123c8f4ee08b39e7">glfwSetCursorPos</a> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>glfwSetMousePosCallback</code> </td><td><a class="el" href="group__input.html#ga7dad39486f2c7591af7fb25134a2501d">glfwSetCursorPosCallback</a> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>glfwSetMouseWheelCallback</code> </td><td><a class="el" href="group__input.html#gacf02eb10504352f16efda4593c3ce60e">glfwSetScrollCallback</a> </td><td>Accepts two-dimensional scroll offsets as doubles </td></tr>
|
||
|
<tr>
|
||
|
<td><code>glfwGetJoystickPos</code> </td><td><a class="el" href="group__input.html#ga6271d46a5901ec2c99601ccf4dd14731">glfwGetJoystickAxes</a> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>glfwGetWindowParam</code> </td><td><a class="el" href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>glfwGetGLVersion</code> </td><td><a class="el" href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a> </td><td>Use <code>GLFW_CONTEXT_VERSION_MAJOR</code>, <code>GLFW_CONTEXT_VERSION_MINOR</code> and <code>GLFW_CONTEXT_REVISION</code> </td></tr>
|
||
|
<tr>
|
||
|
<td><code>glfwGetDesktopMode</code> </td><td><a class="el" href="group__monitor.html#gafc1bb972a921ad5b3bd5d63a95fc2d52">glfwGetVideoMode</a> </td><td>Returns the current mode of a monitor </td></tr>
|
||
|
<tr>
|
||
|
<td><code>glfwGetJoystickParam</code> </td><td><a class="el" href="group__input.html#gaffcbd9ac8ee737fcdd25475123a3c790">glfwJoystickPresent</a> </td><td>The axis and button counts are provided by <a class="el" href="group__input.html#ga6271d46a5901ec2c99601ccf4dd14731">glfwGetJoystickAxes</a> and <a class="el" href="group__input.html#gace54cd930dcd502e118fe4021384ce1b">glfwGetJoystickButtons</a> </td></tr>
|
||
|
</table>
|
||
|
<h2><a class="anchor" id="moving_renamed_tokens"></a>
|
||
|
Tokens</h2>
|
||
|
<table class="doxtable">
|
||
|
<tr>
|
||
|
<th>GLFW 2 </th><th>GLFW 3 </th><th>Notes </th></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_OPENGL_VERSION_MAJOR</code> </td><td><code>GLFW_CONTEXT_VERSION_MAJOR</code> </td><td>Renamed as it applies to OpenGL ES as well </td></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_OPENGL_VERSION_MINOR</code> </td><td><code>GLFW_CONTEXT_VERSION_MINOR</code> </td><td>Renamed as it applies to OpenGL ES as well </td></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_FSAA_SAMPLES</code> </td><td><code>GLFW_SAMPLES</code> </td><td>Renamed to match the OpenGL API </td></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_ACTIVE</code> </td><td><code>GLFW_FOCUSED</code> </td><td>Renamed to match the window focus callback </td></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_WINDOW_NO_RESIZE</code> </td><td><code>GLFW_RESIZABLE</code> </td><td>The default has been inverted </td></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_MOUSE_CURSOR</code> </td><td><code>GLFW_CURSOR</code> </td><td>Used with <a class="el" href="group__input.html#gaa92336e173da9c8834558b54ee80563b">glfwSetInputMode</a> </td></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_KEY_ESC</code> </td><td><code>GLFW_KEY_ESCAPE</code> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_KEY_DEL</code> </td><td><code>GLFW_KEY_DELETE</code> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_KEY_PAGEUP</code> </td><td><code>GLFW_KEY_PAGE_UP</code> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_KEY_PAGEDOWN</code> </td><td><code>GLFW_KEY_PAGE_DOWN</code> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_KEY_KP_NUM_LOCK</code> </td><td><code>GLFW_KEY_NUM_LOCK</code> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_KEY_LCTRL</code> </td><td><code>GLFW_KEY_LEFT_CONTROL</code> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_KEY_LSHIFT</code> </td><td><code>GLFW_KEY_LEFT_SHIFT</code> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_KEY_LALT</code> </td><td><code>GLFW_KEY_LEFT_ALT</code> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_KEY_LSUPER</code> </td><td><code>GLFW_KEY_LEFT_SUPER</code> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_KEY_RCTRL</code> </td><td><code>GLFW_KEY_RIGHT_CONTROL</code> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_KEY_RSHIFT</code> </td><td><code>GLFW_KEY_RIGHT_SHIFT</code> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_KEY_RALT</code> </td><td><code>GLFW_KEY_RIGHT_ALT</code> </td><td></td></tr>
|
||
|
<tr>
|
||
|
<td><code>GLFW_KEY_RSUPER</code> </td><td><code>GLFW_KEY_RIGHT_SUPER</code> </td><td></td></tr>
|
||
|
</table>
|
||
|
</div></div><!-- contents -->
|
||
|
<!-- start footer part -->
|
||
|
<hr class="footer"/><address class="footer"><small>
|
||
|
Generated on Sun Aug 25 2013 21:45:13 for GLFW by  <a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||
|
</a> 1.8.3.1
|
||
|
</small></address>
|
||
|
</body>
|
||
|
</html>
|