rayfract

annotate src/glew/README.md @ 10:1496aae2e7d4

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