GLEW(https://github.com/nigels-com/glew, source updated nightly) with Cmake and pre-generated sources
Go to file
2023-10-15 21:08:17 +10:00
auto Shallow clone of registry repositories 2023-10-07 06:44:25 +10:00
build more cleanup 2023-10-15 21:08:17 +10:00
config Make: Remove 32 bit support from universal build 2022-02-09 19:58:09 +10:00
doc Fix various typos 2021-12-20 07:31:49 +10:00
src visualinfo: EGL not supported yet, error out more clearly 2021-10-05 08:28:49 +10:00
.gitattributes Initial EGL core and extension support with Python egl.xml spec parser 2016-02-06 12:41:11 +10:00
.gitignore Added to .gitignore auto-checkout out repos 2023-03-15 22:28:40 +10:00
.lgtm.yml Rename lgtm.yml to hide the file 2020-11-26 20:31:22 +10:00
.travis.yml CMake: Prefer GLVND if available 2021-03-21 12:41:04 +10:00
cmake-testbuild.sh Updated comment in cmake-testbuild.sh 2023-07-16 09:29:54 +10:00
glew.pc.in Extend glew.pc output to mention GL linking (-framework on OSX) 2019-03-17 09:05:27 +10:00
LICENSE.txt Set eol-style to native for misc headers and text files 2009-10-07 15:36:15 +00:00
Makefile Disable stripping in debug-mode builds 2021-10-05 08:29:14 +10:00
README.md Bumped CMake version in README to 3.16. 2023-09-22 07:03:54 +10:00

GLEW - The OpenGL Extension Wrangler Library

The 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.

http://glew.sourceforge.net/

https://github.com/nigels-com/glew

Gitter Download

Table of Contents

Downloads

Current release is 2.2.0. (Change Log)

Sources available as ZIP or TGZ.

Windows binaries for 32-bit and 64-bit.

Recent snapshots

Snapshots may contain new features, bug-fixes or new OpenGL extensions ahead of tested, official releases.

glew-20220402.tgz GLEW 2.2.0 - with fix for glCreateProgressFenceNVX

Build

It is highly recommended to build from a tgz or zip release snapshot. The code generation workflow is a complex brew of gnu make, perl and python, that works best on Linux or Mac. The code generation is known to work on Windows using MSYS2. For most end-users of GLEW the official releases are the best choice, with first class support.

Linux and Mac

Using GNU Make

GNU make is the primary build system for GLEW, historically. It includes targets for building the sources and headers, for maintenance purposes.

Install build tools

Debian/Ubuntu/Mint: $ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev

RedHat/CentOS/Fedora: $ sudo yum install libXmu-devel libXi-devel libGL-devel

FreeBSD: # pkg install xorg lang/gcc git cmake gmake bash python perl5

Build
$ make
$ sudo make install
$ make clean

Targets: all, glew.lib (sub-targets: glew.lib.shared, glew.lib.static), glew.bin, clean, install, uninstall

Variables: SYSTEM=linux-clang, GLEW_DEST=/usr/local, STRIP=

Note: you may need to call make in the auto folder first

Linux EGL
$ sudo apt install libegl1-mesa-dev
$ make SYSTEM=linux-egl
Linux OSMesa
$ sudo apt install libosmesa-dev
$ make SYSTEM=linux-osmesa
Linux mingw-w64
$ sudo apt install mingw-w64
$ make SYSTEM=linux-mingw32
$ make SYSTEM=linux-mingw64

Using cmake

The cmake build is mostly contributor maintained. Due to the multitude of use cases this is maintained on a best effort basis. Pull requests are welcome.

CMake 3.16 or higher is required.

Install build tools

Debian/Ubuntu/Mint: $ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev cmake git

RedHat/CentOS/Fedora: $ sudo yum install libXmu-devel libXi-devel libGL-devel cmake git

Build
$ cd build
$ cmake ./cmake
$ make -j4
Target Description
glew Build the glew shared library.
glew_s Build the glew static library.
glewinfo Build the glewinfo executable (requires BUILD_UTILS to be ON).
visualinfo Build the visualinfo executable (requires BUILD_UTILS to be ON).
install Install all enabled targets into CMAKE_INSTALL_PREFIX.
clean Clean up build artifacts.
all Build all enabled targets (default target).
Variables Description
BUILD_UTILS Build the glewinfo and visualinfo executables.
GLEW_REGAL Build in Regal mode.
GLEW_OSMESA Build in off-screen Mesa mode.
BUILD_FRAMEWORK Build as MacOSX Framework. Setting CMAKE_INSTALL_PREFIX to /Library/Frameworks is recommended.

Windows

Visual Studio

Use the provided Visual Studio project file in build/vc15/

Projects for vc6, vc10, vc12 and vc14 are also provided

MSYS/Mingw

Available from Mingw

Requirements: bash, make, gcc

$ mingw32-make
$ mingw32-make install
$ mingw32-make install.all

Alternative toolchain: SYSTEM=mingw-win32

MSYS2/Mingw-w64

Available from Msys2 and/or Mingw-w64

Requirements: bash, make, gcc

$ pacman -S gcc make mingw-w64-i686-gcc mingw-w64-x86_64-gcc
$ make
$ make install
$ make install.all

Alternative toolchain: SYSTEM=msys, SYSTEM=msys-win32, SYSTEM=msys-win64

glewinfo

glewinfo is a command-line tool useful for inspecting the capabilities of an OpenGL implementation and GLEW support for that. Please include glewinfo.txt with bug reports, as appropriate.

---------------------------
    GLEW Extension Info
---------------------------

GLEW version 2.0.0
Reporting capabilities of pixelformat 3
Running on a Intel(R) HD Graphics 3000 from Intel
OpenGL version 3.1.0 - Build 9.17.10.4229 is supported

GL_VERSION_1_1:                                                OK
---------------

GL_VERSION_1_2:                                                OK
---------------
  glCopyTexSubImage3D:                                         OK
  glDrawRangeElements:                                         OK
  glTexImage3D:                                                OK
  glTexSubImage3D:                                             OK

...

Code Generation

A Unix or Mac environment is needed for building GLEW from scratch to include new extensions, or customize the code generation. The extension data is regenerated from the top level source directory with:

make extensions

An alternative to generating the GLEW sources from scratch is to download a pre-generated (unsupported) snapshot:

https://sourceforge.net/projects/glew/files/glew/snapshots/

Authors

GLEW is currently maintained by Nigel Stewart with bug fixes, new OpenGL extension support and new releases.

GLEW was developed by Milan Ikits and Marcelo Magallon. Aaron Lefohn, Joe Kniss, and Chris Wyman were the first users and also assisted with the design and debugging process.

The acronym GLEW originates from Aaron Lefohn. Pasi Kärkkäinen identified and fixed several problems with GLX and SDL. Nate Robins created the wglinfo utility, to which modifications were made by Michael Wimmer.

Contributions

GLEW welcomes community contributions. Typically these are co-ordinated via Issues or Pull Requests in the GitHub web interface.

Be sure to mention platform and compiler toolchain details when filing a bug report. The output of glewinfo can be quite useful for discussion also.

Generally GLEW is usually released once a year, around the time of the Siggraph computer graphics conference. If you're not using the current release version of GLEW, be sure to check if the issue or bug is fixed there.

GLEW is originally derived from the EXTGL project by Lev Povalahev. The source code is licensed under the Modified BSD License, the Mesa 3-D License (MIT) and the Khronos License (MIT).

The automatic code generation scripts are released under the GNU GPL.