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

233 lines
9.5KB

  1. <!-- begin header.html -->
  2. <!--
  3. The OpenGL Extension Wrangler Library
  4. Copyright (C) 2008-2015, Nigel Stewart <nigels[]users sourceforge net>
  5. Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
  6. Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
  7. Copyright (C) 2002, Lev Povalahev
  8. All rights reserved.
  9. Redistribution and use in source and binary forms, with or without
  10. modification, are permitted provided that the following conditions are met:
  11. * Redistributions of source code must retain the above copyright notice,
  12. this list of conditions and the following disclaimer.
  13. * Redistributions in binary form must reproduce the above copyright notice,
  14. this list of conditions and the following disclaimer in the documentation
  15. and/or other materials provided with the distribution.
  16. * The name of the author may be used to endorse or promote products
  17. derived from this software without specific prior written permission.
  18. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  19. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  20. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  21. ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  22. LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  23. CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  24. SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  25. INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  26. CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  27. ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  28. THE POSSIBILITY OF SUCH DAMAGE.
  29. -->
  30. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd">
  31. <html>
  32. <head>
  33. <title>GLEW: The OpenGL Extension Wrangler Library</title>
  34. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  35. <link href="glew.css" type="text/css" rel="stylesheet">
  36. </head>
  37. <body bgcolor="#fff0d0">
  38. <table border="0" width="100%" cellpadding="12" cellspacing="8" style="height:100%">
  39. <tr>
  40. <td bgcolor="#ffffff" align="left" valign="top" width="200">
  41. <table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
  42. <tr>
  43. <td valign="top">
  44. <table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
  45. <tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/2.1.0/">2.1.0</a></i></td></tr>
  46. <tr><td align="center"><br></td></tr>
  47. <tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr>
  48. <tr><td align="center"><br></td></tr>
  49. <tr><td align="center">
  50. <table border="0" cellpadding="0" cellspacing="0" align="center">
  51. <tr><td align="center"><a href="index.html">Download</a></td></tr>
  52. <tr><td align="center"><a href="basic.html">Usage</a></td></tr>
  53. <tr><td align="center"><a href="build.html">Building</a></td></tr>
  54. <tr><td align="center"><a href="install.html">Installation</a></td></tr>
  55. <tr><td align="center">Source Generation</td></tr>
  56. <tr><td align="center"><a href="log.html">Change Log</a></td></tr>
  57. <tr><td align="center"><br></tr>
  58. <tr><td align="center"><a href="https://github.com/nigels-com/glew">GitHub</a></td></tr>
  59. <tr><td align="center"><a href="https://github.com/nigels-com/glew/issues">Issues</a></td></tr>
  60. <tr><td align="center"><a href="https://github.com/nigels-com/glew/pulls">Pull Requests</a></td></tr>
  61. <tr><td align="center"><a href="https://github.com/nigels-com/glew#authors">Authors</a></td></tr>
  62. <tr><td align="center"><a href="https://github.com/nigels-com/glew#copyright-and-licensing">Licensing</a></td></tr>
  63. <tr><td align="center"><br></tr>
  64. <tr><td align="center"><a href="https://sourceforge.net/projects/glew">SourceForge Page</a></td></tr>
  65. </table>
  66. <tr><td align="center"><br></tr>
  67. </table>
  68. </td>
  69. </tr>
  70. <tr>
  71. <td valign="bottom">
  72. <table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
  73. <tr><td align="center"><i>Last Update: 07-31-17</i></td></tr>
  74. <tr><td align="center">
  75. <a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/>
  76. <a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/>
  77. <a href="https://travis-ci.org/nigels-com/glew/builds"><img src="travis.png" width="114" height="25" border="0" alt="Travis Logo"></a><br/>
  78. <a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=67586&amp;type=1" width="88" height="31" border="0" alt="SourceForge Logo"></a>
  79. </td>
  80. </tr>
  81. </table>
  82. </td>
  83. </tr>
  84. </table>
  85. </td>
  86. <td bgcolor="#ffffff" align="left" valign="top">
  87. <h1>The OpenGL Extension Wrangler Library</h1>
  88. <!-- end header.html -->
  89. <h2>Automatic Code Generation</h2>
  90. <p>
  91. Starting from release 1.1.0, the source code and parts of the
  92. documentation are automatically generated from the extension
  93. specifications in a two-step process. In the first step,
  94. specification files from the OpenGL registry are downloaded and
  95. parsed. Skeleton descriptors are created for each extension. These
  96. descriptors contain all necessary information for creating the source
  97. code and documentation in a simple and compact format, including the
  98. name of the extension, url link to the specification, tokens, function
  99. declarations, typedefs and struct definitions. In the second step,
  100. the header files as well as the library and glewinfo source are
  101. generated from the descriptor files. The code generation scripts are
  102. located in the <tt>auto</tt> subdirectory.
  103. </p>
  104. <p>
  105. The code generation scripts require GNU make, wget, and perl. On
  106. Windows, the simplest way to get access to these tools is to install
  107. <a href="http://www.cygwin.com/">Cygwin</a>, but make sure that the
  108. root directory is mounted in binary mode. The makefile in the
  109. <tt>auto</tt> directory provides the following build targets:
  110. </p>
  111. <table border=0 cellpadding=0 cellspacing=5>
  112. <tr><td align="left" valign="top"><tt>make</tt></td>
  113. <td align=left>Create the source files from the descriptors.<br/> If the
  114. descriptors do not exist, create them from the spec files.<br/> If the spec
  115. files do not exist, download them from the OpenGL repository.</td></tr>
  116. <tr><td align="left" valign="top"><tt>make&nbsp;clean</tt></td>
  117. <td align=left>Delete the source files.</td></tr>
  118. <tr><td align="left" valign="top"><tt>make&nbsp;clobber</tt></td>
  119. <td align=left>Delete the source files and the descriptors.</td></tr>
  120. <tr><td align="left" valign="top"><tt>make&nbsp;destroy</tt></td>
  121. <td align=left>Delete the source files, the descriptors, and the spec files.</td></tr>
  122. <tr><td align="left" valign="top"><tt>make&nbsp;custom</tt></td>
  123. <td align=left>Create the source files for the extensions
  124. listed in <tt>auto/custom.txt</tt>.<br/> See "Custom Code
  125. Generation" below for more details.</td></tr>
  126. </table>
  127. <h3>Adding a New Extension</h3>
  128. <p>
  129. To add a new extension, create a descriptor file for the extension in
  130. <tt>auto/core</tt> and rerun the code generation scripts by typing
  131. <tt>make clean; make</tt> in the <tt>auto</tt> directory.
  132. </p>
  133. <p>
  134. The format of the descriptor file is given below. Items in
  135. brackets are optional.
  136. </p>
  137. <p class="pre">
  138. &lt;Extension Name&gt;<br>
  139. [&lt;URL of Specification File&gt;]<br>
  140. &nbsp;&nbsp;&nbsp;&nbsp;[&lt;Token Name&gt; &lt;Token Value&gt;]<br>
  141. &nbsp;&nbsp;&nbsp;&nbsp;[&lt;Token Name&gt; &lt;Token Value&gt;]<br>
  142. &nbsp;&nbsp;&nbsp;&nbsp;...<br>
  143. &nbsp;&nbsp;&nbsp;&nbsp;[&lt;Typedef&gt;]<br>
  144. &nbsp;&nbsp;&nbsp;&nbsp;[&lt;Typedef&gt;]<br>
  145. &nbsp;&nbsp;&nbsp;&nbsp;...<br>
  146. &nbsp;&nbsp;&nbsp;&nbsp;[&lt;Function Signature&gt;]<br>
  147. &nbsp;&nbsp;&nbsp;&nbsp;[&lt;Function Signature&gt;]<br>
  148. &nbsp;&nbsp;&nbsp;&nbsp;...<br>
  149. <!-- &nbsp;&nbsp;&nbsp;&nbsp;[&lt;Function Definition&gt;]<br>
  150. &nbsp;&nbsp;&nbsp;&nbsp;[&lt;Function Definition&gt;]<br>
  151. &nbsp;&nbsp;&nbsp;&nbsp;...<br> -->
  152. </p>
  153. <!--
  154. <p>
  155. Note that <tt>Function Definitions</tt> are copied to the header files
  156. without changes and have to be terminated with a semicolon. In
  157. contrast, <tt>Tokens</tt>, <tt>Function signatures</tt>, and
  158. <tt>Typedefs</tt> should not be terminated with a semicolon.
  159. </p>
  160. -->
  161. <p>
  162. Take a look at one of the files in <tt>auto/core</tt> for an
  163. example. Note that typedefs and function signatures should not be
  164. terminated with a semicolon.
  165. </p>
  166. <h3>Custom Code Generation</h3>
  167. <p>
  168. Starting from GLEW 1.3.0, it is possible to control which extensions
  169. to include in the libarary by specifying a list in
  170. <tt>auto/custom.txt</tt>. This is useful when you do not need all the
  171. extensions and would like to reduce the size of the source files.
  172. Type <tt>make clean; make custom</tt> in the <tt>auto</tt> directory
  173. to rerun the scripts with the custom list of extensions.
  174. </p>
  175. <p>
  176. For example, the following is the list of extensions needed to get GLEW and the
  177. utilities to compile.
  178. </p>
  179. <p class="pre">
  180. WGL_ARB_extensions_string<br>
  181. WGL_ARB_multisample<br>
  182. WGL_ARB_pixel_format<br>
  183. WGL_ARB_pbuffer<br>
  184. WGL_EXT_extensions_string<br>
  185. WGL_ATI_pixel_format_float<br>
  186. WGL_NV_float_buffer<br>
  187. </p>
  188. <h2>Separate Namespace</h2>
  189. <p>
  190. To avoid name clashes when linking with libraries that include the
  191. same symbols, extension entry points are declared in a separate
  192. namespace (release 1.1.0 and up). This is achieved by aliasing OpenGL
  193. function names to their GLEW equivalents. For instance,
  194. <tt>glFancyFunction</tt> is simply an alias to
  195. <tt>glewFancyFunction</tt>. The separate namespace does not effect
  196. token and function pointer definitions.
  197. </p>
  198. <h2>Known Issues</h2>
  199. <p>
  200. GLEW requires GLX 1.2 for compatibility with GLUT.
  201. </p>
  202. <!-- begin footer.html -->
  203. </td></tr></table></body>
  204. <!-- end footer.html -->