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