mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-18 02:19:57 +00:00
230 lines
9.3 KiB
HTML
230 lines
9.3 KiB
HTML
|
<!-- begin header.html -->
|
||
|
<!--
|
||
|
The OpenGL Extension Wrangler Library
|
||
|
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.
|
||
|
-->
|
||
|
<!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%" cellpadding="12" cellspacing="8" style="height:100%">
|
||
|
<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"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/1.10.0/">1.10.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="basic.html">Usage</a></td></tr>
|
||
|
<tr><td align="center"><a href="build.html">Building</a></td></tr>
|
||
|
<tr><td align="center">Installation</td></tr>
|
||
|
<tr><td align="center"><a href="advanced.html">Source Generation</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="https://sourceforge.net/projects/glew">Project Page</a></td></tr>
|
||
|
<tr><td align="center"><a href="https://sourceforge.net/p/glew/mailman">Mailing Lists</a></td></tr>
|
||
|
<tr><td align="center"><a href="https://sourceforge.net/p/glew/_list/tickets">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: 07-22-13</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"></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"></a>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<!--- <tr><td align="center"><a
|
||
|
href="http://sourceforge.net/donate/index.php?group_id=67586"><img
|
||
|
src="http://images.sourceforge.net/images/project-support.jpg"
|
||
|
width="88" height="32" border="0" alt="Support This Project"></a></td></tr> -->
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
|
||
|
<td bgcolor="#ffffff" align="left" valign="top">
|
||
|
|
||
|
<h1>The OpenGL Extension Wrangler Library</h1>
|
||
|
|
||
|
<!-- end header.html -->
|
||
|
|
||
|
|
||
|
<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>bin/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 .NET 2003/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>
|
||
|
|
||
|
<!-- begin footer.html -->
|
||
|
</td></tr></table></body>
|
||
|
<!-- end footer.html -->
|
||
|
|