xref: /glew/
Name Date Size

..05-Sep-20204 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/H05-Mar-20204 KiB

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