mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-22 22:55:06 +00:00
documentation update
git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@352 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
parent
28d1bcd4bf
commit
3aabbe2a2a
@ -25,13 +25,12 @@ GLEW: The OpenGL Extension Wrangler Library
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
|
||||
<tr><td align="center"><i>Latest Release: <a href="http://sourceforge.net/project/showfiles.php?group_id=67586&package_id=67942&release_id=287948">1.3.0</a></i></td></tr>
|
||||
<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">
|
||||
<tr><td align="center"><a href="index.html">Download</a></td></tr>
|
||||
<tr><td align="center"><a href="index.html">Home</a></td></tr>
|
||||
<tr><td align="center"><a href="install.html">Installation</a></td></tr>
|
||||
<tr><td align="center"><a href="basic.html">Basic Usage</a></td></tr>
|
||||
<tr><td align="center"><a href="advanced.html">Advanced Usage</a></td></tr>
|
||||
@ -48,15 +47,6 @@ GLEW: The OpenGL Extension Wrangler Library
|
||||
<td valign="bottom">
|
||||
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
|
||||
<tr><td align="center"><i>Last Update: 01-04-05</i></td></tr>
|
||||
<tr><td align="center">
|
||||
<a href="http://www.opengl.org"> <img src="./ogl_sm.jpg" width="68"
|
||||
height="35" border="0" alt="OpenGL Logo" valign="top"></a>
|
||||
<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"
|
||||
valign="bottom"></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
731
doc/README.html
731
doc/README.html
@ -1,731 +0,0 @@
|
||||
<!--
|
||||
Copyright (C) 2004, 2003, 2002, Milan Ikits <milan ikits[at]ieee org>
|
||||
Copyright (C) 2004, 2003, 2002, Marcelo E. Magallon <mmagallo[at]debian org>
|
||||
This documentation may not be modified or redistributed in any
|
||||
form, except by the copyright holder.
|
||||
-->
|
||||
<!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/TR/html/4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
GLEW: The OpenGL Extension Wrangler Library
|
||||
</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<link href="glew.css" type=text/css rel=stylesheet>
|
||||
</head>
|
||||
<body bgcolor="#fff0d0">
|
||||
<center>
|
||||
<table border=0 width="60%" cellpadding="5" cellspacing="5">
|
||||
<tr>
|
||||
<td bgcolor="#ffffff" align=center><br><p><img src="./glew.png" alt="glew" width="97" height="75">
|
||||
<p>
|
||||
<h1>The OpenGL Extension Wrangler Library</h1>
|
||||
<p>
|
||||
<table border=0 cellpadding=0 cellspacing=0 align=center>
|
||||
<tr><td align=center><a href="#Introduction"><small>Introduction</small></a></td></tr>
|
||||
<tr><td align=center><a href="#Download"><small>Obtaining GLEW</small></a></td></tr>
|
||||
<tr><td align=center><a href="#Supported"><small>Supported Extensions</small></a></td></tr>
|
||||
<tr><td align=center><a href="#Build"><small>How to Build Your Project with GLEW</small></a></td></tr>
|
||||
<tr><td align=center><a href="#Install"><small>How to Install GLEW</small></a></td></tr>
|
||||
<tr><td align=center><a href="#Use"><small>How to Use GLEW</small></a></td></tr>
|
||||
<tr><td align=center><a href="#Utilities"><small>Utilities</small></a></td></tr>
|
||||
<tr><td align=center>
|
||||
<a href="#Auto"><small>Automatic Code Generation</small></a>
|
||||
</td></tr>
|
||||
<tr><td align=center>
|
||||
<a href="#Namespace"><small>Separate Namespace</small></a>
|
||||
</td></tr>
|
||||
<tr><td align=center>
|
||||
<a href="#Context"><small>Multiple Rendering Contexts (GLEW MX)</small></a>
|
||||
</td></tr>
|
||||
<tr><td align=center><a href="#Issues"><small>Known Issues</small></a></td></tr>
|
||||
<tr><td align=center><a href="#Credits"><small>Credits, Copyright</small></a></td></tr>
|
||||
<tr><td align=center><a href="#Log"><small>Change Log</small></a></td></tr>
|
||||
<tr><td align=center><a href="http://sourceforge.net/tracker/?group_id=67586">
|
||||
<tr><td align=center><br></td></tr>
|
||||
</table>
|
||||
</tr>
|
||||
|
||||
<tr><td bgcolor="#fff0d0" align="center"></td></tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#ffffff">
|
||||
<center><a name="Introduction"><h2>Introduction</h2></a></center>
|
||||
<p>
|
||||
|
||||
The goal of the OpenGL Extension Wrangler Library (GLEW) is to assist
|
||||
C/C++ OpenGL developers with two tedious tasks: initializing and using
|
||||
extensions and writing portable applications. GLEW provides an
|
||||
efficient run-time mechanism to determine whether a certain extension
|
||||
is supported by the driver or not. OpenGL core and extension
|
||||
functionality is exposed via a single header file. GLEW currently
|
||||
supports a variety of platforms and operating systems, including
|
||||
Windows, Linux, Darwin, Irix, and Solaris.
|
||||
<p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td bgcolor="#fff0d0" align="center"></td></tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#ffffff">
|
||||
<center><a name="Download"><h2>Obtaining GLEW</h2></a></center>
|
||||
<p>
|
||||
Source and precompiled binaries are available at the <a
|
||||
href="http://glew.sourceforge.net/">project website</a>.
|
||||
|
||||
<p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td bgcolor="#fff0d0" align="center"></td></tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#ffffff">
|
||||
<center><a name="Supported"><h2>Supported Extensions</h2></a></center>
|
||||
<p>
|
||||
GLEW currently supports the following extensions:
|
||||
<ul>
|
||||
<li><a href="glew.html">OpenGL extensions</a>
|
||||
<li><a href="wglew.html">WGL extensions</a>
|
||||
<li><a href="glxew.html">GLX extensions</a>
|
||||
</ul>
|
||||
<p>
|
||||
Useful links about OpenGL extensions:
|
||||
<ul>
|
||||
<li><a
|
||||
href="http://www.opengl.org/resources/features/OGLextensions/">
|
||||
All About OpenGL Extensions</a>
|
||||
<li><a href="http://oss.sgi.com/projects/ogl-sample/registry/">OpenGL Extension Registry</a>
|
||||
<li><a
|
||||
href="http://www.ati.com/developer/sdk/radeonSDK/html/info/Prog3D.html">ATI
|
||||
OpenGL Extension Specifications</a>
|
||||
<li><a
|
||||
href="http://developer.apple.com/opengl/extensions.html">
|
||||
APPLE OpenGL Extensions Guide</a>
|
||||
<li><a
|
||||
href="http://developer.nvidia.com/view.asp?IO=nvidia_opengl_specs">NVIDIA
|
||||
OpenGL Extension Specifications</a>
|
||||
</ul>
|
||||
<p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td bgcolor="#fff0d0" align="center"></td></tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#ffffff">
|
||||
|
||||
<center><a name="Build"><h2>How to Build Your Project with GLEW</h2></a></center>
|
||||
<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 and define the <tt>GLEW_STATIC</tt>
|
||||
preprocessor constant for the static library or executable you are
|
||||
building together with GLEW (Windows only). 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:
|
||||
|
||||
<blockquote><pre>#include <glew.h>
|
||||
#include <GL/glut.h>
|
||||
<gl, glu, and glut functionality is available here>
|
||||
</pre></blockquote>
|
||||
|
||||
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 don't
|
||||
need to include it separately.
|
||||
|
||||
<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 need to change
|
||||
the <tt>GLEW_BUILD</tt> preprocessor constant to <tt>GLEW_STATIC</tt>,
|
||||
otherwise you get build errors. <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:
|
||||
|
||||
<blockquote><pre>#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
<gl, glu, and glut functionality is available here>
|
||||
</pre></blockquote>
|
||||
|
||||
or:
|
||||
|
||||
<blockquote><pre>#include <GL/glew.h>
|
||||
<gl and glu functionality is available here>
|
||||
</pre></blockquote>
|
||||
|
||||
<p>
|
||||
Don't forget 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
|
||||
Linux and IRIX (<tt>-lGLEW -lGLU -lGL</tt>).
|
||||
|
||||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td bgcolor="#fff0d0" align="center"></td></tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#ffffff">
|
||||
|
||||
<center><a name="Install"><h2>How to Install GLEW</h2></a></center>
|
||||
|
||||
<p>
|
||||
To install the shared library version of GLEW you need to copy the
|
||||
headers and libraries into their destination directories. On Windows
|
||||
this boils down to copying (no, we will not write a Windows installer
|
||||
for you).
|
||||
<p>
|
||||
|
||||
<center>
|
||||
<table border=0 cellpadding=0 cellspacing=0>
|
||||
<tr><td><tt>lib/glew32.dll</tt></td><td> to </td>
|
||||
<td><tt>%SystemRoot%/system32</tt></td></tr>
|
||||
<tr><td><tt>lib/glew32.lib</tt></td><td> to </td>
|
||||
<td><tt>{VC Root}/Lib</tt></td></tr>
|
||||
<tr><td><tt>include/GL/glew.h</tt></td><td> to </td>
|
||||
<td><tt>{VC Root}/Include/GL</tt></td></tr>
|
||||
<tr><td><tt>include/GL/wglew.h</tt></td><td> to </td>
|
||||
<td><tt>{VC Root}/Include/GL</tt></td></tr>
|
||||
</table>
|
||||
</center>
|
||||
<p>
|
||||
|
||||
where <tt>{VC Root}</tt> is your Visual C++ directory, typically
|
||||
<tt>C:/Program Files/Microsoft Visual Studio/VC98</tt> for Visual
|
||||
Studio 6.0 or <tt>C:/Program Files/Microsoft Visual
|
||||
Studio/Vc7/PlatformSDK</tt> for Visual Studio .NET.
|
||||
|
||||
<p>
|
||||
On Linux and IRIX, 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>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td bgcolor="#fff0d0" align="center"></td></tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#ffffff">
|
||||
|
||||
<center><a name="Use"><h2>How to Use GLEW</h2></a></center>
|
||||
<p>
|
||||
|
||||
<h3>Initializing GLEW</h3>
|
||||
<p>
|
||||
|
||||
First you need to create a valid OpenGL rendering context and call
|
||||
<tt>glewInit()</tt> to initialize the extension entry points. If
|
||||
<tt>glewInit()</tt> returns <tt>GLEW_OK</tt>, the initialization
|
||||
succeeded and you can use the available extensions as well as core
|
||||
OpenGL functionality. For example:
|
||||
|
||||
<blockquote><pre>#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
...
|
||||
glutInit(&argc, argv);
|
||||
glutCreateWindow("GLEW Test");
|
||||
GLenum err = glewInit();
|
||||
if (GLEW_OK != err)
|
||||
{
|
||||
/* problem: glewInit failed, something is seriously wrong */
|
||||
fprintf(stderr, "Error: %s\n", glewGetErrorString(err));
|
||||
...
|
||||
}
|
||||
fprintf(stdout, "Status: Using GLEW %s\n", glewGetString(GLEW_VERSION));
|
||||
</pre></blockquote>
|
||||
|
||||
<p>
|
||||
|
||||
<h3>Querying the available OpenGL extensions</h3>
|
||||
<p>
|
||||
|
||||
Starting from GLEW 1.1.0, you can find out if a particular extension
|
||||
is available on your platform by querying globally defined variables
|
||||
of the form <tt>GLEW_{extension_name}</tt>:
|
||||
|
||||
<blockquote><pre>if (GLEW_ARB_vertex_program)
|
||||
{
|
||||
/* it is safe to use the ARB_vertex_program extension here */
|
||||
glGenProgramsARB(...);
|
||||
}
|
||||
</pre></blockquote>
|
||||
|
||||
<b>In GLEW 1.0.x, a global structure was used for this task. To ensure
|
||||
binary compatibility between releases, the struct was replaced with a
|
||||
set of variables.</b>
|
||||
|
||||
<p>
|
||||
|
||||
You can also check for core OpenGL functionality. For example, to
|
||||
see if OpenGL 1.3 is supported:
|
||||
|
||||
<blockquote><pre>if (GLEW_VERSION_1_3)
|
||||
{
|
||||
/* Yay! OpenGL 1.3 is supported! */
|
||||
}
|
||||
</pre></blockquote>
|
||||
|
||||
In general, you can check if <tt>GLEW_{extension_name}</tt> or
|
||||
<tt>GLEW_VERSION_{version}</tt> is set or not.
|
||||
|
||||
<p>
|
||||
|
||||
For extensions <tt>glewGetExtension</tt> provides a slower alternative:
|
||||
|
||||
<blockquote><pre>if (GL_TRUE == glewGetExtension("GL_ARB_fragment_program"))
|
||||
{
|
||||
/* Looks like ARB_fragment_program is supported. */
|
||||
}
|
||||
</pre></blockquote>
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
<h3>Experimental drivers</h3>
|
||||
<p>
|
||||
|
||||
GLEW works by querying the supported extensions from the graphics
|
||||
driver. Experimental drivers, however, might not report every
|
||||
available extension through the standard mechanism, in which case GLEW
|
||||
will report it unsupported. To circumvent this situation, the
|
||||
<tt>glewExperimental</tt> global switch can be turned on by setting it
|
||||
to <tt>GL_TRUE</tt> before calling <tt>glewInit()</tt>. This makes
|
||||
sure that all extensions with valid entry points will be exposed.
|
||||
|
||||
<p>
|
||||
|
||||
<h3>Platform specific extensions</h3>
|
||||
<p>
|
||||
|
||||
Platform specific extensions are separated into two header files:
|
||||
<tt>wglew.h</tt> and <tt>glxew.h</tt>, which define the available
|
||||
<tt>WGL</tt> and <tt>GLX</tt> extensions. To determine if a certain
|
||||
extension is supported, query <tt>WGLEW_{extension name}</tt> or
|
||||
<tt>GLXEW_{extension_name}</tt>. For example:
|
||||
|
||||
<blockquote><pre>#include <GL/wglew.h>
|
||||
|
||||
if (WGLEW_ARB_pbuffer)
|
||||
{
|
||||
/* OK, we can use pbuffers */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Sorry, pbuffers will not work on this platform */
|
||||
}
|
||||
</pre></blockquote>
|
||||
|
||||
<tr><td bgcolor="#fff0d0" align="center"></td></tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#ffffff">
|
||||
|
||||
<center><a name="Utilities"><h2>Utilities</h2></a></center>
|
||||
<p>
|
||||
|
||||
GLEW provides two command line tools: one for creating a list of
|
||||
available extensions and visuals; and another for verifying extension
|
||||
entry points.
|
||||
|
||||
<p>
|
||||
|
||||
<h3>visualinfo: extensions and visuals</h3>
|
||||
<p>
|
||||
|
||||
<tt>visualinfo</tt> is an extended version of <tt>glxinfo</tt>. On
|
||||
Windows, by default it creates a file called <tt>visualinfo.txt</tt>
|
||||
that contains a list of available OpenGL, WGL, and GLU extensions as
|
||||
well as a table of visuals aka. pixel formats. Pbuffer and multiple
|
||||
output capable visuals are also included. For additional usage
|
||||
information, type <tt>visualinfo -h</tt>.
|
||||
|
||||
<p>
|
||||
|
||||
<h3>glewinfo: extension verification utility</h3>
|
||||
<p>
|
||||
|
||||
<tt>glewinfo</tt> allows you to verify the entry points for the
|
||||
extensions supported on your platform. It uses GLEW to find out which
|
||||
extensions and entry points are available. On Windows it reports the
|
||||
results to a text file called <tt>glewinfo.txt</tt>, on Unix it prints
|
||||
them to <tt>stdout</tt>. <p>
|
||||
|
||||
Windows Usage: <blockquote><pre>glewinfo [-pf <id>]</pre></blockquote>
|
||||
|
||||
where <tt><id></tt> is the pixelformat id for which the
|
||||
capabilities are displayed.
|
||||
|
||||
<p>
|
||||
Unix Usage:
|
||||
<blockquote><pre>glewinfo [-display <dpy>] [-visual <id>]</pre></blockquote>
|
||||
|
||||
where <tt><dpy></tt> is the X11 display and <tt><id></tt> is
|
||||
the visual id for which the capabilities are displayed.
|
||||
<p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td bgcolor="#fff0d0" align="center"></td></tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#ffffff">
|
||||
|
||||
<center><a name="Auto"><h2>Automatic Code Generation</h2></a></center>
|
||||
<p>
|
||||
|
||||
Starting with release 1.1.0, the source code and parts of the
|
||||
documentation are automatically generated from the extension
|
||||
specifications via a two-step process. In the first step,
|
||||
specification files from the OpenGL registry are parsed and skeleton
|
||||
descriptors are created for each extension. These descriptors contain
|
||||
all necessary information for creating the source code and
|
||||
documentation in a simple and compact format, including the name of
|
||||
the extension, url, tokens, function declarations, typedefs and struct
|
||||
definitions. In the second step, the header files as well as the
|
||||
library and glewinfo source are generated from the descriptor
|
||||
files. The code generation scripts are located in the <tt>auto</tt>
|
||||
subdirectory.
|
||||
|
||||
<p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td bgcolor="#fff0d0" align="center"></td></tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#ffffff">
|
||||
|
||||
<center><a name="Namespace"><h2>Separate Namespace</h2></a></center>
|
||||
<p>
|
||||
|
||||
To avoid name clashes when linking with libraries that include the
|
||||
same symbol, extension entry points are declared in a separate
|
||||
namespace (release 1.1.0 and up). This is achieved by aliasing OpenGL
|
||||
function names to their GLEW equivalents. For instance,
|
||||
<tt>glFancyFunction</tt> is simply an alias to
|
||||
<tt>glewFancyFunction</tt>. Note that the separate namespace doesn't
|
||||
effect token and function pointer definitions.
|
||||
<p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr><td bgcolor="#fff0d0" align="center"></td></tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#ffffff">
|
||||
|
||||
<center><a name="Context"><h2>Multiple Rendering
|
||||
Contexts (GLEW MX)</h2></a></center>
|
||||
<p>
|
||||
|
||||
Starting with release 1.2.0, thread-safe support for multiple
|
||||
rendering contexts (possibly with different capabilities) is
|
||||
available. Since this is not required by most users, it is not added
|
||||
to the binary releases to maintain compatibility between different
|
||||
versions. To include multi-context support, you have to do the
|
||||
following:
|
||||
|
||||
<ol>
|
||||
<li>Compile and use GLEW with the <tt>GLEW_MX</tt> preprocessor token
|
||||
defined.</li>
|
||||
<li>For each rendering context, create a <tt>GLEWContext</tt> object
|
||||
that will be available as long as the rendering context exists.</li>
|
||||
<li>Define a macro or function called <tt>glewGetContext()</tt> that
|
||||
returns a pointer to the <tt>GLEWContext</tt> object associated with
|
||||
the rendering context from which OpenGL/WGL/GLX calls are
|
||||
issued. (This dispatch mechanism is primitive, but generic.)
|
||||
<li>Replace the global <tt>glewInit()</tt> call with
|
||||
<tt>glewContextInit(glewGetContext())</tt>. Note, that the
|
||||
<tt>GLEWContext</tt> pointer returned by <tt>glewGetContext()</tt> has
|
||||
to reside in global or thread-local memory. Also, remember to call
|
||||
<tt>glewContextInit</tt> after creating the <tt>GLEWContext</tt> object
|
||||
in each rendering context.
|
||||
</ol>
|
||||
|
||||
<p>Note that according to <a
|
||||
href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/ntopnglr_6yer.asp">WGL
|
||||
documentation</a>, you have to initialize the entry points for every
|
||||
rendering context you create that use pixel formats with different
|
||||
capabilities (for example the pixel formats provided by the generic
|
||||
software OpenGL implementation by Microsoft vs. the hardware
|
||||
accelerated pixel formats). <b>GLEW by default ignores this
|
||||
requirement, and does not define per-context entry points (you can
|
||||
however do this using the steps described above).</b> Assuming a
|
||||
global namespace for the entry points works in most situations,
|
||||
because typically all hardware accelerated pixel formats provide the
|
||||
same entry points and capabilities (and why would anyone want to use
|
||||
the software renderer when hardware acceleration is available?). This
|
||||
means that unless you use the multi-context version of GLEW, you need
|
||||
to call <tt>glewInit()</tt> only once in your program, or more
|
||||
precisely, once per process.</p>
|
||||
|
||||
<p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td bgcolor="#fff0d0" align="center"></td></tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#ffffff">
|
||||
|
||||
<center><a name="Issues"><h2>Known Issues</h2></a></center>
|
||||
<p>
|
||||
|
||||
GLEW requires GLX 1.2 to assure compatibility with GLUT. Also,
|
||||
the SGI GLX video extensions are currently not supported.
|
||||
<p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td bgcolor="#fff0d0" align="center"></td></tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#ffffff">
|
||||
<center><a name="Credits"><h2>Credits, Copyright</h2></a></center>
|
||||
<p>
|
||||
|
||||
GLEW was developed by Milan Ikits and Marcelo Magallon. They also
|
||||
perform occasional maintainance to make sure that GLEW stays in mint
|
||||
condition. Aaron Lefohn, Joe Kniss, and Chris Wyman were the first
|
||||
users and also assisted with the design and debugging process. The
|
||||
acronym GLEW originates from Aaron Lefohn. Pasi Kärkkäinen
|
||||
identified and fixed several problems with GLX and SDL. Nate Robins
|
||||
created the <tt>wglinfo</tt> utility, to which modifications were
|
||||
added by Michael Wimmer.
|
||||
<p>
|
||||
|
||||
<p>
|
||||
GLEW is originally derived from the EXTGL project by Lev Povalahev. The
|
||||
source code is licensed under the modified BSD license, the <a
|
||||
href="sgi.txt">SGI Free Software License B</a>, and the <a
|
||||
href="glx.txt">GLX Public License</a>. The automatic code
|
||||
generation scripts and the config.guess script (from the GNU config tools) are
|
||||
released under the <a href="gpl.txt">GPL</a>.
|
||||
|
||||
<blockquote><pre></pre></blockquote>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td bgcolor="#fff0d0" align="center"></td></tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#ffffff">
|
||||
<center><a name="Log"><h2>Change Log</h2></a></center>
|
||||
<p>
|
||||
<ul class="none">
|
||||
<li><b>1.2.5</b> [12-06-04]
|
||||
<ul>
|
||||
<li> New extensions:
|
||||
<ul>
|
||||
<li>GL_ATI_texture_compression_3dc
|
||||
<li>GL_EXT_Cg_shader
|
||||
<li>GL_EXT_draw_range_elements
|
||||
<li>GL_KTX_buffer_region
|
||||
</ul>
|
||||
<li> Bug fixes:
|
||||
<ul>
|
||||
<li> OpenGL version detection bug
|
||||
<li> Problems with wxWindows and MinGW compilation
|
||||
<li> <tt>visualinfo</tt> compilation problem with GLEW_MX specified
|
||||
<li> Wrong token name in OpenGL 1.5 core
|
||||
</ul>
|
||||
<li> Support for FreeBSD
|
||||
</ul>
|
||||
</ul>
|
||||
<p>
|
||||
<ul class="none">
|
||||
<li><b>1.2.4</b> [09-06-04]
|
||||
<ul>
|
||||
<li> Added ARB_draw_buffers and ARB_texture_rectangle
|
||||
<li> Replaced <tt>wglinfo</tt> with <tt>visualinfo</tt>
|
||||
</ul>
|
||||
<p>
|
||||
<li><b>1.2.3</b> [06-10-04]
|
||||
<ul>
|
||||
<li> Added NV_fragment_program2, NV_fragment_program_option, NV_vertex_program2_option, NV_vertex_program3
|
||||
<li> Bug fix in GL_ARB_vertex_blend
|
||||
</ul>
|
||||
<p>
|
||||
<li><b>1.2.2</b> [05-08-04]
|
||||
<ul>
|
||||
<li> Added GL_EXT_pixel_buffer_object, removed GL_NV_element_array
|
||||
<li> Fixed GLEW_MX problems
|
||||
<li> Bug fix in GL_EXT_texture_rectangle and <tt>wglinfo</tt>
|
||||
</ul>
|
||||
<p>
|
||||
<li><b>1.2.1</b> [03-18-04]
|
||||
<ul>
|
||||
<li> Bug fix in OpenGL version query (early release of 1.2.0 contained this bug)
|
||||
<li> Bug fix in GL_ARB_shader_objects and temporary bug fix in GL_ARB_vertex_shader
|
||||
<li> Added flags on GDI support and multisampling to <tt>wglinfo</tt>
|
||||
</ul>
|
||||
<p>
|
||||
<li><b>1.2.0</b> [02-19-04]
|
||||
<ul>
|
||||
<li> Added full OpenGL 1.5 support
|
||||
<li> Added support for multiple rendering contexts with different capabilities
|
||||
<li> Added command line flags to <tt>glewinfo</tt> for selecting displays and visuals
|
||||
<li> Added GLX_SGIS_multisample, GLX_SUN_video_resize, and GL_SUN_read_video_pixels
|
||||
<li> Added MinGW/MSYS support
|
||||
<li> Bug fixes in GL_ARB_shader_objects and the OS X build
|
||||
</ul>
|
||||
<p>
|
||||
<li><b>1.1.4</b> [12-15-03]
|
||||
<ul>
|
||||
<li> Added GL_APPLE_float_pixels, GL_APPLE_texture_range,
|
||||
GL_EXT_texture_cube_map, GL_EXT_texture_edge_clamp,
|
||||
GLX_ATI_pixel_format_float, and GLX_ATI_render_texture
|
||||
<li> Bug fixes in GL_ATI_map_object_buffer and GL_ATI_fragment_shader
|
||||
</ul>
|
||||
<p>
|
||||
<li><b>1.1.3</b> [10-28-03]
|
||||
<ul>
|
||||
<li> Added Solaris and Darwin support
|
||||
<li> Added GL_ARB_fragment_shader, GL_ARB_shader_objects, and
|
||||
GL_ARB_vertex_shader
|
||||
<li> Fixed bug in GL_WIN_swap_hint
|
||||
<li> Removed <tt>glewinfo</tt>'s dependency on <tt>GLUT</tt>
|
||||
</ul>
|
||||
<p>
|
||||
<li><b>1.1.2</b> [09-15-03]
|
||||
<ul>
|
||||
<li> Removed dependency on WGL_{ARB,EXT}_extensions_string
|
||||
<li> Added glewGetString for querying GLEW version string
|
||||
</ul>
|
||||
<p>
|
||||
<li><b>1.1.1</b> [08-11-03]
|
||||
<ul>
|
||||
<li> Added GLX_NV_float_buffer
|
||||
<li> Fixed bug in GL_ARB_vertex_buffer_object
|
||||
<li> Minor updates in documentation
|
||||
</ul>
|
||||
<p>
|
||||
<li><b>1.1.0</b> [07-08-03]
|
||||
<ul>
|
||||
<li> Added automatic code generation
|
||||
<li> Added almost every extension in the registry
|
||||
<li> Added separate namespace
|
||||
<li> Added IRIX support
|
||||
<li> Updated documentation
|
||||
</ul>
|
||||
<p>
|
||||
<li><b>1.0.7</b> [06-29-03]
|
||||
<ul>
|
||||
<li> Added GL_EXT_depth_bounds_test
|
||||
<li> Fixed typos
|
||||
</ul>
|
||||
<p>
|
||||
<li><b>1.0.6</b> [05-05-03]
|
||||
<ul>
|
||||
<li> Added ARB_vertex_buffer_object and NV_half_float
|
||||
<li> Updated <tt>wglinfo</tt>
|
||||
<li> Temporary Linux bug fixes (problems with SDL and MESA)
|
||||
</ul>
|
||||
<p>
|
||||
<li><b>1.0.5</b> [02-17-03]
|
||||
<ul>
|
||||
<li> Bug fixes
|
||||
<li> Added <tt>wglinfo</tt>
|
||||
<li> Updated documentation
|
||||
</ul>
|
||||
<p>
|
||||
<li><b>1.0.4</b> [02-02-03]
|
||||
<ul>
|
||||
<li> Added NV_texture_expand_normal
|
||||
<li> Added mingw support
|
||||
<li> Updated documentation
|
||||
</ul>
|
||||
<p>
|
||||
<li><b>1.0.3</b> [01-09-03]
|
||||
<ul>
|
||||
<li> Cleaned up ATI extensions
|
||||
<li> Changed function prototypes to match glext.h
|
||||
<li> Added EXT_texture3D
|
||||
<li> Fixed typos in ATI_vertex_attrib_array_object and ATI_draw_buffers
|
||||
</ul>
|
||||
<p>
|
||||
<li><b>1.0.2</b> [12-21-02]
|
||||
<ul>
|
||||
<li> Added list of supported extensions to documentation
|
||||
<li> Added NV_half_float and NV_texgen_emboss
|
||||
</ul>
|
||||
<p>
|
||||
<li><b>1.0.1</b> [12-17-02]
|
||||
<ul>
|
||||
<li> Bug fixes
|
||||
<li> Added glewGetExtension
|
||||
</ul>
|
||||
<p>
|
||||
<li><b>1.0.0</b> [12-12-02]
|
||||
<ul>
|
||||
<li> Initial release
|
||||
</ul>
|
||||
|
||||
</ul>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#FFF0D0">
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<i>Last update: 12-06-04</i></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</center>
|
||||
|
||||
</body>
|
241
doc/advanced.html
Normal file
241
doc/advanced.html
Normal file
@ -0,0 +1,241 @@
|
||||
<!--
|
||||
Copyright (C) 2002-2005 Milan Ikits <milan ikits[]ieee org>
|
||||
Copyright (C) 2002-2005, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
This documentation may not be modified or redistributed in any
|
||||
form, except by the copyright holder.
|
||||
-->
|
||||
<!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/TR/html/4/loose.dtd">
|
||||
<!-- <img src="new.png" height="12" alt="NEW!"> -->
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
GLEW: The OpenGL Extension Wrangler Library
|
||||
</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<link href="glew.css" type=text/css rel=stylesheet>
|
||||
</head>
|
||||
<body bgcolor="#fff0d0">
|
||||
|
||||
<!-- -------------------------------------------------------------------------- -->
|
||||
|
||||
<table border="0" width="100%" height="100%" cellpadding="12" cellspacing="8">
|
||||
<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">
|
||||
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
|
||||
<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">
|
||||
<tr><td align="center"><a href="index.html">Home</a></td></tr>
|
||||
<tr><td align="center"><a href="install.html">Installation</a></td></tr>
|
||||
<tr><td align="center"><a href="basic.html">Basic Usage</td></tr>
|
||||
<tr><td align="center"><b>Advanced Usage</b></td></tr>
|
||||
<tr><td align="center"><a href="credits.html">Credits & Copyright</a></td></tr>
|
||||
<tr><td align="center"><a href="log.html">Change Log</a></td></tr>
|
||||
<tr><td align="center"><a href="http://sourceforge.net/projects/glew/">Project Page</a></td></tr>
|
||||
<tr><td align="center"><a href="http://sourceforge.net/tracker/?group_id=67586">Bug Tracker</a></td></tr>
|
||||
</table>
|
||||
<tr><td align="center"><br></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="bottom">
|
||||
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
|
||||
<tr><td align="center"><i>Last Update: 01-04-05</i></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<!-- -------------------------------------------------------------------------- -->
|
||||
|
||||
<td bgcolor="#ffffff" align="left" valign="top">
|
||||
<h1>The OpenGL Extension Wrangler Library</h1>
|
||||
|
||||
<h2>Automatic Code Generation</h2>
|
||||
|
||||
<p>
|
||||
Starting from release 1.1.0, the source code and parts of the
|
||||
documentation are automatically generated from the extension
|
||||
specifications in a two-step process. In the first step,
|
||||
specification files from the OpenGL registry are downloaded and
|
||||
parsed. Skeleton descriptors are created for each extension. These
|
||||
descriptors contain all necessary information for creating the source
|
||||
code and documentation in a simple and compact format, including the
|
||||
name of the extension, url link to the specification, tokens, function
|
||||
declarations, typedefs and struct definitions. In the second step,
|
||||
the header files as well as the library and glewinfo source are
|
||||
generated from the descriptor files. The code generation scripts are
|
||||
located in the <tt>auto</tt> subdirectory.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The code generation scripts require GNU make, wget, and perl. On
|
||||
Windows, the simplest way to get access to these tools is to install
|
||||
<a href="http://www.cygwin.com/">Cygwin</a>. The makefile in the
|
||||
<tt>auto</tt> directory provides the following build targets:
|
||||
</p>
|
||||
|
||||
<center>
|
||||
<table border=0 cellpadding=0 cellspacing=0> <!-- bgcolor="#f0f0f0" -->
|
||||
<tr><td align="right" valign="top" width="25%"><tt>make</tt></td>
|
||||
<td> </td>
|
||||
<td align=left>Create the source files from the descriptors. If the
|
||||
descriptors do not exist, create them from the spec files. If the spec
|
||||
files do not exist, download them from the OpenGL repository.</td></tr>
|
||||
<tr><td align="right" valign="top"><tt>make clean</tt></td>
|
||||
<td> </td>
|
||||
<td align=left>Delete the source files.</td></tr>
|
||||
<tr><td align="right" valign="top"><tt>make clobber</tt></td>
|
||||
<td> </td>
|
||||
<td align=left>Delete the source files and the descriptors.</td></tr>
|
||||
<tr><td align="right" valign="top"><tt>make destroy</tt></td>
|
||||
<td> </td>
|
||||
<td align=left>Delete the source files, the descriptors, and the spec files.</td></tr>
|
||||
<tr><td align="right" valign="top"><tt>make custom</tt></td>
|
||||
<td> </td>
|
||||
<td align=left>Create the source files for the extensions
|
||||
listed in <tt>auto/custom.txt</tt>. See "Custom Code
|
||||
Generation" below for more details.</td></tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<h3>Adding a New Extension</h3>
|
||||
|
||||
<p>
|
||||
To add a new extension, create a descriptor file for the extension in
|
||||
<tt>auto/core</tt> and rerun the code generation scripts by typing
|
||||
<tt>make clean; make</tt> in the <tt>auto</tt> directory.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The format of the descriptor file is given below. Items in
|
||||
brackets are optional.
|
||||
</p>
|
||||
|
||||
<p class="pre">
|
||||
<Extension Name><br>
|
||||
[<URL of Specification File>]<br>
|
||||
[<Token Name> <Token Value>]<br>
|
||||
[<Token Name> <Token Value>]<br>
|
||||
...<br>
|
||||
[<Typedef>]<br>
|
||||
[<Typedef>]<br>
|
||||
...<br>
|
||||
[<Function Signature>]<br>
|
||||
[<Function Signature>]<br>
|
||||
...<br>
|
||||
<!-- [<Function Definition>]<br>
|
||||
[<Function Definition>]<br>
|
||||
...<br> -->
|
||||
</p>
|
||||
|
||||
<!--
|
||||
<p>
|
||||
Note that <tt>Function Definitions</tt> are copied to the header files
|
||||
without changes and have to be terminated with a semicolon. In
|
||||
contrast, <tt>Tokens</tt>, <tt>Function signatures</tt>, and
|
||||
<tt>Typedefs</tt> should not be terminated with a semicolon.
|
||||
</p>
|
||||
-->
|
||||
|
||||
<p>
|
||||
Take a look at one of the files in <tt>auto/core</tt> for an
|
||||
example. Note that typedefs and function signatures should not be
|
||||
terminated with a semicolon.
|
||||
</p>
|
||||
|
||||
<h3>Custom Code Generation</h3>
|
||||
<p>
|
||||
Starting from GLEW 1.3.0, it is possible to control which extensions
|
||||
to include in the libarary by specifying a list in
|
||||
<tt>auto/custom.txt</tt>. This is useful when you do not need all the
|
||||
extensions and would like to reduce the size of the source files.
|
||||
Type <tt>make clean; make custom</tt> in the <tt>auto</tt> directory
|
||||
to rerun the scripts with the custom list of extensions.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For example, the following is the list of extensions needed to get GLEW and the
|
||||
utilities to compile.
|
||||
</p>
|
||||
|
||||
<p class="pre">
|
||||
WGL_ARB_extensions_string<br>
|
||||
WGL_ARB_multisample<br>
|
||||
WGL_ARB_pixel_format<br>
|
||||
WGL_ARB_pbuffer<br>
|
||||
WGL_EXT_extensions_string<br>
|
||||
WGL_ATI_pixel_format_float<br>
|
||||
WGL_NV_float_buffer<br>
|
||||
</p>
|
||||
|
||||
<h2>Multiple Rendering Contexts (GLEW MX)</h2>
|
||||
|
||||
<p>Starting with release 1.2.0, thread-safe support for multiple
|
||||
rendering contexts, possibly with different capabilities, is
|
||||
available. Since this is not required by most users, it is not added
|
||||
to the binary releases to maintain compatibility between different
|
||||
versions. To include multi-context support, you have to do the
|
||||
following:</p>
|
||||
<ol>
|
||||
<li>Compile and use GLEW with the <tt>GLEW_MX</tt> preprocessor token
|
||||
defined.</li>
|
||||
<li>For each rendering context, create a <tt>GLEWContext</tt> object
|
||||
that will be available as long as the rendering context exists.</li>
|
||||
<li>Define a macro or function called <tt>glewGetContext()</tt> that
|
||||
returns a pointer to the <tt>GLEWContext</tt> object associated with
|
||||
the rendering context from which OpenGL/WGL/GLX calls are issued. This
|
||||
dispatch mechanism is primitive, but generic.
|
||||
<li>Make sure that you call <tt>glewInit()</tt> after creating the
|
||||
<tt>GLEWContext</tt> object in each rendering context. Note, that the
|
||||
<tt>GLEWContext</tt> pointer returned by <tt>glewGetContext()</tt> has
|
||||
to reside in global or thread-local memory.
|
||||
</ol>
|
||||
|
||||
<p>Note that according to the <a
|
||||
href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/ntopnglr_6yer.asp">MSDN
|
||||
WGL documentation</a>, you have to initialize the entry points for
|
||||
every rendering context that use pixel formats with different
|
||||
capabilities For example, the pixel formats provided by the generic
|
||||
software OpenGL implementation by Microsoft vs. the hardware
|
||||
accelerated pixel formats have different capabilities. <b>GLEW by
|
||||
default ignores this requirement, and does not define per-context
|
||||
entry points (you can however do this using the steps described
|
||||
above).</b> Assuming a global namespace for the entry points works in
|
||||
most situations, because typically all hardware accelerated pixel
|
||||
formats provide the same entry points and capabilities. This means
|
||||
that unless you use the multi-context version of GLEW, you need to
|
||||
call <tt>glewInit()</tt> only once in your program, or more precisely,
|
||||
once per process.</p>
|
||||
|
||||
<h2>Separate Namespace</h2>
|
||||
|
||||
<p>
|
||||
To avoid name clashes when linking with libraries that include the
|
||||
same symbols, extension entry points are declared in a separate
|
||||
namespace (release 1.1.0 and up). This is achieved by aliasing OpenGL
|
||||
function names to their GLEW equivalents. For instance,
|
||||
<tt>glFancyFunction</tt> is simply an alias to
|
||||
<tt>glewFancyFunction</tt>. The separate namespace does not effect
|
||||
token and function pointer definitions.
|
||||
</p>
|
||||
|
||||
<h2>Known Issues</h2>
|
||||
|
||||
<p>
|
||||
GLEW requires GLX 1.2 for compatibility with GLUT.
|
||||
</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</body>
|
245
doc/basic.html
Normal file
245
doc/basic.html
Normal file
@ -0,0 +1,245 @@
|
||||
<!--
|
||||
Copyright (C) 2002-2005 Milan Ikits <milan ikits[]ieee org>
|
||||
Copyright (C) 2002-2005, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
This documentation may not be modified or redistributed in any
|
||||
form, except by the copyright holder.
|
||||
-->
|
||||
<!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/TR/html/4/loose.dtd">
|
||||
<!-- <img src="new.png" height="12" alt="NEW!"> -->
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
GLEW: The OpenGL Extension Wrangler Library
|
||||
</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<link href="glew.css" type=text/css rel=stylesheet>
|
||||
</head>
|
||||
<body bgcolor="#fff0d0">
|
||||
|
||||
<!-- -------------------------------------------------------------------------- -->
|
||||
|
||||
<table border="0" width="100%" height="100%" cellpadding="12" cellspacing="8">
|
||||
<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">
|
||||
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
|
||||
<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">
|
||||
<tr><td align="center"><a href="index.html">Home</a></td></tr>
|
||||
<tr><td align="center"><a href="install.html">Installation</a></td></tr>
|
||||
<tr><td align="center"><b>Basic Usage</b></td></tr>
|
||||
<tr><td align="center"><a href="advanced.html">Advanced Usage</a></td></tr>
|
||||
<tr><td align="center"><a href="credits.html">Credits & Copyright</a></td></tr>
|
||||
<tr><td align="center"><a href="log.html">Change Log</a></td></tr>
|
||||
<tr><td align="center"><a href="http://sourceforge.net/projects/glew/">Project Page</a></td></tr>
|
||||
<tr><td align="center"><a href="http://sourceforge.net/tracker/?group_id=67586">Bug Tracker</a></td></tr>
|
||||
</table>
|
||||
<tr><td align="center"><br></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="bottom">
|
||||
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
|
||||
<tr><td align="center"><i>Last Update: 01-04-05</i></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<!-- -------------------------------------------------------------------------- -->
|
||||
|
||||
<td bgcolor="#ffffff" align="left" valign="top">
|
||||
<h1>The OpenGL Extension Wrangler Library</h1>
|
||||
<h2>Initializing GLEW</h2>
|
||||
<p>
|
||||
First you need to create a valid OpenGL rendering context and call
|
||||
<tt>glewInit()</tt> to initialize the extension entry points. If
|
||||
<tt>glewInit()</tt> returns <tt>GLEW_OK</tt>, the initialization
|
||||
succeeded and you can use the available extensions as well as core
|
||||
OpenGL functionality. For example:
|
||||
</p>
|
||||
|
||||
<p class="pre">
|
||||
#include <GL/glew.h><br>
|
||||
#include <GL/glut.h><br>
|
||||
...<br>
|
||||
glutInit(&argc, argv);<br>
|
||||
glutCreateWindow("GLEW Test");<br>
|
||||
GLenum err = glewInit();<br>
|
||||
if (GLEW_OK != err)<br>
|
||||
{<br>
|
||||
/* Problem: glewInit failed, something is seriously wrong. */<br>
|
||||
fprintf(stderr, "Error: %s\n", glewGetErrorString(err));<br>
|
||||
...<br>
|
||||
}<br>
|
||||
fprintf(stdout, "Status: Using GLEW %s\n", glewGetString(GLEW_VERSION));<br>
|
||||
</p>
|
||||
|
||||
<h2>Checking for Extensions</h2>
|
||||
|
||||
<p>
|
||||
Starting from GLEW 1.1.0, you can find out if a particular extension
|
||||
is available on your platform by querying globally defined variables
|
||||
of the form <tt>GLEW_{extension_name}</tt>:
|
||||
</p>
|
||||
|
||||
<p class="pre">
|
||||
if (GLEW_ARB_vertex_program)<br>
|
||||
{<br>
|
||||
/* It is safe to use the ARB_vertex_program extension here. */<br>
|
||||
glGenProgramsARB(...);<br>
|
||||
}<br>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>In GLEW 1.0.x, a global structure was used for this task. To ensure
|
||||
binary compatibility between releases, the struct was replaced with a
|
||||
set of variables.</b>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
You can also check for core OpenGL functionality. For example, to
|
||||
see if OpenGL 1.3 is supported, do the following:
|
||||
</p>
|
||||
|
||||
<p class="pre">
|
||||
if (GLEW_VERSION_1_3)<br>
|
||||
{<br>
|
||||
/* Yay! OpenGL 1.3 is supported! */<br>
|
||||
}<br>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In general, you can check if <tt>GLEW_{extension_name}</tt> or
|
||||
<tt>GLEW_VERSION_{version}</tt> is true or false.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
It is also possible to perform extension checks from string
|
||||
input. Starting from the 1.3.0 release, use <tt>glewIsSupported</tt>
|
||||
to check if the required core or extension functionality is
|
||||
available:
|
||||
</p>
|
||||
|
||||
<p class="pre">
|
||||
if (glewIsSupported("GL_VERSION_1_4 GL_ARB_point_sprites"))<br>
|
||||
{<br>
|
||||
/* Great, we have OpenGL 1.4 + point sprites. */<br>
|
||||
}<br>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For extensions only, <tt>glewGetExtension</tt> provides a slower alternative
|
||||
(GLEW 1.0.x-1.2.x). <b>Note that in the 1.3.0 release </b>
|
||||
<tt>glewGetExtension</tt> <b>was replaced with </b>
|
||||
<tt>glewIsSupported</tt>.
|
||||
</p>
|
||||
|
||||
<p class="pre">
|
||||
if (glewGetExtension("GL_ARB_fragment_program"))<br>
|
||||
{<br>
|
||||
/* Looks like ARB_fragment_program is supported. */<br>
|
||||
}<br>
|
||||
</p>
|
||||
|
||||
<h2>Experimental Drivers</h2>
|
||||
|
||||
<p>
|
||||
GLEW obtains information on the supported extensions from the graphics
|
||||
driver. Experimental or pre-release drivers, however, might not
|
||||
report every available extension through the standard mechanism, in
|
||||
which case GLEW will report it unsupported. To circumvent this
|
||||
situation, the <tt>glewExperimental</tt> global switch can be turned
|
||||
on by setting it to <tt>GL_TRUE</tt> before calling
|
||||
<tt>glewInit()</tt>, which ensures that all extensions with valid
|
||||
entry points will be exposed.
|
||||
</p>
|
||||
|
||||
<h2>Platform Specific Extensions</h2>
|
||||
|
||||
<p>
|
||||
Platform specific extensions are separated into two header files:
|
||||
<tt>wglew.h</tt> and <tt>glxew.h</tt>, which define the available
|
||||
<tt>WGL</tt> and <tt>GLX</tt> extensions. To determine if a certain
|
||||
extension is supported, query <tt>WGLEW_{extension name}</tt> or
|
||||
<tt>GLXEW_{extension_name}</tt>. For example:
|
||||
</p>
|
||||
|
||||
<p class="pre">
|
||||
#include <GL/wglew.h><br>
|
||||
<br>
|
||||
if (WGLEW_ARB_pbuffer)<br>
|
||||
{<br>
|
||||
/* OK, we can use pbuffers. */<br>
|
||||
}<br>
|
||||
else<br>
|
||||
{<br>
|
||||
/* Sorry, pbuffers will not work on this platform. */<br>
|
||||
}<br>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Alternatively, use <tt>wglewIsSupported</tt> or
|
||||
<tt>glxewIsSupported</tt> to check for extensions from a string:
|
||||
</p>
|
||||
|
||||
<p class="pre">
|
||||
if (wglewIsSupported("WGL_ARB_pbuffer"))<br>
|
||||
{<br>
|
||||
/* OK, we can use pbuffers. */<br>
|
||||
}<br>
|
||||
</p>
|
||||
|
||||
<h2>Utilities</h2>
|
||||
|
||||
<p>
|
||||
GLEW provides two command-line utilities: one for creating a list of
|
||||
available extensions and visuals; and another for verifying extension
|
||||
entry points.
|
||||
</p>
|
||||
|
||||
<h3>visualinfo: extensions and visuals</h3>
|
||||
|
||||
<p>
|
||||
<tt>visualinfo</tt> is an extended version of <tt>glxinfo</tt>. The
|
||||
Windows version creates a file called <tt>visualinfo.txt</tt>, which
|
||||
contains a list of available OpenGL, WGL, and GLU extensions as well
|
||||
as a table of visuals aka. pixel formats. Pbuffer and MRT capable
|
||||
visuals are also included. For additional usage information, type
|
||||
<tt>visualinfo -h</tt>.
|
||||
</p>
|
||||
|
||||
<h3>glewinfo: extension verification utility</h3>
|
||||
|
||||
<p>
|
||||
<tt>glewinfo</tt> allows you to verify the entry points for the
|
||||
extensions supported on your platform. The Windows version
|
||||
reports the results to a text file called <tt>glewinfo.txt</tt>. The
|
||||
Unix version prints the results to <tt>stdout</tt>.
|
||||
</p>
|
||||
|
||||
<p>Windows usage:</p>
|
||||
<blockquote><pre>glewinfo [-pf <id>]</pre></blockquote>
|
||||
|
||||
<p>where <tt><id></tt> is the pixel format id for which the
|
||||
capabilities are displayed.</p>
|
||||
|
||||
<p>Unix usage:</p>
|
||||
<blockquote><pre>glewinfo [-display <dpy>] [-visual <id>]</pre></blockquote>
|
||||
|
||||
<p>where <tt><dpy></tt> is the X11 display and <tt><id></tt> is
|
||||
the visual id for which the capabilities are displayed.</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</body>
|
93
doc/credits.html
Normal file
93
doc/credits.html
Normal file
@ -0,0 +1,93 @@
|
||||
<!--
|
||||
Copyright (C) 2002-2005 Milan Ikits <milan ikits[]ieee org>
|
||||
Copyright (C) 2002-2005, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
This documentation may not be modified or redistributed in any
|
||||
form, except by the copyright holder.
|
||||
-->
|
||||
<!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/TR/html/4/loose.dtd">
|
||||
<!-- <img src="new.png" height="12" alt="NEW!"> -->
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
GLEW: The OpenGL Extension Wrangler Library
|
||||
</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<link href="glew.css" type=text/css rel=stylesheet>
|
||||
</head>
|
||||
<body bgcolor="#fff0d0">
|
||||
|
||||
<!-- -------------------------------------------------------------------------- -->
|
||||
|
||||
<table border="0" width="100%" height="100%" cellpadding="12" cellspacing="8">
|
||||
<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">
|
||||
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
|
||||
<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">
|
||||
<tr><td align="center"><a href="index.html">Home</a></td></tr>
|
||||
<tr><td align="center"><a href="install.html">Installation</a></td></tr>
|
||||
<tr><td align="center"><a href="basic.html">Basic Usage</a></td></tr>
|
||||
<tr><td align="center"><a href="advanced.html">Advanced Usage</a></td></tr>
|
||||
<tr><td align="center"><b>Credits & Copyright</b></td></tr>
|
||||
<tr><td align="center"><a href="log.html">Change Log</a></td></tr>
|
||||
<tr><td align="center"><a href="http://sourceforge.net/projects/glew/">Project Page</a></td></tr>
|
||||
<tr><td align="center"><a href="http://sourceforge.net/tracker/?group_id=67586">Bug Tracker</a></td></tr>
|
||||
</table>
|
||||
<tr><td align="center"><br></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="bottom">
|
||||
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
|
||||
<tr><td align="center"><i>Last Update: 01-04-05</i></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<!-- -------------------------------------------------------------------------- -->
|
||||
|
||||
<td bgcolor="#ffffff" align="left" valign="top">
|
||||
|
||||
<h1 align="center">The OpenGL Extension Wrangler Library</h1>
|
||||
|
||||
<h2>Credits</h2>
|
||||
|
||||
<p>
|
||||
GLEW was developed by <a href="http://www.cs.utah.edu/~ikits/">Milan
|
||||
Ikits</a> and <a
|
||||
href="http://wwwvis.informatik.uni-stuttgart.de/~magallon/">Marcelo
|
||||
Magallon</a>. They also perform occasional maintainance to make sure
|
||||
that GLEW stays in mint condition. Aaron Lefohn, Joe Kniss, and Chris
|
||||
Wyman were the first users and also assisted with the design and
|
||||
debugging process. The acronym GLEW originates from Aaron Lefohn.
|
||||
Pasi Kärkkäinen identified and fixed several problems with
|
||||
GLX and SDL. Nate Robins created the <tt>wglinfo</tt> utility, to
|
||||
which modifications were made by Michael Wimmer.
|
||||
</p>
|
||||
|
||||
<h2>Copyright</h2>
|
||||
|
||||
<p>
|
||||
GLEW is originally derived from the <a
|
||||
href="http://www.levp.de/3d/">EXTGL</a> project by Lev Povalahev. The
|
||||
source code is licensed under the modified BSD license, the <a
|
||||
href="sgi.txt">SGI Free Software License B</a>, and the <a
|
||||
href="glx.txt">GLX Public License</a>. The automatic code
|
||||
generation scripts are released under the <a href="gpl.txt">GPL</a>.
|
||||
</p>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</body>
|
@ -175,6 +175,6 @@ hr
|
||||
background-color: maroon;
|
||||
height: 1px;
|
||||
border: 0px;
|
||||
width: 85%;
|
||||
width: 80%;
|
||||
align: center;
|
||||
}
|
||||
|
107
doc/index.html
Normal file
107
doc/index.html
Normal file
@ -0,0 +1,107 @@
|
||||
<!--
|
||||
Copyright (C) 2002-2005 Milan Ikits <milan ikits[]ieee org>
|
||||
Copyright (C) 2002-2005, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
This documentation may not be modified or redistributed in any
|
||||
form, except by the copyright holder.
|
||||
-->
|
||||
<!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/TR/html/4/loose.dtd">
|
||||
<!-- <img src="new.png" height="12" alt="NEW!"> -->
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
GLEW: The OpenGL Extension Wrangler Library
|
||||
</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<link href="glew.css" type=text/css rel=stylesheet>
|
||||
</head>
|
||||
<body bgcolor="#fff0d0">
|
||||
|
||||
<!-- -------------------------------------------------------------------------- -->
|
||||
|
||||
<table border="0" width="100%" height="100%" cellpadding="12" cellspacing="8">
|
||||
<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">
|
||||
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
|
||||
<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">
|
||||
<tr><td align="center"><b>Home</b></td></tr>
|
||||
<tr><td align="center"><a href="install.html">Installation</a></td></tr>
|
||||
<tr><td align="center"><a href="basic.html">Basic Usage</a></td></tr>
|
||||
<tr><td align="center"><a href="advanced.html">Advanced Usage</a></td></tr>
|
||||
<tr><td align="center"><a href="credits.html">Credits & Copyright</a></td></tr>
|
||||
<tr><td align="center"><a href="log.html">Change Log</a></td></tr>
|
||||
<tr><td align="center"><a href="http://sourceforge.net/projects/glew/">Project Page</a></td></tr>
|
||||
<tr><td align="center"><a href="http://sourceforge.net/tracker/?group_id=67586">Bug Tracker</a></td></tr>
|
||||
</table>
|
||||
<tr><td align="center"><br></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="bottom">
|
||||
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
|
||||
<tr><td align="center"><i>Last Update: 01-04-05</i></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<!-- -------------------------------------------------------------------------- -->
|
||||
|
||||
<td bgcolor="#ffffff" align="left" valign="top">
|
||||
|
||||
<h1 align="center">The OpenGL Extension Wrangler Library</h1>
|
||||
<p>
|
||||
The OpenGL Extension Wrangler Library (GLEW) is a cross-platform C/C++
|
||||
extension loading library. GLEW provides efficient run-time
|
||||
mechanisms for determining which OpenGL extensions are supported by
|
||||
the driver. OpenGL core and extension functionality is exposed in a
|
||||
single header file. GLEW currently supports a variety of platforms
|
||||
and operating systems, including Windows, Linux, Mac OSX, FreeBSD,
|
||||
Irix, and Solaris.
|
||||
</p>
|
||||
|
||||
<h2>Supported Extensions</h2>
|
||||
<p>
|
||||
The 1.3.0 release contains support for OpenGL 2.0 and the following extensions:
|
||||
</p>
|
||||
<ul>
|
||||
<li><a href="glew.html">OpenGL extensions</a>
|
||||
<li><a href="wglew.html">WGL extensions</a>
|
||||
<li><a href="glxew.html">GLX extensions</a>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Links</h2>
|
||||
<ul>
|
||||
<li><a
|
||||
href="http://www.opengl.org/resources/faq/getting_started.html">
|
||||
OpenGL Getting Started FAQ</a></li>
|
||||
<li><a
|
||||
href="http://www.opengl.org/resources/features/OGLextensions/">
|
||||
All About OpenGL Extensions</a></li>
|
||||
<li><a href="http://oss.sgi.com/projects/ogl-sample/registry/">OpenGL Extension Registry</a></li>
|
||||
<li><a
|
||||
href="http://www.ati.com/developer/sdk/radeonSDK/html/info/Prog3D.html">ATI
|
||||
OpenGL Extension Specifications</a></li>
|
||||
<li><a
|
||||
href="http://developer.apple.com/opengl/extensions.html">
|
||||
APPLE OpenGL Extensions Guide</a></li>
|
||||
<li><a
|
||||
href="http://developer.nvidia.com/view.asp?IO=nvidia_opengl_specs">NVIDIA
|
||||
OpenGL Extension Specifications</a></li>
|
||||
</ul>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</body>
|
190
doc/install.html
Normal file
190
doc/install.html
Normal file
@ -0,0 +1,190 @@
|
||||
<!--
|
||||
Copyright (C) 2002-2005 Milan Ikits <milan ikits[]ieee org>
|
||||
Copyright (C) 2002-2005, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
This documentation may not be modified or redistributed in any
|
||||
form, except by the copyright holder.
|
||||
-->
|
||||
<!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/TR/html/4/loose.dtd">
|
||||
<!-- <img src="new.png" height="12" alt="NEW!"> -->
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
GLEW: The OpenGL Extension Wrangler Library
|
||||
</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<link href="glew.css" type=text/css rel=stylesheet>
|
||||
</head>
|
||||
<body bgcolor="#fff0d0">
|
||||
<table border="0" width="100%" height="100%" cellpadding="12" cellspacing="8">
|
||||
<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">
|
||||
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
|
||||
<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">
|
||||
<tr><td align="center"><a href="index.html">Home</a></td></tr>
|
||||
<tr><td align="center"><b>Installation</b></td></tr>
|
||||
<tr><td align="center"><a href="basic.html">Basic Usage</a></td></tr>
|
||||
<tr><td align="center"><a href="advanced.html">Advanced Usage</a></td></tr>
|
||||
<tr><td align="center"><a href="credits.html">Credits & Copyright</a></td></tr>
|
||||
<tr><td align="center"><a href="log.html">Change Log</a></td></tr>
|
||||
<tr><td align="center"><a href="http://sourceforge.net/projects/glew/">Project Page</a></td></tr>
|
||||
<tr><td align="center"><a href="http://sourceforge.net/tracker/?group_id=67586">Bug Tracker</a></td></tr>
|
||||
</table>
|
||||
<tr><td align="center"><br></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="bottom">
|
||||
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
|
||||
<tr><td align="center"><i>Last Update: 01-04-05</i></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<!-- -------------------------------------------------------------------------- -->
|
||||
|
||||
<td bgcolor="#ffffff" align="left" valign="top">
|
||||
|
||||
<h1 align="center">The OpenGL Extension Wrangler Library</h1>
|
||||
|
||||
<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" -->
|
||||
<tr><td align="left"><tt>lib/glew32.dll</tt></td><td> to </td>
|
||||
<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
|
||||
Studio/Vc7/PlatformSDK</tt> for Visual Studio .NET.
|
||||
</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>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</body>
|
273
doc/log.html
Normal file
273
doc/log.html
Normal file
@ -0,0 +1,273 @@
|
||||
<!--
|
||||
Copyright (C) 2002-2005 Milan Ikits <milan ikits[]ieee org>
|
||||
Copyright (C) 2002-2005, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
This documentation may not be modified or redistributed in any
|
||||
form, except by the copyright holder.
|
||||
-->
|
||||
<!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/TR/html/4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
GLEW: The OpenGL Extension Wrangler Library
|
||||
</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<link href="glew.css" type=text/css rel=stylesheet>
|
||||
</head>
|
||||
<body bgcolor="#fff0d0">
|
||||
|
||||
<!-- -------------------------------------------------------------------------- -->
|
||||
|
||||
<table border="0" width="100%" height="100%" cellpadding="12" cellspacing="8">
|
||||
<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">
|
||||
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
|
||||
<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">
|
||||
<tr><td align="center"><a href="index.html">Home</a></td></tr>
|
||||
<tr><td align="center"><a href="install.html">Installation</a></td></tr>
|
||||
<tr><td align="center"><a href="basic.html">Basic Usage</a></td></tr>
|
||||
<tr><td align="center"><a href="advanced.html">Advanced Usage</a></td></tr>
|
||||
<tr><td align="center"><a href="credits.html">Credits & Copyright</a></td></tr>
|
||||
<tr><td align="center"><b>Change Log</b></td></tr>
|
||||
<tr><td align="center"><a href="http://sourceforge.net/projects/glew/">Project Page</a></td></tr>
|
||||
<tr><td align="center"><a href="http://sourceforge.net/tracker/?group_id=67586">Bug Tracker</a></td></tr>
|
||||
</table>
|
||||
<tr><td align="center"><br></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="bottom">
|
||||
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
|
||||
<tr><td align="center"><i>Last Update: 01-04-05</i></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
<!-- -------------------------------------------------------------------------- -->
|
||||
|
||||
<td bgcolor="#ffffff" align="left" valign="top">
|
||||
<h1 align="center">The OpenGL Extension Wrangler Library</h1>
|
||||
<h2>Change Log</h2>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.3.0</b> [01-04-05]
|
||||
<ul>
|
||||
<li> New features:
|
||||
<ul>
|
||||
<li> Support for core OpenGL 2.0
|
||||
<li> <tt>glewIsSupported</tt> provides efficient string-based extension checks
|
||||
<li> Custom code generation from a list of extensions
|
||||
<li> Makefile changes
|
||||
</ul>
|
||||
<li> New extensions:
|
||||
<ul>
|
||||
<li> WGL_ATI_render_texture_rectangle
|
||||
</ul>
|
||||
<li> Bug fixes:
|
||||
<ul>
|
||||
<li> Incorrect function signature in OpenGL 1.5 core
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.2.5</b> [12-06-04]
|
||||
<ul>
|
||||
<li> New extensions:
|
||||
<ul>
|
||||
<li>GL_ATI_texture_compression_3dc
|
||||
<li>GL_EXT_Cg_shader
|
||||
<li>GL_EXT_draw_range_elements
|
||||
<li>GL_KTX_buffer_region
|
||||
</ul>
|
||||
<li> Bug fixes:
|
||||
<ul>
|
||||
<li> OpenGL version detection bug
|
||||
<li> Problems with wxWindows and MinGW compilation
|
||||
<li> <tt>visualinfo</tt> compilation problem with GLEW_MX specified
|
||||
<li> Wrong token name in OpenGL 1.5 core
|
||||
</ul>
|
||||
<li> Support for FreeBSD
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.2.4</b> [09-06-04]
|
||||
<ul>
|
||||
<li> Added ARB_draw_buffers and ARB_texture_rectangle
|
||||
<li> Fixed bug in ARB_shader_objects
|
||||
<li> Replaced <tt>wglinfo</tt> with <tt>visualinfo</tt>
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.2.3</b> [06-10-04]
|
||||
<ul>
|
||||
<li> Added GL_NV_fragment_program2, GL_NV_fragment_program_option, GL_NV_vertex_program2_option, GL_NV_vertex_program3
|
||||
<li> Bug fix in GL_ARB_vertex_blend
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.2.2</b> [05-08-04]
|
||||
<ul>
|
||||
<li> Added GL_EXT_pixel_buffer_object, removed GL_NV_element_array
|
||||
<li> Fixed GLEW_MX problems
|
||||
<li> Bug fix in GL_EXT_texture_rectangle and <tt>wglinfo</tt>
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.2.1</b> [03-18-04]
|
||||
<ul>
|
||||
<li> Bug fix in OpenGL version query (early release of 1.2.0 contained this bug)
|
||||
<li> Bug fix in GL_ARB_shader_objects and temporary bug fix in GL_ARB_vertex_shader
|
||||
<li> Added flags on GDI support and multisampling to <tt>wglinfo</tt>
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.2.0</b> [02-19-04]
|
||||
<ul>
|
||||
<li> Added full OpenGL 1.5 support
|
||||
<li> Added support for multiple rendering contexts with different capabilities
|
||||
<li> Added command line flags to <tt>glewinfo</tt> for selecting displays and visuals
|
||||
<li> Added GLX_SGIS_multisample, GLX_SUN_video_resize, and GL_SUN_read_video_pixels
|
||||
<li> Added MinGW/MSYS support
|
||||
<li> Bug fixes in GL_ARB_shader_objects and the OS X build
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.1.4</b> [12-15-03]
|
||||
<ul>
|
||||
<li> Added GL_APPLE_float_pixels, GL_APPLE_texture_range,
|
||||
GL_EXT_texture_cube_map, GL_EXT_texture_edge_clamp,
|
||||
GLX_ATI_pixel_format_float, and GLX_ATI_render_texture
|
||||
<li> Bug fixes in GL_ATI_map_object_buffer and GL_ATI_fragment_shader
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.1.3</b> [10-28-03]
|
||||
<ul>
|
||||
<li> Added Solaris and Darwin support
|
||||
<li> Added GL_ARB_fragment_shader, GL_ARB_shader_objects, and GL_ARB_vertex_shader
|
||||
<li> Fixed bug in GL_WIN_swap_hint
|
||||
<li> Removed <tt>glewinfo</tt>'s dependency on <tt>GLUT</tt>
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.1.2</b> [09-15-03]
|
||||
<ul>
|
||||
<li> Removed dependency on WGL_{ARB,EXT}_extensions_string to make GLEW run on Matrox cards
|
||||
<li> Added glewGetString for querying the GLEW version string
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.1.1</b> [08-11-03]
|
||||
<ul>
|
||||
<li> Added GLX_NV_float_buffer, GL_ARB_shading_language_100, and GL_ARB_texture_non_power_of_two
|
||||
<li> Fixed bug in GL_ARB_vertex_buffer_object
|
||||
<li> Minor updates in documentation
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.1.0</b> [07-08-03]
|
||||
<ul>
|
||||
<li> Added automatic code generation
|
||||
<li> Added almost every extension in the registry
|
||||
<li> Added separate namespace
|
||||
<li> Added Irix support
|
||||
<li> Updated documentation
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.0.7</b> [06-29-03]
|
||||
<ul>
|
||||
<li> Added GL_EXT_depth_bounds_test
|
||||
<li> Fixed typos
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.0.6</b> [05-05-03]
|
||||
<ul>
|
||||
<li> Added ARB_vertex_buffer_object and NV_half_float
|
||||
<li> Updated <tt>wglinfo</tt>
|
||||
<li> Temporary Linux bug fixes (problems with SDL and MESA)
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.0.5</b> [02-17-03]
|
||||
<ul>
|
||||
<li> Bug fixes
|
||||
<li> Added <tt>wglinfo</tt>
|
||||
<li> Updated documentation
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.0.4</b> [02-02-03]
|
||||
<ul>
|
||||
<li> Added NV_texture_expand_normal
|
||||
<li> Added mingw support
|
||||
<li> Updated documentation
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.0.3</b> [01-09-03]
|
||||
<ul>
|
||||
<li> Cleaned up ATI extensions
|
||||
<li> Changed function prototypes to match glext.h
|
||||
<li> Added EXT_texture3D
|
||||
<li> Fixed typos in ATI_vertex_attrib_array_object and ATI_draw_buffers
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.0.2</b> [12-21-02]
|
||||
<ul>
|
||||
<li> Added list of supported extensions to documentation
|
||||
<li> Added NV_half_float and NV_texgen_emboss
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.0.1</b> [12-17-02]
|
||||
<ul>
|
||||
<li> Bug fixes
|
||||
<li> Added glewGetExtension
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>1.0.0</b> [12-12-02]
|
||||
<ul>
|
||||
<li> Initial release
|
||||
</ul>
|
||||
</ul>
|
||||
<hr align="center">
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
</body>
|
Loading…
Reference in New Issue
Block a user