1# GLEW - The OpenGL Extension Wrangler Library 2 3![](http://glew.sourceforge.net/glew.png) 4 5http://glew.sourceforge.net/ 6 7https://github.com/nigels-com/glew 8 9[![Build Status](https://travis-ci.org/nigels-com/glew.svg?branch=master)](https://travis-ci.org/nigels-com/glew) 10[![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) 11[![Download](https://img.shields.io/sourceforge/dm/glew.svg)](https://sourceforge.net/projects/glew/files/latest/download) 12 13## Downloads 14 15Current release is [2.0.0](https://sourceforge.net/projects/glew/files/glew/2.0.0/). 16[(Change Log)](http://glew.sourceforge.net/log.html) 17 18Sources available as 19[ZIP](https://sourceforge.net/projects/glew/files/glew/2.0.0/glew-2.0.0.zip/download) or 20[TGZ](https://sourceforge.net/projects/glew/files/glew/2.0.0/glew-2.0.0.tgz/download). 21 22Windows binaries for [32-bit and 64-bit](https://sourceforge.net/projects/glew/files/glew/2.0.0/glew-2.0.0-win32.zip/download). 23 24### Recent snapshots 25 26Snapshots may contain new features, bug-fixes or new OpenGL extensions ahead of tested, official releases. 27 28[glew-20160708.tgz](http://sourceforge.net/projects/glew/files/glew/snapshots/glew-20160708.tgz/download) 29*GLEW 2.0.0 RC: Core context, EGL support, no MX* 30 31[glew-20160402.tgz](http://sourceforge.net/projects/glew/files/glew/snapshots/glew-20160402.tgz/download) 32*GLEW 2.0.0 RC: Core context, EGL support, no MX* 33 34## Build 35 36From a downloaded tarball or zip archive: 37 38### Linux and Mac 39 40#### Using GNU Make 41 42##### Install build tools 43 44Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev libosmesa-dev git` 45 46RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel git` 47 48##### Build 49 50 $ make 51 $ sudo make install 52 $ make clean 53 54Targets: `all, glew.lib, glew.bin, clean, install, uninstall` 55 56Variables: `SYSTEM=linux-clang, GLEW_DEST=/usr/local, STRIP=` 57 58#### Using cmake 59 60*CMake 2.8.12 or higher is required.* 61 62##### Install build tools 63 64Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libXmu-dev libXi-dev libgl-dev git cmake` 65 66RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel git cmake` 67 68##### Build 69 70 $ cd build 71 $ cmake ./cmake 72 $ make -j4 73 74| Target | Description | 75| ---------- | ----------- | 76| glew | Build the glew shared library. | 77| glew_s | Build the glew static library. | 78| glewinfo | Build the `glewinfo` executable (requires `BUILD_UTILS` to be `ON`). | 79| visualinfo | Build the `visualinfo` executable (requires `BUILD_UTILS` to be `ON`). | 80| install | Install all enabled targets into `CMAKE_INSTALL_PREFIX`. | 81| clean | Clean up build artifacts. | 82| all | Build all enabled targets (default target). | 83 84| Variables | Description | 85| --------------- | ----------- | 86| BUILD_UTILS | Build the `glewinfo` and `visualinfo` executables. | 87| GLEW_REGAL | Build in Regal mode. | 88| GLEW_OSMESA | Build in off-screen Mesa mode. | 89| BUILD_FRAMEWORK | Build as MacOSX Framework. Setting `CMAKE_INSTALL_PREFIX` to `/Library/Frameworks` is recommended. | 90 91### Windows 92 93#### Visual Studio 94 95Use the provided Visual Studio project file in build/vc12/ 96 97Projects for vc6 and vc10 are also provided 98 99#### MSYS/Mingw 100 101Available from [Mingw](http://www.mingw.org/) 102 103Requirements: bash, make, gcc 104 105 $ mingw32-make 106 $ mingw32-make install 107 $ mingw32-make install.all 108 109Alternative toolchain: `SYSTEM=mingw-win32` 110 111#### MSYS2/Mingw-w64 112 113Available from [Msys2](http://msys2.github.io/) and/or [Mingw-w64](http://mingw-w64.org/) 114 115Requirements: bash, make, gcc 116 117 $ pacman -S gcc make mingw-w64-i686-gcc mingw-w64-x86_64-gcc 118 $ make 119 $ make install 120 $ make install.all 121 122Alternative toolchain: `SYSTEM=msys, SYSTEM=msys-win32, SYSTEM=msys-win64` 123 124## glewinfo 125 126`glewinfo` is a command-line tool useful for inspecting the capabilities of an 127OpenGL implementation and GLEW support for that. Please include the output of 128`glewinfo` with bug reports, as appropriate. 129 130 --------------------------- 131 GLEW Extension Info 132 --------------------------- 133 134 GLEW version 2.0.0 135 Reporting capabilities of pixelformat 3 136 Running on a Intel(R) HD Graphics 3000 from Intel 137 OpenGL version 3.1.0 - Build 9.17.10.4229 is supported 138 139 GL_VERSION_1_1: OK 140 --------------- 141 142 GL_VERSION_1_2: OK 143 --------------- 144 glCopyTexSubImage3D: OK 145 glDrawRangeElements: OK 146 glTexImage3D: OK 147 glTexSubImage3D: OK 148 149 ... 150 151## Code Generation 152 153A Unix or Mac environment is neded for building GLEW from scratch to 154include new extensions, or customize the code generation. The extension 155data is regenerated from the top level source directory with: 156 157 make extensions 158 159An alternative to generating the GLEW sources from scratch is to 160download a pre-generated (unsupported) snapshot: 161 162https://sourceforge.net/projects/glew/files/glew/snapshots/ 163 164Travis-built snapshots are also available: 165 166https://glew.s3.amazonaws.com/index.html 167 168## Authors 169 170GLEW is currently maintained by [Nigel Stewart](https://github.com/nigels-com) 171with bug fixes, new OpenGL extension support and new releases. 172 173GLEW was developed by [Milan Ikits](http://www.cs.utah.edu/~ikits/) 174and [Marcelo Magallon](http://wwwvis.informatik.uni-stuttgart.de/~magallon/). 175Aaron Lefohn, Joe Kniss, and Chris Wyman were the first users and also 176assisted with the design and debugging process. 177 178The acronym GLEW originates from Aaron Lefohn. 179Pasi Kärkkäinen identified and fixed several problems with 180GLX and SDL. Nate Robins created the `wglinfo` utility, to 181which modifications were made by Michael Wimmer. 182 183## Copyright and Licensing 184 185GLEW is originally derived from the EXTGL project by Lev Povalahev. 186The source code is licensed under the 187[Modified BSD License](http://glew.sourceforge.net/glew.txt), the 188[Mesa 3-D License](http://glew.sourceforge.net/mesa.txt) (MIT) and the 189[Khronos License](http://glew.sourceforge.net/khronos.txt) (MIT). 190 191The automatic code generation scripts are released under the 192[GNU GPL](http://glew.sourceforge.net/gpl.txt). 193