xref: /glew/
Name Date Size

..27-Apr.-20224 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/H09-Feb.-20224 KiB

doc/H19-Dec.-20214 KiB

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

LICENSE.txtH A D02-Sep.-20193.7 KiB

MakefileH A D04-Oct.-202111.6 KiB

README.mdH A D02-Apr.-20228.7 KiB

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