xref: /glew/
Name Date Size

..29-Nov-20194 KiB

.gitattributesH A D02-Sep-2019154

.gitignoreH A D02-Sep-2019325

.travis.ymlH A D02-Sep-2019860

auto/H02-Sep-20194 KiB

build/H02-Sep-20194 KiB

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

config/H28-Sep-20194 KiB

doc/H02-Sep-20194 KiB

glew.pc.inH A D02-Sep-2019260

LICENSE.txtH A D02-Sep-20193.7 KiB

MakefileH A D28-Sep-201911.5 KiB

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