2009-12-31 00:06:32 +00:00
|
|
|
<!-- begin header.html -->
|
2005-01-05 01:17:23 +00:00
|
|
|
<!--
|
2008-10-27 01:32:09 +00:00
|
|
|
The OpenGL Extension Wrangler Library
|
2023-10-06 23:15:32 +00:00
|
|
|
Copyright (C) 2008-2023, Nigel Stewart <nigels[]nigels.com>
|
2008-10-27 01:32:09 +00:00
|
|
|
Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
|
|
|
Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
|
|
|
Copyright (C) 2002, Lev Povalahev
|
|
|
|
All rights reserved.
|
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
|
|
modification, are permitted provided that the following conditions are met:
|
|
|
|
|
|
|
|
* Redistributions of source code must retain the above copyright notice,
|
|
|
|
this list of conditions and the following disclaimer.
|
|
|
|
* Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
this list of conditions and the following disclaimer in the documentation
|
|
|
|
and/or other materials provided with the distribution.
|
|
|
|
* The name of the author may be used to endorse or promote products
|
|
|
|
derived from this software without specific prior written permission.
|
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
|
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
|
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
|
|
|
THE POSSIBILITY OF SUCH DAMAGE.
|
2005-01-05 01:17:23 +00:00
|
|
|
-->
|
2005-03-15 04:22:50 +00:00
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html/4/loose.dtd">
|
2005-01-05 01:17:23 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
2009-12-31 00:06:32 +00:00
|
|
|
<title>GLEW: The OpenGL Extension Wrangler Library</title>
|
2005-03-15 04:22:50 +00:00
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
|
|
<link href="glew.css" type="text/css" rel="stylesheet">
|
2005-01-05 01:17:23 +00:00
|
|
|
</head>
|
|
|
|
<body bgcolor="#fff0d0">
|
2009-12-31 00:06:32 +00:00
|
|
|
<table border="0" width="100%" cellpadding="12" cellspacing="8" style="height:100%">
|
2005-01-05 01:17:23 +00:00
|
|
|
<tr>
|
|
|
|
<td bgcolor="#ffffff" align="left" valign="top" width="200">
|
|
|
|
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
|
|
|
|
<tr>
|
|
|
|
<td valign="top">
|
2009-12-31 00:06:32 +00:00
|
|
|
|
2005-01-05 01:17:23 +00:00
|
|
|
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
|
2023-10-06 23:15:32 +00:00
|
|
|
<tr><td align="center"><i>Latest Release: <a href="https://github.com/nigels-com/glew/releases/tag/glew-2.3.0">2.3.0</a></i></td></tr>
|
2005-01-05 01:17:23 +00:00
|
|
|
<tr><td align="center"><br></td></tr>
|
|
|
|
<tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr>
|
|
|
|
<tr><td align="center"><br></td></tr>
|
|
|
|
<tr><td align="center">
|
|
|
|
<table border="0" cellpadding="0" cellspacing="0" align="center">
|
2005-01-06 06:54:46 +00:00
|
|
|
<tr><td align="center"><a href="index.html">Download</a></td></tr>
|
2011-08-20 23:17:18 +00:00
|
|
|
<tr><td align="center"><a href="basic.html">Usage</a></td></tr>
|
|
|
|
<tr><td align="center"><a href="build.html">Building</a></td></tr>
|
2009-12-31 00:06:32 +00:00
|
|
|
<tr><td align="center">Installation</td></tr>
|
2011-08-20 23:17:18 +00:00
|
|
|
<tr><td align="center"><a href="advanced.html">Source Generation</a></td></tr>
|
2016-02-06 02:53:49 +00:00
|
|
|
<tr><td align="center"><br></tr>
|
2015-01-24 12:23:50 +00:00
|
|
|
<tr><td align="center"><a href="https://github.com/nigels-com/glew">GitHub</a></td></tr>
|
2016-02-06 02:53:49 +00:00
|
|
|
<tr><td align="center"><a href="https://github.com/nigels-com/glew/issues">Issues</a></td></tr>
|
|
|
|
<tr><td align="center"><a href="https://github.com/nigels-com/glew/pulls">Pull Requests</a></td></tr>
|
2023-10-06 23:15:32 +00:00
|
|
|
<tr><td align="center"><a href="https://github.com/nigels-com/glew/releases">Releases</a></td></tr>
|
|
|
|
<tr><td align="center"><br></tr>
|
|
|
|
<tr><td align="center"><br>Also</tr>
|
|
|
|
<tr><td align="center"><a href="https://github.com/Perlmint/glew-cmake">Perlmint/glew-cmake</a></td></tr>
|
2016-02-06 02:53:49 +00:00
|
|
|
<tr><td align="center"><br></tr>
|
2005-01-05 01:17:23 +00:00
|
|
|
</table>
|
|
|
|
<tr><td align="center"><br></tr>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2009-12-31 00:06:32 +00:00
|
|
|
|
2005-01-05 01:17:23 +00:00
|
|
|
<td valign="bottom">
|
|
|
|
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
|
2023-10-06 23:15:32 +00:00
|
|
|
<tr><td align="center"><i>Last Update: 10-10-23</i></td></tr>
|
2005-01-06 06:54:46 +00:00
|
|
|
<tr><td align="center">
|
2015-01-24 12:23:50 +00:00
|
|
|
<a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/>
|
|
|
|
<a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/>
|
|
|
|
<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=67586&type=1" width="88" height="31" border="0" alt="SourceForge Logo"></a>
|
2005-01-06 06:54:46 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2005-01-05 01:17:23 +00:00
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td bgcolor="#ffffff" align="left" valign="top">
|
|
|
|
|
2009-12-31 00:06:32 +00:00
|
|
|
<h1>The OpenGL Extension Wrangler Library</h1>
|
|
|
|
|
|
|
|
<!-- end header.html -->
|
|
|
|
|
2005-01-05 01:17:23 +00:00
|
|
|
|
|
|
|
<h2>Installation</h2>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
To use the shared library version of GLEW, you need to copy the
|
|
|
|
headers and libraries into their destination directories. On Windows
|
|
|
|
this typically boils down to copying:
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<table border="0" cellpadding="0" cellspacing="0" align="center"> <!-- bgcolor="#f0f0f0" -->
|
2005-02-03 03:49:03 +00:00
|
|
|
<tr><td align="left"><tt>bin/glew32.dll</tt></td><td> to </td>
|
2005-01-05 01:17:23 +00:00
|
|
|
<td align="left"><tt>%SystemRoot%/system32</tt></td></tr>
|
|
|
|
<tr><td align="left"><tt>lib/glew32.lib</tt></td><td> to </td>
|
|
|
|
<td align="left"><tt>{VC Root}/Lib</tt></td></tr>
|
|
|
|
<tr><td align="left"><tt>include/GL/glew.h</tt></td><td> to </td>
|
|
|
|
<td align="left"><tt>{VC Root}/Include/GL</tt></td></tr>
|
|
|
|
<tr><td align="left"><tt>include/GL/wglew.h</tt></td><td> to </td>
|
|
|
|
<td align="left"><tt>{VC Root}/Include/GL</tt></td></tr>
|
|
|
|
</table>
|
|
|
|
<p>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
where <tt>{VC Root}</tt> is the Visual C++ root directory, typically
|
|
|
|
<tt>C:/Program Files/Microsoft Visual Studio/VC98</tt> for Visual
|
|
|
|
Studio 6.0 or <tt>C:/Program Files/Microsoft Visual
|
2005-01-30 22:12:33 +00:00
|
|
|
Studio .NET 2003/Vc7/PlatformSDK</tt> for Visual Studio .NET.
|
2005-01-05 01:17:23 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
On Unix, typing <tt>make install</tt> will attempt to install GLEW
|
|
|
|
into <tt>/usr/include/GL</tt> and <tt>/usr/lib</tt>. You can
|
|
|
|
customize the installation target via the <tt>GLEW_DEST</tt>
|
|
|
|
environment variable if you do not have write access to these
|
|
|
|
directories.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<h2>Building Your Project with GLEW</h2>
|
|
|
|
<p>
|
|
|
|
There are two ways to build your project with GLEW.
|
|
|
|
</p>
|
|
|
|
<h3>Including the source files / project file</h3>
|
|
|
|
<p>
|
|
|
|
The simpler but less flexible way is to include <tt>glew.h</tt> and
|
|
|
|
<tt>glew.c</tt> into your project. On Windows, you also need to
|
|
|
|
define the <tt>GLEW_STATIC</tt> preprocessor token when building a
|
|
|
|
static library or executable, and the <tt>GLEW_BUILD</tt> preprocessor
|
|
|
|
token when building a dll. You also need to replace
|
|
|
|
<tt><GL/gl.h></tt> and <tt><GL/glu.h></tt> with
|
|
|
|
<tt><glew.h></tt> in your code and set the appropriate include
|
|
|
|
flag (<tt>-I</tt>) to tell the compiler where to look for it. For
|
|
|
|
example:
|
|
|
|
</p>
|
|
|
|
<p class="pre">
|
|
|
|
#include <glew.h><br>
|
|
|
|
#include <GL/glut.h><br>
|
|
|
|
<gl, glu, and glut functionality is available here><br>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
Depending on where you put <tt>glew.h</tt> you may also need to change
|
|
|
|
the include directives in <tt>glew.c</tt>. Note that if you are using
|
|
|
|
GLEW together with GLUT, you have to include <tt>glew.h</tt> first.
|
|
|
|
In addition, <tt>glew.h</tt> includes <tt>glu.h</tt>, so you do not
|
|
|
|
need to include it separately.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
On Windows, you also have the option of adding the supplied project
|
|
|
|
file <tt>glew_static.dsp</tt> to your workspace (solution) and compile
|
|
|
|
it together with your other projects. In this case you also need to
|
|
|
|
change the <tt>GLEW_BUILD</tt> preprocessor constant to
|
|
|
|
<tt>GLEW_STATIC</tt> when building a static library or executable,
|
|
|
|
otherwise you get build errors.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<b>Note that GLEW does not use the C
|
|
|
|
runtime library, so it does not matter which version (single-threaded,
|
|
|
|
multi-threaded or multi-threaded DLL) it is linked with (without
|
|
|
|
debugging information). It is, however, always a good idea to compile all
|
|
|
|
your projects including GLEW with the same C runtime settings.</b>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<h3>Using GLEW as a shared library</h3>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
Alternatively, you can use the provided project files / makefile to
|
|
|
|
build a separate shared library you can link your projects with later.
|
|
|
|
In this case the best practice is to install <tt>glew.h</tt>,
|
|
|
|
<tt>glew32.lib</tt>, and <tt>glew32.dll</tt> / <tt>libGLEW.so</tt> to
|
|
|
|
where the OpenGL equivalents <tt>gl.h</tt>, <tt>opengl32.lib</tt>, and
|
|
|
|
<tt>opengl32.dll</tt> / <tt>libGL.so</tt> are located. Note that you
|
|
|
|
need administrative privileges to do this. If you do not have
|
|
|
|
administrator access and your system administrator will not do it for
|
|
|
|
you, you can install GLEW into your own lib and include subdirectories
|
|
|
|
and tell the compiler where to find it. Then you can just replace
|
|
|
|
<tt><GL/gl.h></tt> with <tt><GL/glew.h></tt> in your
|
|
|
|
program:
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p class="pre">
|
|
|
|
#include <GL/glew.h><br>
|
|
|
|
#include <GL/glut.h><br>
|
|
|
|
<gl, glu, and glut functionality is available here><br>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
or:
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p class="pre">
|
|
|
|
#include <GL/glew.h><br>
|
|
|
|
<gl and glu functionality is available here><br>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
Remember to link your project with <tt>glew32.lib</tt>,
|
|
|
|
<tt>glu32.lib</tt>, and <tt>opengl32.lib</tt> on Windows and
|
|
|
|
<tt>libGLEW.so</tt>, <tt>libGLU.so</tt>, and <tt>libGL.so</tt> on
|
|
|
|
Unix (<tt>-lGLEW -lGLU -lGL</tt>).
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
It is important to keep in mind that <tt>glew.h</tt> includes neither
|
|
|
|
<tt>windows.h</tt> nor <tt>gl.h</tt>. Also, GLEW will warn you by
|
|
|
|
issuing a preprocessor error in case you have included <tt>gl.h</tt>,
|
|
|
|
<tt>glext.h</tt>, or <tt>glATI.h</tt> before <tt>glew.h</tt>.
|
|
|
|
</p>
|
|
|
|
|
2009-12-31 00:06:32 +00:00
|
|
|
<!-- begin footer.html -->
|
|
|
|
</td></tr></table></body>
|
|
|
|
<!-- end footer.html -->
|
2005-01-05 01:17:23 +00:00
|
|
|
|