ruby-glfw 0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. data/README +1 -0
  2. data/README.API +73 -0
  3. data/Rakefile +120 -0
  4. data/examples/boing.rb +519 -0
  5. data/examples/gears.rb +327 -0
  6. data/examples/keytest.rb +117 -0
  7. data/examples/listmodes.rb +20 -0
  8. data/examples/mipmaps.rb +104 -0
  9. data/examples/mipmaps.tga +0 -0
  10. data/examples/particles.rb +837 -0
  11. data/examples/pong3d.rb +741 -0
  12. data/examples/pong3d_field.tga +0 -0
  13. data/examples/pong3d_instr.tga +0 -0
  14. data/examples/pong3d_menu.tga +0 -0
  15. data/examples/pong3d_title.tga +0 -0
  16. data/examples/pong3d_winner1.tga +0 -0
  17. data/examples/pong3d_winner2.tga +0 -0
  18. data/examples/splitview.rb +432 -0
  19. data/examples/triangle.rb +89 -0
  20. data/examples/wave.rb +294 -0
  21. data/ext/glfw/glfw.c +1094 -0
  22. data/ext/glfw/mkrf_conf.rb +70 -0
  23. data/glfw-src/Makefile +220 -0
  24. data/glfw-src/compile.ami +61 -0
  25. data/glfw-src/compile.bat +217 -0
  26. data/glfw-src/compile.sh +607 -0
  27. data/glfw-src/docs/Makefile +57 -0
  28. data/glfw-src/docs/Reference.pdf +0 -0
  29. data/glfw-src/docs/UsersGuide.pdf +0 -0
  30. data/glfw-src/docs/cleanup.bat +22 -0
  31. data/glfw-src/docs/glfwdoc.sty +80 -0
  32. data/glfw-src/docs/glfwrm.tex +3034 -0
  33. data/glfw-src/docs/glfwug.tex +2024 -0
  34. data/glfw-src/docs/readme.txt +80 -0
  35. data/glfw-src/examples/Makefile.amigaos.gcc +70 -0
  36. data/glfw-src/examples/Makefile.amigaos.vbcc +70 -0
  37. data/glfw-src/examples/Makefile.dos.djgpp +71 -0
  38. data/glfw-src/examples/Makefile.macosx.gcc +96 -0
  39. data/glfw-src/examples/Makefile.win32.bcc +75 -0
  40. data/glfw-src/examples/Makefile.win32.cross-mgw +79 -0
  41. data/glfw-src/examples/Makefile.win32.cygwin +79 -0
  42. data/glfw-src/examples/Makefile.win32.lcc +74 -0
  43. data/glfw-src/examples/Makefile.win32.mgw +75 -0
  44. data/glfw-src/examples/Makefile.win32.msvc +74 -0
  45. data/glfw-src/examples/Makefile.win32.ow +74 -0
  46. data/glfw-src/examples/Makefile.win32.pellesc +74 -0
  47. data/glfw-src/examples/Makefile.x11.in +54 -0
  48. data/glfw-src/examples/boing.c +606 -0
  49. data/glfw-src/examples/bundle.sh +46 -0
  50. data/glfw-src/examples/gears.c +382 -0
  51. data/glfw-src/examples/keytest.c +264 -0
  52. data/glfw-src/examples/listmodes.c +48 -0
  53. data/glfw-src/examples/mipmaps.c +126 -0
  54. data/glfw-src/examples/mipmaps.tga +0 -0
  55. data/glfw-src/examples/mtbench.c +301 -0
  56. data/glfw-src/examples/mthello.c +48 -0
  57. data/glfw-src/examples/particles.c +1148 -0
  58. data/glfw-src/examples/pong3d.c +839 -0
  59. data/glfw-src/examples/pong3d_field.tga +0 -0
  60. data/glfw-src/examples/pong3d_instr.tga +0 -0
  61. data/glfw-src/examples/pong3d_menu.tga +0 -0
  62. data/glfw-src/examples/pong3d_title.tga +0 -0
  63. data/glfw-src/examples/pong3d_winner1.tga +0 -0
  64. data/glfw-src/examples/pong3d_winner2.tga +0 -0
  65. data/glfw-src/examples/splitview.c +506 -0
  66. data/glfw-src/examples/triangle.c +108 -0
  67. data/glfw-src/examples/wave.c +397 -0
  68. data/glfw-src/images/opengl.gif +0 -0
  69. data/glfw-src/images/osicert.gif +0 -0
  70. data/glfw-src/include/GL/glfw.h +486 -0
  71. data/glfw-src/lib/amigaos/Makefile.amigaos.gcc +128 -0
  72. data/glfw-src/lib/amigaos/Makefile.amigaos.vbcc +128 -0
  73. data/glfw-src/lib/amigaos/SDI_compiler.h +94 -0
  74. data/glfw-src/lib/amigaos/amigaos_enable.c +51 -0
  75. data/glfw-src/lib/amigaos/amigaos_fullscreen.c +319 -0
  76. data/glfw-src/lib/amigaos/amigaos_glext.c +61 -0
  77. data/glfw-src/lib/amigaos/amigaos_init.c +284 -0
  78. data/glfw-src/lib/amigaos/amigaos_joystick.c +359 -0
  79. data/glfw-src/lib/amigaos/amigaos_thread.c +494 -0
  80. data/glfw-src/lib/amigaos/amigaos_time.c +206 -0
  81. data/glfw-src/lib/amigaos/amigaos_window.c +830 -0
  82. data/glfw-src/lib/amigaos/platform.h +337 -0
  83. data/glfw-src/lib/dos/Makefile.dos.djgpp +146 -0
  84. data/glfw-src/lib/dos/dos_enable.c +51 -0
  85. data/glfw-src/lib/dos/dos_events.c +173 -0
  86. data/glfw-src/lib/dos/dos_fullscreen.c +101 -0
  87. data/glfw-src/lib/dos/dos_glext.c +59 -0
  88. data/glfw-src/lib/dos/dos_init.c +105 -0
  89. data/glfw-src/lib/dos/dos_irq.s +246 -0
  90. data/glfw-src/lib/dos/dos_joystick.c +94 -0
  91. data/glfw-src/lib/dos/dos_keyboard.c +694 -0
  92. data/glfw-src/lib/dos/dos_mouse.c +337 -0
  93. data/glfw-src/lib/dos/dos_thread.c +267 -0
  94. data/glfw-src/lib/dos/dos_time.c +309 -0
  95. data/glfw-src/lib/dos/dos_window.c +563 -0
  96. data/glfw-src/lib/dos/platform.h +341 -0
  97. data/glfw-src/lib/enable.c +295 -0
  98. data/glfw-src/lib/fullscreen.c +95 -0
  99. data/glfw-src/lib/glext.c +201 -0
  100. data/glfw-src/lib/image.c +629 -0
  101. data/glfw-src/lib/init.c +108 -0
  102. data/glfw-src/lib/input.c +280 -0
  103. data/glfw-src/lib/internal.h +210 -0
  104. data/glfw-src/lib/joystick.c +101 -0
  105. data/glfw-src/lib/macosx/Makefile.macosx.gcc +172 -0
  106. data/glfw-src/lib/macosx/Makefile.macosx.gcc.universal +166 -0
  107. data/glfw-src/lib/macosx/libglfw.pc.in +11 -0
  108. data/glfw-src/lib/macosx/macosx_enable.c +42 -0
  109. data/glfw-src/lib/macosx/macosx_fullscreen.c +126 -0
  110. data/glfw-src/lib/macosx/macosx_glext.c +52 -0
  111. data/glfw-src/lib/macosx/macosx_init.c +194 -0
  112. data/glfw-src/lib/macosx/macosx_joystick.c +50 -0
  113. data/glfw-src/lib/macosx/macosx_thread.c +414 -0
  114. data/glfw-src/lib/macosx/macosx_time.c +112 -0
  115. data/glfw-src/lib/macosx/macosx_window.c +1279 -0
  116. data/glfw-src/lib/macosx/platform.h +349 -0
  117. data/glfw-src/lib/stream.c +194 -0
  118. data/glfw-src/lib/tga.c +405 -0
  119. data/glfw-src/lib/thread.c +340 -0
  120. data/glfw-src/lib/time.c +83 -0
  121. data/glfw-src/lib/win32/Makefile.win32.bcc +265 -0
  122. data/glfw-src/lib/win32/Makefile.win32.cross-mgw +274 -0
  123. data/glfw-src/lib/win32/Makefile.win32.cygwin +279 -0
  124. data/glfw-src/lib/win32/Makefile.win32.lcc +246 -0
  125. data/glfw-src/lib/win32/Makefile.win32.mgw +243 -0
  126. data/glfw-src/lib/win32/Makefile.win32.msvc +242 -0
  127. data/glfw-src/lib/win32/Makefile.win32.ow +242 -0
  128. data/glfw-src/lib/win32/Makefile.win32.pellesc +242 -0
  129. data/glfw-src/lib/win32/glfwdll.def +67 -0
  130. data/glfw-src/lib/win32/glfwdll_mgw1.def +67 -0
  131. data/glfw-src/lib/win32/glfwdll_mgw2.def +67 -0
  132. data/glfw-src/lib/win32/glfwdll_pellesc.def +65 -0
  133. data/glfw-src/lib/win32/libglfw.pc.in +11 -0
  134. data/glfw-src/lib/win32/platform.h +474 -0
  135. data/glfw-src/lib/win32/win32_dllmain.c +60 -0
  136. data/glfw-src/lib/win32/win32_enable.c +155 -0
  137. data/glfw-src/lib/win32/win32_fullscreen.c +317 -0
  138. data/glfw-src/lib/win32/win32_glext.c +85 -0
  139. data/glfw-src/lib/win32/win32_init.c +356 -0
  140. data/glfw-src/lib/win32/win32_joystick.c +234 -0
  141. data/glfw-src/lib/win32/win32_thread.c +511 -0
  142. data/glfw-src/lib/win32/win32_time.c +146 -0
  143. data/glfw-src/lib/win32/win32_window.c +1714 -0
  144. data/glfw-src/lib/window.c +727 -0
  145. data/glfw-src/lib/x11/Makefile.x11.in +243 -0
  146. data/glfw-src/lib/x11/platform.h +415 -0
  147. data/glfw-src/lib/x11/x11_enable.c +51 -0
  148. data/glfw-src/lib/x11/x11_fullscreen.c +524 -0
  149. data/glfw-src/lib/x11/x11_glext.c +69 -0
  150. data/glfw-src/lib/x11/x11_init.c +275 -0
  151. data/glfw-src/lib/x11/x11_joystick.c +371 -0
  152. data/glfw-src/lib/x11/x11_keysym2unicode.c +902 -0
  153. data/glfw-src/lib/x11/x11_thread.c +507 -0
  154. data/glfw-src/lib/x11/x11_time.c +154 -0
  155. data/glfw-src/lib/x11/x11_window.c +1746 -0
  156. data/glfw-src/license.txt +21 -0
  157. data/glfw-src/readme.html +927 -0
  158. data/glfw-src/support/d/examples/Makefile +59 -0
  159. data/glfw-src/support/d/examples/boing.d +610 -0
  160. data/glfw-src/support/d/examples/gears.d +379 -0
  161. data/glfw-src/support/d/examples/keytest.d +272 -0
  162. data/glfw-src/support/d/examples/listmodes.d +48 -0
  163. data/glfw-src/support/d/examples/mipmaps.d +126 -0
  164. data/glfw-src/support/d/examples/mtbench.d +304 -0
  165. data/glfw-src/support/d/examples/mthello.d +54 -0
  166. data/glfw-src/support/d/examples/particles.d +1150 -0
  167. data/glfw-src/support/d/examples/pong3d.d +840 -0
  168. data/glfw-src/support/d/examples/splitview.d +486 -0
  169. data/glfw-src/support/d/examples/triangle.d +108 -0
  170. data/glfw-src/support/d/examples/wave.d +400 -0
  171. data/glfw-src/support/d/imports/gl.d +4539 -0
  172. data/glfw-src/support/d/imports/glfw.d +349 -0
  173. data/glfw-src/support/d/imports/glu.d +328 -0
  174. data/glfw-src/support/d/lib/glfwdll.def +64 -0
  175. data/glfw-src/support/d/lib/glu32.def +56 -0
  176. data/glfw-src/support/d/lib/makefile +12 -0
  177. data/glfw-src/support/d/lib/opengl32.def +372 -0
  178. data/glfw-src/support/d/readme.html +83 -0
  179. data/glfw-src/support/delphi/examples/Triangle.dpr +105 -0
  180. data/glfw-src/support/delphi/lib/glfw.pas +437 -0
  181. data/glfw-src/support/delphi/readme.html +97 -0
  182. data/glfw-src/support/lua/examples/gears.lua +383 -0
  183. data/glfw-src/support/lua/examples/test1.lua +68 -0
  184. data/glfw-src/support/lua/readme.html +128 -0
  185. data/glfw-src/support/lua/src/luaglfw.c +1179 -0
  186. data/glfw-src/support/lua/src/luaglfw.h +48 -0
  187. data/glfw-src/support/lua/src/runlua.c +82 -0
  188. data/glfw-src/support/masm/examples/fpc.mac +47 -0
  189. data/glfw-src/support/masm/examples/makeit.bat +66 -0
  190. data/glfw-src/support/masm/examples/triangle.asm +232 -0
  191. data/glfw-src/support/masm/include/glfw.inc +326 -0
  192. data/glfw-src/support/masm/include/glu32.inc +55 -0
  193. data/glfw-src/support/masm/include/opengl32.inc +372 -0
  194. data/glfw-src/support/masm/lib/glfwdll.lib +0 -0
  195. data/glfw-src/support/masm/readme.html +170 -0
  196. data/glfw-src/support/msvc80/GLFW.sln +26 -0
  197. data/glfw-src/support/msvc80/GLFW.vcproj +257 -0
  198. data/glfw-src/support/msvc80/GLFWDLL.vcproj +287 -0
  199. data/glfw-src/support/visualbasic/bindings/glfw.bas +320 -0
  200. data/glfw-src/support/visualbasic/bindings/glu32.bas +284 -0
  201. data/glfw-src/support/visualbasic/bindings/opengl32.bas +999 -0
  202. data/glfw-src/support/visualbasic/examples/Triangle.bas +101 -0
  203. data/glfw-src/support/visualbasic/readme.html +164 -0
  204. data/website/index.html +84 -0
  205. data/website/style.css +110 -0
  206. metadata +301 -0
@@ -0,0 +1,21 @@
1
+ Copyright (c) 2002-2007 Camilla Berglund <elmindreda@users.sourceforge.net>
2
+
3
+ This software is provided 'as-is', without any express or implied
4
+ warranty. In no event will the authors be held liable for any damages
5
+ arising from the use of this software.
6
+
7
+ Permission is granted to anyone to use this software for any purpose,
8
+ including commercial applications, and to alter it and redistribute it
9
+ freely, subject to the following restrictions:
10
+
11
+ 1. The origin of this software must not be misrepresented; you must not
12
+ claim that you wrote the original software. If you use this software
13
+ in a product, an acknowledgment in the product documentation would
14
+ be appreciated but is not required.
15
+
16
+ 2. Altered source versions must be plainly marked as such, and must not
17
+ be misrepresented as being the original software.
18
+
19
+ 3. This notice may not be removed or altered from any source
20
+ distribution.
21
+
@@ -0,0 +1,927 @@
1
+ <html>
2
+
3
+ <head>
4
+ <title>GLFW Readme File</title>
5
+ </head>
6
+
7
+ <body>
8
+
9
+ <!-- TITLE -------------------------------------------------------------->
10
+ <table border=0 cellspacing=0 cellpadding=0 width=100%>
11
+ <tr>
12
+ <td width=90 valign=top align=left>
13
+ <a href="http://www.opengl.org/" target="_top"><img src="images/opengl.gif" border="0" width="84" height="44"></a><br>
14
+ <a href="http://www.opensource.org/docs/definition.php" target="_top"><img src="images/osicert.gif" border="0" width="72" height="60"></a>
15
+ </td>
16
+ <td align=center>
17
+ <font face="bookman old style,arial" size=+4><b>GLFW v2.6</b></font><br>
18
+ <font face="bookman old style,arial" size=+3>source distribution</font>
19
+ </td>
20
+ <td width=90 valign=top align=right>
21
+ &nbsp;
22
+ </td>
23
+ </tr>
24
+ </table>
25
+
26
+
27
+ <p>
28
+ <center>
29
+ <table border=0><tr><td>
30
+ <b>
31
+ <ol>
32
+ <li><a href="#sec1">Introduction</li></a>
33
+ <li><a href="#sec2">Compiling GLFW and the example programs</li></a>
34
+ <li><a href="#sec3">Installing GLFW</li></a>
35
+ <li><a href="#sec4">Using GLFW</li></a>
36
+ <li><a href="#sec5">Version history</li></a>
37
+ <li><a href="#sec6">Directory structure of the GLFW distribution</li></a>
38
+ <li><a href="#sec7">Contacting the project</li></a>
39
+ <li><a href="#sec8">Acknowledgements</li></a>
40
+ </ol>
41
+ </b>
42
+ </td></tr></table>
43
+ </center>
44
+
45
+ <p><hr>
46
+
47
+ <a name="sec1">
48
+ <h2>1. Introduction</h2>
49
+
50
+ <p>Welcome to version 2.6 of the GLFW OpenGL framework. GLFW is a free, open
51
+ source, portable framework for OpenGL application development. In short, it is
52
+ a library that constitutes a powerful API for handling operating system
53
+ specific tasks, such as opening an OpenGL window, reading keyboard and mouse
54
+ input, creating threads, and much more.</p>
55
+
56
+ <p><hr>
57
+
58
+ <a name="sec2">
59
+ <h2>2. Compiling GLFW and the example programs</h2>
60
+
61
+ <p>A top level makefile can be found in the root directory of the GLFW
62
+ distribution that has been designed to work with several compilers. If you
63
+ simply enter the GLFW root directory in a shell and type <b>make</b> (or
64
+ <b>nmake</b> or <b>gmake</b>, depending on the name of your make tool), and a
65
+ list should appear with the currently supported options for systems and
66
+ compilers.</p>
67
+
68
+ <p>For example, one of the options is to compile GLFW for Windows with the
69
+ LCC-Win32 C compiler. To do that, type <b>make win32-lcc</b> in the shell (as
70
+ specified in the previously mentioned list). That will compile the GLFW static
71
+ link library and the supplied example programs. For Windows compilers, a Win32
72
+ DLL will also be compiled.</p>
73
+
74
+ <p>Currently supported compilers and systems are:
75
+
76
+ <ol>
77
+ <li>Borland C++ Builder compiler 5.x for Windows</li>
78
+ <li>Cygwin (GCC) for Windows</li>
79
+ <li>LCC-Win32 for Windows</li>
80
+ <li>Microsoft Visual C++ 6.x for Windows</li>
81
+ <li>MinGW32 (GCC) for Windows</li>
82
+ <li>OpenWatcom for Windows</li>
83
+ <li>Pelles C for Windows</li>
84
+ <li>Unix or Unix-like systems running the X Window System (auto detect
85
+ compiler, or force GCC)</li>
86
+ <li>Apple Developer Tools (GCC) for Mac OS X</li>
87
+ </ol>
88
+
89
+ <p>If your compiler/system is not in the list, you will have to create new
90
+ makefiles in the <b>lib\win32</b>, <b>lib/x11</b> or <b>lib/macosx</b>
91
+ directory, and in the <b>examples</b> directory. If you have any problems,
92
+ please use our support forum and bug tracker on SourceForge.net. We would like
93
+ to add support for more compilers and verify that GLFW compiles under as many
94
+ systems as possible, so if you had to make any modifications or additions to
95
+ the source and/or makefiles in order to make GLFW compile successfully, we
96
+ would like to know what you had to do.</p>
97
+
98
+
99
+ <h3>2.1 Note for Microsoft Visual C++ users</h3>
100
+
101
+ <p>When MSVC is installed, you are asked if it should be possible to access the
102
+ compiler from the command line. For some strange reason, the default answer to
103
+ this question is NO. If you answered no to this question you will have to run a
104
+ file named <b>VCVARS32.BAT</b>, which is located in the <b>bin</b> directory of
105
+ your Visual C++ folder, before you can use the compiler from the command
106
+ line.</p>
107
+
108
+ <p>Note that <b>VCVARS32.BAT</b> must be run from the same shell as you intend
109
+ to use for compiling GLFW (simply clicking on the file from the explorer will
110
+ <i>not</i> work).</p>
111
+
112
+ <p>After that is done, it is possible to compile GLFW by entering the GLFW root
113
+ directory and issuing <b>nmake win32-msvc</b>.</p>
114
+
115
+ <p>For instance, if MSVC is installed in the directory 'C:\Program
116
+ Files\Microsoft Developer Studio\VC98', then you should be able to compile GLFW
117
+ with this procedure:</p>
118
+
119
+ <ol>
120
+ <li>Start a command prompt (MS-DOS prompt)</li>
121
+ <li>"CD" to the directory where you unzipped the GLFW source
122
+ distribution (where this readme file is located)</li>
123
+ <li>Type <b>&quot;C:\Program Files\Microsoft Developer
124
+ Studio\VC98\BIN\VCVARS32&quot;</b> (with quotation marks)</li>
125
+ <li>Type <b>nmake win32-msvc</b></li>
126
+ </ol>
127
+
128
+
129
+ <h3>2.2 Note for MinGW/DevC++ users</h3>
130
+
131
+ <p>Do not use the MSYS shell for compiling GLFW, because the supplied batch
132
+ file "compile.bat" will only work under a Windows command prompt (or MS-DOS
133
+ prompt).</p>
134
+
135
+ <p>Under Windows 98, the MinGW make program may set the $(MAKE) variable
136
+ incorrectly. To remedy this, uncomment the line at the beginning of the top
137
+ level Makefile that says MAKE = make (possibly replacing make with some other
138
+ name, e.g. mingw32-make).</p>
139
+
140
+
141
+ <h3>2.3 Note for Cygwin users</h3>
142
+
143
+ <p>The Cygwin makefile was designed to run from a Cygwin bash shell. You
144
+ can <i>not</i> use an MS-DOS prompt (or NT cmd prompt) to compile GLFW with the
145
+ win32-cygwin option. Similarly, the win32-clean option will not work from a
146
+ Cygwin shell, which is why there is a special cygwin-clean option.</p>
147
+
148
+
149
+ <h3>2.4 Note for OpenWatcom users</h3>
150
+
151
+ <p>In order to compile GLFW successfully with OpenWatcom (for Windows),
152
+ execute "nmake MAKE=nmake win32-ow" in the GLFW root directory. Also make
153
+ sure that you have all your environment variables set up correctly. It is
154
+ the default option when installing OpenWatcom to permanently set up all
155
+ the required environment variables. If nmake does not work, you probably
156
+ have to run "WATCOM\setvars.bat" from the command prompt before executing
157
+ nmake, where WATCOM is the directory in which you installed OpenWatcom
158
+ (e.g. C:\Watcom).</p>
159
+
160
+
161
+ <h3>2.5 Note for Pelles C users</h3>
162
+
163
+ <p>To build GLFW with Pelles C, you need at lest version 2.80.3 of Pelles C
164
+ (POCC and POLINK).</p>
165
+
166
+ <p>Type 'pomake win32-pellesc' to build GLFW.</p>
167
+
168
+
169
+ <h3>2.6 Note for Unix/X11 users</h3>
170
+
171
+ <p>Compiler and link library capabilities are auto-detected with a script
172
+ called <b>compile.sh</b>. It has been tested under Linux Mandrake 10.1, Mac OS
173
+ X 10.2, SunOS 5.6 (GCC), IRIX 5.3, FreeBSD 5.0 and QNX, but should hopefully
174
+ run on the majority of available Unix/Unix-like systems and generate functional
175
+ Makefiles. You do not have to run the script manually, since it is called from
176
+ the top level Makefile.</p>
177
+
178
+
179
+ <h3>2.8 Note for Mac OS X users</h3>
180
+
181
+ <p>To compile GLFW for Mac OS X, you will need to have installed the BSD
182
+ subsystem and the Developer Tools, which can be found on your Mac OS X CD:s.
183
+ When they are installed, simply open Terminal and go to the root GLFW
184
+ directory. From there, you can build the library and all the examples by
185
+ running make, i.e. <b>make macosx-gcc</b>.</p>
186
+
187
+
188
+
189
+ <p><hr>
190
+
191
+ <a name="sec3">
192
+ <h2>3. Installing GLFW</h2>
193
+
194
+ <h3>3.1 Windows</h3>
195
+
196
+ <p>After compiling GLFW with MinGW or Cygwin, three files of interest should
197
+ have appeared in the <b>lib\win32</b> directory. They are: <b>libglfw.a</b>
198
+ (the static link version of GLFW), <b>glfw.dll</b> (the DLL version of GLFW)
199
+ and <b>libglfwdll.a</b> (the DLL import library).</p>
200
+
201
+ <p>To install GLFW on Cygwin (and possibly MinGW), run make with the
202
+ <b>cygwin-install</b> target. This will generate the pkgconfig file and copy
203
+ it, the header file and the library to the correct locations of your Cygwin
204
+ installation. If you wish to change the installation location from its default,
205
+ set the desired prefix path with the environment variable <b>PREFIX</b>.</p>
206
+
207
+ <p>If you used Borland C++ Builder, LCC-Win32, Microsoft Visual C++ or
208
+ OpenWatcom, the files are named <b>glfw.lib</b> (the static link version of
209
+ GLFW), <b>glfw.dll</b> (the DLL version of GLFW) and <b>glfwdll.lib</b> (the
210
+ DLL import library).</p>
211
+
212
+ <p>The static link library and the DLL import library should be copied to your
213
+ compiler's <b>LIB</b> directory (where all other link libraries are located).
214
+ The DLL can be copied either to your Windows system directory (where
215
+ opengl32.dll is located), or to the project directory of your GLFW-based
216
+ projects (where you place your compiled EXEs).</p>
217
+
218
+ <p>You should also copy the GLFW include file, <b>include\GL\glfw.h</b>, to the
219
+ <b>GL</b> directory of your compiler's include directory (where gl.h, glu.h
220
+ etc. are located).</p>
221
+
222
+
223
+ <h3>3.2 Unix</h3>
224
+
225
+ <p>After compiling GLFW, three files named <b>libglfw.pc.in</b>,
226
+ <b>libglfw.a</b> and <b>libglfw.so</b> should have appeared in the
227
+ <b>lib/x11</b> directory. This is the pkgconfig template file, the GLFW static
228
+ link library and the GLFW shared library, respectively.</p>
229
+
230
+ <p>To install GLFW onto your system, run make as root with the
231
+ <b>x11-install</b> build target. This will install the pkgconfig file, the
232
+ static library and the header. By default, the files will be installed under
233
+ <b>/usr/local</b>. If you wish to install to a different location, set the
234
+ environment variable <b>PREFIX</b> appropriately when running make.</p>
235
+
236
+ <p>Note that the shared library is not installed by default, as you really
237
+ should think twice before using it. GLFW is very small and shared library
238
+ distribution on Unix outside of packaging systems is quite tricky. The GLFW
239
+ license also allows static linking without requiring your to share your
240
+ code.</p>
241
+
242
+
243
+ <h3>3.4 Mac OS X</h3>
244
+
245
+ <p>After compiling GLFW, three files named <b>libglfw.pc.in</b>,
246
+ <b>libglfw.a</b> and <b>libglfw.dylib</b> should appear in the
247
+ <b>lib/macosx</b> directory. This is the pkgconfig template file, the GLFW
248
+ static link library and the GLFW dynamic library, respectively.</p>
249
+
250
+ <p>To install GLFW onto your system, run make with sudo and the
251
+ <b>macosx-install</b> build target, i.e.:</p>
252
+
253
+ <p>&nbsp;&nbsp;<b>sudo make macosx-install</b>
254
+
255
+ <p>This will install the pkgconfig file, the
256
+ static library and the header. By default, the files will be installed under
257
+ <b>/usr/local</b>. If you wish to install to a different location, set
258
+ the environment variable <b>PREFIX</b> appropriately when running make.</p>
259
+
260
+ <p>Note that the shared library is not installed by default, as you really
261
+ should think twice before using it. GLFW is very small and very sutable for
262
+ static linking. The GLFW license also allows static linking without requiring
263
+ your to share your code.</p>
264
+
265
+
266
+ <a name="sec4">
267
+ <p><h2>4. Using GLFW</h2>
268
+
269
+ <p>There are two aspects to using GLFW:
270
+
271
+ <p>
272
+ <ol>
273
+ <li>How does the GLFW API work</li>
274
+ <li>How to compile programs that use GLFW</li>
275
+ </ol>
276
+
277
+ <p>The first point is covered in the <a href="docs/UsersGuide.pdf">GLFW
278
+ Users Guide</a> and the <a href="docs/Reference.pdf">GLFW Reference
279
+ Manual</a>, and we suggest that you read at least the Users Guide, since
280
+ it's a good introduction to the GLFW API.</p>
281
+
282
+ <p>Designing and compiling programs that use GLFW is not very difficult.
283
+ A few rules for successfully designing GLFW-based programs are presented
284
+ in the following sections.</p>
285
+
286
+ <p><br><h3>4.1 Include &lt;GL/glfw.h&gt;</h3>
287
+
288
+ <p>In your program, you should include &lt;GL/glfw.h&gt;. This include
289
+ file defines all the necessary constants, types and prototypes that are
290
+ used to interact with the GLFW API. It also includes &lt;GL/gl.h&gt; and
291
+ &lt;GL/glu.h&gt;, and - <u>this is very important</u> - <i><b>it defines
292
+ all the necessary constants and types that are necessary for OpenGL to
293
+ work on different platforms</b></i>.</p>
294
+
295
+ <p>For instance, under Windows you are normally required to include
296
+ &lt;windows.h&gt; before you include &lt;GL/gl.h&gt;. If you write such a
297
+ program, it would not compile under e.g. Linux since &lt;windows.h&gt;
298
+ does not exist under Linux. &lt;GL/glfw.h&gt; takes care of these things
299
+ for you. Note however that it does not actually include &lt;windows.h&gt;,
300
+ it merely mimics the parts of it that are needed for &lt;GL/gl.h&gt; and
301
+ &lt;GL/glu.h&gt; (this way we do not get the thousands of constants,
302
+ types and prototypes that could otherwise possibly interfere with our own
303
+ declarations).</p>
304
+
305
+ <p>In other words:
306
+ <ul>
307
+ <li>Do <i>not</i> include &lt;GL/gl.h&gt; or &lt;GL/glu.h&gt;! (GLFW
308
+ does it for you)</li>
309
+ <li>Do <i>not</i> include &lt;windows.h&gt;! (unless you really need
310
+ it)</li>
311
+ </ul>
312
+
313
+ <p>Note: If you <i>do</i> need to include &lt;windows.h&gt;, do it
314
+ <i>before</i> including &lt;GL/glfw.h&gt;.</p>
315
+
316
+
317
+ <p><br><h3>4.2 Link with the right libraries</h3>
318
+
319
+ <p><h4>4.2.1 Windows static library</h4>
320
+
321
+ <p>If you link with the static version of GLFW, it is also necessary to
322
+ link with some system libraries that GLFW uses.</p>
323
+
324
+ <p>When linking a program under Windows that uses the static version of
325
+ GLFW, you must also link with the following libraries: <b>opengl32</b>,
326
+ <b>user32</b> and <b>kernel32</b>. Some of these libraries may be linked
327
+ with by default by your compiler. In the table below you can see the
328
+ minimum required link options for each supported Windows compiler (you may
329
+ want to add other libraries as well, such as <b>glu32</b>):</p>
330
+
331
+ <p><table border=1>
332
+ <tr><td><b>Compiler</b></td><td><b>Link options</b></td></tr>
333
+ <tr><td>Borland C++ Builder</td><td>glfw.lib opengl32.lib</td></tr>
334
+ <tr><td>Cygwin</td><td><i>See Unix static library below</i></td></tr>
335
+ <tr><td>LCC-Win32</td><td>glfw.lib opengl32.lib</td></tr>
336
+ <tr><td>Microsoft Visual C++</td><td>glfw.lib opengl32.lib user32.lib</td></tr>
337
+ <tr><td>MinGW32</td><td>-lglfw -lopengl32</td></tr>
338
+ <tr><td>OpenWatcom</td><td>glfw.lib opengl32.lib user32.lib</td></tr>
339
+ <tr><td>Pelles C</td><td>glfw.lib opengl32.lib user32.lib kernel32.lib</td></tr>
340
+ </table>
341
+
342
+
343
+ <p><br><h4>4.2.2 Windows DLL</h4>
344
+
345
+ <p>To compile a program that uses the DLL version of GLFW, you need to
346
+ define the <b>GLFW_DLL</b> constant. This can either be done with a
347
+ compiler switch, typically by adding <b>-DGLFW_DLL</b> to the list of
348
+ compiler options. You can also do it by adding the line:</p>
349
+
350
+ <p>#define GLFW_DLL
351
+
352
+ <p>...to all your source files that include <b>glfw.h</b>, <u>before</u>
353
+ including it.</p>
354
+
355
+ <p>When linking a program under Windows that uses the DLL version of GLFW,
356
+ the only library you need to link with for GLFW to work is <b>glfwdll</b>.
357
+ In the table below you can see the minimum required link options for each
358
+ supported Windows compiler (you may want to add other libraries as well,
359
+ such as <b>opengl32</b> and <b>glu32</b>):</p>
360
+
361
+ <p><table border=1>
362
+ <tr><td><b>Compiler</b></td><td><b>Link options</b></td></tr>
363
+ <tr><td>Borland C++ Builder</td><td>glfwdll.lib</td></tr>
364
+ <tr><td>Cygwin</td><td>-lglfwdll</td></tr>
365
+ <tr><td>LCC-Win32</td><td>glfwdll.lib</td></tr>
366
+ <tr><td>Microsoft Visual C++</td><td>glfwdll.lib</td></tr>
367
+ <tr><td>MinGW32</td><td>-lglfwdll</td></tr>
368
+ <tr><td>OpenWatcom</td><td>glfwdll.lib</td></tr>
369
+ <tr><td>Pelles C</td><td>glfwdll.lib</td></tr>
370
+ </table>
371
+
372
+
373
+
374
+ <p><br><h4>4.2.3 Unix static library</h4>
375
+
376
+ <p>GLFW now supports <a href="http://pkgconfig.freedesktop.org/wiki/">pkgconfig</a>, and a libglfw.pc file is generated and
377
+ installed when you install the library. For systems that do not provide
378
+ pkgconfig, you should look in this file for the proper compile and link
379
+ flags for your system, as determined by compile.sh at compile time.</p>
380
+
381
+ <p>A typical compile and link command line may look like this (using GCC):</p>
382
+
383
+ <p>&nbsp;&nbsp;<b>gcc `pkg-config --cflags libglfw` -o myprog myprog.c `pkg-config --libs libglfw`</b>
384
+
385
+ <p>If you use GLU functions in your program you should also add
386
+ <b>-lGLU</b>.</p>
387
+
388
+
389
+
390
+ <p><br><h4>4.2.5 Mac OS X static library</h4>
391
+
392
+ <p>When compiling and linking a program under Mac OS X that uses GLFW, you
393
+ must also link with the following frameworks: <b>Carbon.framework</b>,
394
+ <b>AGL.framework</b> and <b>OpenGL.framework</b>.
395
+
396
+ <p>If you are using Xcode, you simply add the GLFW library <b>libglfw.a</b> and
397
+ these frameworks to your project. If, however, you are building your program
398
+ from the command line, there are two methods for correctly linking your GLFW
399
+ program.</p>
400
+
401
+ <p>GLFW now supports <a
402
+ href="http://pkgconfig.freedesktop.org/wiki/">pkgconfig</a>, and a libglfw.pc
403
+ file is generated and installed when you install the library. You can find
404
+ pkgconfig in most packaging systems, such as <a
405
+ href="http://www.finkproject.org/">Fink</a> and <a
406
+ href="http://darwinports.opendarwin.org/">DarwinPorts</a>, so if you have one
407
+ of them installed, simply install pkgconfig. Once you have pkgconfig available,
408
+ the command line for compiling and linking your program is:</p>
409
+
410
+ <p>&nbsp;&nbsp;<b>gcc `pkg-config --cflags libglfw` -o myprog myprog.c `pkg-config --libs libglfw`</b>
411
+
412
+ <p>If you do not wish to use pkgconfig, you will need to add the required
413
+ frameworks and libraries to your command line using the <b>-l</b> and
414
+ <b>-framework</b> switches, i.e.:</p>
415
+
416
+ <p>&nbsp;&nbsp;<b>gcc -o myprog myprog.c -lglfw -framework Carbon -framework AGL -framework OpenGL</b>
417
+
418
+ <p>Note that you do not add the .framework extension to a framework when adding
419
+ it from the command line.</p>
420
+
421
+ <p>These frameworks contain all GL and GLU functions, so there is no need to
422
+ add additional libraries or frameworks when using GLU functionality. Also note
423
+ that even though your machine may have Unix-style GL libraries, they are for
424
+ use with the X Window System, and will <i>not</i> work with the Mac OS X native
425
+ version of GLFW.</p>
426
+
427
+
428
+ <a name="sec5">
429
+ <p><h2>5. Version history</h2>
430
+
431
+ <p><h3>v2.6</h3>
432
+ <ul>
433
+ <li>Added <code>GLFW_FSAA_SAMPLES</code> multisampling hint (implemented on all platforms)</li>
434
+ <li>Added <code>GLFW_WINDOW_NO_RESIZE</code> hint for non-resizable windows (implemented on all platforms)</li>
435
+ <li>Added install targets for all Unix-like build targets</li>
436
+ <li>Added <code>glfwReadMemoryImage</code> function for creating a <code>GLFWImage</code> object from an image file in a memory buffer</li>
437
+ <li>Added <code>glfwLoadMemoryTexture2D</code> function for decoding an image file in a memory buffer into a texture</li>
438
+ <li>Added <code>glfwLoadTextureImage2D</code> function for loading a <code>GLFWImage</code> object into a texture</li>
439
+ <li>Added cross-compilation support for MinGW under a Unix-like host</li>
440
+ <li>D bindings updated and all examples ported to modern D</li>
441
+ <li>Delphi bindings updated to reflect API additions</li>
442
+ <li>Bugfix: The interaction between key repeat and window focus code caused duplicate presses</li>
443
+ <li>Bugfix: The mouse position was not properly updated when re-enabling the mouse cursor</li>
444
+ <li>[Win32] Added pkgconfig file generation for Cygwin</li>
445
+ <li>[Win32] Added version number to window class name</li>
446
+ <li>[Win32] Added optional loading of user provided window icon resource</li>
447
+ <li>[Win32] Bugfix: Very small sleep periods were forced to higher value</li>
448
+ <li>[Win32] Bugfix: The nmake makefile did not handle paths with spaces correctly</li>
449
+ <li>[Win32] Bugfix: Removed assembly RDTSC timing code</li>
450
+ <li>[Win32] Bugfix: Hidden cursor was not clipped to windowed windows</li>
451
+ <li>[X11] Added XRandR code path for fullscreen windows</li>
452
+ <li>[X11] Added building of shared library</li>
453
+ <li>[X11] Added <a href="http://tronche.com/gui/x/icccm/">ICCCM</a> WM fullscreen hints</li>
454
+ <li>[X11] Added support for the <code>_NET_WM_PING</code> protocol</li>
455
+ <li>[X11] Added pkgconfig file generation</li>
456
+ <li>[X11] Added setting of WM size hints</li>
457
+ <li>[X11] Bugfix: Removed assembly RDTSC timing code</li>
458
+ <li>[X11] Bugfix: Window re-opening now works properly (including fullscreen windows)</li>
459
+ <li>[X11] Bugfix: Potential crash bug in video mode matching code</li>
460
+ <li>[X11] Bugfix: Static buffers imposed an invisible limit on reported video mode count</li>
461
+ <li>[X11] Bugfix: Interaction with certain window managers when setting input focus would cause termination with a BadMatch error</li>
462
+ <li>[X11] Bugfix: Keypad keys did not trigger the character callback</li>
463
+ <li>[MacOSX] Added pkgconfig file generation</li>
464
+ <li>[MacOSX] Added building of shared library</li>
465
+ <li>[MacOSX] Added building of Universal Binary libraries</li>
466
+ <li>[MacOSX] Replaced fullscreen code path with CGL version</li>
467
+ <li>[MacOSX] Bugfix: Binaries without bundles or resource forks now interact properly with the WM</li>
468
+ <li>[MacOSX] Bugfix: Replaced Carbon event time source with <code>gettimeofday</code></li>
469
+ <li>[MacOSX] Bugfix: Added code to minimize the dreaded OpenGL application startup jump</li>
470
+ <li>[MacOSX] Bugfix: Fixed broken implementation of <code>glfwSetMousePos</code> for windowed mode</li>
471
+ <li>[MacOSX] Bugfix: Fixed broken implementation of hidden cursor</li>
472
+ <li>[MacOSX] Bugfix: Capturing all displays and not just the main one</li>
473
+ <li>[AmigaOS] Obsoleted platform due to lack of maintainer and community interest</li>
474
+ <li>[DOS] Obsoleted platform due to lack of maintainer and community interest</li>
475
+ </ul>
476
+
477
+ <p><h3>v2.5</h3>
478
+ <ul>
479
+ <li>Added the function glfwWaitEvents</li>
480
+ <li>Added window close callback, which enables a program to prevent a user
481
+ from closing a window with the window manager</li>
482
+ <li>Added window refresh callback, which is called when the window needs
483
+ to be refreshed</li>
484
+ <li>Added support for loading alpha textures (GLFW_ALPHA_MAP_BIT)</li>
485
+ <li>Added support for the Lua programming language</li>
486
+ <li>Added support for the D programming language</li>
487
+ <li>Added support for the Pelles C compiler for Windows</li>
488
+ <li>Added API level support for up to eight mouse buttons</li>
489
+ <li>[Win32] Added support for up to five mouse buttons</li>
490
+ <li>[Win32] Mouse down events capture mouse input</li>
491
+ <li>[Win32] Bugfix: The DLL now exports glfwSetTime</li>
492
+ <li>[Win32] Fix: The GLFW window is now placed in the upper left corner
493
+ of the desktop working area</li>
494
+ <li>[Win32/X11] Bugfix: More robust check for SwapInterval</li>
495
+ <li>[X11] Added support for USB joysticks under Linux (/dev/input/js*)</li>
496
+ <li>[X11] Bugfix: Added support for GLX extensions in glfwExtensionSupported</li>
497
+ <li>[X11] Bugfix: More robust fullscreen mode (?)</li>
498
+ <li>[X11] Bugfix: Runtime check of XF86VidMode support for the active
499
+ display</li>
500
+ <li>[X11] Bugfix: Some mouse button events were reported incorrectly</li>
501
+ <li>[MacOSX] Added support for the input char callback.</li>
502
+ <li>[MacOSX] Added video mode validation and duplicate elimination.</li>
503
+ <li>[MacOSX] Switched to a new MakeBundle.sh script.</li>
504
+ <li>[MacOSX] Added emulation of the window refresh callback.</li>
505
+ <li>[MacOSX] Bugfix: The window and its associated resources are now
506
+ properly released.</li>
507
+ <li>[MacOSX] Bugfix: Removed support for more than eight mouse buttons.</li>
508
+ <li>[x86 CPUs] Improved Intel mobile CPU detection (e.g. disables RDTSC
509
+ timing on Centrino systems)</li>
510
+ </ul>
511
+
512
+ <p><h3>v2.4.2</h3>
513
+ <ul>
514
+ <li>Preliminary native Mac OS X support (via the Carbon interface)</li>
515
+ <li>Preliminary DOS support (DJGPP + Mesa)</li>
516
+ <li>Changed license to the zlib license (almost identical to the previous
517
+ GLFW license), so now GLFW is OSI Certified</li>
518
+ <li>Rewrote the GLFW documentation in LaTeX, meaning several improvements
519
+ (both visual and practical)</li>
520
+ <li>Added the <b>support</b> folder to the distribution, which includes
521
+ support for various languages</li>
522
+ <li>[Win32] Added OpenWatcom compiler support (thanks Sebastian
523
+ Schuberth!)</li>
524
+ <li>[Win32] Changed fallback timer from GetTickCount to timeGetTime,
525
+ which usually provides better resolution</li>
526
+ <li>[Win32] Bugfix: Accumulator buffer selection should be more
527
+ robust</li>
528
+ <li>[Win32] Bugfix: If stereo rendering is requested, and no stereo pixel
529
+ format could be created, glfwOpenWindow now fails</li>
530
+ <li>[Win32] Bugfix: glfwSetWindowSize now sets the size of the client
531
+ area, NOT the entire window, meaning that there is a 1:1 relationship
532
+ between glfwSetWindowSize and glfwGetWindowSize</li>
533
+ <li>[X11] Added FreeBSD and QNX support</li>
534
+ <li>[X11] Added support for non-pthread capable systems</li>
535
+ <li>[X11] Hopefully more robust configuration script (compile.sh)</li>
536
+ <li>[X11] Bugfix: When mouse cursor is hidden, mouse sensitivity is no
537
+ longer degraded</li>
538
+ <li>[X11] Bugfix: Source files EOL was PC style (CR/LF) in v2.4.1 (blame
539
+ my WinCVS configuration)</li>
540
+ <li>[X11] Bugfix: When a GLFW window is closed, input focus is properly
541
+ released</li>
542
+ <li>[X11] Bugfix: Iconification of fullscreen windows should now work
543
+ properly</li>
544
+ <li>[x86 CPUs] Improved RDTSC timing (e.g. RDTSC support on single-CPU
545
+ Intel Hyper-Threading enabled systmes)</li>
546
+ <li>[AmigaOS] Added joystick support</li>
547
+ <li>[AmigaOS] Mouse cursor positioning is now implemented</li>
548
+ <li>[AmigaOS] Added support for Geek Gadgets GCC</li>
549
+ <li>[AmigaOS] Bugfix: glfwGetWindowParam now returns proper values for
550
+ all parameters (except for GLFW_ACCELERATED)</li>
551
+ </ul>
552
+
553
+ <p><h3>v2.4.1</h3>
554
+ <ul>
555
+ <li>Added AmigaOS support (preliminary)</li>
556
+ <li>GLFW for the X Window System now works under Mac OS X</li>
557
+ <li>[Win32] Bugfix: glfwWaitCond treated the timeout as milliseconds
558
+ instead of seconds</li>
559
+ <li>[X11] Bugfix: GLFW should now compile under IRIX v5.3</li>
560
+ <li>[X11] Bugfix: GLFW should now compile with Kylix</li>
561
+ </ul>
562
+
563
+ <p><h3>v2.4</h3>
564
+ <ul>
565
+ <li>Major source code rearrangement - much code is now shared between
566
+ different platforms, and it should be easier to port GLFW to new
567
+ platforms</li>
568
+ <li>Added a Unicode keyboard text input interface (CharCallback)</li>
569
+ <li>Keyboard key input is now slightly more internationalized: GLFW now
570
+ uses 8-bit ISO-8859-1 encoding for keys representing printable
571
+ characters (e.g. &quot;&Ouml;&quot;, &quot;&#167;&quot;, etc), as
572
+ opposed to the previous 7-bit US-ASCII encoding</li>
573
+ <li>Added more key constants (F13-F25, keypad '=')</li>
574
+ <li>Added an enable/disable swicth for automatic event polling from
575
+ glfwSwapBuffers</li>
576
+ <li>[X11] Added support for sysctl for querying the number of processors
577
+ in the system (if POSIX sysconf is not supported)</li>
578
+ <li>[X11] Bugfix: compile.sh now works with Sun sh (and hopefully others
579
+ too)</li>
580
+ <li>[X11] Bugfix: compile.sh now detects the need for -ldl when dlopen is
581
+ used</li>
582
+ <li>[Win32] Bugfix: When closing a fullscreen window under Win 9x/NT4,
583
+ the task bar icon now disappears properly</li>
584
+ <li>[Win32] Bugfix: GLFW should now compile on a wider range of MSVC
585
+ compilers (e.g. .NET) - Thanks Tim Little!</li>
586
+ </ul>
587
+
588
+ <p><h3>v2.3.2</h3>
589
+ <ul>
590
+ <li>Removed the silly limitation of 100 threads (the thread information
591
+ is now kept in a linked list)</li>
592
+ <li>General source cleanup (window state is now kept in a single
593
+ struct, plus some other minor changes)</li>
594
+ <li>[X11] Added Solaris gethrtime() support (not tested yet), which
595
+ should give an improved timer for Sun/Solaris stations</li>
596
+ <li>[X11] Some fixes to the 'compile.sh' script (-O for non-gcc compilers
597
+ and 'make x11-gcc' should now really force GCC)</li>
598
+ </ul>
599
+
600
+ <p><h3>v2.3.1</h3>
601
+ <ul>
602
+ <li>[X11] A minimalist configuration script was added that solves the
603
+ issue with glXGetProcAddressARB, and unifies all Unix/X11 Makefiles
604
+ into one template Makefile (well, one for GLFW, and one for the
605
+ examples)</li>
606
+ </ul>
607
+
608
+ <p><h3>v2.3</h3>
609
+ <ul>
610
+ <li>Added OpenGL stereo rendering support</li>
611
+ <li>Added a function for parsing the OpenGL version string
612
+ (glfwGetGLVersion)</li>
613
+ <li>[x86] Bugfix: Hopefully the CPU core clock dependent timer RDTSC will
614
+ never be used on CPUs with variable core frequencies anymore</li>
615
+ <li>[X11] Bugfix: GLFW could create stereo rendering capable windows,
616
+ even if it was not requested (GLFW v2.2.x did not support selection
617
+ of stereo rendering)</li>
618
+ <li>[X11] Bugfix: glfwGetProcAddress returned NULL on most systems (even
619
+ on those that supported glXGetProcAddressARB). Now GLFW assumes that
620
+ glXGetProcAddressARB is supported on all systems, which solves the
621
+ bug, but may result in compiler errors on some systems (please let me
622
+ know if you have any related problems).</li>
623
+ </ul>
624
+
625
+ <p><h3>v2.2.3</h3>
626
+ <ul>
627
+ <li>Bugfix: Checking for GL_SGIS_generate_mipmap is more robust</li>
628
+ <li>Bugfix: glfwLoadTexture2D will now fail if no window is opened</li>
629
+ <li>[Win32] Bugfix: Right shift was not detected under Win 9x/ME (it is
630
+ still not as good as under NT/2K/XP, but at least you get right
631
+ shifts)</li>
632
+ <li>[X11] Bugfix: Visuals are now selected more accurately. For instance,
633
+ glfwOpenWindow will no longer fail if you request a 24-bit color
634
+ buffer if only 16-bit color visuals are avilable (which means that
635
+ pong3d should work on 16-bit displays).</li>
636
+ </ul>
637
+
638
+ <p><h3>v2.2.2</h3>
639
+ <ul>
640
+ <li>[Win32] Bugfix: Windows did not always get focus (this was a tough
641
+ one!)</li>
642
+ <li>[Win32] Bugfix: glfwGetWindowParam did not work with
643
+ GLFW_ACCUM_*_BITS or GLFW_AUX_BUFFERS</li>
644
+ <li>[X11] Bugfix: Linux joystick Y axis positions were reversed</li>
645
+ </ul>
646
+
647
+ <p><h3>v2.2.1</h3>
648
+ <ul>
649
+ <li>[X11] Added joystick support for Linux</li>
650
+ </ul>
651
+
652
+ <p><h3>v2.2</h3>
653
+ <ul>
654
+ <li>Added joystick support (only supported under Windows so far)</li>
655
+ <li>Added joystick controls to pong3d.c (only 3 more lines of code)</li>
656
+ <li>Added glfwOpenWindowHint() function</li>
657
+ <li>It is now possible to specify a desired vertical monitor refresh
658
+ rate (for fullscreen windows)</li>
659
+ <li>It is now possible to request an accumulator buffer and auxiliary
660
+ buffers</li>
661
+ <li>Added glfwSetTime() function</li>
662
+ <li>Added a GLFW conversion of the MESA/GLUT gears.c demo to the example
663
+ programs</li>
664
+ <li>[Win32] gdi32.dll and winmm.dll are now loaded dynamically when
665
+ glfwInit() is called. This means that there is no need to link with
666
+ gdi32.lib or winmm.lib when using the static version of GLFW, which
667
+ should make GLFW usage more convenient.</li>
668
+ <li>[Win32] Bugfix: Greatly improved keyboard input (detect left/right
669
+ CTRL etc)</li>
670
+ <li>[Win32] Bugfix: glfwExtensionSupported now detects all WGL extensions
671
+ (e.g. WGL_ARB_pbuffer)</li>
672
+ <li>[Win32] Bugfix: Mouse cursor was not re-hidden when a GLFW window was
673
+ deselected and then selected again (with ALT+TAB)</li>
674
+ <li>[X11] Bugfix: Minor bug in the SGI timer - and ugly (unintended) SGI
675
+ timer debug info removed</li>
676
+ <li>[X11] Bugfix: glfwGetDesktopMode and glfwGetVideoModes no longer give
677
+ segmentation faults if no X server is available</li>
678
+ </ul>
679
+
680
+ <p><h3>v2.1</h3>
681
+ <ul>
682
+ <li>Added image and texture loading capabilities (support for the TGA
683
+ file format at the moment)</li>
684
+ <li>Added a new example program (mipmaps.c) for showing off the automatic
685
+ mipmap generation and texture loading capabilities of GLFW 2.1</li>
686
+ <li>Removed the separate TGA loader (tga.c in the examples directory)
687
+ since texture loading is supported natively by GLFW. Also updated the
688
+ Pong3D demo to use GLFW texture loading instead of tga.c.</li>
689
+ <li>Improved keyboard handling (e.g. numeric keypad keys can be
690
+ detected)</li>
691
+ <li>Added a new example program, keytest.c</li>
692
+ <li>Changed the GLFWvidmode structure and the corresponding API functions
693
+ to report pure color bits instead of the confusing (and unportable)
694
+ "BPP" field</li>
695
+ <li>Changed glfwSetWindowSize so that it operates in fullscreen mode
696
+ too</li>
697
+ <li>Added mouse wheel support under Windows (not Win95) and X11</li>
698
+ <li>Added window iconification functions (glfwInconifyWindow and
699
+ glfwRestoreWindow)</li>
700
+ <li>Improved iconification and deactivation handling under both Windows
701
+ and X11</li>
702
+ <li>Made it possible to turn on/off key repeat (the default is now no key
703
+ repeat)</li>
704
+ <li>Added SGI hardware timer support (CLOCK_SGI_CYCLE) for improved
705
+ timer resolution for SGI computers</li>
706
+ <li>Added support for the free Borland C++ Builder 5.x compiler for
707
+ Windows</li>
708
+ <li>Made it possible to compiler GLFW as a Windows DLL using any of the
709
+ supported compilers</li>
710
+ <li>Some constants have changed names (e.g. GLFW_REDBITS is now called
711
+ GLFW_RED_BITS)</li>
712
+ <li>Updated GLFW documentation (GLFW Users Guide and GLFW Reference
713
+ Manual) to reflect the changes in the API</li>
714
+ <li>[Win32] Bugfix: Corrected Cygwin toplevel makefile entry</li>
715
+ <li>[Win32] Bugfix: Fixed event lag bug</li>
716
+ <li>[Win32] Bugfix: Fixed Radeon 8500 crash</li>
717
+ <li>[X11] Bugfix: Fixed the window close bug</li>
718
+ <li>[X11] Bugfix: Iconification/deactivation is now detected</li>
719
+ <li>[X11] Bugfix: Non-OpenGL visuals are not listed anymore</li>
720
+ <li>[XFree86] Bugfix: Undesired video mode changes are now prevented</li>
721
+ </ul>
722
+
723
+ <p><h3>v2.0.3</h3>
724
+ <ul>
725
+ <li>Added precise CPU cycle based timing support (RDTSC) for x86
726
+ CPUs (under both Windows and Unix)</li>
727
+ <li>Added a makefile option for building for Windows with Cygwin</li>
728
+ <li>Corrected the CC for Unix/X11 makefiles (-Wall is usually not a
729
+ supported flag for CC, so it was removed from the CFLAGS list)</li>
730
+ </ul>
731
+
732
+ <p><h3>v2.0.2</h3>
733
+ <ul>
734
+ <li>Added a makefile option for building for X11 with 'cc' rather than
735
+ 'gcc' (useful for IRIX users for instance).</li>
736
+ <li>[Win32] Bugfix: Mouse coordinates are now relative to the window
737
+ upper left corner, which also means that disabling the mouse cursor
738
+ in windowed mode should work much better.</li>
739
+ <li>[X11] Bugfix: Added a bunch of more keys that are recognized by
740
+ GLFW.</li>
741
+ <li>[X11] Bugfix: glfwGetNumberOfProcessors now works for IRIX (earlier
742
+ versions of GLFW would not compile under IRIX).</li>
743
+ </ul>
744
+
745
+ <p><h3>v2.0.1</h3>
746
+ <ul>
747
+ <li>glfwTerminate() will now be called automatically upon normal program
748
+ termination (using atexit())</li>
749
+ <li>[Win32] Bugfix: Buffer-swapping did not work if a window lost
750
+ focus.</li>
751
+ <li>[Win32] Bugfix: Top level Makefile did not work under Windows
752
+ 9x.</li>
753
+ <li>[Win32] Bugfix: NULL declaratoin in glfw.h was not MSVC 7.x
754
+ compatible.</li>
755
+ <li>[X11] Bugfix: GLFW would not build with C++ (e.g. g++).</li>
756
+ </ul>
757
+
758
+ <h3>v2.0</h3>
759
+ <ul>
760
+ <li>GLFW is no longer a single source file, but an entire link library.</li>
761
+ <li>Added multi threading support.</li>
762
+ <li>Added more window control.</li>
763
+ <li>New distribution layout (both Win32 and X11 version in same archive).</li>
764
+ <li>Added GLFW Users Manual and GLFW Reference Manual as PDF files.</li>
765
+ <li>Some bugfixes.</li>
766
+ </ul>
767
+
768
+ <p><h3>v1.0.2</h3>
769
+ <ul>
770
+ <li>Improved fullscreen functionality.</li>
771
+ <li>Added fullscreen support for X11.</li>
772
+ </ul>
773
+
774
+ <p><h3>v1.0.1</h3>
775
+ <ul>
776
+ <li>Added support for the X Window System.</li>
777
+ <li>Fixed bugs.</li>
778
+ </ul>
779
+
780
+ <p><h3>v1.0.0</h3>
781
+ <ul>
782
+ <li>First release.</li>
783
+ <li>Only supported Windows.</li>
784
+ </ul>
785
+
786
+
787
+ <p><hr>
788
+
789
+ <a name="sec6">
790
+ <p><h2>6. Directory structure of the GLFW distribution</h2>
791
+
792
+ <p>Here is an overview of the directory structure of the GLFW distribution:
793
+
794
+ <p>
795
+ <table border=0 cellspacing=0>
796
+ <tr valign="top"><td width=100><b>docs</b></td><td>&nbsp;</td><td>GLFW manuals in PDF format</td></tr>
797
+ <tr valign="top"><td><b>examples</b></td><td>&nbsp;</td><td>Several example programs in C</td></tr>
798
+ <tr valign="top"><td><b>images</b></td><td>&nbsp;</td><td>Images for this HTML document</td></tr>
799
+ <tr valign="top"><td><b>include</b></td><td>&nbsp;</td><td>&nbsp;</td></tr>
800
+ <tr valign="top"><td><b>&nbsp;&nbsp;&nbsp;GL</b></td><td>&nbsp;</td><td>Here is the GLFW C/C++ include file</td></tr>
801
+ <tr valign="top"><td><b>lib</b></td><td>&nbsp;</td><td>The source code for GLFW</td></tr>
802
+ <tr valign="top"><td><b>&nbsp;&nbsp;&nbsp;amigaos</b></td><td>&nbsp;</td><td>AmigaOS specific implementation (obsoleted)</td></tr>
803
+ <tr valign="top"><td><b>&nbsp;&nbsp;&nbsp;dos</b></td><td>&nbsp;</td><td>DOS specific implementation (obsoleted)</td></tr>
804
+ <tr valign="top"><td><b>&nbsp;&nbsp;&nbsp;macosx</b></td><td>&nbsp;</td><td>Mac OS X specific implementation</td></tr>
805
+ <tr valign="top"><td><b>&nbsp;&nbsp;&nbsp;win32</b></td><td>&nbsp;</td><td>Windows specific implementation</td></tr>
806
+ <tr valign="top"><td><b>&nbsp;&nbsp;&nbsp;x11</b></td><td>&nbsp;</td><td>Unix/X11 specific implementation</td></tr>
807
+ <tr valign="top"><td><b>support</b></td><td>&nbsp;</td><td>&nbsp;</td></tr>
808
+ <tr valign="top"><td><b>&nbsp;&nbsp;&nbsp;d</b></td><td>&nbsp;</td><td>D support</td></tr>
809
+ <tr valign="top"><td><b>&nbsp;&nbsp;&nbsp;delphi</b></td><td>&nbsp;</td><td>Delphi support</td></tr>
810
+ <tr valign="top"><td><b>&nbsp;&nbsp;&nbsp;lua</b></td><td>&nbsp;</td><td>Lua support</td></tr>
811
+ <tr valign="top"><td><b>&nbsp;&nbsp;&nbsp;masm</b></td><td>&nbsp;</td><td>MASM32 support</td></tr>
812
+ <tr valign="top"><td><b>&nbsp;&nbsp;&nbsp;visualbasic</b></td><td>&nbsp;</td><td>Visual Basic support</td></tr>
813
+ </table>
814
+ <br><br>
815
+
816
+
817
+ <p><hr>
818
+
819
+ <a name="sec7">
820
+ <p><h2>7. Contacting the project</h2>
821
+
822
+ <p>The official GLFW web site can be found here:
823
+ <a href="http://glfw.sourceforge.net/">http://glfw.sourceforge.net/</a>. It contains the latest version of GLFW, news and other information that is
824
+ useful for OpenGL development.</p>
825
+
826
+ <p>If you have questions related to the use of <b>GLFW</b>, we have a <a
827
+ href="https://sourceforge.net/forum/forum.php?forum_id=247562"
828
+ target="_blank">user's web forum</a>, and a <a
829
+ href="https://lists.sourceforge.net/lists/listinfo/glfw-user"
830
+ target="_blank">user's mailing list</a> on SF.net, and the IRC channel
831
+ <code>#glfw</code> on <a href="http://freenode.net/"
832
+ target="_blank">Freenode</a>.</p>
833
+
834
+ <p>If you have a bug to report or a feature you'd like to request, please file
835
+ it in the <a href="http://sourceforge.net/tracker/?group_id=72569"
836
+ target="_blank">SF.net trackers</a>.</p>
837
+
838
+ Finally, if you're interested in helping out with the development of
839
+ <b>GLFW</b> or porting it to your favorite platform, we have a <a
840
+ href="https://lists.stacken.kth.se/mailman/listinfo/glfw-dev"
841
+ target="_blank">developer's mailing list</a>, or you could join us on
842
+ <code>#glfw</code>.
843
+
844
+
845
+ <p><hr>
846
+
847
+ <a name="sec8">
848
+ <h2>8. Acknowledgements</h2>
849
+
850
+ <p>GLFW would not be what it is today without the help from:
851
+ <ul>
852
+
853
+ <li>Marcus Geelnard, the orignal author and long-time maintainer of GLFW,
854
+ without whose brilliant work none of this would have happened.</li><br>
855
+
856
+ <li>Robin Leffmann, for his work on Mac OS X and other platforms, and his
857
+ invaluable support.</li><br>
858
+
859
+ <li>Keith Bauer, for his invaluable help with porting and maintaining GLFW on
860
+ Mac OS X, and for his many ideas.</li><br>
861
+
862
+ <li>Ozzy @ <a href="http://www.orkysquad.org" target="_blank">Orkysquad</a>,
863
+ for his dedication to GLFW, for debugging my source, and for his
864
+ valuable experience with game development.</li><br>
865
+
866
+ <li>Jeff Molofee, the author of the excellent OpenGL tutorials at <a
867
+ href="http://nehe.gamedev.net/" target="_blank">NeHe Productions</a>.
868
+ Much of the Windows code of GLFW was originally based on Jeff's
869
+ code.</li><br>
870
+
871
+ <li>Douglas C. Schmidt and Irfan Pyarali, for their excellent article <a
872
+ href="http://www.cs.wustl.edu/~schmidt/win32-cv-1.html"
873
+ target="_blank">Strategies for Implementing POSIX Condition Variables on
874
+ Win32</a>, which is the basis for the Win32 condition variable
875
+ implementation in GLFW.</li><br>
876
+
877
+ <li>Bobyshev Alexander and Martins Mozeiko, for the original proposal of
878
+ an FSAA hint and their work on the Win32 implementation of FSAA.</li><br>
879
+
880
+ <li>Gerald Franz, who made GLFW compile under IRIX, and supplied patches
881
+ for the X11 keyboard translation routine.</li><br>
882
+
883
+ <li>Bradley Smith, for his updates of the D support and his ports of the
884
+ remaining examples to the D language.</li><br>
885
+
886
+ <li>Olivier Delannoy, for the initial implementation of FSAA support on
887
+ X11, cross-compiling support for MinGW and general extreme usefulness.</li>
888
+
889
+ <li>Glenn Lewis, for helping out with support for the D programming
890
+ language.</li><br>
891
+
892
+ <li>David Medlock, for doing the initial Lua port.</li><br>
893
+
894
+ <li>Frank Wille, for helping me with the AmigaOS port and making GLFW
895
+ compile under IRIX 5.3.</li><br>
896
+
897
+ <li>Matt Sealey, for helping me with the MorphOS port.</li><br>
898
+
899
+ <li>Paul R. Deppe, who helped me with Cygwin support, and made an
900
+ adaption of <a href="http://plib.sourceforge.net/" target="_blank">PLIB</a>
901
+ so that it can use GLFW (instead of GLUT).</li><br>
902
+
903
+ <li>Jarrod Davis, for the Delphi port of GLFW.</li><br>
904
+
905
+ <li>Toni Jovanoski, for helping me with the MASM32 port of GLFW, and
906
+ supplying the example program and fixed OpenGL and GLU bindings for
907
+ MASM32.</li><br>
908
+
909
+ <li>Sebastian Schuberth, for the OpenWatcom makefiles.</li><br>
910
+
911
+ <li>Dmitri Shuralyov, Samuli Tuomola, Santi Zupancic, Sylvain
912
+ Hellegouarch, and many others for support, bug reports and
913
+ testing.</li><br>
914
+
915
+ <li><a href="http://www.opengl.org/" target="_blank">www.opengl.org</a>,
916
+ and all the people on the discussion forums there that have provided
917
+ help during the development of GLFW.</li><br>
918
+
919
+ <li>The <a href="http://msdn.microsoft.com/library/"
920
+ target="_blank">MSDN Online Linrary</a>, which was used extensively for
921
+ Windows development.</li><br>
922
+
923
+ <li>All the feedback from the GLFW community - thank you!</li><br>
924
+ </ul>
925
+
926
+ </body>
927
+ </html>