xref: /glew/
Name Date Size

..18-Aug.-20214 KiB

.gitattributesH A D02-Sep.-2019154

.gitignoreH A D02-Sep.-2019325

.lgtm.ymlH A D26-Nov.-2020233

.travis.ymlH A D21-Mar.-2021886

auto/H02-Sep.-20194 KiB

build/H02-Sep.-20194 KiB

cmake-testbuild.shH A D02-Sep.-20192.2 KiB

config/H05-Mar.-20204 KiB

doc/H10-Jan.-20214 KiB

glew.pc.inH A D02-Sep.-2019260

LICENSE.txtH A D02-Sep.-20193.7 KiB

MakefileH A D23-Jul.-202111.6 KiB

README.mdH A D10-Jan.-20218.8 KiB

src/H28-Sep.-20194 KiB

README.md

1# GLEW - The OpenGL Extension Wrangler Library
2
3The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library. GLEW provides efficient run-time mechanisms for determining which OpenGL extensions are supported on the target platform. OpenGL core and extension functionality is exposed in a single header file. GLEW has been tested on a variety of operating systems, including Windows, Linux, Mac OS X, FreeBSD, Irix, and Solaris.
4
5![](http://glew.sourceforge.net/glew.png)
6
7http://glew.sourceforge.net/
8
9https://github.com/nigels-com/glew
10
11[![Build Status](https://travis-ci.org/nigels-com/glew.svg?branch=master)](https://travis-ci.org/nigels-com/glew)
12[![Gitter](https://badges.gitter.im/nigels-com/glew.svg)](https://gitter.im/nigels-com/glew?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
13[![Download](https://img.shields.io/sourceforge/dm/glew.svg)](https://sourceforge.net/projects/glew/files/latest/download)
14
15## Table of Contents
16
17* [Downloads](#downloads)
18	* [Recent snapshots](#recent-snapshots)
19* [Build](#build)
20	* [Linux and Mac](#linux-and-mac)
21		* [Using GNU Make](#using-gnu-make)
22		* [Install build tools](#install-build-tools)
23		* [Build](#build-1)
24		* [Linux EGL](#linux-egl)
25		* [Linux OSMesa](#linux-osmesa)
26		* [Linux mingw-w64](#linux-mingw-w64)
27	* [Using cmake](#using-cmake)
28		* [Install build tools](#install-build-tools-1)
29		* [Build](#build-2)
30	* [Windows](#windows)
31		* [Visual Studio](#visual-studio)
32		* [MSYS/Mingw](#msysmingw)
33		* [MSYS2/Mingw-w64](#msys2mingw-w64)
34* [glewinfo](#glewinfo)
35* [Code Generation](#code-generation)
36* [Authors](#authors)
37* [Contributions](#contributions)
38* [Copyright and Licensing](#copyright-and-licensing)
39
40## Downloads
41
42Current release is [2.2.0](https://github.com/nigels-com/glew/releases/tag/glew-2.2.0).
43[(Change Log)](http://glew.sourceforge.net/log.html)
44
45Sources available as
46[ZIP](https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.zip) or
47[TGZ](https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.tgz).
48
49Windows binaries for [32-bit and 64-bit](https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0-win32.zip).
50
51### Recent snapshots
52
53Snapshots may contain new features, bug-fixes or new OpenGL extensions ahead of tested, official releases.
54
55<!--- [glew-20190928.tgz](https://sourceforge.net/projects/glew/files/glew/snapshots/glew-20190928.tgz/download) *GLEW 2.2.0 RC2: New extensions, bug fixes* -->
56
57## Build
58
59It is highly recommended to build from a tgz or zip release snapshot.
60The code generation workflow is a complex brew of gnu make, perl and python, that works best on Linux or Mac.
61The code generation is known to work on Windows using [MSYS2](https://www.msys2.org/).
62For most end-users of GLEW the official releases are the best choice, with first class support.
63
64### Linux and Mac
65
66#### Using GNU Make
67
68GNU make is the primary build system for GLEW, historically.
69It includes targets for building the sources and headers, for maintenance purposes.
70
71##### Install build tools
72
73Debian/Ubuntu/Mint:    `$ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev`
74
75RedHat/CentOS/Fedora:  `$ sudo yum install libXmu-devel libXi-devel libGL-devel`
76
77FreeBSD: `# pkg install xorg lang/gcc git cmake gmake bash python perl5`
78
79##### Build
80
81	$ make
82	$ sudo make install
83	$ make clean
84
85Targets:    `all, glew.lib (sub-targets: glew.lib.shared, glew.lib.static), glew.bin, clean, install, uninstall`
86
87Variables:  `SYSTEM=linux-clang, GLEW_DEST=/usr/local, STRIP=`
88
89_Note: you may need to call `make` in the  **auto** folder first_
90
91##### Linux EGL
92
93	$ sudo apt install libegl1-mesa-dev
94	$ make SYSTEM=linux-egl
95
96##### Linux OSMesa
97
98	$ sudo apt install libosmesa-dev
99	$ make SYSTEM=linux-osmesa
100
101##### Linux mingw-w64
102
103	$ sudo apt install mingw-w64
104	$ make SYSTEM=linux-mingw32
105	$ make SYSTEM=linux-mingw64
106
107#### Using cmake
108
109The cmake build is mostly contributer maintained.
110Due to the multitude of use cases this is maintained on a _best effort_ basis.
111Pull requests are welcome.
112
113*CMake 2.8.12 or higher is required.*
114
115##### Install build tools
116
117Debian/Ubuntu/Mint:   `$ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev cmake git`
118
119RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel cmake git`
120
121##### Build
122
123	$ cd build
124	$ cmake ./cmake
125	$ make -j4
126
127| Target     | Description |
128| ---------- | ----------- |
129| glew       | Build the glew shared library. |
130| glew_s     | Build the glew static library. |
131| glewinfo   | Build the `glewinfo` executable (requires `BUILD_UTILS` to be `ON`). |
132| visualinfo | Build the `visualinfo` executable (requires `BUILD_UTILS` to be `ON`). |
133| install    | Install all enabled targets into `CMAKE_INSTALL_PREFIX`. |
134| clean      | Clean up build artifacts. |
135| all        | Build all enabled targets (default target). |
136
137| Variables       | Description |
138| --------------- | ----------- |
139| BUILD_UTILS     | Build the `glewinfo` and `visualinfo` executables. |
140| GLEW_REGAL      | Build in Regal mode. |
141| GLEW_OSMESA     | Build in off-screen Mesa mode. |
142| BUILD_FRAMEWORK | Build as MacOSX Framework.  Setting `CMAKE_INSTALL_PREFIX` to `/Library/Frameworks` is recommended. |
143
144### Windows
145
146#### Visual Studio
147
148Use the provided Visual Studio project file in build/vc15/
149
150Projects for vc6, vc10, vc12 and vc14 are also provided
151
152#### MSYS/Mingw
153
154Available from [Mingw](http://www.mingw.org/)
155
156Requirements: bash, make, gcc
157
158	$ mingw32-make
159	$ mingw32-make install
160	$ mingw32-make install.all
161
162Alternative toolchain:  `SYSTEM=mingw-win32`
163
164#### MSYS2/Mingw-w64
165
166Available from [Msys2](http://msys2.github.io/) and/or [Mingw-w64](http://mingw-w64.org/)
167
168Requirements: bash, make, gcc
169
170	$ pacman -S gcc make mingw-w64-i686-gcc mingw-w64-x86_64-gcc
171	$ make
172	$ make install
173	$ make install.all
174
175Alternative toolchain:  `SYSTEM=msys, SYSTEM=msys-win32, SYSTEM=msys-win64`
176
177## glewinfo
178
179`glewinfo` is a command-line tool useful for inspecting the capabilities of an
180OpenGL implementation and GLEW support for that.  Please include `glewinfo.txt`
181with bug reports, as appropriate.
182
183	---------------------------
184	    GLEW Extension Info
185	---------------------------
186
187	GLEW version 2.0.0
188	Reporting capabilities of pixelformat 3
189	Running on a Intel(R) HD Graphics 3000 from Intel
190	OpenGL version 3.1.0 - Build 9.17.10.4229 is supported
191
192	GL_VERSION_1_1:                                                OK
193	---------------
194
195	GL_VERSION_1_2:                                                OK
196	---------------
197	  glCopyTexSubImage3D:                                         OK
198	  glDrawRangeElements:                                         OK
199	  glTexImage3D:                                                OK
200	  glTexSubImage3D:                                             OK
201
202	...
203
204## Code Generation
205
206A Unix or Mac environment is needed for building GLEW from scratch to
207include new extensions, or customize the code generation. The extension
208data is regenerated from the top level source directory with:
209
210	make extensions
211
212An alternative to generating the GLEW sources from scratch is to
213download a pre-generated (unsupported) snapshot:
214
215https://sourceforge.net/projects/glew/files/glew/snapshots/
216
217## Authors
218
219GLEW is currently maintained by [Nigel Stewart](https://github.com/nigels-com)
220with bug fixes, new OpenGL extension support and new releases.
221
222GLEW was developed by [Milan Ikits](http://www.cs.utah.edu/~ikits/)
223and [Marcelo Magallon](http://wwwvis.informatik.uni-stuttgart.de/~magallon/).
224Aaron Lefohn, Joe Kniss, and Chris Wyman were the first users and also
225assisted with the design and debugging process.
226
227The acronym GLEW originates from Aaron Lefohn.
228Pasi K&auml;rkk&auml;inen identified and fixed several problems with
229GLX and SDL.  Nate Robins created the `wglinfo` utility, to
230which modifications were made by Michael Wimmer.
231
232## Contributions
233
234GLEW welcomes community contributions.  Typically these are co-ordinated
235via [Issues](https://github.com/nigels-com/glew/issues) or
236[Pull Requests](https://github.com/nigels-com/glew/pulls) in the
237GitHub web interface.
238
239Be sure to mention platform and compiler toolchain details when filing
240a bug report.  The output of `glewinfo` can be quite useful for discussion
241also.
242
243Generally GLEW is usually released once a year, around the time of the Siggraph
244computer graphics conference.  If you're not using the current release
245version of GLEW, be sure to check if the issue or bug is fixed there.
246
247## Copyright and Licensing
248
249GLEW is originally derived from the EXTGL project by Lev Povalahev.
250The source code is licensed under the
251[Modified BSD License](http://glew.sourceforge.net/glew.txt), the
252[Mesa 3-D License](http://glew.sourceforge.net/mesa.txt) (MIT) and the
253[Khronos License](http://glew.sourceforge.net/khronos.txt) (MIT).
254
255The automatic code generation scripts are released under the
256[GNU GPL](http://glew.sourceforge.net/gpl.txt).
257