mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2025-04-05 16:32:03 +00:00
Compare commits
480 Commits
glew-2.1.0
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
72ff6b1a5e | ||
|
9f4f3e67eb | ||
|
8d3ac6aca3 | ||
|
b323ebf9ad | ||
|
c050e33aa0 | ||
|
a5494db414 | ||
|
e13dcc58e6 | ||
|
b9f61b43b2 | ||
|
e1a80a9f12 | ||
|
4c6cb2f56d | ||
|
786430a248 | ||
|
7fb9693bd8 | ||
|
c1985bb954 | ||
|
338306293e | ||
|
f064fbfcb6 | ||
|
f8023b362d | ||
|
5aa27cf7d4 | ||
|
c43940a927 | ||
|
906f8f7a6e | ||
|
3cf29c57e9 | ||
|
c2f7ab7f09 | ||
|
a4d8b2a2a3 | ||
|
908ac2eb68 | ||
|
0e6711a117 | ||
|
4abae5fd0c | ||
|
7684bff43b | ||
|
a13f8088ac | ||
|
bae9d1a33d | ||
|
bfe27f1ed1 | ||
|
a98195b83d | ||
|
9758219375 | ||
|
61ff0a2a04 | ||
|
4ed6aac84b | ||
|
281c2936f3 | ||
|
1eb8c92877 | ||
|
91cfa6a5c9 | ||
|
7f7e844cfc | ||
|
ef7d12ecb7 | ||
|
8f9a60f6aa | ||
|
062db23216 | ||
|
675b56a057 | ||
|
6a53a2a200 | ||
|
52ce1cc575 | ||
|
f266584c9a | ||
|
020831e5ad | ||
|
d9504ce13b | ||
|
94b823ee04 | ||
|
ccc2ac3e40 | ||
|
19ecc02312 | ||
|
1a5db5d19b | ||
|
8260c05ee0 | ||
|
9dc72dbd02 | ||
|
e392a7c26f | ||
|
5a2307fae3 | ||
|
c8a2ddfbe1 | ||
|
37e6144802 | ||
|
2c4c183c34 | ||
|
c6673b15bf | ||
|
55c8b94608 | ||
|
35d928bc77 | ||
|
5dbae5a837 | ||
|
5239c3ae21 | ||
|
5f57b09c04 | ||
|
966e53fa15 | ||
|
3f922b3dc6 | ||
|
4a757ac7c0 | ||
|
7c2b7514f6 | ||
|
fe9f5c25c6 | ||
|
ec2cb231a4 | ||
|
570e4534e6 | ||
|
466859eeea | ||
|
ca63fc313e | ||
|
098c409d4d | ||
|
31c1901c82 | ||
|
442d56d47d | ||
|
6940c54fc1 | ||
|
23b9557df8 | ||
|
c44ef5c33d | ||
|
e15487351e | ||
|
673391490c | ||
|
062067f2ba | ||
|
8e2e31e69b | ||
|
037635a192 | ||
|
9e6361b357 | ||
|
247baa9e20 | ||
|
d7693eea09 | ||
|
ce3818d22f | ||
|
b7931abd0c | ||
|
715afa0ff5 | ||
|
ea2076658a | ||
|
7c5c9d5f6b | ||
|
b832da25bc | ||
|
538b2e8d3f | ||
|
767e031645 | ||
|
679a3b17fa | ||
|
883e35a3d4 | ||
|
4d6020be39 | ||
|
d452fb8c39 | ||
|
01420c19a9 | ||
|
a8ef112236 | ||
|
8824bc1146 | ||
|
80e061f85d | ||
|
2b50f4acd2 | ||
|
2b16160853 | ||
|
e34bb212f6 | ||
|
c7dc7efe4e | ||
|
e2b4a36751 | ||
|
547fc11b29 | ||
|
f61e323584 | ||
|
78f10dd0e0 | ||
|
f1c0b06b1b | ||
|
af5eac1089 | ||
|
e983f5e0ee | ||
|
5cc3b4b8a8 | ||
|
67ff18e2ee | ||
|
0be1dc6b89 | ||
|
81b97ab31e | ||
|
c4936e08b7 | ||
|
7d525405e6 | ||
|
10f2e41b97 | ||
|
b78f12e465 | ||
|
a1e2e3deab | ||
|
f4165c28eb | ||
|
fb0f210598 | ||
|
749aec8b9b | ||
|
95329dc4a6 | ||
|
8c88a0858f | ||
|
d68cb03149 | ||
|
5b5685e39a | ||
|
0fa5d11024 | ||
|
107ab7f6e9 | ||
|
4e5fe20519 | ||
|
a3d0ca0c7f | ||
|
e009b0fdce | ||
|
a79115599b | ||
|
b7aa06157b | ||
|
397f383c53 | ||
|
430a36d2b8 | ||
|
9f3df6c128 | ||
|
a553506b46 | ||
|
04007493ce | ||
|
980ccfe56d | ||
|
3900ff84b4 | ||
|
669ca8dda9 | ||
|
3cdab58d4e | ||
|
75e3154422 | ||
|
bfc724c6cc | ||
|
0b97f2568d | ||
|
7764128044 | ||
|
e34677f42b | ||
|
2785d66dde | ||
|
97419eafab | ||
|
9f109bec6c | ||
|
c87ee50fb5 | ||
|
a8b341554f | ||
|
a96e6f1c45 | ||
|
c4c1fd4fec | ||
|
5ab6ba3039 | ||
|
68ac8e80a9 | ||
|
55a499e65a | ||
|
60eafc8a9b | ||
|
b8b7ff3511 | ||
|
9fb23c3e61 | ||
|
555aa3ffc0 | ||
|
7d44f3c67c | ||
|
5ea705737a | ||
|
882aef9761 | ||
|
9a2c9a14b7 | ||
|
ec3049cfc1 | ||
|
1b83eb287d | ||
|
02629da9ca | ||
|
d1d8b889b8 | ||
|
3871202dfd | ||
|
83a174e575 | ||
|
7c706576b8 | ||
|
c32bb089c1 | ||
|
83907238d9 | ||
|
82e8441253 | ||
|
18676f16d9 | ||
|
59a52e570f | ||
|
f9b0c4225f | ||
|
262514e123 | ||
|
6f770a5b5b | ||
|
4f2237a265 | ||
|
cc5cfff738 | ||
|
5a59fc7d94 | ||
|
59c63684ee | ||
|
d47097985a | ||
|
17761407da | ||
|
2ed67686ba | ||
|
4bbe8aa2ab | ||
|
68135131a9 | ||
|
b374d9ad93 | ||
|
0831041e9f | ||
|
3f91cd177a | ||
|
5509e2e13e | ||
|
20ea2d0d07 | ||
|
ceb7145f3e | ||
|
371895de42 | ||
|
acd5fc7f64 | ||
|
708bbfd807 | ||
|
df23003353 | ||
|
41c88953cd | ||
|
ea30c83d92 | ||
|
9170611428 | ||
|
77fa1efe71 | ||
|
1f730ccb3d | ||
|
2545ef4e02 | ||
|
5bc4c9d380 | ||
|
ff01f1db86 | ||
|
0329c64675 | ||
|
e3f3079a53 | ||
|
c52a9eb978 | ||
|
47588720ee | ||
|
8c42082242 | ||
|
662a645508 | ||
|
154f83e024 | ||
|
e4de8a77a1 | ||
|
5a7232fc53 | ||
|
def19e7de4 | ||
|
f92c14bcc1 | ||
|
61d167422c | ||
|
9cc72c5dc2 | ||
|
3565eacf87 | ||
|
e6d676975f | ||
|
1f833c032f | ||
|
1b17b0b210 | ||
|
89b83938a2 | ||
|
f5feecd46e | ||
|
10f2d76c62 | ||
|
f8de1d2860 | ||
|
f2e1f3bac5 | ||
|
565caae5ad | ||
|
521fa58c63 | ||
|
f93eddb4a4 | ||
|
edf558f8f6 | ||
|
3e6dfc4414 | ||
|
dcff76b0d1 | ||
|
62b9213b44 | ||
|
abb57c9b54 | ||
|
278a314d99 | ||
|
f1a95440ea | ||
|
b2ea0143bd | ||
|
6f31e134f6 | ||
|
e304e73230 | ||
|
103b3d156e | ||
|
44049b7de2 | ||
|
899d47a2f3 | ||
|
fbcb13d274 | ||
|
a8df738667 | ||
|
79ca96a53e | ||
|
4932bbba1d | ||
|
ce7bb5a8f0 | ||
|
d650219631 | ||
|
8368ad1c3e | ||
|
0cb090a1a9 | ||
|
fb66d74d14 | ||
|
70fb6195ae | ||
|
180ac698f7 | ||
|
d36641c3e5 | ||
|
923d1cadf3 | ||
|
c49798062d | ||
|
b48ded757e | ||
|
317f39e669 | ||
|
831a868c60 | ||
|
28c160367b | ||
|
302eae8ebb | ||
|
99a9408cf0 | ||
|
82e4802538 | ||
|
7f65a36866 | ||
|
c63cdf976d | ||
|
8e190fe8fc | ||
|
a2ab3e7ca7 | ||
|
6dbc940772 | ||
|
06ec3affe2 | ||
|
679246fadb | ||
|
8b2d34956c | ||
|
5bb183155b | ||
|
6755e0fcac | ||
|
40fbbe826c | ||
|
3e033b9db5 | ||
|
6d5dabf870 | ||
|
14e212406c | ||
|
bc3c5d4992 | ||
|
4234f46208 | ||
|
03afadd4f2 | ||
|
d547ee1556 | ||
|
9964f51119 | ||
|
a8ebd2819e | ||
|
d73ad7eeb2 | ||
|
08ca29e604 | ||
|
66144ae686 | ||
|
be4e0eb102 | ||
|
c849b3f00b | ||
|
e0e17b923e | ||
|
23a7226493 | ||
|
b7c40325c7 | ||
|
559cd7fad8 | ||
|
e8149ff567 | ||
|
4fbb8fe14a | ||
|
f43a19ea26 | ||
|
e544f8c12d | ||
|
ef0e1c4d3a | ||
|
1cdf352217 | ||
|
f5f69b25eb | ||
|
2af38d87be | ||
|
871bb6601b | ||
|
0b396919e6 | ||
|
ee3026486f | ||
|
1579119716 | ||
|
a30e00892a | ||
|
07b759b784 | ||
|
b612863554 | ||
|
15ab6eebec | ||
|
ea68a21093 | ||
|
ae2050b432 | ||
|
db1e93ef4c | ||
|
319c412f65 | ||
|
7be092340b | ||
|
43eefb57d0 | ||
|
f0d8d60cce | ||
|
4af9476eda | ||
|
34d1b6bc31 | ||
|
74c6c8f89a | ||
|
59b243190a | ||
|
5120a35abf | ||
|
e6e5c08ff8 | ||
|
560041a19b | ||
|
998f57e090 | ||
|
81af57f72e | ||
|
2f22768eb3 | ||
|
834284b7ee | ||
|
e3fe70d1dc | ||
|
9aec204e2e | ||
|
eda0eed11c | ||
|
93ef744f23 | ||
|
a56fb7777e | ||
|
c24552fa19 | ||
|
19cdf6ac57 | ||
|
3be4d079d7 | ||
|
69271d06c2 | ||
|
0ba2fb54c6 | ||
|
faf403280c | ||
|
6f3f61c68e | ||
|
bc1a01e903 | ||
|
280d754ac3 | ||
|
3bb390a566 | ||
|
c9db554e1f | ||
|
c63ddd98f4 | ||
|
530355e698 | ||
|
ebeeabace8 | ||
|
91666953f0 | ||
|
f2d45b6f53 | ||
|
868558e265 | ||
|
ae08241886 | ||
|
61948d59d7 | ||
|
64d8e37d50 | ||
|
f8afe700d5 | ||
|
74c8a959b2 | ||
|
e4ed595e2c | ||
|
b04e9803ef | ||
|
51e6b73dda | ||
|
0af1837330 | ||
|
9b1e3b3dca | ||
|
573806ef49 | ||
|
8732077f11 | ||
|
9ec6e6c1cd | ||
|
80726c2df7 | ||
|
0c3450e8db | ||
|
fc0036b9b7 | ||
|
9d73125320 | ||
|
bd5d498437 | ||
|
12670f2b4a | ||
|
19bd2de9e3 | ||
|
18197fd0ec | ||
|
d8f945586c | ||
|
c7de9d54bf | ||
|
c1e87433e5 | ||
|
902171e1f3 | ||
|
ce75a3eb2d | ||
|
3a53edea04 | ||
|
1a6229a0bb | ||
|
32051fc50c | ||
|
7574ab4d00 | ||
|
bdb7d8bdfc | ||
|
0af757be46 | ||
|
271dbb8687 | ||
|
0d77a03a16 | ||
|
5b895ae670 | ||
|
26f3c9889d | ||
|
62f1f24c73 | ||
|
97cb936058 | ||
|
4832dfd170 | ||
|
3a183ac231 | ||
|
f5be4658cb | ||
|
88132fdb08 | ||
|
2afabc5e36 | ||
|
cfcfbb5e6b | ||
|
dc27f8e2fe | ||
|
8019ddef45 | ||
|
77a8c11b80 | ||
|
69e31e274f | ||
|
1c7e8c529b | ||
|
0beff1381f | ||
|
6ee5896cdc | ||
|
51cb63b12a | ||
|
45ebeddf0f | ||
|
a3825dcb85 | ||
|
2c6f79c148 | ||
|
6ca897879f | ||
|
819f806107 | ||
|
15ad18bc1a | ||
|
7cea676806 | ||
|
2227a08d22 | ||
|
8fe0cc10db | ||
|
657889e2a0 | ||
|
e7010eea07 | ||
|
ffcdf98d6c | ||
|
7d4191c138 | ||
|
c50a0582bd | ||
|
8bd32fb681 | ||
|
6db724a060 | ||
|
4b50556664 | ||
|
90277d022a | ||
|
b23fc454db | ||
|
61e43be6fb | ||
|
c1c69104dd | ||
|
117a22ea96 | ||
|
c26257cdff | ||
|
fc9d19ab37 | ||
|
2a34faa730 | ||
|
998722981f | ||
|
57e1b1d0e9 | ||
|
d80b4f1a88 | ||
|
5b0b52c70d | ||
|
f22182f664 | ||
|
5f3a0e31dd | ||
|
d45e5d3b34 | ||
|
574f6f0407 | ||
|
66e8e09e20 | ||
|
ceb841390b | ||
|
43312b09e8 | ||
|
e5f61ba213 | ||
|
dfe114f0ba | ||
|
963b49b005 | ||
|
9d11302877 | ||
|
ab43be0f06 | ||
|
3a73d80be4 | ||
|
1672429f22 | ||
|
c23a995349 | ||
|
62c39ba638 | ||
|
b4f7c06310 | ||
|
1dbf20b5b4 | ||
|
81d119c7fc | ||
|
b2d8206b36 | ||
|
ede8f3b946 | ||
|
a9ceeeedeb | ||
|
9ac6bc4ebb | ||
|
64d0afa487 | ||
|
17fa396828 | ||
|
5dcb9332da | ||
|
721efda22d | ||
|
61c642b71b | ||
|
864a7ea189 | ||
|
0e35fbec4e | ||
|
322624ffdd | ||
|
0680e345f4 | ||
|
c94b3de7d7 | ||
|
d629461fb0 | ||
|
f96a4f3ddf | ||
|
e224767d3c | ||
|
b23ed9846f | ||
|
6b12687640 | ||
|
49cae90154 | ||
|
f4f7759f3a | ||
|
dcd588d402 | ||
|
e080154dc4 | ||
|
0c0532c7c6 | ||
|
dac0614780 | ||
|
5408d71c61 |
217
.github/workflows/cmake.yml
vendored
Normal file
217
.github/workflows/cmake.yml
vendored
Normal file
@ -0,0 +1,217 @@
|
||||
name: CMake
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: Release
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# The CMake configure and build commands are platform agnostic and should work equally
|
||||
# well on Windows or Mac. You can convert this to a matrix build if you need
|
||||
# cross-platform coverage.
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||
runs-on: ubuntu-latest
|
||||
container: ubuntu:latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: apt update && DEBIAN_FRONTEND=noninteractive apt install -y cmake gcc g++ libglu1-mesa-dev pkg-config libx11-dev libxext-dev
|
||||
|
||||
- name: Create Build Environment
|
||||
# Some projects don't allow in-source building, so create a separate build directory
|
||||
# We'll use this as our working directory for all subsequent commands
|
||||
run: |
|
||||
mkdir build_test
|
||||
mkdir from_installed
|
||||
mkdir pkg-config
|
||||
mkdir as_subdirectory
|
||||
|
||||
- name: Configure CMake
|
||||
# Use a bash shell so we can use the same syntax for environment variable
|
||||
# access regardless of the host operating system
|
||||
shell: bash
|
||||
working-directory: build_test
|
||||
# Note the current convention is to use the -S and -B options here to specify source
|
||||
# and build directories, but this is only available with CMake 3.13 and higher.
|
||||
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
||||
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
|
||||
- name: Build test
|
||||
working-directory: build_test
|
||||
shell: bash
|
||||
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||
run: cmake --build . --config $BUILD_TYPE
|
||||
|
||||
- name: Install test
|
||||
shell: bash
|
||||
working-directory: from_installed
|
||||
run: |
|
||||
mkdir -p ext_project/build
|
||||
cp $GITHUB_WORKSPACE/src/glewinfo.c ext_project/
|
||||
cmake $GITHUB_WORKSPACE -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/glew-root-cmake
|
||||
cmake --build . --target install
|
||||
|
||||
cd ext_project
|
||||
cp $GITHUB_WORKSPACE/glew-cmake/cmake-install-test.cmake CMakeLists.txt
|
||||
cmake -DCMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/glew-root-cmake/ .
|
||||
cmake --build .
|
||||
|
||||
- name: Package config test
|
||||
shell: bash
|
||||
working-directory: pkg-config
|
||||
run: |
|
||||
mkdir -p ext_project
|
||||
cp $GITHUB_WORKSPACE/src/glewinfo.c ext_project/
|
||||
cmake $GITHUB_WORKSPACE -DPKG_CONFIG_REPRESENTATIVE_TARGET=libglew_static -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/glew-root-pkg-config
|
||||
cmake --build . --target install
|
||||
|
||||
cd ext_project
|
||||
gcc $GITHUB_WORKSPACE/src/glewinfo.c $(PKG_CONFIG_PATH=$GITHUB_WORKSPACE/glew-root-pkg-config/lib/pkgconfig pkg-config --libs --cflags glew) -o glewinfo
|
||||
|
||||
- name: Subdirectory test
|
||||
shell: bash
|
||||
working-directory: as_subdirectory
|
||||
run: |
|
||||
cp $GITHUB_WORKSPACE/src/glewinfo.c ./
|
||||
cp $GITHUB_WORKSPACE/glew-cmake/sub-directory-test.cmake CMakeLists.txt
|
||||
cmake .
|
||||
cmake --build .
|
||||
|
||||
build_2_8:
|
||||
# The CMake configure and build commands are platform agnostic and should work equally
|
||||
# well on Windows or Mac. You can convert this to a matrix build if you need
|
||||
# cross-platform coverage.
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||
runs-on: ubuntu-latest
|
||||
container: ubuntu:14.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: apt update && apt install -y cmake gcc libgl1-mesa-dev libx11-dev libxext-dev
|
||||
|
||||
- name: Configure CMake
|
||||
shell: bash
|
||||
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
|
||||
- name: Build test
|
||||
shell: bash
|
||||
run: cmake --build .
|
||||
|
||||
- name: Check alias
|
||||
shell: bash
|
||||
run: test -e lib/libGLEW.a
|
||||
|
||||
build_3_10:
|
||||
# The CMake configure and build commands are platform agnostic and should work equally
|
||||
# well on Windows or Mac. You can convert this to a matrix build if you need
|
||||
# cross-platform coverage.
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||
runs-on: ubuntu-latest
|
||||
container: ubuntu:18.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: apt update && apt install -y cmake gcc libgl1-mesa-dev libx11-dev libxext-dev
|
||||
|
||||
- name: Configure CMake
|
||||
shell: bash
|
||||
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
|
||||
- name: Build test
|
||||
shell: bash
|
||||
run: cmake --build .
|
||||
|
||||
- name: Check alias
|
||||
shell: bash
|
||||
run: test -e lib/libGLEW.a
|
||||
|
||||
build_latest:
|
||||
runs-on: ubuntu-latest
|
||||
container: ubuntu:latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: apt update && apt install -y python3 python3-pip gcc libgl1-mesa-dev libx11-dev libxext-dev && pip install cmake
|
||||
|
||||
- name: Configure CMake
|
||||
shell: bash
|
||||
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
|
||||
- name: Build test
|
||||
shell: bash
|
||||
run: cmake --build .
|
||||
|
||||
- name: Check alias
|
||||
shell: bash
|
||||
run: test -e lib/libGLEW.a
|
||||
|
||||
build_mingw:
|
||||
# The CMake configure and build commands are platform agnostic and should work equally
|
||||
# well on Windows or Mac. You can convert this to a matrix build if you need
|
||||
# cross-platform coverage.
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||
runs-on: ubuntu-latest
|
||||
container: ubuntu:18.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: apt update && apt install -y cmake g++-mingw-w64-x86-64 make libgl1-mesa-dev libx11-dev libxext-dev
|
||||
|
||||
- name: Configure CMake
|
||||
shell: bash
|
||||
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/glew-cmake/mingw.cmake"
|
||||
|
||||
- name: Build test
|
||||
shell: bash
|
||||
run: cmake --build .
|
||||
|
||||
|
||||
build_mac:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Configure CMake
|
||||
shell: bash
|
||||
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
|
||||
- name: Build test
|
||||
shell: bash
|
||||
run: cmake --build .
|
||||
|
||||
build_windows:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Configure CMake
|
||||
shell: bash
|
||||
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
|
||||
- name: Build test
|
||||
shell: bash
|
||||
run: cmake --build .
|
5
.gitignore
vendored
5
.gitignore
vendored
@ -5,7 +5,9 @@
|
||||
/build/*.rc
|
||||
/build/*/*.sdf
|
||||
/build/*/*.suo
|
||||
/build/*/*.db
|
||||
/build/*/*.vcxproj.user
|
||||
/build/*/.vs/
|
||||
/build/*/tmp/
|
||||
/build/cmake/CMakeFiles/
|
||||
/build/cmake/CMakeCache.txt
|
||||
@ -18,3 +20,6 @@
|
||||
/tmp
|
||||
/out
|
||||
.DS_Store*
|
||||
auto/EGL-Registry
|
||||
auto/OpenGL-Registry
|
||||
auto/glfixes
|
||||
|
12
.lgtm.yml
Normal file
12
.lgtm.yml
Normal file
@ -0,0 +1,12 @@
|
||||
extraction:
|
||||
cpp:
|
||||
prepare:
|
||||
packages:
|
||||
- "build-essential"
|
||||
- "libxmu-dev"
|
||||
- "libxi-dev"
|
||||
- "libgl-dev"
|
||||
index:
|
||||
build_command:
|
||||
- "cd auto; make all -j8; cd .."
|
||||
- "make all -j8"
|
20
.travis.yml
20
.travis.yml
@ -1,18 +1,18 @@
|
||||
language: cpp
|
||||
sudo: false
|
||||
dist: trusty
|
||||
install:
|
||||
script:
|
||||
- make -C auto clobber
|
||||
- make extensions
|
||||
- make dist-src
|
||||
- make clean; SYSTEM=linux make
|
||||
- make clean; SYSTEM=linux-osmesa make
|
||||
- make clean; SYSTEM=linux-egl make
|
||||
- make clean; SYSTEM=linux-clang make
|
||||
- make clean; SYSTEM=linux-clang-egl make
|
||||
- pushd build/cmake; git clean -xdf .; cmake -G 'Unix Makefiles' . ; make; popd
|
||||
- pushd build/cmake; git clean -xdf .; cmake -G 'Unix Makefiles' -DGLEW_OSMESA=1 . ; make; popd
|
||||
- pushd build/cmake; git clean -xdf .; cmake -G 'Unix Makefiles' -DGLEW_EGL=1 . ; make; popd
|
||||
- make clean && SYSTEM=linux make
|
||||
- make clean && SYSTEM=linux-osmesa make
|
||||
- make clean && SYSTEM=linux-egl make
|
||||
- make clean && SYSTEM=linux-clang make
|
||||
- make clean && SYSTEM=linux-clang-egl make
|
||||
- pushd build/cmake && git clean -xdf . && cmake -G 'Unix Makefiles' . && make && popd
|
||||
- pushd build/cmake && git clean -xdf . && cmake -G 'Unix Makefiles' -DGLEW_OSMESA=ON . && make && popd
|
||||
- pushd build/cmake && git clean -xdf . && cmake -G 'Unix Makefiles' -DGLEW_EGL=ON -DGLEW_X11=OFF . && make && popd
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
@ -22,8 +22,6 @@ addons:
|
||||
- libosmesa6-dev
|
||||
- libegl1-mesa-dev
|
||||
artifacts:
|
||||
bucket: glew
|
||||
s3_region: "us-east-1"
|
||||
paths:
|
||||
- $(ls *.zip *.tgz | tr "\n" ":")
|
||||
- $(find doc -type f | tr "\n" ":")
|
||||
|
@ -1,53 +0,0 @@
|
||||
|
||||
env:
|
||||
global:
|
||||
- CONAN_USERNAME="nigels-com"
|
||||
- CONAN_REFERENCE="glew/master"
|
||||
- CONAN_CHANNEL="testing"
|
||||
|
||||
linux: &linux
|
||||
os: linux
|
||||
sudo: required
|
||||
language: python
|
||||
python: "2.7"
|
||||
services:
|
||||
- docker
|
||||
osx: &osx
|
||||
os: osx
|
||||
language: generic
|
||||
matrix:
|
||||
include:
|
||||
|
||||
- <<: *linux
|
||||
env: CONAN_GCC_VERSIONS=4.9 CONAN_DOCKER_IMAGE=lasote/conangcc49
|
||||
- <<: *linux
|
||||
env: CONAN_GCC_VERSIONS=5.4 CONAN_DOCKER_IMAGE=lasote/conangcc54
|
||||
- <<: *linux
|
||||
env: CONAN_GCC_VERSIONS=6.3 CONAN_DOCKER_IMAGE=lasote/conangcc63
|
||||
- <<: *linux
|
||||
env: CONAN_CLANG_VERSIONS=3.9 CONAN_DOCKER_IMAGE=lasote/conanclang39
|
||||
- <<: *linux
|
||||
env: CONAN_CLANG_VERSIONS=4.0 CONAN_DOCKER_IMAGE=lasote/conanclang40
|
||||
- <<: *osx
|
||||
osx_image: xcode7.3
|
||||
env: CONAN_APPLE_CLANG_VERSIONS=7.3
|
||||
- <<: *osx
|
||||
osx_image: xcode8.2
|
||||
env: CONAN_APPLE_CLANG_VERSIONS=8.0
|
||||
- <<: *osx
|
||||
osx_image: xcode8.3
|
||||
env: CONAN_APPLE_CLANG_VERSIONS=8.1
|
||||
|
||||
install:
|
||||
- chmod +x ./build/conan/.travis/install.sh
|
||||
- ./build/conan/.travis/install.sh
|
||||
script:
|
||||
# Building master
|
||||
- cp -rf ./build/conan/* .
|
||||
- cp -rf ./build/conan/.travis .
|
||||
- chmod +x .travis/run.sh
|
||||
- .travis/run.sh
|
||||
|
||||
# Building released version
|
||||
#- chmod +x ./build/conan/.travis/run.sh
|
||||
#- cd ./build/conan && .travis/run.sh
|
287
CMakeLists.txt
Normal file
287
CMakeLists.txt
Normal file
@ -0,0 +1,287 @@
|
||||
cmake_minimum_required(VERSION 2.8.12...3.5)
|
||||
|
||||
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/config/version _VERSION_MAJOR_STRING REGEX "GLEW_MAJOR[ ]*=[ ]*[0-9]+.*")
|
||||
string(REGEX REPLACE "GLEW_MAJOR[ ]*=[ ]*([0-9]+)" "\\1" MAJOR_VERSION ${_VERSION_MAJOR_STRING})
|
||||
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/config/version _VERSION_MINOR_STRING REGEX "GLEW_MINOR[ ]*=[ ]*[0-9]+.*")
|
||||
string(REGEX REPLACE "GLEW_MINOR[ ]*=[ ]*([0-9]+)" "\\1" MINOR_VERSION ${_VERSION_MINOR_STRING})
|
||||
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/config/version _VERSION_PATCH_STRING REGEX "GLEW_MICRO[ ]*=[ ]*[0-9]+.*")
|
||||
string(REGEX REPLACE "GLEW_MICRO[ ]*=[ ]*([0-9]+)" "\\1" PATCH_VERSION ${_VERSION_PATCH_STRING})
|
||||
set(GLEW_VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION})
|
||||
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.0)
|
||||
cmake_policy(SET CMP0048 NEW)
|
||||
project("glew" VERSION ${GLEW_VERSION} LANGUAGES C)
|
||||
else()
|
||||
project("glew" C)
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${MAJOR_VERSION})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${MAJOR_VERSION})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${MAJOR_VERSION})
|
||||
endif()
|
||||
|
||||
set(SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
set(INCLUDE_DIR "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>$<INSTALL_INTERFACE:include>")
|
||||
set(RC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build)
|
||||
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
|
||||
|
||||
include("GeneratePkgConfig.cmake")
|
||||
|
||||
if (POLICY CMP0077)
|
||||
cmake_policy(SET CMP0077 NEW)
|
||||
endif()
|
||||
|
||||
option(glew-cmake_BUILD_SHARED "Build the shared glew library" ON)
|
||||
option(glew-cmake_BUILD_STATIC "Build the static glew library" ON)
|
||||
option(USE_GLU "Use GLU" OFF)
|
||||
option(GLEW_OSMESA "Off-screen Mesa mode" OFF)
|
||||
option(PKG_CONFIG_REPRESENTATIVE_TARGET "Generate pc file for specified target as glew. libglew_static|libglew_shared" OFF)
|
||||
option(ONLY_LIBS "Do not build executables" OFF)
|
||||
|
||||
set(LIBGLEW_SRCS ${SRC_DIR}/glew.c)
|
||||
|
||||
set(DEFINITIONS)
|
||||
if(WIN32)
|
||||
list(APPEND DEFINITIONS -DWIN32_MEAN_AND_LEAN -DVC_EXTRALEAN -D_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
list(APPEND LIBGLEW_SRCS ${RC_DIR}/glew.rc)
|
||||
endif()
|
||||
|
||||
# Use namespaced libraries when supported
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.14)
|
||||
set(USE_NAMESPACED_LIB YES)
|
||||
else()
|
||||
set(USE_NAMESPACED_LIB NO)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0028)
|
||||
cmake_policy(SET CMP0028 NEW)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0042)
|
||||
cmake_policy(SET CMP0042 NEW)
|
||||
endif()
|
||||
|
||||
if(POLICY CMP0072)
|
||||
set(OpenGL_GL_PREFERENCE GLVND)
|
||||
endif()
|
||||
|
||||
if(NOT (WIN32 OR APPLE))
|
||||
message("Try to find OpenGL with GLVND")
|
||||
find_package(OpenGL REQUIRED
|
||||
COMPONENTS OpenGL GLX)
|
||||
endif()
|
||||
|
||||
if(OPENGL_FOUND AND OpenGL_GLX_FOUND AND TARGET OpenGL::OpenGL)
|
||||
set(USE_GLVND YES)
|
||||
else()
|
||||
message("GLVND not supported. Try find OpenGL legacy")
|
||||
find_package(OpenGL REQUIRED)
|
||||
set(USE_GLVND NO)
|
||||
endif()
|
||||
|
||||
set(pc_requires)
|
||||
|
||||
if(NOT USE_GLU)
|
||||
list(APPEND DEFINITIONS -DGLEW_NO_GLU)
|
||||
else()
|
||||
if(NOT OPENGL_GLU_FOUND)
|
||||
message(FATAL_ERROR "GLU is not found. but GLU option is enabled")
|
||||
endif()
|
||||
|
||||
list(APPEND pc_requires glu)
|
||||
|
||||
if(USE_NAMESPACED_LIB)
|
||||
list(APPEND LIBRARIES OpenGL::GLU)
|
||||
else()
|
||||
list(APPEND LIBRARIES ${OPENGL_glu_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND pc_requires gl)
|
||||
if(USE_NAMESPACED_LIB)
|
||||
if(USE_GLVND)
|
||||
list(APPEND LIBRARIES OpenGL::OpenGL)
|
||||
else()
|
||||
list(APPEND LIBRARIES OpenGL::GL)
|
||||
endif()
|
||||
else()
|
||||
if(USE_GLVND)
|
||||
list(APPEND LIBRARIES ${OPENGL_opengl_LIBRARY})
|
||||
else()
|
||||
list(APPEND LIBRARIES ${OPENGL_gl_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OS Specific dependencies
|
||||
if(APPLE)
|
||||
find_library(AGL_LIBRARY AGL REQUIRED)
|
||||
list(APPEND LIBRARIES ${AGL_LIBRARY})
|
||||
elseif(NOT WIN32)
|
||||
if(GLEW_OSMESA)
|
||||
find_library(OSMESA_LIBRARY OSMesa REQUIRED)
|
||||
list(APPEND LIBRARIES ${OSMESA_LIBRARY})
|
||||
list(APPEND DEFINITIONS -DGLEW_OSMESA)
|
||||
list(APPEND pc_requires osmesa)
|
||||
else()
|
||||
if(USE_GLVND)
|
||||
if(NOT OpenGL_GLX_FOUND)
|
||||
message(FATAL_ERROR "GLX is not found. Try with PREFER_GLVND=NO")
|
||||
endif()
|
||||
|
||||
if(USE_NAMESPACED_LIB)
|
||||
list(APPEND LIBRARIES OpenGL::GLX)
|
||||
else()
|
||||
list(APPEND LIBRARIES ${OPENGL_glx_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(X11 REQUIRED)
|
||||
|
||||
list(APPEND pc_requires x11 xext)
|
||||
if(USE_NAMESPACED_LIB)
|
||||
list(APPEND LIBRARIES X11::X11 X11::Xext)
|
||||
else()
|
||||
list(APPEND LIBRARIES ${X11_X11_LIB} ${X11_Xext_LIB})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(GLEW_TARGETS)
|
||||
|
||||
if(NOT CMAKE_INSTALL_LIBDIR)
|
||||
set(INSTALL_LIBDIR lib)
|
||||
else()
|
||||
set(INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/test_fs_support_case_sensitivity
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/test_fs_support_CASE_sensitivity)
|
||||
file(GLOB TEST_FILE_LIST ${CMAKE_BINARY_DIR}/test_fs_support_*_sensitivity)
|
||||
list(LENGTH TEST_FILE_LIST TEST_FILE_COUNT)
|
||||
if(TEST_FILE_COUNT EQUAL 2)
|
||||
set(SUPPORT_CASE_SENSITIVE_FS YES)
|
||||
else()
|
||||
set(SUPPORT_CASE_SENSITIVE_FS NO)
|
||||
endif()
|
||||
|
||||
function(set_representative_target TARGET)
|
||||
set_target_properties(${TARGET} PROPERTIES
|
||||
OUTPUT_NAME "glew"
|
||||
DEBUG_POSTFIX d)
|
||||
|
||||
# Windows & macOS use case-insensetive FS. do not create symbolic link
|
||||
if(SUPPORT_CASE_SENSITIVE_FS)
|
||||
get_target_property(TARGET_TYPE ${TARGET} TYPE)
|
||||
string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
|
||||
if(CMAKE_BUILD_TYPE_LOWER STREQUAL "debug" AND NOT ANDROID)
|
||||
set(GLEW_DEBUG_SUFFIX "d")
|
||||
else()
|
||||
set(GLEW_DEBUG_SUFFIX "")
|
||||
endif()
|
||||
if(TARGET_TYPE STREQUAL STATIC_LIBRARY)
|
||||
set(EXT ".a")
|
||||
get_target_property(OUT_DIR ${TARGET} ARCHIVE_OUTPUT_DIRECTORY)
|
||||
else()
|
||||
set(EXT ".so")
|
||||
get_target_property(OUT_DIR ${TARGET} LIBRARY_OUTPUT_DIRECTORY)
|
||||
endif()
|
||||
if(NOT ${CMAKE_VERSION} VERSION_LESS 3.0)
|
||||
add_custom_command(TARGET ${TARGET} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink libglew${GLEW_DEBUG_SUFFIX}${EXT} libGLEW${GLEW_DEBUG_SUFFIX}${EXT}
|
||||
WORKING_DIRECTORY ${OUT_DIR}
|
||||
BYPRODUCTS ${OUT_DIR}/libGLEW${GLEW_DEBUG_SUFFIX}${EXT}
|
||||
COMMENT "create libGLEW${GLEW_DEBUG_SUFFIX} symbolic link")
|
||||
else()
|
||||
add_custom_command(TARGET ${TARGET} POST_BUILD
|
||||
COMMAND bash ARGS -c "( test ! -e ${OUT_DIR}/libGLEW${GLEW_DEBUG_SUFFIX}${EXT} && cd ${OUT_DIR} && ${CMAKE_COMMAND} -E create_symlink libglew${GLEW_DEBUG_SUFFIX}${EXT} libGLEW${GLEW_DEBUG_SUFFIX}${EXT} ) || true"
|
||||
COMMENT "create libGLEW${GLEW_DEBUG_SUFFIX} symbolic link"
|
||||
VERBATIM)
|
||||
endif()
|
||||
|
||||
if(NOT ${CMAKE_VERSION} VERSION_LESS 3.14)
|
||||
install(FILES ${OUT_DIR}/libGLEW${GLEW_DEBUG_SUFFIX}${EXT} TYPE LIB)
|
||||
else()
|
||||
install(FILES ${OUT_DIR}/libGLEW${GLEW_DEBUG_SUFFIX}${EXT} DESTINATION ${INSTALL_LIBDIR})
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
if(glew-cmake_BUILD_STATIC)
|
||||
add_library(libglew_static STATIC ${LIBGLEW_SRCS})
|
||||
|
||||
set_representative_target(libglew_static)
|
||||
|
||||
target_compile_definitions(libglew_static PUBLIC GLEW_STATIC)
|
||||
list(APPEND GLEW_TARGETS libglew_static)
|
||||
endif()
|
||||
|
||||
if(glew-cmake_BUILD_SHARED)
|
||||
add_library(libglew_shared SHARED ${LIBGLEW_SRCS})
|
||||
|
||||
if(glew-cmake_BUILD_STATIC)
|
||||
set_target_properties(libglew_shared PROPERTIES
|
||||
OUTPUT_NAME "glew-shared"
|
||||
DEBUG_POSTFIX d)
|
||||
else()
|
||||
set_representative_target(libglew_shared)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(libglew_shared PRIVATE GLEW_BUILD)
|
||||
if(MINGW)
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13)
|
||||
target_link_options(libglew_shared PRIVATE -nostdlib)
|
||||
else()
|
||||
target_link_libraries(libglew_shared PRIVATE -nostdlib)
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND GLEW_TARGETS libglew_shared)
|
||||
endif()
|
||||
|
||||
foreach(GLEW_TARGET ${GLEW_TARGETS})
|
||||
target_compile_definitions(${GLEW_TARGET} PUBLIC ${DEFINITIONS})
|
||||
target_include_directories(${GLEW_TARGET} PUBLIC ${INCLUDE_DIR})
|
||||
target_link_libraries(${GLEW_TARGET} PUBLIC ${LIBRARIES})
|
||||
set_target_properties(${GLEW_TARGET} PROPERTIES VERSION ${GLEW_VERSION})
|
||||
endforeach()
|
||||
|
||||
if(PKG_CONFIG_REPRESENTATIVE_TARGET)
|
||||
GeneratePkgConfigFile(${PKG_CONFIG_REPRESENTATIVE_TARGET} "The OpenGL Extension Wrangler library"
|
||||
NAME "glew"
|
||||
LIBRARY_DIR ${INSTALL_LIBDIR}
|
||||
REQUIRES ${pc_requires})
|
||||
endif()
|
||||
|
||||
install(TARGETS ${GLEW_TARGETS} EXPORT glew-cmake
|
||||
ARCHIVE DESTINATION ${INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${INSTALL_LIBDIR})
|
||||
install(EXPORT glew-cmake DESTINATION ${INSTALL_LIBDIR}/cmake/glew FILE glewConfig.cmake)
|
||||
|
||||
file(GLOB PUBLIC_HEADERS "include/GL/*.h")
|
||||
install(FILES ${PUBLIC_HEADERS} DESTINATION include/GL/)
|
||||
|
||||
if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR} AND NOT ONLY_LIBS)
|
||||
set(GLEWINFO_SRCS ${SRC_DIR}/glewinfo.c)
|
||||
set(VISUALINFO_SRCS ${SRC_DIR}/visualinfo.c)
|
||||
if(MSVS)
|
||||
list(APPEND GLEWINFO_SRCS ${RC_DIR}/glewinfo.rc)
|
||||
list(APPEND VISUALINFO_SRCS ${RC_DIR}/visualinfo.rc)
|
||||
endif()
|
||||
|
||||
add_executable(glewinfo ${GLEWINFO_SRCS})
|
||||
add_executable(visualinfo ${VISUALINFO_SRCS})
|
||||
|
||||
if(glew-cmake_BUILD_STATIC)
|
||||
target_link_libraries(glewinfo libglew_static)
|
||||
target_link_libraries(visualinfo libglew_static)
|
||||
else()
|
||||
target_link_libraries(glewinfo libglew_shared)
|
||||
target_link_libraries(visualinfo libglew_shared)
|
||||
endif()
|
||||
|
||||
install(TARGETS glewinfo visualinfo DESTINATION bin)
|
||||
endif()
|
62
GeneratePkgConfig.cmake
Normal file
62
GeneratePkgConfig.cmake
Normal file
@ -0,0 +1,62 @@
|
||||
function(GeneratePkgConfigFile target description)
|
||||
cmake_parse_arguments(pc "" "NAME;LIBRARY_DIR" "REQUIRES" ${ARGV})
|
||||
if(NOT pc_LIBRARY_DIR)
|
||||
set(pc_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
if(WIN32)
|
||||
set(PKGCONFIG_INSTALL_DIR)
|
||||
else()
|
||||
set(PKGCONFIG_INSTALL_DIR ${pc_LIBRARY_DIR}/pkgconfig)
|
||||
endif()
|
||||
if(NOT pc_NAME)
|
||||
set(pc_NAME ${target})
|
||||
endif()
|
||||
|
||||
get_property(raw_definitions TARGET ${target} PROPERTY INTERFACE_COMPILE_DEFINITIONS)
|
||||
set(definitions "")
|
||||
foreach(def IN LISTS raw_definitions)
|
||||
if(def MATCHES "-D")
|
||||
list(APPEND definitions ${def})
|
||||
else()
|
||||
list(APPEND definitions "-D${def}")
|
||||
endif()
|
||||
endforeach()
|
||||
list(JOIN definitions " " definitions)
|
||||
|
||||
get_property(target_output TARGET ${target} PROPERTY OUTPUT_NAME)
|
||||
get_filename_component(target_output ${target_output} NAME)
|
||||
set(links "-l${target_output}")
|
||||
get_property(raw_links TARGET ${target} PROPERTY INTERFACE_LINK_LIBRARIES)
|
||||
foreach(link IN LISTS raw_links)
|
||||
if(link MATCHES "-l")
|
||||
list(APPEND links ${link})
|
||||
elseif(TARGET ${link})
|
||||
get_property(is_imported TARGET ${link} PROPERTY IMPORTED)
|
||||
if(NOT is_imported)
|
||||
get_property(link_target TARGET ${link} PROPERTY OUTPUT_NAME)
|
||||
list(APPEND links ${link_target})
|
||||
endif()
|
||||
else()
|
||||
list(APPEND links "-l${link}")
|
||||
endif()
|
||||
endforeach()
|
||||
list(JOIN links " " links)
|
||||
get_property(version TARGET ${target} PROPERTY VERSION)
|
||||
|
||||
set(out_file "${CMAKE_CURRENT_BINARY_DIR}/${pc_NAME}.pc")
|
||||
file(WRITE ${out_file} "prefix=${CMAKE_INSTALL_PREFIX}\n")
|
||||
file(APPEND ${out_file} "exec_prefix=\${prefix}\n")
|
||||
file(APPEND ${out_file} "libdir=\${prefix}/${pc_LIBRARY_DIR}\n")
|
||||
file(APPEND ${out_file} "includedir=\${prefix}/include\n")
|
||||
file(APPEND ${out_file} "\n")
|
||||
file(APPEND ${out_file} "Name: ${pc_NAME}\n")
|
||||
file(APPEND ${out_file} "Description: ${description}\n")
|
||||
file(APPEND ${out_file} "Version: ${version}\n")
|
||||
file(APPEND ${out_file} "Cflags: -I\${includedir} ${definitions}\n")
|
||||
file(APPEND ${out_file} "Libs: -L\${libdir} ${links}\n")
|
||||
if(pc_REQUIRES)
|
||||
string(REPLACE ";" " " REQUIRES "${pc_REQUIRES}")
|
||||
file(APPEND ${out_file} "Requires: ${REQUIRES}")
|
||||
endif()
|
||||
install(FILES ${out_file} DESTINATION "${PKGCONFIG_INSTALL_DIR}")
|
||||
endfunction()
|
41
Makefile
41
Makefile
@ -31,7 +31,7 @@
|
||||
include config/version
|
||||
|
||||
SHELL = /bin/sh
|
||||
SYSTEM ?= $(shell config/config.guess | cut -d - -f 3 | sed -e 's/[0-9\.]//g;')
|
||||
SYSTEM ?= $(shell config/config.guess | cut -d - -f 3 | sed -e 's/\.//g' -e 's/[0-9]\{1,\}.*//')
|
||||
SYSTEM.SUPPORTED = $(shell test -f config/Makefile.$(SYSTEM) && echo 1)
|
||||
|
||||
ifeq ($(SYSTEM.SUPPORTED), 1)
|
||||
@ -40,8 +40,8 @@ else
|
||||
$(error "Platform '$(SYSTEM)' not supported")
|
||||
endif
|
||||
|
||||
GLEW_PREFIX ?= /usr
|
||||
GLEW_DEST ?= /usr
|
||||
GLEW_PREFIX ?= /usr/local
|
||||
GLEW_DEST ?= /usr/local
|
||||
BINDIR ?= $(GLEW_DEST)/bin
|
||||
LIBDIR ?= $(GLEW_DEST)/lib
|
||||
INCDIR ?= $(GLEW_DEST)/include/GL
|
||||
@ -61,7 +61,6 @@ DIST_DIR := $(shell mktemp -d /tmp/glew.XXXXXX)/$(DIST_NAME)
|
||||
# To disable stripping of linked binaries either:
|
||||
# - use STRIP= on gmake command-line
|
||||
# - edit this makefile to set STRIP to the empty string
|
||||
# (Note: STRIP does not affect the strip in the install step)
|
||||
#
|
||||
# To disable symlinks:
|
||||
# - use LN= on gmake command-line
|
||||
@ -77,6 +76,7 @@ DOS2UNIX ?= dos2unix -q
|
||||
|
||||
ifneq (,$(filter debug,$(MAKECMDGOALS)))
|
||||
OPT = -g
|
||||
STRIP :=
|
||||
else
|
||||
OPT = $(POPT)
|
||||
endif
|
||||
@ -89,6 +89,7 @@ all debug: glew.lib glew.bin
|
||||
|
||||
LIB.LDFLAGS := $(LDFLAGS.EXTRA) $(LDFLAGS.GL)
|
||||
LIB.LIBS := $(GL_LDFLAGS)
|
||||
LIB.SHARED.DIR ?= lib
|
||||
|
||||
LIB.SRCS := src/glew.c
|
||||
LIB.SRCS.NAMES := $(notdir $(LIB.SRCS))
|
||||
@ -100,7 +101,7 @@ LIB.SOBJS := $(LIB.SOBJS:.c=.o)
|
||||
|
||||
glew.lib: glew.lib.shared glew.lib.static
|
||||
|
||||
glew.lib.shared: lib lib/$(LIB.SHARED) glew.pc
|
||||
glew.lib.shared: lib $(LIB.SHARED.DIR) $(LIB.SHARED.DIR)/$(LIB.SHARED) glew.pc
|
||||
glew.lib.static: lib lib/$(LIB.STATIC) glew.pc
|
||||
|
||||
.PHONY: glew.lib glew.lib.shared glew.lib.static
|
||||
@ -118,11 +119,11 @@ ifneq ($(STRIP),)
|
||||
$(STRIP) -x $@
|
||||
endif
|
||||
|
||||
lib/$(LIB.SHARED): $(LIB.SOBJS)
|
||||
$(LIB.SHARED.DIR)/$(LIB.SHARED): $(LIB.SOBJS)
|
||||
$(LD) $(LDFLAGS.SO) -o $@ $^ $(LIB.LDFLAGS) $(LIB.LIBS)
|
||||
ifneq ($(LN),)
|
||||
$(LN) $(LIB.SHARED) lib/$(LIB.SONAME)
|
||||
$(LN) $(LIB.SHARED) lib/$(LIB.DEVLNK)
|
||||
$(LN) $(LIB.SHARED) $(LIB.SHARED.DIR)/$(LIB.SONAME)
|
||||
$(LN) $(LIB.SHARED) $(LIB.SHARED.DIR)/$(LIB.DEVLNK)
|
||||
endif
|
||||
ifneq ($(STRIP),)
|
||||
$(STRIP) -x $@
|
||||
@ -149,6 +150,7 @@ glew.pc: glew.pc.in
|
||||
-e "s|@version@|$(GLEW_VERSION)|g" \
|
||||
-e "s|@cflags@||g" \
|
||||
-e "s|@libname@|$(NAME)|g" \
|
||||
-e "s|@libgl@|$(LDFLAGS.GL)|g" \
|
||||
-e "s|@requireslib@|$(LIBGLU)|g" \
|
||||
< $< > $@
|
||||
|
||||
@ -169,21 +171,20 @@ VISUALINFO.BIN.OBJ := $(VISUALINFO.BIN.OBJ:.c=.o)
|
||||
# Don't build glewinfo or visualinfo for NaCL, yet.
|
||||
|
||||
ifneq ($(filter nacl%,$(SYSTEM)),)
|
||||
glew.bin: glew.lib bin
|
||||
glew.bin: glew.lib
|
||||
else
|
||||
glew.bin: glew.lib bin bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN)
|
||||
glew.bin: glew.lib bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN)
|
||||
endif
|
||||
|
||||
bin:
|
||||
mkdir bin
|
||||
|
||||
bin/$(GLEWINFO.BIN): $(GLEWINFO.BIN.OBJ) lib/$(LIB.SHARED)
|
||||
bin/$(GLEWINFO.BIN): $(GLEWINFO.BIN.OBJ) $(LIB.SHARED.DIR)/$(LIB.SHARED)
|
||||
@mkdir -p $(dir $@)
|
||||
$(CC) $(CFLAGS) -o $@ $(GLEWINFO.BIN.OBJ) $(BIN.LIBS)
|
||||
ifneq ($(STRIP),)
|
||||
$(STRIP) -x $@
|
||||
endif
|
||||
|
||||
bin/$(VISUALINFO.BIN): $(VISUALINFO.BIN.OBJ) lib/$(LIB.SHARED)
|
||||
bin/$(VISUALINFO.BIN): $(VISUALINFO.BIN.OBJ) $(LIB.SHARED.DIR)/$(LIB.SHARED)
|
||||
@mkdir -p $(dir $@)
|
||||
$(CC) $(CFLAGS) -o $@ $(VISUALINFO.BIN.OBJ) $(BIN.LIBS)
|
||||
ifneq ($(STRIP),)
|
||||
$(STRIP) -x $@
|
||||
@ -208,9 +209,9 @@ install.lib: glew.lib
|
||||
# runtime
|
||||
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
|
||||
$(INSTALL) -d -m 0755 "$(DESTDIR)$(BINDIR)"
|
||||
$(INSTALL) -m 0755 lib/$(LIB.SHARED) "$(DESTDIR)$(BINDIR)/"
|
||||
$(INSTALL) -m 0755 $(LIB.SHARED.DIR)/$(LIB.SHARED) "$(DESTDIR)$(BINDIR)/"
|
||||
else
|
||||
$(INSTALL) -m 0644 lib/$(LIB.SHARED) "$(DESTDIR)$(LIBDIR)/"
|
||||
$(INSTALL) -m 0644 $(LIB.SHARED.DIR)/$(LIB.SHARED) "$(DESTDIR)$(LIBDIR)/"
|
||||
endif
|
||||
ifneq ($(LN),)
|
||||
$(LN) $(LIB.SHARED) "$(DESTDIR)$(LIBDIR)/$(LIB.SONAME)"
|
||||
@ -227,13 +228,14 @@ endif
|
||||
|
||||
install.bin: glew.bin
|
||||
$(INSTALL) -d -m 0755 "$(DESTDIR)$(BINDIR)"
|
||||
$(INSTALL) -s -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) "$(DESTDIR)$(BINDIR)/"
|
||||
$(INSTALL) -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) "$(DESTDIR)$(BINDIR)/"
|
||||
|
||||
install.include:
|
||||
$(INSTALL) -d -m 0755 "$(DESTDIR)$(INCDIR)"
|
||||
$(INSTALL) -m 0644 include/GL/wglew.h "$(DESTDIR)$(INCDIR)/"
|
||||
$(INSTALL) -m 0644 include/GL/glew.h "$(DESTDIR)$(INCDIR)/"
|
||||
$(INSTALL) -m 0644 include/GL/glxew.h "$(DESTDIR)$(INCDIR)/"
|
||||
$(INSTALL) -m 0644 include/GL/eglew.h "$(DESTDIR)$(INCDIR)/"
|
||||
|
||||
install.pkgconfig: glew.pc
|
||||
$(INSTALL) -d -m 0755 "$(DESTDIR)$(PKGDIR)"
|
||||
@ -292,6 +294,9 @@ dist-src:
|
||||
mkdir -p $(DIST_DIR)/lib
|
||||
cp -a auto $(DIST_DIR)
|
||||
$(RM) -Rf $(DIST_DIR)/auto/registry
|
||||
$(RM) -Rf $(DIST_DIR)/auto/glfixes
|
||||
$(RM) -Rf $(DIST_DIR)/auto/OpenGL-Registry
|
||||
$(RM) -Rf $(DIST_DIR)/auto/EGL-Registry
|
||||
cp -a build $(DIST_DIR)
|
||||
cp -a config $(DIST_DIR)
|
||||
cp -a src $(DIST_DIR)
|
||||
|
197
README.md
197
README.md
@ -1,190 +1,29 @@
|
||||
# GLEW - The OpenGL Extension Wrangler Library
|
||||
# GLEW-cmake - nightly pre-generated snapshot with old unofficial cmake support
|
||||
|
||||

|
||||
[GLEW](https://github.com/nigels-com/glew) is upstream of this project.
|
||||
But *GLEW* repository does not contain generated sources. Only releases include generated sources.
|
||||
|
||||
http://glew.sourceforge.net/
|
||||
*GLEW-cmake* has generated sources based on the latest *GLEW*. Sources are generated nightly.
|
||||
If you need only the latest snapshot of *GLEW*, try the build system of *GLEW*. It is placed under the `build` directory. Official `CMakeLists.txt` is placed in `build/cmake`.
|
||||
Please check [README_glew.md](./README_glew.md) for using build system of *GLEW*.
|
||||
|
||||
https://github.com/nigels-com/glew
|
||||
Also, *GLEW-cmake* has unofficial cmake support - It is created when the official CMake support of *GLEW* does not exist.
|
||||
You can see some CMake script examples in [`glew-cmake`](./glew-cmake/) directory. But, I **strongly** recommend using official CMakeLists of *GLEW*.
|
||||
|
||||
[](https://travis-ci.org/nigels-com/glew)
|
||||
[](https://gitter.im/nigels-com/glew?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
[](https://sourceforge.net/projects/glew/files/latest/download)
|
||||
## Usage
|
||||
|
||||
## Downloads
|
||||
This project provide `libglew_static` and `libglew_shared` library targets and `glewinfo` and `visualinfo` executable targets.
|
||||
|
||||
Current release is [2.1.0](https://sourceforge.net/projects/glew/files/glew/2.1.0/).
|
||||
[(Change Log)](http://glew.sourceforge.net/log.html)
|
||||
`libglew_static` provides a static library, and `libglew_shared` provides a shared library.
|
||||
*glew-cmake* does not affected by [BUILD_SHARED_LIBS](https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html).
|
||||
|
||||
Sources available as
|
||||
[ZIP](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.zip/download) or
|
||||
[TGZ](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.tgz/download).
|
||||
You can disable each library target by setting `glew-cmake_BUILD_SHARED` or `glew-cmake_BUILD_STATIC` falsy value (ex. `NO`, `FALSE`).
|
||||
|
||||
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).
|
||||
If you need only libraries, Please set `ONLY_LIBS` to `ON`. Otherwise, cmake generates executable targets also.
|
||||
|
||||
### Recent snapshots
|
||||
You can get pkg-config fils by setting `PKG_CONFIG_REPRESENTATIVE_TARGET` to `libglew_static` or `libglew_shared`.
|
||||
|
||||
Snapshots may contain new features, bug-fixes or new OpenGL extensions ahead of tested, official releases.
|
||||
Simply specify dependency of your target with `libglew_static` or `libglew_shared` by `target_link_libraries`.
|
||||
It will set the additional include directory & the libraries to link to your target.
|
||||
|
||||
## 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.
|
||||
For most end-users of GLEW the official releases are the best choice, with first class support.
|
||||
|
||||
### Linux and Mac
|
||||
|
||||
#### Using GNU Make
|
||||
|
||||
##### Install build tools
|
||||
|
||||
Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev libosmesa-dev`
|
||||
|
||||
RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel`
|
||||
|
||||
##### 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: may need to make **auto** folder_
|
||||
|
||||
#### Using cmake
|
||||
|
||||
*CMake 2.8.12 or higher is required.*
|
||||
|
||||
##### Install build tools
|
||||
|
||||
Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libXmu-dev libXi-dev libgl-dev cmake`
|
||||
|
||||
RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel cmake`
|
||||
|
||||
##### 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/vc12/
|
||||
|
||||
Projects for vc6 and vc10 are also provided
|
||||
|
||||
#### MSYS/Mingw
|
||||
|
||||
Available from [Mingw](http://www.mingw.org/)
|
||||
|
||||
Requirements: bash, make, gcc
|
||||
|
||||
$ mingw32-make
|
||||
$ mingw32-make install
|
||||
$ mingw32-make install.all
|
||||
|
||||
Alternative toolchain: `SYSTEM=mingw-win32`
|
||||
|
||||
#### MSYS2/Mingw-w64
|
||||
|
||||
Available from [Msys2](http://msys2.github.io/) and/or [Mingw-w64](http://mingw-w64.org/)
|
||||
|
||||
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/
|
||||
|
||||
Travis-built snapshots are also available:
|
||||
|
||||
https://glew.s3.amazonaws.com/index.html
|
||||
|
||||
## Authors
|
||||
|
||||
GLEW is currently maintained by [Nigel Stewart](https://github.com/nigels-com)
|
||||
with bug fixes, new OpenGL extension support and new releases.
|
||||
|
||||
GLEW was developed by [Milan Ikits](http://www.cs.utah.edu/~ikits/)
|
||||
and [Marcelo Magallon](http://wwwvis.informatik.uni-stuttgart.de/~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.
|
||||
|
||||
## Copyright and Licensing
|
||||
|
||||
GLEW is originally derived from the EXTGL project by Lev Povalahev.
|
||||
The source code is licensed under the
|
||||
[Modified BSD License](http://glew.sourceforge.net/glew.txt), the
|
||||
[Mesa 3-D License](http://glew.sourceforge.net/mesa.txt) (MIT) and the
|
||||
[Khronos License](http://glew.sourceforge.net/khronos.txt) (MIT).
|
||||
|
||||
The automatic code generation scripts are released under the
|
||||
[GNU GPL](http://glew.sourceforge.net/gpl.txt).
|
||||
If you are not familiar with cmake, Some `sub-directory-test.cmake`, `fetch-content.cmake` in [`glew-cmake`](./glew-cmake/) could be helpful.
|
||||
|
256
README_glew.md
Normal file
256
README_glew.md
Normal file
@ -0,0 +1,256 @@
|
||||
# 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
|
||||
|
||||
[](https://gitter.im/nigels-com/glew?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
[](https://sourceforge.net/projects/glew/files/latest/download)
|
||||
[](https://ap-southeast-2.codebuild.aws.amazon.com/project/eyJlbmNyeXB0ZWREYXRhIjoiK3RLWndGOVVkMWthbXRQZCtVTTNOQ0w2dEpxakZ1cVBTNDZ1UldGODdqUERSdkx0U21Nd0RFaGhQL1kycVlmNzh2OXpEYnRKV3hXTVJJdjUvVStCbTl0dkliZm5jRTFsc0VBPSIsIml2UGFyYW1ldGVyU3BlYyI6ImZ0ekRoMkNjaU0rRUt5K2UiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D)
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Downloads](#downloads)
|
||||
* [Recent snapshots](#recent-snapshots)
|
||||
* [Build](#build)
|
||||
* [Linux and Mac](#linux-and-mac)
|
||||
* [Using GNU Make](#using-gnu-make)
|
||||
* [Install build tools](#install-build-tools)
|
||||
* [Build](#build-1)
|
||||
* [Linux EGL](#linux-egl)
|
||||
* [Linux OSMesa](#linux-osmesa)
|
||||
* [Linux mingw-w64](#linux-mingw-w64)
|
||||
* [Using cmake](#using-cmake)
|
||||
* [Install build tools](#install-build-tools-1)
|
||||
* [Build](#build-2)
|
||||
* [Windows](#windows)
|
||||
* [Visual Studio](#visual-studio)
|
||||
* [MSYS/Mingw](#msysmingw)
|
||||
* [MSYS2/Mingw-w64](#msys2mingw-w64)
|
||||
* [glewinfo](#glewinfo)
|
||||
* [Code Generation](#code-generation)
|
||||
* [Authors](#authors)
|
||||
* [Contributions](#contributions)
|
||||
* [Copyright and Licensing](#copyright-and-licensing)
|
||||
|
||||
## Downloads
|
||||
|
||||
Current release is [2.2.0](https://github.com/nigels-com/glew/releases/tag/glew-2.2.0).
|
||||
[(Change Log)](http://glew.sourceforge.net/log.html)
|
||||
|
||||
Sources available as
|
||||
[ZIP](https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.zip) or
|
||||
[TGZ](https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.tgz).
|
||||
|
||||
Windows binaries for [32-bit and 64-bit](https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0-win32.zip).
|
||||
|
||||
### Recent snapshots
|
||||
|
||||
Snapshots may contain new features, bug-fixes or new OpenGL extensions ahead of tested, official releases.
|
||||
|
||||
[glew-20220402.tgz](https://sourceforge.net/projects/glew/files/glew/snapshots/glew-20220402.tgz/download) *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](https://www.msys2.org/).
|
||||
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](http://www.mingw.org/)
|
||||
|
||||
Requirements: bash, make, gcc
|
||||
|
||||
$ mingw32-make
|
||||
$ mingw32-make install
|
||||
$ mingw32-make install.all
|
||||
|
||||
Alternative toolchain: `SYSTEM=mingw-win32`
|
||||
|
||||
#### MSYS2/Mingw-w64
|
||||
|
||||
Available from [Msys2](http://msys2.github.io/) and/or [Mingw-w64](http://mingw-w64.org/)
|
||||
|
||||
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](https://github.com/nigels-com)
|
||||
with bug fixes, new OpenGL extension support and new releases.
|
||||
|
||||
GLEW was developed by [Milan Ikits](http://www.cs.utah.edu/~ikits/)
|
||||
and [Marcelo Magallon](http://wwwvis.informatik.uni-stuttgart.de/~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](https://github.com/nigels-com/glew/issues) or
|
||||
[Pull Requests](https://github.com/nigels-com/glew/pulls) 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.
|
||||
|
||||
## Copyright and Licensing
|
||||
|
||||
GLEW is originally derived from the EXTGL project by Lev Povalahev.
|
||||
The source code is licensed under the
|
||||
[Modified BSD License](http://glew.sourceforge.net/glew.txt), the
|
||||
[Mesa 3-D License](http://glew.sourceforge.net/mesa.txt) (MIT) and the
|
||||
[Khronos License](http://glew.sourceforge.net/khronos.txt) (MIT).
|
||||
|
||||
The automatic code generation scripts are released under the
|
||||
[GNU GPL](http://glew.sourceforge.net/gpl.txt).
|
@ -12,29 +12,12 @@ include ../config/version
|
||||
SHELL = bash
|
||||
PYTHON ?= python
|
||||
|
||||
### Use git repository for GL extension specifications
|
||||
|
||||
GIT_CLONE ?= git clone --branch glew https://github.com/nigels-com/glfixes.git
|
||||
|
||||
###
|
||||
### Conventional desktop OpenGL settings
|
||||
###
|
||||
|
||||
REGISTRY = registry/gl/specs
|
||||
EXT = extensions/gl
|
||||
FILTER = filter_gl_ext.sh
|
||||
CORE = core/gl
|
||||
REGISTRY_URL = http://www.opengl.org/registry/
|
||||
|
||||
###
|
||||
### Experimental OpenGL ES settings
|
||||
###
|
||||
|
||||
# REGISTRY = registry/gles
|
||||
# EXT = extensions/gles
|
||||
# FILTER = filter_gles_ext.sh
|
||||
# CORE = core/gles
|
||||
# REGISTRY_URL = http://www.khronos.org/registry/gles/
|
||||
REPO_OPENGL ?= https://github.com/KhronosGroup/OpenGL-Registry.git
|
||||
REPO_EGL ?= https://github.com/KhronosGroup/EGL-Registry.git
|
||||
REPO_GLFIXES ?= https://github.com/nigels-com/glfixes
|
||||
|
||||
BIN = bin
|
||||
SRC = src
|
||||
@ -103,30 +86,55 @@ B.TARGETS = \
|
||||
|
||||
all custom: $(I.TARGETS) $(S.TARGETS) $(D.TARGETS) $(B.TARGETS)
|
||||
|
||||
registry: $(REGISTRY)/.dummy
|
||||
ext: $(EXT)/.dummy
|
||||
|
||||
$(REGISTRY)/.dummy:
|
||||
OpenGL-Registry/.dummy:
|
||||
@echo "--------------------------------------------------------------------"
|
||||
@echo "Downloading registry"
|
||||
@echo "Downloading OpenGL-Registry"
|
||||
@echo "--------------------------------------------------------------------"
|
||||
$(GIT_CLONE) registry
|
||||
git clone --depth=1 $(REPO_OPENGL) OpenGL-Registry
|
||||
git clone --depth=1 --branch glew $(REPO_GLFIXES) glfixes
|
||||
touch $@
|
||||
|
||||
$(EXT)/.dummy: $(REGISTRY)/.dummy
|
||||
EGL-Registry/.dummy:
|
||||
@echo "--------------------------------------------------------------------"
|
||||
@echo "Creating descriptors"
|
||||
@echo "Downloading EGL-Registry"
|
||||
@echo "--------------------------------------------------------------------"
|
||||
git clone --depth=1 $(REPO_EGL) EGL-Registry
|
||||
touch $@
|
||||
|
||||
$(EXT)/.dummy: OpenGL-Registry/.dummy EGL-Registry/.dummy
|
||||
@echo "--------------------------------------------------------------------"
|
||||
@echo "OpenGL descriptors"
|
||||
@echo "--------------------------------------------------------------------"
|
||||
rm -rf $(EXT)
|
||||
$(BIN)/update_ext.sh $(EXT) $(REGISTRY) $(BLACKLIST)
|
||||
$(PYTHON) $(BIN)/parse_xml.py registry/xml/egl.xml --core core/gl --extensions extensions/gl
|
||||
$(BIN)/$(FILTER) $(EXT)
|
||||
cp -r glfixes/gl/specs/ANGLE OpenGL-Registry/extensions
|
||||
cp -r glfixes/gl/specs/REGAL OpenGL-Registry/extensions
|
||||
$(BIN)/update_ext.sh $(EXT) OpenGL-Registry/extensions $(BLACKLIST)
|
||||
@echo "--------------------------------------------------------------------"
|
||||
@echo "WGL descriptors"
|
||||
@echo "--------------------------------------------------------------------"
|
||||
rm -f $(EXT)/WGL_*
|
||||
$(PYTHON) $(BIN)/parse_xml.py OpenGL-Registry/xml/wgl.xml --api wgl --extensions extensions/gl
|
||||
@echo "--------------------------------------------------------------------"
|
||||
@echo "GLX descriptors"
|
||||
@echo "--------------------------------------------------------------------"
|
||||
rm -f $(EXT)/GLX_*
|
||||
$(PYTHON) $(BIN)/parse_xml.py OpenGL-Registry/xml/glx.xml --api glx --extensions extensions/gl
|
||||
@echo "--------------------------------------------------------------------"
|
||||
@echo "EGL descriptors"
|
||||
@echo "--------------------------------------------------------------------"
|
||||
$(PYTHON) $(BIN)/parse_xml.py EGL-Registry/api/egl.xml --api egl --extensions extensions/gl
|
||||
@echo "--------------------------------------------------------------------"
|
||||
@echo "filter descriptors"
|
||||
@echo "--------------------------------------------------------------------"
|
||||
$(BIN)/filter_gl_ext.sh $(EXT)
|
||||
ifeq ($(patsubst Darwin%,Darwin,$(SYSTEM)), Darwin)
|
||||
find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \
|
||||
xargs -J % cp % $(EXT)
|
||||
else
|
||||
find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \
|
||||
xargs cp --target-directory=$(EXT)
|
||||
xargs -I % -n 1 cp % $(EXT)
|
||||
endif
|
||||
touch $@
|
||||
|
||||
@ -209,7 +217,7 @@ $(S.DEST)/glew.c: $(EXT)/.dummy
|
||||
$(BIN)/make_def_var.pl GL $(GL_EXT_SPEC) >> $@
|
||||
echo -e "\nstatic const char * _glewExtensionLookup[] = {" >> $@;
|
||||
$(BIN)/make_index.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
|
||||
echo -e " NULL\n};\n" >> $@;
|
||||
echo -e " NULL\n};\n\n" >> $@;
|
||||
$(BIN)/make_enable_index.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
|
||||
$(BIN)/make_initd.pl GL $(GL_CORE_SPEC) >> $@
|
||||
$(BIN)/make_initd.pl GL $(GL_EXT_SPEC) >> $@
|
||||
@ -302,7 +310,7 @@ $(S.DEST)/glewinfo.c: $(EXT)/.dummy
|
||||
$(BIN)/make_info_list.pl $(EGL_CORE_SPEC) >> $@
|
||||
$(BIN)/make_info_list.pl $(EGL_EXT_SPEC) >> $@
|
||||
cat $(SRC)/glewinfo_tail.c >> $@
|
||||
perl -e 's/"glColorSubTable"/"glBlendEquation", glBlendEquation == NULL);\n glewInfoFunc("glColorSubTable"/g' -pi $@
|
||||
perl -e 's/"glColorSubTable"/"glBlendEquation", glBlendEquation == NULL);\n glewInfoFunc(fi, "glColorSubTable"/g' -pi $@
|
||||
rm -f $@.bak
|
||||
|
||||
# Update documentation
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
@ -77,10 +78,6 @@ EOT
|
||||
# fix GL_NV_occlusion_query and GL_HP_occlusion_test
|
||||
grep -v '_HP' $1/GL_NV_occlusion_query > tmp
|
||||
mv tmp $1/GL_NV_occlusion_query
|
||||
perl -e's/OCCLUSION_TEST_HP.*/OCCLUSION_TEST_HP 0x8165/' -pi \
|
||||
$1/GL_HP_occlusion_test
|
||||
perl -e's/OCCLUSION_TEST_RESULT_HP.*/OCCLUSION_TEST_RESULT_HP 0x8166/' -pi \
|
||||
$1/GL_HP_occlusion_test
|
||||
|
||||
# add deprecated constants to GL_ATI_fragment_shader
|
||||
cat >> $1/GL_ATI_fragment_shader <<EOT
|
||||
@ -151,9 +148,14 @@ EOT
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfigSGIX
|
||||
EOT
|
||||
|
||||
# Skip GLX_SGIX_dmbuffer and GLX_SGIX_video_source
|
||||
# unknown DMparams, DMbuffer, etc
|
||||
rm -f $1/GLX_SGIX_dmbuffer
|
||||
rm -f $1/GLX_SGIX_video_source
|
||||
|
||||
# add typedefs to GLX_SGIX_pbuffer
|
||||
cat >> $1/GLX_SGIX_pbuffer <<EOT
|
||||
typedef XID GLXPbufferSGIX
|
||||
typedef XID GLXPbufferSGIX
|
||||
typedef struct { int type; unsigned long serial; Bool send_event; Display *display; GLXDrawable drawable; int event_type; int draw_type; unsigned int mask; int x, y; int width, height; int count; } GLXBufferClobberEventSGIX
|
||||
EOT
|
||||
|
||||
@ -287,9 +289,9 @@ EOT
|
||||
BOOL wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth)
|
||||
EOT
|
||||
|
||||
# Filter glProgramParameteri from GL_ARB_separate_shader_objects
|
||||
# grep -v "glProgramParameteri" $1/GL_ARB_separate_shader_objects > tmp
|
||||
# mv tmp $1/GL_ARB_separate_shader_objects
|
||||
# Filter glProgramUniform from GL_EXT_separate_shader_objects
|
||||
cat $1/GL_EXT_separate_shader_objects | grep -v "glProgramUniform" | grep -v "glProgramParameteri" > tmp
|
||||
mv tmp $1/GL_EXT_separate_shader_objects
|
||||
|
||||
# Filter out EXT functions from GL_ARB_viewport_array
|
||||
grep -v "EXT" $1/GL_ARB_viewport_array > tmp
|
||||
@ -338,11 +340,6 @@ EOT
|
||||
grep -v "glGetPointerv" $1/GL_KHR_debug > tmp
|
||||
mv tmp $1/GL_KHR_debug
|
||||
|
||||
# Remove GL_ARB_debug_group, GL_ARB_debug_label and GL_ARB_debug_output2, for now
|
||||
rm -f $1/GL_ARB_debug_group
|
||||
rm -f $1/GL_ARB_debug_label
|
||||
rm -f $1/GL_ARB_debug_output2
|
||||
|
||||
# add typedefs to GL_ARB_cl_event
|
||||
# parse_spec.pl can't parse typedefs from New Types section, but ought to
|
||||
cat >> $1/GL_ARB_cl_event <<EOT
|
||||
@ -484,8 +481,9 @@ EOT
|
||||
head -n4 $1/GL_AMD_gpu_shader_int64 > tmp
|
||||
mv tmp $1/GL_AMD_gpu_shader_int64
|
||||
|
||||
# Filter out GL_NO_ERROR enum from GL_KHR_robustness
|
||||
grep -v 'GL_NO_ERROR' $1/GL_KHR_robustness > tmp
|
||||
# Filter out GL_NO_ERROR enum and glGetGraphicsResetStatus from GL_KHR_robustness
|
||||
grep -v 'GL_NO_ERROR' $1/GL_KHR_robustness |
|
||||
grep -v 'glGetGraphicsResetStatus' > tmp
|
||||
mv tmp $1/GL_KHR_robustness
|
||||
|
||||
# Filter out all enums from GL_KHR_blend_equation_advanced_coherent
|
||||
@ -500,10 +498,6 @@ EOT
|
||||
grep -v 'GL_NONE' $1/GL_KHR_context_flush_control > tmp
|
||||
mv tmp $1/GL_KHR_context_flush_control
|
||||
|
||||
# Filter out GL_NONE enum from GL_EGL_KHR_context_flush_control
|
||||
grep -v 'GL_NONE' $1/GL_EGL_KHR_context_flush_control > tmp
|
||||
mv tmp $1/GL_EGL_KHR_context_flush_control
|
||||
|
||||
# Filter out CoverageModulation from NV_framebuffer_mixed_samples
|
||||
# Superset of EXT_raster_multisample
|
||||
|
||||
@ -558,6 +552,50 @@ EOT
|
||||
grep -v "TextureStorage" $1/GL_ARB_texture_storage > tmp
|
||||
mv tmp $1/GL_ARB_texture_storage
|
||||
|
||||
# Filter out functions from GL_EXT_occlusion_query_boolean
|
||||
|
||||
grep -v "(" $1/GL_EXT_occlusion_query_boolean > tmp
|
||||
mv tmp $1/GL_EXT_occlusion_query_boolean
|
||||
|
||||
# Filter out duplicate enums from GL_EXT_protected_textures
|
||||
|
||||
cat $1/GL_EXT_protected_textures | grep -v GL_TRUE | grep -v GL_FALSE > tmp
|
||||
mv tmp $1/GL_EXT_protected_textures
|
||||
|
||||
# Filter out duplicate enums from GL_EXT_robustness
|
||||
|
||||
cat $1/GL_EXT_robustness | grep -v GL_NO_ERROR > tmp
|
||||
mv tmp $1/GL_EXT_robustness
|
||||
|
||||
# Filter GL_EXT_shader_framebuffer_fetch_non_coherent
|
||||
|
||||
grep -v "FramebufferFetchBarrierEXT" $1/GL_EXT_shader_framebuffer_fetch_non_coherent > tmp
|
||||
mv tmp $1/GL_EXT_shader_framebuffer_fetch_non_coherent
|
||||
|
||||
# Filter GL_EXT_tessellation_shader
|
||||
|
||||
grep -v "PatchParameteriEXT" $1/GL_EXT_tessellation_shader > tmp
|
||||
mv tmp $1/GL_EXT_tessellation_shader
|
||||
|
||||
# Filter GL_EXT_texture_buffer
|
||||
|
||||
grep -v "TexBuffer" $1/GL_EXT_texture_buffer > tmp
|
||||
mv tmp $1/GL_EXT_texture_buffer
|
||||
|
||||
# Filter GL_EXT_texture_border_clamp
|
||||
|
||||
grep -v "TexParameter" $1/GL_EXT_texture_border_clamp > tmp
|
||||
mv tmp $1/GL_EXT_texture_border_clamp
|
||||
|
||||
# Filter GL_EXT_disjoint_timer_query
|
||||
|
||||
cat $1/GL_EXT_disjoint_timer_query | grep -v GetQueryObjecti64v | grep -v GetQueryObjectui64v > tmp
|
||||
mv tmp $1/GL_EXT_disjoint_timer_query
|
||||
|
||||
# Filter GL_NV_read_buffer_front
|
||||
|
||||
grep -v "ReadBufferNV" $1/GL_NV_read_buffer_front > tmp
|
||||
mv tmp $1/GL_NV_read_buffer_front
|
||||
|
||||
# Append GLVULKANPROCNV to GL_NV_draw_vulkan_image
|
||||
# Probably ought to be explicitly mentioned in the spec language
|
||||
@ -566,5 +604,11 @@ EOT
|
||||
typedef void (APIENTRY *GLVULKANPROCNV)(void)
|
||||
EOT
|
||||
|
||||
# GLU extensions are not relevant here
|
||||
rm -f $1/GL_GLU_*
|
||||
|
||||
# Not complete
|
||||
rm -f $1/GL_SGIX_color_type
|
||||
|
||||
# clean up
|
||||
rm -f patterns $1/*.bak
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
|
@ -1,4 +1,5 @@
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
@ -9,7 +10,7 @@
|
||||
my %regex = (
|
||||
extname => qr/^[A-Z][A-Za-z0-9_]+$/,
|
||||
exturl => qr/^http.+$/,
|
||||
function => qr/^(.+) ([a-z][a-z0-9_]*) \((.+)\)$/i,
|
||||
function => qr/^(.+) ([a-z][a-z0-9_]*) \((.*)\)$/i,
|
||||
token => qr/^([A-Z][A-Z0-9_x]*)\s+((?:0x)?[0-9A-Fa-f]+(u(ll)?)?|[A-Z][A-Z0-9_]*)$/,
|
||||
type => qr/^typedef\s+(.+)$/,
|
||||
exact => qr/.*;$/,
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
@ -9,6 +10,7 @@
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use File::Basename;
|
||||
|
||||
use lib '.';
|
||||
do 'bin/make.pl';
|
||||
@ -29,7 +31,7 @@ if (@ARGV)
|
||||
print "/* Detected via extension string or experimental mode */\n";
|
||||
print "static GLboolean* _glewExtensionEnabled[] = {\n";;
|
||||
|
||||
foreach my $ext (sort @extlist)
|
||||
foreach my $ext (sort { basename($a) cmp basename($b) } @extlist)
|
||||
{
|
||||
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) =
|
||||
parse_ext($ext);
|
||||
@ -42,5 +44,5 @@ if (@ARGV)
|
||||
print "#endif\n";
|
||||
}
|
||||
|
||||
print " NULL\n};\n";
|
||||
print " NULL\n};\n\n";
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
@ -9,6 +10,7 @@
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use File::Basename;
|
||||
|
||||
use lib '.';
|
||||
do 'bin/make.pl';
|
||||
@ -27,7 +29,7 @@ if (@ARGV)
|
||||
{
|
||||
@extlist = @ARGV;
|
||||
|
||||
foreach my $ext (sort @extlist)
|
||||
foreach my $ext (sort { basename($a) cmp basename($b) } @extlist)
|
||||
{
|
||||
my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) =
|
||||
parse_ext($ext);
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
@ -19,7 +20,7 @@ do 'bin/make.pl';
|
||||
sub make_pfn_info($%)
|
||||
{
|
||||
my $name = $_[0];
|
||||
return " glewInfoFunc(\"$_[0]\", $name == NULL);";
|
||||
return " glewInfoFunc(fi, \"$_[0]\", $name == NULL);";
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------------------
|
||||
@ -43,13 +44,23 @@ if (@ARGV)
|
||||
#make_separator($extname);
|
||||
print "#ifdef $extname\n\n";
|
||||
print "static void _glewInfo_$extname (void)\n{\n";
|
||||
if ($extvar =~ /VERSION/)
|
||||
|
||||
if (! %$functions)
|
||||
{
|
||||
print " glewPrintExt(\"$extname\", $extvar, $extvar, $extvar);\n";
|
||||
print " ";
|
||||
}
|
||||
else
|
||||
{
|
||||
print " glewPrintExt(\"$extname\", $extvar, $extpre" .
|
||||
print " GLboolean fi = ";
|
||||
}
|
||||
|
||||
if ($extvar =~ /VERSION/)
|
||||
{
|
||||
print "glewPrintExt(\"$extname\", $extvar, $extvar, $extvar);\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "glewPrintExt(\"$extname\", $extvar, $extpre" .
|
||||
"ewIsSupported(\"$extname\"), $extpre" .
|
||||
"ewGetExtension(\"$extstring\"));\n";
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#!/usr/bin/env perl
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
@ -69,6 +70,10 @@ my %typemap = (
|
||||
uint64 => "GLuint64",
|
||||
sync => "GLsync",
|
||||
|
||||
# GL_EXT_EGL_image_storage
|
||||
|
||||
eglImageOES => "GLeglImageOES",
|
||||
|
||||
# AMD_debug_output
|
||||
|
||||
DEBUGPROCAMD => "GLDEBUGPROCAMD",
|
||||
@ -109,7 +114,7 @@ my %taboo_tokens = (
|
||||
);
|
||||
|
||||
# list of function definitions to be ignored, unless they are being defined in
|
||||
# the given spec. This is an ugly hack arround the fact that people writing
|
||||
# the given spec. This is an ugly hack around the fact that people writing
|
||||
# spec files seem to shut down all brain activity while they are at this task.
|
||||
#
|
||||
# This will be moved to its own file eventually.
|
||||
@ -137,6 +142,14 @@ my %fnc_ignore_list = (
|
||||
"ProgramLocalParameter4fARB" => "ARB_vertex_program",
|
||||
"ProgramLocalParameter4fvARB" => "ARB_vertex_program",
|
||||
"ProgramStringARB" => "ARB_vertex_program",
|
||||
"EGLImageTargetTexture2DOES" => "OES_EGL_image",
|
||||
"FramebufferTextureOES" => "GL_OES_geometry_shader",
|
||||
"PatchParameteriOES" => "GL_OES_tessellation_shader",
|
||||
"PointSizePointerOES" => "GL_OES_point_size_array",
|
||||
"LockArraysEXT" => "EXT_compiled_vertex_array",
|
||||
"UnlockArraysEXT" => "EXT_compiled_vertex_array",
|
||||
"CoverageMaskNV" => "NV_coverage_sample",
|
||||
"CoverageOperationNV" => "NV_coverage_sample",
|
||||
"glXCreateContextAttribsARB" => "ARB_create_context_profile",
|
||||
"wglCreateContextAttribsARB" => "WGL_ARB_create_context_profile",
|
||||
);
|
||||
@ -145,9 +158,9 @@ my %regex = (
|
||||
eofnc => qr/(?:\);?$|^$)/, # )$ | );$ | ^$
|
||||
extname => qr/^[A-Z][A-Za-z0-9_]+$/,
|
||||
none => qr/^\(none\)$/,
|
||||
function => qr/^(.+) ([a-z][a-z0-9_]*) \((.+)\)$/i,
|
||||
prefix => qr/^(?:[aw]?gl|glX)/, # gl | agl | wgl | glX
|
||||
tprefix => qr/^(?:[AW]?GL|GLX)_/, # GL_ | AGL_ | WGL_ | GLX_
|
||||
function => qr/^(.+) ([a-z][a-z0-9_]*) \((.*)\)$/i,
|
||||
prefix => qr/^(?:[aw]?gl|glX|egl)/, # gl | agl | wgl | glX
|
||||
tprefix => qr/^(?:[AW]?GL|GLX|EGL)_/, # GL_ | AGL_ | WGL_ | GLX_
|
||||
section => compile_regex('^(', join('|', @sections), ')$'), # sections in spec
|
||||
token => qr/^([A-Z0-9][A-Z0-9_x]*):?\s+((?:0x)?[0-9A-Fa-f]+(u(ll)?)?)(|\s[^\?]*)$/, # define tokens
|
||||
types => compile_regex('\b(', join('|', keys %typemap), ')\b'), # var types
|
||||
@ -172,7 +185,7 @@ sub normalize_prototype
|
||||
return $_;
|
||||
}
|
||||
|
||||
# Ugly hack to work arround the fact that functions are declared in more
|
||||
# Ugly hack to work around the fact that functions are declared in more
|
||||
# than one spec file.
|
||||
sub ignore_function($$)
|
||||
{
|
||||
@ -245,6 +258,10 @@ sub parse_spec($)
|
||||
$parms =~ s/$regex{voidtype}/$voidtypemap{$1}/og;
|
||||
$parms =~ s/GLvoid/void/og;
|
||||
$parms =~ s/ void\* / void */og;
|
||||
if ($parms eq "")
|
||||
{
|
||||
$parms = "void"; # NVX_progress_fence and others
|
||||
}
|
||||
}
|
||||
# add to functions hash
|
||||
$functions{$name} = {
|
||||
@ -311,7 +328,7 @@ my @speclist = ();
|
||||
my %extensions = ();
|
||||
|
||||
my $ext_dir = shift;
|
||||
my $reg_http = "http://www.opengl.org/registry/specs/";
|
||||
my $reg_http = "https://www.khronos.org/registry/OpenGL/extensions/";
|
||||
|
||||
# Take command line arguments or read list from file
|
||||
if (@ARGV)
|
||||
@ -332,7 +349,7 @@ foreach my $spec (sort @speclist)
|
||||
open EXT, ">$info";
|
||||
print EXT $ext . "\n"; # Extension name
|
||||
my $specname = $spec;
|
||||
$specname =~ s/registry\/gl\/specs\///;
|
||||
$specname =~ s/OpenGL-Registry\/extensions\///;
|
||||
print EXT $reg_http . $specname . "\n"; # Extension info URL
|
||||
print EXT $ext . "\n"; # Extension string
|
||||
print EXT "\n"; # Resuses nothing by default
|
||||
|
@ -1,9 +1,13 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/env python
|
||||
|
||||
import re
|
||||
import sys
|
||||
from xml.dom.minidom import parse, Node
|
||||
|
||||
#
|
||||
# DOM traversal utility functions
|
||||
#
|
||||
|
||||
def findChildren(node, path):
|
||||
result = []
|
||||
if len(path)==1:
|
||||
@ -21,6 +25,8 @@ def findChildren(node, path):
|
||||
def findData(node, path):
|
||||
return [ i.firstChild.data for i in findChildren(node, path) ]
|
||||
|
||||
isPointer = re.compile('(.*)([ ]+)([*]+)')
|
||||
|
||||
def findParams(node):
|
||||
n = findData(node, ['name'])[0]
|
||||
t = ''
|
||||
@ -29,15 +35,15 @@ def findParams(node):
|
||||
t += i.data
|
||||
if i.nodeType==Node.ELEMENT_NODE and i.tagName=='ptype':
|
||||
t += i.firstChild.data
|
||||
return ( t, n)
|
||||
|
||||
t.strip()
|
||||
m = isPointer.match(t)
|
||||
if m:
|
||||
t = ('%s%s'%(m.group(1), m.group(3))).strip()
|
||||
return ( t, n.strip())
|
||||
|
||||
def findEnums(dom):
|
||||
ret = {}
|
||||
for i in findChildren(dom, [ 'registry', 'enums', 'enum' ]):
|
||||
n = i.getAttribute('name')
|
||||
v = i.getAttribute('value')
|
||||
ret[n] = v
|
||||
return ret
|
||||
return {i.getAttribute('name'): i.getAttribute('value') for i in findChildren(dom, [ 'registry', 'enums', 'enum' ])}
|
||||
|
||||
def findCommands(dom):
|
||||
ret = {}
|
||||
@ -51,12 +57,8 @@ def findFeatures(dom):
|
||||
ret = {}
|
||||
for i in findChildren(dom, [ 'registry', 'feature' ]):
|
||||
n = i.getAttribute('name')
|
||||
e = []
|
||||
c = []
|
||||
for j in findChildren(i, [ 'require', 'enum' ]):
|
||||
e.append(j.getAttribute("name"))
|
||||
for j in findChildren(i, [ 'require', 'command' ]):
|
||||
c.append(j.getAttribute("name"))
|
||||
e = [j.getAttribute("name") for j in findChildren(i, [ 'require', 'enum' ])]
|
||||
c = [j.getAttribute("name") for j in findChildren(i, [ 'require', 'command' ])]
|
||||
ret[n] = (e,c)
|
||||
return ret
|
||||
|
||||
@ -64,12 +66,8 @@ def findExtensions(dom):
|
||||
ret = {}
|
||||
for i in findChildren(dom, [ 'registry', 'extensions', 'extension' ]):
|
||||
n = i.getAttribute('name')
|
||||
e = []
|
||||
c = []
|
||||
for j in findChildren(i, [ 'require', 'enum' ]):
|
||||
e.append(j.getAttribute("name"))
|
||||
for j in findChildren(i, [ 'require', 'command' ]):
|
||||
c.append(j.getAttribute("name"))
|
||||
e = [j.getAttribute("name") for j in findChildren(i, [ 'require', 'enum' ])]
|
||||
c = [j.getAttribute("name") for j in findChildren(i, [ 'require', 'command' ])]
|
||||
ret[n] = (e,c)
|
||||
return ret
|
||||
|
||||
@ -80,52 +78,68 @@ def findApi(dom, name):
|
||||
extensions = findExtensions(dom)
|
||||
return (enums, commands, features, extensions)
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
isWGL = re.compile('WGL_([A-Z0-9]+)_.*')
|
||||
|
||||
def writeExtension(f, name, extension, enums, commands):
|
||||
f.write('%s\n'%name)
|
||||
f.write('%s\n'%'https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf')
|
||||
f.write(('%s\n'%name).encode())
|
||||
|
||||
url = 'https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf'
|
||||
|
||||
m = isWGL.match(name)
|
||||
if m:
|
||||
url = 'https://www.khronos.org/registry/OpenGL/extensions/%s/%s.txt'%(m.group(1), name)
|
||||
|
||||
f.write(('%s\n'%(url)).encode())
|
||||
|
||||
if name.find('_VERSION_')==-1:
|
||||
f.write('%s\n'%name)
|
||||
f.write(('%s\n'%name).encode())
|
||||
else:
|
||||
f.write('\n')
|
||||
f.write('\n')
|
||||
f.write('\n'.encode())
|
||||
f.write('\n'.encode())
|
||||
|
||||
enums = [ (j, enums[j]) for j in extension[0] ]
|
||||
for e in sorted(enums, key=lambda i: i[1]):
|
||||
f.write('\t%s %s\n'%(e[0], e[1]))
|
||||
f.write(('\t%s %s\n'%(e[0], e[1])).encode())
|
||||
|
||||
commands = [ (j, commands[j]) for j in extension[1] ]
|
||||
for c in sorted(commands):
|
||||
params = ', '.join( [ '%s %s'%(j[0], j[1]) for j in c[1][1] ] )
|
||||
params = ', '.join( [ '%s %s'%(j[0].strip(), j[1].strip()) for j in c[1][1] ] )
|
||||
if len(params)==0:
|
||||
params = ' void '
|
||||
f.write('\t%s %s (%s)\n'%(c[1][0], c[0], params))
|
||||
params = 'void'
|
||||
f.write(('\t%s %s (%s)\n'%(c[1][0].strip(), c[0].strip(), params)).encode())
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
from optparse import OptionParser
|
||||
from argparse import ArgumentParser
|
||||
import os
|
||||
|
||||
parser = OptionParser('usage: %prog [options] [XML specs...]')
|
||||
parser.add_option("--core", dest="core", help="location for core outputs", default='')
|
||||
parser.add_option("--extensions", dest="extensions", help="location for extensions outputs", default='')
|
||||
parser = ArgumentParser(description='usage: %prog [options] [XML specs...]')
|
||||
parser.add_argument("--core", dest="core", help="location for core outputs", default='')
|
||||
parser.add_argument("--api", dest="name", help="API name: egl, wgl, glx, etc", default='')
|
||||
parser.add_argument("--extensions", dest="extensions", help="location for extensions outputs", default='')
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
(options, args) = parser.parse_known_args()
|
||||
options = vars(options)
|
||||
|
||||
for i in args:
|
||||
|
||||
dom = parse(i)
|
||||
api = findApi(dom, 'egl')
|
||||
api = findApi(dom, options['name'])
|
||||
|
||||
print('Found {} enums, {} commands, {} features and {} extensions.'.format(
|
||||
len(api[0]), len(api[1]), len(api[2]), len(api[3])))
|
||||
|
||||
if len(options.core):
|
||||
if len(options['core']):
|
||||
for i in api[2].keys():
|
||||
f = open('%s/%s'%(options.core, i), 'w')
|
||||
writeExtension(f, i, api[2][i], api[0], api[1])
|
||||
f.close()
|
||||
with open(os.path.join(options['core'], i), 'wb') as f:
|
||||
writeExtension(f, i, api[2][i], api[0], api[1])
|
||||
|
||||
if len(options.extensions):
|
||||
if len(options['extensions']):
|
||||
for i in api[3].keys():
|
||||
f = open('%s/%s'%(options.extensions, i), 'w')
|
||||
writeExtension(f, i, api[3][i], api[0], api[1])
|
||||
f.close()
|
||||
with open(os.path.join(options['extensions'], i), 'wb') as f:
|
||||
writeExtension(f, i, api[3][i], api[0], api[1])
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
##
|
||||
## Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
##
|
||||
|
@ -4,11 +4,25 @@ EXT/vertex_array_set.alt.txt
|
||||
EXT/vertex_array_set.txt
|
||||
EXT/nurbs_tessellator.txt
|
||||
EXT/object_space_tess.txt
|
||||
MESA/MESA_sampler_objects.txt
|
||||
SGI/filter4_parameters.txt
|
||||
SGIS/texture_color_mask.txt
|
||||
SGIX/dmbuffer.txt
|
||||
SGIX/instruments.txt
|
||||
SGIX/video_source.txt
|
||||
SGIX/hyperpipe_group.txt
|
||||
SGIS/SGIS_texture_color_mask.txt
|
||||
SGIX/SGIX_dmbuffer.txt
|
||||
SGIX/SGIX_instruments.txt
|
||||
SGIX/SGIX_video_source.txt
|
||||
SGIX/SGIX_hyperpipe_group.txt
|
||||
OES/OES_fixed_point.txt
|
||||
OES/OES_query_matrix.txt
|
||||
IMG/IMG_user_clip_plane.txt
|
||||
NV/NV_query_resource.txt
|
||||
NV/EGL_NV_coverage_sample.txt
|
||||
OES/OES_draw_elements_base_vertex.txt
|
||||
OES/OES_viewport_array.txt
|
||||
OES/EGL_KHR_fence_sync.txt
|
||||
EXT/EXT_texenv_op.txt
|
||||
EXT/EXT_transform_feedback2.txt
|
||||
EXT/EXT_vertex_array_set.txt
|
||||
EXT/EXT_separate_shader_objects.gles.txt
|
||||
IGLOO/IGLOO_swap_triangle_strip_vertex_pointerXXX.txt
|
||||
IGLOO/IGLOO_viewport_offsetXXX.txt
|
||||
IGLOO/IGLOO_toggle_color_and_lightXXX.txt
|
||||
|
7
auto/core/gl/EGL_EXT_device_base
Normal file
7
auto/core/gl/EGL_EXT_device_base
Normal file
@ -0,0 +1,7 @@
|
||||
EGL_EXT_device_base
|
||||
https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf
|
||||
EGL_EXT_device_base
|
||||
|
||||
EGL_BAD_DEVICE_EXT 0x322B
|
||||
EGL_DEVICE_EXT 0x322C
|
||||
EGL_NO_DEVICE_EXT EGL_CAST(EGLDeviceEXT,0)
|
7
auto/core/gl/EGL_KHR_fence_sync
Normal file
7
auto/core/gl/EGL_KHR_fence_sync
Normal file
@ -0,0 +1,7 @@
|
||||
EGL_KHR_fence_sync
|
||||
https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf
|
||||
EGL_KHR_fence_sync
|
||||
|
||||
EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0
|
||||
EGL_SYNC_CONDITION_KHR 0x30F8
|
||||
EGL_SYNC_FENCE_KHR 0x30F9
|
6
auto/core/gl/EGL_KHR_image_base
Normal file
6
auto/core/gl/EGL_KHR_image_base
Normal file
@ -0,0 +1,6 @@
|
||||
EGL_KHR_image_base
|
||||
https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf
|
||||
EGL_KHR_image_base
|
||||
|
||||
EGL_IMAGE_PRESERVED_KHR 0x30D2
|
||||
EGL_NO_IMAGE_KHR EGL_CAST(EGLImageKHR,0)
|
27
auto/core/gl/EGL_KHR_lock_surface3
Normal file
27
auto/core/gl/EGL_KHR_lock_surface3
Normal file
@ -0,0 +1,27 @@
|
||||
EGL_KHR_lock_surface3
|
||||
https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf
|
||||
EGL_KHR_lock_surface3
|
||||
|
||||
EGL_READ_SURFACE_BIT_KHR 0x0001
|
||||
EGL_WRITE_SURFACE_BIT_KHR 0x0002
|
||||
EGL_LOCK_SURFACE_BIT_KHR 0x0080
|
||||
EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100
|
||||
EGL_MATCH_FORMAT_KHR 0x3043
|
||||
EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0
|
||||
EGL_FORMAT_RGB_565_KHR 0x30C1
|
||||
EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2
|
||||
EGL_FORMAT_RGBA_8888_KHR 0x30C3
|
||||
EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4
|
||||
EGL_LOCK_USAGE_HINT_KHR 0x30C5
|
||||
EGL_BITMAP_POINTER_KHR 0x30C6
|
||||
EGL_BITMAP_PITCH_KHR 0x30C7
|
||||
EGL_BITMAP_ORIGIN_KHR 0x30C8
|
||||
EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9
|
||||
EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA
|
||||
EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB
|
||||
EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC
|
||||
EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD
|
||||
EGL_LOWER_LEFT_KHR 0x30CE
|
||||
EGL_UPPER_LEFT_KHR 0x30CF
|
||||
EGL_BITMAP_PIXEL_SIZE_KHR 0x3110
|
||||
EGLBoolean eglQuerySurface64KHR (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR * value)
|
86
auto/core/gl/EGL_VERSION_1_0
Normal file
86
auto/core/gl/EGL_VERSION_1_0
Normal file
@ -0,0 +1,86 @@
|
||||
EGL_VERSION_1_0
|
||||
https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf
|
||||
|
||||
|
||||
EGL_FALSE 0
|
||||
EGL_PBUFFER_BIT 0x0001
|
||||
EGL_PIXMAP_BIT 0x0002
|
||||
EGL_WINDOW_BIT 0x0004
|
||||
EGL_SUCCESS 0x3000
|
||||
EGL_NOT_INITIALIZED 0x3001
|
||||
EGL_BAD_ACCESS 0x3002
|
||||
EGL_BAD_ALLOC 0x3003
|
||||
EGL_BAD_ATTRIBUTE 0x3004
|
||||
EGL_BAD_CONFIG 0x3005
|
||||
EGL_BAD_CONTEXT 0x3006
|
||||
EGL_BAD_CURRENT_SURFACE 0x3007
|
||||
EGL_BAD_DISPLAY 0x3008
|
||||
EGL_BAD_MATCH 0x3009
|
||||
EGL_BAD_NATIVE_PIXMAP 0x300A
|
||||
EGL_BAD_NATIVE_WINDOW 0x300B
|
||||
EGL_BAD_PARAMETER 0x300C
|
||||
EGL_BAD_SURFACE 0x300D
|
||||
EGL_BUFFER_SIZE 0x3020
|
||||
EGL_ALPHA_SIZE 0x3021
|
||||
EGL_BLUE_SIZE 0x3022
|
||||
EGL_GREEN_SIZE 0x3023
|
||||
EGL_RED_SIZE 0x3024
|
||||
EGL_DEPTH_SIZE 0x3025
|
||||
EGL_STENCIL_SIZE 0x3026
|
||||
EGL_CONFIG_CAVEAT 0x3027
|
||||
EGL_CONFIG_ID 0x3028
|
||||
EGL_LEVEL 0x3029
|
||||
EGL_MAX_PBUFFER_HEIGHT 0x302A
|
||||
EGL_MAX_PBUFFER_PIXELS 0x302B
|
||||
EGL_MAX_PBUFFER_WIDTH 0x302C
|
||||
EGL_NATIVE_RENDERABLE 0x302D
|
||||
EGL_NATIVE_VISUAL_ID 0x302E
|
||||
EGL_NATIVE_VISUAL_TYPE 0x302F
|
||||
EGL_SAMPLES 0x3031
|
||||
EGL_SAMPLE_BUFFERS 0x3032
|
||||
EGL_SURFACE_TYPE 0x3033
|
||||
EGL_TRANSPARENT_TYPE 0x3034
|
||||
EGL_TRANSPARENT_BLUE_VALUE 0x3035
|
||||
EGL_TRANSPARENT_GREEN_VALUE 0x3036
|
||||
EGL_TRANSPARENT_RED_VALUE 0x3037
|
||||
EGL_NONE 0x3038
|
||||
EGL_SLOW_CONFIG 0x3050
|
||||
EGL_NON_CONFORMANT_CONFIG 0x3051
|
||||
EGL_TRANSPARENT_RGB 0x3052
|
||||
EGL_VENDOR 0x3053
|
||||
EGL_VERSION 0x3054
|
||||
EGL_EXTENSIONS 0x3055
|
||||
EGL_HEIGHT 0x3056
|
||||
EGL_WIDTH 0x3057
|
||||
EGL_LARGEST_PBUFFER 0x3058
|
||||
EGL_DRAW 0x3059
|
||||
EGL_READ 0x305A
|
||||
EGL_CORE_NATIVE_ENGINE 0x305B
|
||||
EGL_TRUE 1
|
||||
EGL_NO_CONTEXT EGL_CAST(EGLContext,0)
|
||||
EGL_NO_DISPLAY EGL_CAST(EGLDisplay,0)
|
||||
EGL_NO_SURFACE EGL_CAST(EGLSurface,0)
|
||||
EGL_DONT_CARE EGL_CAST(EGLint,-1)
|
||||
EGLBoolean eglChooseConfig (EGLDisplay dpy, const EGLint * attrib_list, EGLConfig * configs, EGLint config_size, EGLint * num_config)
|
||||
EGLBoolean eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target)
|
||||
EGLContext eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint * attrib_list)
|
||||
EGLSurface eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint * attrib_list)
|
||||
EGLSurface eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint * attrib_list)
|
||||
EGLSurface eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint * attrib_list)
|
||||
EGLBoolean eglDestroyContext (EGLDisplay dpy, EGLContext ctx)
|
||||
EGLBoolean eglDestroySurface (EGLDisplay dpy, EGLSurface surface)
|
||||
EGLBoolean eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint * value)
|
||||
EGLBoolean eglGetConfigs (EGLDisplay dpy, EGLConfig * configs, EGLint config_size, EGLint * num_config)
|
||||
EGLDisplay eglGetCurrentDisplay ( void )
|
||||
EGLSurface eglGetCurrentSurface (EGLint readdraw)
|
||||
EGLDisplay eglGetDisplay (EGLNativeDisplayType display_id)
|
||||
EGLint eglGetError ( void )
|
||||
EGLBoolean eglInitialize (EGLDisplay dpy, EGLint * major, EGLint * minor)
|
||||
EGLBoolean eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)
|
||||
EGLBoolean eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint * value)
|
||||
const char * eglQueryString (EGLDisplay dpy, EGLint name)
|
||||
EGLBoolean eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint * value)
|
||||
EGLBoolean eglSwapBuffers (EGLDisplay dpy, EGLSurface surface)
|
||||
EGLBoolean eglTerminate (EGLDisplay dpy)
|
||||
EGLBoolean eglWaitGL ( void )
|
||||
EGLBoolean eglWaitNative (EGLint engine)
|
22
auto/core/gl/EGL_VERSION_1_1
Normal file
22
auto/core/gl/EGL_VERSION_1_1
Normal file
@ -0,0 +1,22 @@
|
||||
EGL_VERSION_1_1
|
||||
https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf
|
||||
|
||||
|
||||
EGL_CONTEXT_LOST 0x300E
|
||||
EGL_BIND_TO_TEXTURE_RGB 0x3039
|
||||
EGL_BIND_TO_TEXTURE_RGBA 0x303A
|
||||
EGL_MIN_SWAP_INTERVAL 0x303B
|
||||
EGL_MAX_SWAP_INTERVAL 0x303C
|
||||
EGL_NO_TEXTURE 0x305C
|
||||
EGL_TEXTURE_RGB 0x305D
|
||||
EGL_TEXTURE_RGBA 0x305E
|
||||
EGL_TEXTURE_2D 0x305F
|
||||
EGL_TEXTURE_FORMAT 0x3080
|
||||
EGL_TEXTURE_TARGET 0x3081
|
||||
EGL_MIPMAP_TEXTURE 0x3082
|
||||
EGL_MIPMAP_LEVEL 0x3083
|
||||
EGL_BACK_BUFFER 0x3084
|
||||
EGLBoolean eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer)
|
||||
EGLBoolean eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer)
|
||||
EGLBoolean eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value)
|
||||
EGLBoolean eglSwapInterval (EGLDisplay dpy, EGLint interval)
|
38
auto/core/gl/EGL_VERSION_1_2
Normal file
38
auto/core/gl/EGL_VERSION_1_2
Normal file
@ -0,0 +1,38 @@
|
||||
EGL_VERSION_1_2
|
||||
https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf
|
||||
|
||||
|
||||
EGL_OPENGL_ES_BIT 0x0001
|
||||
EGL_OPENVG_BIT 0x0002
|
||||
EGL_LUMINANCE_SIZE 0x303D
|
||||
EGL_ALPHA_MASK_SIZE 0x303E
|
||||
EGL_COLOR_BUFFER_TYPE 0x303F
|
||||
EGL_RENDERABLE_TYPE 0x3040
|
||||
EGL_SINGLE_BUFFER 0x3085
|
||||
EGL_RENDER_BUFFER 0x3086
|
||||
EGL_COLORSPACE 0x3087
|
||||
EGL_ALPHA_FORMAT 0x3088
|
||||
EGL_COLORSPACE_sRGB 0x3089
|
||||
EGL_COLORSPACE_LINEAR 0x308A
|
||||
EGL_ALPHA_FORMAT_NONPRE 0x308B
|
||||
EGL_ALPHA_FORMAT_PRE 0x308C
|
||||
EGL_CLIENT_APIS 0x308D
|
||||
EGL_RGB_BUFFER 0x308E
|
||||
EGL_LUMINANCE_BUFFER 0x308F
|
||||
EGL_HORIZONTAL_RESOLUTION 0x3090
|
||||
EGL_VERTICAL_RESOLUTION 0x3091
|
||||
EGL_PIXEL_ASPECT_RATIO 0x3092
|
||||
EGL_SWAP_BEHAVIOR 0x3093
|
||||
EGL_BUFFER_PRESERVED 0x3094
|
||||
EGL_BUFFER_DESTROYED 0x3095
|
||||
EGL_OPENVG_IMAGE 0x3096
|
||||
EGL_CONTEXT_CLIENT_TYPE 0x3097
|
||||
EGL_OPENGL_ES_API 0x30A0
|
||||
EGL_OPENVG_API 0x30A1
|
||||
EGL_DISPLAY_SCALING 10000
|
||||
EGL_UNKNOWN EGL_CAST(EGLint,-1)
|
||||
EGLBoolean eglBindAPI (EGLenum api)
|
||||
EGLSurface eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint * attrib_list)
|
||||
EGLenum eglQueryAPI ( void )
|
||||
EGLBoolean eglReleaseThread ( void )
|
||||
EGLBoolean eglWaitClient ( void )
|
16
auto/core/gl/EGL_VERSION_1_3
Normal file
16
auto/core/gl/EGL_VERSION_1_3
Normal file
@ -0,0 +1,16 @@
|
||||
EGL_VERSION_1_3
|
||||
https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf
|
||||
|
||||
|
||||
EGL_OPENGL_ES2_BIT 0x0004
|
||||
EGL_VG_COLORSPACE_LINEAR_BIT 0x0020
|
||||
EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040
|
||||
EGL_MATCH_NATIVE_PIXMAP 0x3041
|
||||
EGL_CONFORMANT 0x3042
|
||||
EGL_VG_COLORSPACE 0x3087
|
||||
EGL_VG_ALPHA_FORMAT 0x3088
|
||||
EGL_VG_COLORSPACE_sRGB 0x3089
|
||||
EGL_VG_COLORSPACE_LINEAR 0x308A
|
||||
EGL_VG_ALPHA_FORMAT_NONPRE 0x308B
|
||||
EGL_VG_ALPHA_FORMAT_PRE 0x308C
|
||||
EGL_CONTEXT_CLIENT_VERSION 0x3098
|
13
auto/core/gl/EGL_VERSION_1_4
Normal file
13
auto/core/gl/EGL_VERSION_1_4
Normal file
@ -0,0 +1,13 @@
|
||||
EGL_VERSION_1_4
|
||||
https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf
|
||||
|
||||
|
||||
EGL_OPENGL_BIT 0x0008
|
||||
EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200
|
||||
EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400
|
||||
EGL_MULTISAMPLE_RESOLVE 0x3099
|
||||
EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A
|
||||
EGL_MULTISAMPLE_RESOLVE_BOX 0x309B
|
||||
EGL_OPENGL_API 0x30A2
|
||||
EGL_DEFAULT_DISPLAY EGL_CAST(EGLNativeDisplayType,0)
|
||||
EGLContext eglGetCurrentContext ( void )
|
59
auto/core/gl/EGL_VERSION_1_5
Normal file
59
auto/core/gl/EGL_VERSION_1_5
Normal file
@ -0,0 +1,59 @@
|
||||
EGL_VERSION_1_5
|
||||
https://www.khronos.org/registry/egl/specs/eglspec.1.5.pdf
|
||||
|
||||
|
||||
EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001
|
||||
EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002
|
||||
EGL_OPENGL_ES3_BIT 0x00000040
|
||||
EGL_SYNC_FLUSH_COMMANDS_BIT 0x0001
|
||||
EGL_GL_COLORSPACE_SRGB 0x3089
|
||||
EGL_GL_COLORSPACE_LINEAR 0x308A
|
||||
EGL_CONTEXT_MAJOR_VERSION 0x3098
|
||||
EGL_CL_EVENT_HANDLE 0x309C
|
||||
EGL_GL_COLORSPACE 0x309D
|
||||
EGL_GL_TEXTURE_2D 0x30B1
|
||||
EGL_GL_TEXTURE_3D 0x30B2
|
||||
EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3
|
||||
EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4
|
||||
EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5
|
||||
EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6
|
||||
EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7
|
||||
EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8
|
||||
EGL_GL_RENDERBUFFER 0x30B9
|
||||
EGL_GL_TEXTURE_LEVEL 0x30BC
|
||||
EGL_GL_TEXTURE_ZOFFSET 0x30BD
|
||||
EGL_IMAGE_PRESERVED 0x30D2
|
||||
EGL_SYNC_PRIOR_COMMANDS_COMPLETE 0x30F0
|
||||
EGL_SYNC_STATUS 0x30F1
|
||||
EGL_SIGNALED 0x30F2
|
||||
EGL_UNSIGNALED 0x30F3
|
||||
EGL_TIMEOUT_EXPIRED 0x30F5
|
||||
EGL_CONDITION_SATISFIED 0x30F6
|
||||
EGL_SYNC_TYPE 0x30F7
|
||||
EGL_SYNC_CONDITION 0x30F8
|
||||
EGL_SYNC_FENCE 0x30F9
|
||||
EGL_CONTEXT_MINOR_VERSION 0x30FB
|
||||
EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD
|
||||
EGL_SYNC_CL_EVENT 0x30FE
|
||||
EGL_SYNC_CL_EVENT_COMPLETE 0x30FF
|
||||
EGL_CONTEXT_OPENGL_DEBUG 0x31B0
|
||||
EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1
|
||||
EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2
|
||||
EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2
|
||||
EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD
|
||||
EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD
|
||||
EGL_NO_RESET_NOTIFICATION 0x31BE
|
||||
EGL_LOSE_CONTEXT_ON_RESET 0x31BF
|
||||
EGL_FOREVER 0xFFFFFFFFFFFFFFFF
|
||||
EGL_NO_IMAGE EGL_CAST(EGLImage,0)
|
||||
EGL_NO_SYNC EGL_CAST(EGLSync,0)
|
||||
EGLint eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout)
|
||||
EGLImage eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib * attrib_list)
|
||||
EGLSurface eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void * native_pixmap, const EGLAttrib * attrib_list)
|
||||
EGLSurface eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void * native_window, const EGLAttrib * attrib_list)
|
||||
EGLSync eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib * attrib_list)
|
||||
EGLBoolean eglDestroyImage (EGLDisplay dpy, EGLImage image)
|
||||
EGLBoolean eglDestroySync (EGLDisplay dpy, EGLSync sync)
|
||||
EGLDisplay eglGetPlatformDisplay (EGLenum platform, void * native_display, const EGLAttrib * attrib_list)
|
||||
EGLBoolean eglGetSyncAttrib (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib * value)
|
||||
EGLBoolean eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags)
|
@ -1,23 +0,0 @@
|
||||
GLX_AMD_gpu_association
|
||||
http://www.opengl.org/registry/specs/AMD/glx_gpu_association.txt
|
||||
GLX_AMD_gpu_association
|
||||
|
||||
GLX_GPU_VENDOR_AMD 0x1F00
|
||||
GLX_GPU_RENDERER_STRING_AMD 0x1F01
|
||||
GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
|
||||
GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
|
||||
GLX_GPU_RAM_AMD 0x21A3
|
||||
GLX_GPU_CLOCK_AMD 0x21A4
|
||||
GLX_GPU_NUM_PIPES_AMD 0x21A5
|
||||
GLX_GPU_NUM_SIMD_AMD 0x21A6
|
||||
GLX_GPU_NUM_RB_AMD 0x21A7
|
||||
GLX_GPU_NUM_SPI_AMD 0x21A8
|
||||
void glXBlitContextFramebufferAMD (GLXContext dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
|
||||
GLXContext glXCreateAssociatedContextAMD (unsigned int id, GLXContext share_list)
|
||||
GLXContext glXCreateAssociatedContextAttribsAMD (unsigned int id, GLXContext share_context, const int* attribList)
|
||||
Bool glXDeleteAssociatedContextAMD (GLXContext ctx)
|
||||
unsigned int glXGetContextGPUIDAMD (GLXContext ctx)
|
||||
GLXContext glXGetCurrentAssociatedContextAMD (void)
|
||||
unsigned int glXGetGPUIDsAMD (unsigned int maxCount, unsigned int* ids)
|
||||
int glXGetGPUInfoAMD (unsigned int id, int property, GLenum dataType, unsigned int size, void* data)
|
||||
Bool glXMakeAssociatedContextCurrentAMD (GLXContext ctx)
|
@ -1,5 +0,0 @@
|
||||
GLX_EXT_create_context_es2_profile
|
||||
http://www.opengl.org/registry/specs/EXT/glx_create_context_es2_profile.txt
|
||||
GLX_EXT_create_context_es2_profile
|
||||
|
||||
GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
|
@ -1,5 +0,0 @@
|
||||
GLX_EXT_create_context_es_profile
|
||||
http://www.opengl.org/registry/specs/EXT/glx_create_context_es_profile.txt
|
||||
GLX_EXT_create_context_es_profile
|
||||
|
||||
GLX_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
|
@ -1,6 +0,0 @@
|
||||
GLX_EXT_fbconfig_packed_float
|
||||
http://developer.download.nvidia.com/opengl/specs/GL_EXT_packed_float.txt
|
||||
GLX_EXT_fbconfig_packed_float
|
||||
|
||||
GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
|
||||
GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
|
@ -1,5 +0,0 @@
|
||||
GLX_EXT_framebuffer_sRGB
|
||||
http://developer.download.nvidia.com/opengl/specs/GL_EXT_framebuffer_sRGB.txt
|
||||
GLX_EXT_framebuffer_sRGB
|
||||
|
||||
GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
|
4
auto/core/gl/GLX_EXT_scene_marker
Normal file
4
auto/core/gl/GLX_EXT_scene_marker
Normal file
@ -0,0 +1,4 @@
|
||||
GLX_EXT_scene_marker
|
||||
https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_scene_marker.txt
|
||||
GLX_EXT_scene_marker
|
||||
|
@ -1,6 +0,0 @@
|
||||
GLX_MESA_swap_control
|
||||
http://cgit.freedesktop.org/mesa/mesa/plain/docs/MESA_swap_control.spec
|
||||
GLX_MESA_swap_control
|
||||
|
||||
int glXGetSwapIntervalMESA (void)
|
||||
int glXSwapIntervalMESA (unsigned int interval)
|
@ -1,5 +0,0 @@
|
||||
GLX_NV_float_buffer
|
||||
http://cvs1.nvidia.com/inc/GL/glxtokens.h
|
||||
GLX_NV_float_buffer
|
||||
|
||||
GLX_FLOAT_COMPONENTS_NV 0x20B0
|
4
auto/core/gl/GLX_SGIS_color_range
Normal file
4
auto/core/gl/GLX_SGIS_color_range
Normal file
@ -0,0 +1,4 @@
|
||||
GLX_SGIS_color_range
|
||||
https://www.khronos.org/registry/OpenGL/extensions/SGIS/GLX_SGIS_color_range.txt
|
||||
GLX_SGIS_color_range
|
||||
|
@ -1,6 +0,0 @@
|
||||
GLX_SGIS_shared_multisample
|
||||
|
||||
GLX_SGIS_shared_multisample
|
||||
|
||||
GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
|
||||
GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
|
@ -1,6 +0,0 @@
|
||||
GLX_SGIX_swap_barrier
|
||||
http://oss.sgi.com/projects/ogl-sample/registry/SGIX/swap_barrier.txt
|
||||
GLX_SGIX_swap_barrier
|
||||
|
||||
void glXBindSwapBarrierSGIX (Display *dpy, GLXDrawable drawable, int barrier)
|
||||
Bool glXQueryMaxSwapBarriersSGIX (Display *dpy, int screen, int *max)
|
@ -1,5 +0,0 @@
|
||||
GLX_SGIX_swap_group
|
||||
http://oss.sgi.com/projects/ogl-sample/registry/SGIX/swap_group.txt
|
||||
GLX_SGIX_swap_group
|
||||
|
||||
void glXJoinSwapGroupSGIX (Display *dpy, GLXDrawable drawable, GLXDrawable member)
|
@ -1,6 +0,0 @@
|
||||
GLX_SGI_video_sync
|
||||
http://www.opengl.org/registry/specs/SGI/video_sync.txt
|
||||
GLX_SGI_video_sync
|
||||
|
||||
int glXGetVideoSyncSGI (unsigned int* count)
|
||||
int glXWaitVideoSyncSGI (int divisor, int remainder, unsigned int* count)
|
@ -9,13 +9,6 @@ GL_EXT_memory_object
|
||||
GL_TILING_TYPES_EXT 0x9583
|
||||
GL_OPTIMAL_TILING_EXT 0x9584
|
||||
GL_LINEAR_TILING_EXT 0x9585
|
||||
GL_LAYOUT_GENERAL_EXT 0x958D
|
||||
GL_LAYOUT_COLOR_ATTACHMENT_EXT 0x958E
|
||||
GL_LAYOUT_DEPTH_STENCIL_ATTACHMENT_EXT 0x958F
|
||||
GL_LAYOUT_DEPTH_STENCIL_READ_ONLY_EXT 0x9590
|
||||
GL_LAYOUT_SHADER_READ_ONLY_EXT 0x9591
|
||||
GL_LAYOUT_TRANSFER_SRC_EXT 0x9592
|
||||
GL_LAYOUT_TRANSFER_DST_EXT 0x9593
|
||||
GL_NUM_DEVICE_UUIDS_EXT 0x9596
|
||||
GL_DEVICE_UUID_EXT 0x9597
|
||||
GL_DRIVER_UUID_EXT 0x9598
|
||||
|
6
auto/core/gl/GL_EXT_scene_marker
Normal file
6
auto/core/gl/GL_EXT_scene_marker
Normal file
@ -0,0 +1,6 @@
|
||||
GL_EXT_scene_marker
|
||||
https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_scene_marker.txt
|
||||
GL_EXT_scene_marker
|
||||
|
||||
void glBeginSceneEXT (void)
|
||||
void glEndSceneEXT (void)
|
@ -2,6 +2,16 @@ GL_EXT_semaphore
|
||||
http://www.opengl.org/registry/specs/EXT/external_objects.txt
|
||||
GL_EXT_semaphore
|
||||
|
||||
GL_LAYOUT_GENERAL_EXT 0x958D
|
||||
GL_LAYOUT_COLOR_ATTACHMENT_EXT 0x958E
|
||||
GL_LAYOUT_DEPTH_STENCIL_ATTACHMENT_EXT 0x958F
|
||||
GL_LAYOUT_DEPTH_STENCIL_READ_ONLY_EXT 0x9590
|
||||
GL_LAYOUT_SHADER_READ_ONLY_EXT 0x9591
|
||||
GL_LAYOUT_TRANSFER_SRC_EXT 0x9592
|
||||
GL_LAYOUT_TRANSFER_DST_EXT 0x9593
|
||||
GL_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_EXT 0x9530
|
||||
GL_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_EXT 0x9531
|
||||
|
||||
void glDeleteSemaphoresEXT (GLsizei n, const GLuint* semaphores)
|
||||
void glGenSemaphoresEXT (GLsizei n, GLuint* semaphores)
|
||||
void glGetSemaphoreParameterui64vEXT (GLuint semaphore, GLenum pname, GLuint64* params)
|
||||
|
7
auto/core/gl/GL_KHR_context_flush_control
Normal file
7
auto/core/gl/GL_KHR_context_flush_control
Normal file
@ -0,0 +1,7 @@
|
||||
GL_KHR_context_flush_control
|
||||
https://www.khronos.org/registry/OpenGL/extensions/KHR/KHR_context_flush_control.txt
|
||||
GL_KHR_context_flush_control
|
||||
|
||||
GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB
|
||||
GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC
|
||||
|
15
auto/core/gl/GL_NV_sample_locations
Normal file
15
auto/core/gl/GL_NV_sample_locations
Normal file
@ -0,0 +1,15 @@
|
||||
GL_NV_sample_locations
|
||||
https://www.khronos.org/registry/OpenGL/extensions/NV/NV_sample_locations.txt
|
||||
GL_NV_sample_locations
|
||||
|
||||
GL_SAMPLE_LOCATION_NV 0x8E50
|
||||
GL_SAMPLE_LOCATION_SUBPIXEL_BITS_NV 0x933D
|
||||
GL_SAMPLE_LOCATION_PIXEL_GRID_WIDTH_NV 0x933E
|
||||
GL_SAMPLE_LOCATION_PIXEL_GRID_HEIGHT_NV 0x933F
|
||||
GL_PROGRAMMABLE_SAMPLE_LOCATION_TABLE_SIZE_NV 0x9340
|
||||
GL_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9341
|
||||
GL_FRAMEBUFFER_PROGRAMMABLE_SAMPLE_LOCATIONS_NV 0x9342
|
||||
GL_FRAMEBUFFER_SAMPLE_LOCATION_PIXEL_GRID_NV 0x9343
|
||||
void glFramebufferSampleLocationsfvNV (GLenum target, GLuint start, GLsizei count, const GLfloat* v)
|
||||
void glNamedFramebufferSampleLocationsfvNV (GLuint framebuffer, GLuint start, GLsizei count, const GLfloat* v)
|
||||
void glResolveDepthValuesNV (void)
|
@ -89,7 +89,7 @@ http://www.opengl.org/documentation/specs/version2.0/glspec20.pdf
|
||||
void glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha)
|
||||
void glDrawBuffers (GLsizei n, const GLenum* bufs)
|
||||
void glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass)
|
||||
void glStencilFuncSeparate (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask)
|
||||
void glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask)
|
||||
void glStencilMaskSeparate (GLenum face, GLuint mask)
|
||||
void glAttachShader (GLuint program, GLuint shader)
|
||||
void glBindAttribLocation (GLuint program, GLuint index, const GLchar* name)
|
||||
|
@ -1,13 +0,0 @@
|
||||
WGL_ARB_create_context
|
||||
http://www.opengl.org/registry/specs/ARB/wgl_create_context.txt
|
||||
WGL_ARB_create_context
|
||||
|
||||
WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
|
||||
WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
|
||||
WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
|
||||
WGL_CONTEXT_FLAGS_ARB 0x2094
|
||||
ERROR_INVALID_VERSION_ARB 0x2095
|
||||
ERROR_INVALID_PROFILE_ARB 0x2096
|
||||
HGLRC wglCreateContextAttribsARB (HDC hDC, HGLRC hShareContext, const int* attribList)
|
@ -1,5 +0,0 @@
|
||||
WGL_ATI_render_texture_rectangle
|
||||
|
||||
WGL_ATI_render_texture_rectangle
|
||||
|
||||
WGL_TEXTURE_RECTANGLE_ATI 0x21A5
|
@ -1,5 +0,0 @@
|
||||
WGL_EXT_create_context_es2_profile
|
||||
http://www.opengl.org/registry/specs/EXT/wgl_create_context_es2_profile.txt
|
||||
WGL_EXT_create_context_es2_profile
|
||||
|
||||
WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
|
@ -1,5 +0,0 @@
|
||||
WGL_EXT_create_context_es_profile
|
||||
http://www.opengl.org/registry/specs/EXT/wgl_create_context_es_profile.txt
|
||||
WGL_EXT_create_context_es_profile
|
||||
|
||||
WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
|
@ -1,5 +0,0 @@
|
||||
WGL_EXT_framebuffer_sRGB
|
||||
http://developer.download.nvidia.com/opengl/specs/GL_EXT_framebuffer_sRGB.txt
|
||||
WGL_EXT_framebuffer_sRGB
|
||||
|
||||
WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9
|
@ -1,5 +0,0 @@
|
||||
WGL_EXT_pixel_format_packed_float
|
||||
http://developer.download.nvidia.com/opengl/specs/GL_EXT_packed_float.txt
|
||||
WGL_EXT_pixel_format_packed_float
|
||||
|
||||
WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8
|
@ -1,6 +0,0 @@
|
||||
WGL_NV_vertex_array_range
|
||||
http://oss.sgi.com/projects/ogl-sample/registry/NV/vertex_array_range.txt
|
||||
WGL_NV_vertex_array_range
|
||||
|
||||
void * wglAllocateMemoryNV (GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority)
|
||||
void wglFreeMemoryNV (void *pointer)
|
@ -88,7 +88,7 @@ terminated with a semicolon.
|
||||
<h3>Custom Code Generation</h3>
|
||||
<p>
|
||||
Starting from GLEW 1.3.0, it is possible to control which extensions
|
||||
to include in the libarary by specifying a list in
|
||||
to include in the library by specifying a list in
|
||||
<tt>auto/custom.txt</tt>. This is useful when you do not need all the
|
||||
extensions and would like to reduce the size of the source files.
|
||||
Type <tt>make clean; make custom</tt> in the <tt>auto</tt> directory
|
||||
|
@ -13,7 +13,7 @@ Mac OS X, FreeBSD, Irix, and Solaris.
|
||||
<a href="http://sourceforge.net/projects/glew/">GLEW</a> is distributed
|
||||
as source and precompiled binaries.<br/>
|
||||
The latest release is
|
||||
<a href="https://sourceforge.net/projects/glew/files/glew/2.1.0/">2.1.0</a>[07-31-17]:
|
||||
<a href="https://github.com/nigels-com/glew/releases/tag/glew-2.2.0">2.2.0</a>[03-15-20]:
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
@ -27,8 +27,8 @@ The latest release is
|
||||
<td align="right"><b>Source</b></td>
|
||||
<td></td>
|
||||
<td align="left">
|
||||
<a href="https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.zip/download">ZIP</a> |
|
||||
<a href="https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.tgz/download">TGZ</a></td>
|
||||
<a href="https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.zip">ZIP</a> |
|
||||
<a href="https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.tgz">TGZ</a></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -36,7 +36,7 @@ The latest release is
|
||||
<td align="right"><b>Binaries</b></td>
|
||||
<td></td>
|
||||
<td align="left">
|
||||
<a href="https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0-win32.zip/download">Windows 32-bit and 64-bit</a>
|
||||
<a href="https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0-win32.zip">Windows 32-bit and 64-bit</a>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@ -65,8 +65,9 @@ The latest release contains support for OpenGL 4.6, compatibility and forward-co
|
||||
|
||||
<h2>News</h2>
|
||||
<ul>
|
||||
<li>[07-31-17] <a href="https://sourceforge.net/projects/glew/files/glew/2.1.0/">GLEW 2.1.0</a> adds support for OpenGL 4.6, new extensions and minor bug fixes</li>
|
||||
<li>[07-24-16] <a href="https://sourceforge.net/projects/glew/files/glew/2.0.0/">GLEW 2.0.0</a> adds support for forward-compatible contexts, adds new extensions, OSMesa and EGL support, MX discontinued and minor bug fixes</li>
|
||||
<li>[03-15-20] <a href="https://github.com/nigels-com/glew/releases/tag/glew-2.2.0">GLEW 2.2.0</a> new extensions and minor bug fixes</li>
|
||||
<li>[07-31-17] <a href="https://github.com/nigels-com/glew/releases/tag/glew-2.1.0">GLEW 2.1.0</a> adds support for OpenGL 4.6, new extensions and minor bug fixes</li>
|
||||
<li>[07-24-16] <a href="https://github.com/nigels-com/glew/releases/tag/glew-2.0.0">GLEW 2.0.0</a> adds support for forward-compatible contexts, adds new extensions, OSMesa and EGL support, MX discontinued and minor bug fixes</li>
|
||||
<li>[08-10-15] <a href="https://sourceforge.net/projects/glew/files/glew/1.13.0/">GLEW 1.13.0</a> adds support for new extensions, fixes minor bugs</li>
|
||||
<li>[26-01-15] <a href="https://sourceforge.net/projects/glew/files/glew/1.12.0/">GLEW 1.12.0</a> fixes minor bugs and adds new extensions</li>
|
||||
<li>[08-11-14] <a href="https://sourceforge.net/projects/glew/files/glew/1.11.0/">GLEW 1.11.0</a> adds support for OpenGL 4.5, new extensions</li>
|
||||
|
@ -1,5 +1,188 @@
|
||||
<h2>Change Log</h2>
|
||||
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>2.2.0</b> [03-15-20]
|
||||
|
||||
<ul>
|
||||
<li> Bug fixes:
|
||||
<ul>
|
||||
<li> GL_EXT_semaphore constants
|
||||
<li> Some const pointer fixups in OpenGL API
|
||||
<li> Correction for GLEW_VERSION_4_5
|
||||
<li> Windows build updates and fixes
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li> New extensions:
|
||||
<ul>
|
||||
<li> GL_AMD_framebuffer_multisample_advanced
|
||||
<li> GL_AMD_gpu_shader_half_float_fetch
|
||||
<li> GL_AMD_shader_image_load_store_lod
|
||||
<li> GL_ARM_texture_unnormalized_coordinates
|
||||
<li> GL_DMP_program_binary
|
||||
<li> GL_DMP_shader_binary
|
||||
<li> GL_EXT_EGL_image_external_wrap_modes
|
||||
<li> GL_EXT_EGL_image_storage
|
||||
<li> GL_EXT_EGL_sync
|
||||
<li> GL_EXT_clip_control
|
||||
<li> GL_EXT_depth_clamp
|
||||
<li> GL_EXT_disjoint_timer_query
|
||||
<li> GL_EXT_draw_transform_feedback
|
||||
<li> GL_EXT_multiview_tessellation_geometry_shader
|
||||
<li> GL_EXT_multiview_texture_multisample
|
||||
<li> GL_EXT_multiview_timer_query
|
||||
<li> GL_EXT_occlusion_query_boolean
|
||||
<li> GL_EXT_primitive_bounding_box
|
||||
<li> GL_EXT_protected_textures
|
||||
<li> GL_EXT_robustness
|
||||
<li> GL_EXT_shader_framebuffer_fetch_non_coherent
|
||||
<li> GL_EXT_static_vertex_array
|
||||
<li> GL_EXT_tessellation_point_size
|
||||
<li> GL_EXT_tessellation_shader
|
||||
<li> GL_EXT_texture_border_clamp
|
||||
<li> GL_EXT_texture_buffer
|
||||
<li> GL_EXT_texture_compression_s3tc_srgb
|
||||
<li> GL_EXT_texture_format_sRGB_override
|
||||
<li> GL_EXT_texture_mirror_clamp_to_edge
|
||||
<li> GL_EXT_texture_query_lod
|
||||
<li> GL_EXT_texture_shadow_lod
|
||||
<li> GL_FJ_shader_binary_GCCSO
|
||||
<li> GL_IMG_bindless_texture
|
||||
<li> GL_IMG_framebuffer_downsample
|
||||
<li> GL_IMG_multisampled_render_to_texture
|
||||
<li> GL_IMG_program_binary
|
||||
<li> GL_IMG_read_format
|
||||
<li> GL_IMG_shader_binary
|
||||
<li> GL_IMG_texture_compression_pvrtc
|
||||
<li> GL_IMG_texture_compression_pvrtc2
|
||||
<li> GL_IMG_texture_env_enhanced_fixed_function
|
||||
<li> GL_IMG_texture_filter_cubic
|
||||
<li> GL_INTEL_blackhole_render
|
||||
<li> GL_INTEL_shader_integer_functions2
|
||||
<li> GL_KHR_shader_subgroup
|
||||
<li> GL_MESA_framebuffer_flip_y
|
||||
<li> GL_MESA_program_binary_formats
|
||||
<li> GL_MESA_tile_raster_order
|
||||
<li> GL_NVX_gpu_multicast2
|
||||
<li> GL_NVX_progress_fence
|
||||
<li> GL_NV_compute_shader_derivatives
|
||||
<li> GL_NV_conservative_raster_pre_snap
|
||||
<li> GL_NV_conservative_raster_underestimation
|
||||
<li> GL_NV_depth_nonlinear
|
||||
<li> GL_NV_fragment_shader_barycentric
|
||||
<li> GL_NV_memory_attachment
|
||||
<li> GL_NV_mesh_shader
|
||||
<li> GL_NV_query_resource_tag
|
||||
<li> GL_NV_read_buffer
|
||||
<li> GL_NV_read_buffer_front
|
||||
<li> GL_NV_representative_fragment_test
|
||||
<li> GL_NV_scissor_exclusive
|
||||
<li> GL_NV_shader_subgroup_partitioned
|
||||
<li> GL_NV_shader_texture_footprint
|
||||
<li> GL_NV_shading_rate_image
|
||||
<li> GL_NV_vdpau_interop2
|
||||
<li> GL_OES_EGL_image
|
||||
<li> GL_OES_EGL_image_external
|
||||
<li> GL_OES_EGL_image_external_essl3
|
||||
<li> GL_OES_blend_equation_separate
|
||||
<li> GL_OES_blend_func_separate
|
||||
<li> GL_OES_blend_subtract
|
||||
<li> GL_OES_compressed_ETC1_RGB8_texture
|
||||
<li> GL_OES_compressed_paletted_texture
|
||||
<li> GL_OES_copy_image
|
||||
<li> GL_OES_depth24
|
||||
<li> GL_OES_depth32
|
||||
<li> GL_OES_depth_texture
|
||||
<li> GL_OES_depth_texture_cube_map
|
||||
<li> GL_OES_draw_buffers_indexed
|
||||
<li> GL_OES_draw_texture
|
||||
<li> GL_OES_element_index_uint
|
||||
<li> GL_OES_extended_matrix_palette
|
||||
<li> GL_OES_fbo_render_mipmap
|
||||
<li> GL_OES_fragment_precision_high
|
||||
<li> GL_OES_framebuffer_object
|
||||
<li> GL_OES_geometry_point_size
|
||||
<li> GL_OES_geometry_shader
|
||||
<li> GL_OES_get_program_binary
|
||||
<li> GL_OES_gpu_shader5
|
||||
<li> GL_OES_mapbuffer
|
||||
<li> GL_OES_matrix_get
|
||||
<li> GL_OES_matrix_palette
|
||||
<li> GL_OES_packed_depth_stencil
|
||||
<li> GL_OES_point_size_array
|
||||
<li> GL_OES_point_sprite
|
||||
<li> GL_OES_read_format
|
||||
<li> GL_OES_required_internalformat
|
||||
<li> GL_OES_rgb8_rgba8
|
||||
<li> GL_OES_sample_shading
|
||||
<li> GL_OES_sample_variables
|
||||
<li> GL_OES_shader_image_atomic
|
||||
<li> GL_OES_shader_io_blocks
|
||||
<li> GL_OES_shader_multisample_interpolation
|
||||
<li> GL_OES_single_precision
|
||||
<li> GL_OES_standard_derivatives
|
||||
<li> GL_OES_stencil1
|
||||
<li> GL_OES_stencil4
|
||||
<li> GL_OES_stencil8
|
||||
<li> GL_OES_surfaceless_context
|
||||
<li> GL_OES_tessellation_point_size
|
||||
<li> GL_OES_tessellation_shader
|
||||
<li> GL_OES_texture_3D
|
||||
<li> GL_OES_texture_border_clamp
|
||||
<li> GL_OES_texture_buffer
|
||||
<li> GL_OES_texture_compression_astc
|
||||
<li> GL_OES_texture_cube_map
|
||||
<li> GL_OES_texture_cube_map_array
|
||||
<li> GL_OES_texture_env_crossbar
|
||||
<li> GL_OES_texture_mirrored_repeat
|
||||
<li> GL_OES_texture_npot
|
||||
<li> GL_OES_texture_stencil8
|
||||
<li> GL_OES_texture_storage_multisample_2d_array
|
||||
<li> GL_OES_texture_view
|
||||
<li> GL_OES_vertex_array_object
|
||||
<li> GL_OES_vertex_half_float
|
||||
<li> GL_OES_vertex_type_10_10_10_2
|
||||
<li> GL_QCOM_YUV_texture_gather
|
||||
<li> GL_QCOM_shader_framebuffer_fetch_rate
|
||||
<li> GL_QCOM_texture_foveated
|
||||
<li> GL_QCOM_texture_foveated_subsampled_layout
|
||||
<li> GL_VIV_shader_binary
|
||||
<li> EGL_ANDROID_GLES_layers
|
||||
<li> EGL_ANDROID_get_frame_timestamps
|
||||
<li> EGL_ANDROID_get_native_client_buffer
|
||||
<li> EGL_ARM_image_format
|
||||
<li> EGL_EXT_bind_to_front
|
||||
<li> EGL_EXT_client_sync
|
||||
<li> EGL_EXT_compositor
|
||||
<li> EGL_EXT_gl_colorspace_display_p3
|
||||
<li> EGL_EXT_gl_colorspace_display_p3_linear
|
||||
<li> EGL_EXT_gl_colorspace_display_p3_passthrough
|
||||
<li> EGL_EXT_gl_colorspace_scrgb
|
||||
<li> EGL_EXT_image_gl_colorspace
|
||||
<li> EGL_EXT_image_implicit_sync_control
|
||||
<li> EGL_EXT_surface_CTA861_3_metadata
|
||||
<li> EGL_EXT_sync_reuse
|
||||
<li> EGL_KHR_display_reference
|
||||
<li> EGL_MESA_query_driver
|
||||
<li> EGL_NV_context_priority_realtime
|
||||
<li> EGL_NV_quadruple_buffer
|
||||
<li> EGL_NV_stream_dma
|
||||
<li> EGL_NV_stream_flush
|
||||
<li> EGL_NV_stream_origin
|
||||
<li> EGL_NV_triple_buffer
|
||||
<li> EGL_WL_bind_wayland_display
|
||||
<li> EGL_WL_create_wayland_buffer_from_image
|
||||
<li> GLX_EXT_context_priority
|
||||
<li> GLX_EXT_no_config_context
|
||||
<li> GLX_NV_multigpu_context
|
||||
<li> WGL_NV_multigpu_context
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
</ul>
|
||||
|
||||
<hr align="center">
|
||||
<ul class="none">
|
||||
<li><b>2.1.0</b> [07-31-17]
|
||||
@ -15,7 +198,7 @@
|
||||
<ul>
|
||||
<li> Bug fixes:
|
||||
<ul>
|
||||
<li> Resovled crash when glXGetCurrentDisplay() is NULL
|
||||
<li> Resolved crash when glXGetCurrentDisplay() is NULL
|
||||
<li> CMake: only install PDB files with MSVC
|
||||
<li> wglGetProcAddress crash with NOGDI defined
|
||||
<li> Mac: using -Os rather than -O2
|
||||
@ -744,7 +927,7 @@
|
||||
</ul>
|
||||
<li> Bug fixes:
|
||||
<ul>
|
||||
<li> Incorrent 64-bit type definitions
|
||||
<li> Incorrect 64-bit type definitions
|
||||
<li> Do not strip static library on install
|
||||
<li> Missing tokens in GL_ATI_fragment_shader and WGL_{ARB,EXT}_make_current_read
|
||||
<li> Missing tokens in GL_VERSION_2_1
|
||||
@ -792,7 +975,7 @@ corruption of their values
|
||||
<li> Missing include guards in glxew.h
|
||||
<li> Makefile and install problems for Cygwin builds
|
||||
<li> Install problem for Linux AMD64 builds
|
||||
<li> Incorrent token in GL_ATI_texture_compression_3dc
|
||||
<li> Incorrect token in GL_ATI_texture_compression_3dc
|
||||
<li> Missing tokens from GL_ATIX_point_sprites
|
||||
</ul>
|
||||
</ul>
|
||||
|
@ -27,7 +27,11 @@
|
||||
#include <KHR/khrplatform.h>
|
||||
#include <EGL/eglplatform.h>
|
||||
|
||||
#include <GL/glew.h>
|
||||
#ifndef GLEW_INCLUDE
|
||||
# include <GL/glew.h>
|
||||
#else
|
||||
# include GLEW_INCLUDE
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -72,6 +76,12 @@ typedef khronos_utime_nanoseconds_t EGLuint64NV;
|
||||
typedef khronos_stime_nanoseconds_t EGLnsecsANDROID;
|
||||
|
||||
struct EGLClientPixmapHI;
|
||||
struct AHardwareBuffer;
|
||||
|
||||
/* Wayland types for WL_bind_wayland_display purposes */
|
||||
struct wl_buffer;
|
||||
struct wl_display;
|
||||
struct wl_resource;
|
||||
|
||||
#define EGL_DONT_CARE ((EGLint)-1)
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
//
|
||||
// Version
|
||||
//
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION GLEW_MAJOR, GLEW_MINOR, GLEW_MICRO, 0
|
||||
PRODUCTVERSION GLEW_MAJOR, GLEW_MINOR, GLEW_MICRO, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
@ -40,8 +40,9 @@ BEGIN
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments",
|
||||
VALUE "Comments",
|
||||
"The OpenGL Extension Wrangler Library\r\n"
|
||||
"Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>\r\n"
|
||||
"Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>\r\n"
|
||||
"Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>\r\n"
|
||||
"Copyright (C) 2002, Lev Povalahev\r\n"
|
||||
@ -119,7 +120,7 @@ BEGIN
|
||||
VALUE "FileDescription", "The OpenGL Extension Wrangler Library\0"
|
||||
VALUE "FileVersion", "GLEW_MAJOR,GLEW_MINOR,GLEW_MICRO,0\0"
|
||||
VALUE "InternalName", "GLEW\0"
|
||||
VALUE "LegalCopyright", "© 2002-2008 Milan Ikits & Marcelo Magallon\0"
|
||||
VALUE "LegalCopyright", "(C) 2002-2019 Nigel Stewart & Milan Ikits & Marcelo Magallon\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", FILENAME "\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
|
@ -1,12 +1,20 @@
|
||||
#ifndef GLEW_INCLUDE
|
||||
#include <GL/glew.h>
|
||||
# include <GL/glew.h>
|
||||
#else
|
||||
#include GLEW_INCLUDE
|
||||
# include GLEW_INCLUDE
|
||||
#endif
|
||||
|
||||
#if defined(GLEW_OSMESA)
|
||||
# define GLAPI extern
|
||||
# ifndef APIENTRY
|
||||
# define APIENTRY
|
||||
# define GLEW_APIENTRY_DEFINED
|
||||
# endif
|
||||
# include <GL/osmesa.h>
|
||||
# ifdef GLEW_APIENTRY_DEFINED
|
||||
# undef APIENTRY
|
||||
# undef GLEW_APIENTRY_DEFINED
|
||||
# endif
|
||||
#elif defined(GLEW_EGL)
|
||||
# include <GL/eglew.h>
|
||||
#elif defined(_WIN32)
|
||||
@ -28,7 +36,7 @@
|
||||
#if defined(GLEW_EGL)
|
||||
#elif defined(GLEW_REGAL)
|
||||
|
||||
/* In GLEW_REGAL mode we call direcly into the linked
|
||||
/* In GLEW_REGAL mode we call directly into the linked
|
||||
libRegal.so glGetProcAddressREGAL for looking up
|
||||
the GL function pointers. */
|
||||
|
||||
@ -70,7 +78,7 @@ void* dlGetProcAddress (const GLubyte* name)
|
||||
#include <string.h>
|
||||
#include <AvailabilityMacros.h>
|
||||
|
||||
#ifdef MAC_OS_X_VERSION_10_3
|
||||
#if defined(MAC_OS_X_VERSION_10_3) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3
|
||||
|
||||
#include <dlfcn.h>
|
||||
|
||||
@ -120,7 +128,7 @@ void* NSGLGetProcAddress (const GLubyte *name)
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
#endif /* MAC_OS_X_VERSION_10_3 */
|
||||
#endif /* defined(MAC_OS_X_VERSION_10_3) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3 */
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
/*
|
||||
@ -221,7 +229,7 @@ static GLboolean _glewStrSame1 (const GLubyte** a, GLuint* na, const GLubyte* b,
|
||||
if(*na >= nb)
|
||||
{
|
||||
GLuint i=0;
|
||||
while (i < nb && (*a)+i != NULL && b+i != NULL && (*a)[i] == b[i]) i++;
|
||||
while (i < nb && (*a)[i] == b[i]) i++;
|
||||
if(i == nb)
|
||||
{
|
||||
*a = *a + nb;
|
||||
@ -237,7 +245,7 @@ static GLboolean _glewStrSame2 (const GLubyte** a, GLuint* na, const GLubyte* b,
|
||||
if(*na >= nb)
|
||||
{
|
||||
GLuint i=0;
|
||||
while (i < nb && (*a)+i != NULL && b+i != NULL && (*a)[i] == b[i]) i++;
|
||||
while (i < nb && (*a)[i] == b[i]) i++;
|
||||
if(i == nb)
|
||||
{
|
||||
*a = *a + nb;
|
||||
@ -253,7 +261,7 @@ static GLboolean _glewStrSame3 (const GLubyte** a, GLuint* na, const GLubyte* b,
|
||||
if(*na >= nb)
|
||||
{
|
||||
GLuint i=0;
|
||||
while (i < nb && (*a)+i != NULL && b+i != NULL && (*a)[i] == b[i]) i++;
|
||||
while (i < nb && (*a)[i] == b[i]) i++;
|
||||
if (i == nb && (*na == nb || (*a)[i] == ' ' || (*a)[i] == '\n' || (*a)[i] == '\r' || (*a)[i] == '\t'))
|
||||
{
|
||||
*a = *a + nb;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define __glew_h__
|
||||
#define __GLEW_H__
|
||||
|
||||
#if defined(__gl_h_) || defined(__GL_H__) || defined(_GL_H) || defined(__X_GL_H)
|
||||
#if defined(__gl_h_) || defined(__GL_H__) || defined(_GL_H) || defined(__gl_gl_h_) || defined(__X_GL_H)
|
||||
#error gl.h included before glew.h
|
||||
#endif
|
||||
#if defined(__gl2_h_)
|
||||
@ -14,7 +14,7 @@
|
||||
#if defined(__REGAL_H__)
|
||||
#error Regal.h included before glew.h
|
||||
#endif
|
||||
#if defined(__glext_h_) || defined(__GLEXT_H_)
|
||||
#if defined(__glext_h_) || defined(__GLEXT_H_) || defined(__gl_glext_h_)
|
||||
#error glext.h included before glew.h
|
||||
#endif
|
||||
#if defined(__gl_ATI_h_)
|
||||
@ -25,11 +25,13 @@
|
||||
#define __gl2_h_
|
||||
#define __GL_H__
|
||||
#define _GL_H
|
||||
#define __gl_gl_h_
|
||||
#define __gltypes_h_
|
||||
#define __REGAL_H__
|
||||
#define __X_GL_H
|
||||
#define __glext_h_
|
||||
#define __GLEXT_H_
|
||||
#define __gl_glext_h_
|
||||
#define __gl_ATI_h_
|
||||
|
||||
#if defined(_WIN32)
|
||||
@ -61,11 +63,6 @@
|
||||
# define APIENTRY
|
||||
# endif
|
||||
#endif
|
||||
#ifndef GLAPI
|
||||
# if defined(__MINGW32__) || defined(__CYGWIN__)
|
||||
# define GLAPI extern
|
||||
# endif
|
||||
#endif
|
||||
/* <winnt.h> */
|
||||
#ifndef CALLBACK
|
||||
#define GLEW_CALLBACK_DEFINED
|
||||
@ -139,15 +136,26 @@ typedef _W64 int ptrdiff_t;
|
||||
* (mem, 2004-01-04)
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#if defined(__APPLE__) || defined(__linux__)
|
||||
# if defined(__cplusplus)
|
||||
# include <cstddef>
|
||||
# include <cstdint>
|
||||
# else
|
||||
# include <stddef.h>
|
||||
# include <stdint.h>
|
||||
# endif
|
||||
#else
|
||||
|
||||
# include <stddef.h>
|
||||
|
||||
/* SGI MIPSPro doesn't like stdint.h in C++ mode */
|
||||
/* ID: 3376260 Solaris 9 has inttypes.h, but not stdint.h */
|
||||
|
||||
#if (defined(__sgi) || defined(__sun)) && !defined(__GNUC__)
|
||||
#include <inttypes.h>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
# if (defined(__sgi) || defined(__sun)) && !defined(__GNUC__)
|
||||
# include <inttypes.h>
|
||||
# else
|
||||
# include <stdint.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define GLEW_APIENTRY_DEFINED
|
||||
@ -231,6 +239,8 @@ typedef struct __GLsync *GLsync;
|
||||
|
||||
typedef char GLchar;
|
||||
|
||||
typedef void *GLeglImageOES; /* GL_EXT_EGL_image_storage */
|
||||
|
||||
#define GL_ZERO 0
|
||||
#define GL_FALSE 0
|
||||
#define GL_LOGIC_OP 0x0BF1
|
||||
|
@ -25,7 +25,7 @@ GLenum eglewInit (EGLDisplay display)
|
||||
if (!initialize || !queryString)
|
||||
return 1;
|
||||
|
||||
/* query EGK version */
|
||||
/* query EGL version */
|
||||
if (initialize(display, &major, &minor) != EGL_TRUE)
|
||||
return 1;
|
||||
|
||||
|
@ -73,13 +73,12 @@ GLboolean GLEWAPIENTRY glewGetExtension (const char* name)
|
||||
typedef const GLubyte* (GLAPIENTRY * PFNGLGETSTRINGPROC) (GLenum name);
|
||||
typedef void (GLAPIENTRY * PFNGLGETINTEGERVPROC) (GLenum pname, GLint *params);
|
||||
|
||||
static GLenum GLEWAPIENTRY glewContextInit ()
|
||||
GLenum GLEWAPIENTRY glewContextInit (void)
|
||||
{
|
||||
PFNGLGETSTRINGPROC getString;
|
||||
const GLubyte* s;
|
||||
GLuint dot;
|
||||
GLint major, minor;
|
||||
size_t n;
|
||||
|
||||
#ifdef _WIN32
|
||||
getString = glGetString;
|
||||
@ -110,7 +109,7 @@ static GLenum GLEWAPIENTRY glewContextInit ()
|
||||
else
|
||||
{
|
||||
GLEW_VERSION_4_6 = ( major > 4 ) || ( major == 4 && minor >= 6 ) ? GL_TRUE : GL_FALSE;
|
||||
GLEW_VERSION_4_5 = GLEW_VERSION_4_4 == GL_TRUE || ( major == 4 && minor >= 5 ) ? GL_TRUE : GL_FALSE;
|
||||
GLEW_VERSION_4_5 = GLEW_VERSION_4_6 == GL_TRUE || ( major == 4 && minor >= 5 ) ? GL_TRUE : GL_FALSE;
|
||||
GLEW_VERSION_4_4 = GLEW_VERSION_4_5 == GL_TRUE || ( major == 4 && minor >= 4 ) ? GL_TRUE : GL_FALSE;
|
||||
GLEW_VERSION_4_3 = GLEW_VERSION_4_4 == GL_TRUE || ( major == 4 && minor >= 3 ) ? GL_TRUE : GL_FALSE;
|
||||
GLEW_VERSION_4_2 = GLEW_VERSION_4_3 == GL_TRUE || ( major == 4 && minor >= 2 ) ? GL_TRUE : GL_FALSE;
|
||||
@ -130,8 +129,11 @@ static GLenum GLEWAPIENTRY glewContextInit ()
|
||||
GLEW_VERSION_1_1 = GLEW_VERSION_1_2 == GL_TRUE || ( major == 1 && minor >= 1 ) ? GL_TRUE : GL_FALSE;
|
||||
}
|
||||
|
||||
for (n = 0; n < sizeof(_glewExtensionString) / sizeof(_glewExtensionString[0]); ++n)
|
||||
_glewExtensionString[n] = GL_FALSE;
|
||||
{
|
||||
size_t i;
|
||||
for (i = 0; i < sizeof(_glewExtensionString) / sizeof(_glewExtensionString[0]); ++i)
|
||||
_glewExtensionString[i] = GL_FALSE;
|
||||
}
|
||||
|
||||
if (GLEW_VERSION_3_0)
|
||||
{
|
||||
|
@ -8,6 +8,7 @@ const GLubyte * GLEWAPIENTRY glewGetErrorString (GLenum error)
|
||||
(const GLubyte*)"Missing GL version",
|
||||
(const GLubyte*)"GL 1.1 and up are not supported",
|
||||
(const GLubyte*)"GLX 1.2 and up are not supported",
|
||||
(const GLubyte*)"No GLX display",
|
||||
(const GLubyte*)"Unknown error"
|
||||
};
|
||||
const size_t max_error = sizeof(_glewErrorString)/sizeof(*_glewErrorString) - 1;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
** The OpenGL Extension Wrangler Library
|
||||
** Copyright (C) 2008-2017, Nigel Stewart <nigels[]users sourceforge net>
|
||||
** Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
** Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
** Copyright (C) 2002, Lev Povalahev
|
||||
|
@ -27,6 +27,7 @@ VERSION_MICRO GLEW_VERSION_MICRO_STRING
|
||||
|
||||
/* API */
|
||||
GLEWAPI GLenum GLEWAPIENTRY glewInit (void);
|
||||
GLEWAPI GLenum GLEWAPIENTRY glewContextInit (void);
|
||||
GLEWAPI GLboolean GLEWAPIENTRY glewIsSupported (const char *name);
|
||||
#define glewIsExtensionSupported(x) glewIsSupported(x)
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
//
|
||||
// Version
|
||||
//
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION GLEW_MAJOR, GLEW_MINOR, GLEW_MICRO, 0
|
||||
PRODUCTVERSION GLEW_MAJOR, GLEW_MINOR, GLEW_MICRO, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
@ -28,8 +28,9 @@ BEGIN
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments",
|
||||
VALUE "Comments",
|
||||
"The OpenGL Extension Wrangler Library\r\n"
|
||||
"Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>\r\n"
|
||||
"Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>\r\n"
|
||||
"Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>\r\n"
|
||||
"Copyright (C) 2002, Lev Povalahev\r\n"
|
||||
@ -107,7 +108,7 @@ BEGIN
|
||||
VALUE "FileDescription", "Utility for verifying extension entry points\0"
|
||||
VALUE "FileVersion", "GLEW_MAJOR,GLEW_MINOR,GLEW_MICRO,0\0"
|
||||
VALUE "InternalName", "glewinfo\0"
|
||||
VALUE "LegalCopyright", "© 2002-2008 Milan Ikits & Marcelo Magallon\0"
|
||||
VALUE "LegalCopyright", "(C) 2002-2019 Nigel Stewart & Milan Ikits & Marcelo Magallon\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", FILENAME "\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
|
@ -40,6 +40,9 @@ struct createParams
|
||||
/* https://www.opengl.org/registry/specs/ARB/glx_create_context.txt */
|
||||
int profile; /* core = 1, compatibility = 2 */
|
||||
int flags; /* debug = 1, forward compatible = 2 */
|
||||
|
||||
/* GLEW experimental mode */
|
||||
int experimental;
|
||||
};
|
||||
|
||||
GLboolean glewCreateContext (struct createParams *params);
|
||||
@ -50,7 +53,7 @@ void glewDestroyContext ();
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
static void glewPrintExt (const char* name, GLboolean def1, GLboolean def2, GLboolean def3)
|
||||
static GLboolean glewPrintExt (const char* name, GLboolean def1, GLboolean def2, GLboolean def3)
|
||||
{
|
||||
unsigned int i;
|
||||
fprintf(f, "\n%s:", name);
|
||||
@ -65,15 +68,19 @@ static void glewPrintExt (const char* name, GLboolean def1, GLboolean def2, GLbo
|
||||
for (i=0; i<strlen(name)+1; i++) fprintf(f, "-");
|
||||
fprintf(f, "\n");
|
||||
fflush(f);
|
||||
return def1 || def2 || def3 || glewExperimental; /* Enable per-function info too? */
|
||||
}
|
||||
|
||||
static void glewInfoFunc (const char* name, GLint undefined)
|
||||
static void glewInfoFunc (GLboolean fi, const char* name, GLint undefined)
|
||||
{
|
||||
unsigned int i;
|
||||
fprintf(f, " %s:", name);
|
||||
for (i=0; i<60-strlen(name); i++) fprintf(f, " ");
|
||||
fprintf(f, "%s\n", undefined ? "MISSING" : "OK");
|
||||
fflush(f);
|
||||
if (fi)
|
||||
{
|
||||
fprintf(f, " %s:", name);
|
||||
for (i=0; i<60-strlen(name); i++) fprintf(f, " ");
|
||||
fprintf(f, "%s\n", undefined ? "MISSING" : "OK");
|
||||
fflush(f);
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------- GL_VERSION_1_1 ---------------------------- */
|
||||
|
@ -20,7 +20,8 @@ int main (int argc, char** argv)
|
||||
0, /* major */
|
||||
0, /* minor */
|
||||
0, /* profile mask */
|
||||
0 /* flags */
|
||||
0, /* flags */
|
||||
0 /* experimental */
|
||||
};
|
||||
|
||||
#if defined(GLEW_EGL)
|
||||
@ -41,7 +42,8 @@ int main (int argc, char** argv)
|
||||
#endif
|
||||
"[-version <OpenGL version>] "
|
||||
"[-profile core|compatibility] "
|
||||
"[-flag debug|forward]"
|
||||
"[-flag debug|forward] "
|
||||
"[-experimental]"
|
||||
"\n");
|
||||
return 1;
|
||||
}
|
||||
@ -52,7 +54,7 @@ int main (int argc, char** argv)
|
||||
glewDestroyContext();
|
||||
return 1;
|
||||
}
|
||||
glewExperimental = GL_TRUE;
|
||||
glewExperimental = params.experimental ? GL_TRUE : GL_FALSE;
|
||||
err = glewInit();
|
||||
if (GLEW_OK != err)
|
||||
{
|
||||
@ -127,7 +129,11 @@ GLboolean glewParseArgs (int argc, char** argv, struct createParams *params)
|
||||
if (!strcmp(argv[p], "-version"))
|
||||
{
|
||||
if (++p >= argc) return GL_TRUE;
|
||||
#if defined(__STDC_LIB_EXT1__) || (defined(_MSC_VER) && (_MSC_VER >= 1400))
|
||||
if (sscanf_s(argv[p++], "%d.%d", ¶ms->major, ¶ms->minor) != 2) return GL_TRUE;
|
||||
#else
|
||||
if (sscanf(argv[p++], "%d.%d", ¶ms->major, ¶ms->minor) != 2) return GL_TRUE;
|
||||
#endif
|
||||
}
|
||||
else if (!strcmp(argv[p], "-profile"))
|
||||
{
|
||||
@ -158,13 +164,18 @@ GLboolean glewParseArgs (int argc, char** argv, struct createParams *params)
|
||||
{
|
||||
if (++p >= argc) return GL_TRUE;
|
||||
params->display = argv[p++];
|
||||
}
|
||||
}
|
||||
else if (!strcmp(argv[p], "-visual"))
|
||||
{
|
||||
if (++p >= argc) return GL_TRUE;
|
||||
params->visual = (int)strtol(argv[p++], NULL, 0);
|
||||
}
|
||||
#endif
|
||||
else if (!strcmp(argv[p], "-experimental"))
|
||||
{
|
||||
params->experimental = 1;
|
||||
++p;
|
||||
}
|
||||
else
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
@ -19,7 +19,12 @@
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/Xmd.h>
|
||||
#include <GL/glew.h>
|
||||
|
||||
#ifndef GLEW_INCLUDE
|
||||
# include <GL/glew.h>
|
||||
#else
|
||||
# include GLEW_INCLUDE
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!-- begin header.html -->
|
||||
<!--
|
||||
The OpenGL Extension Wrangler Library
|
||||
Copyright (C) 2008-2015, Nigel Stewart <nigels[]users sourceforge net>
|
||||
Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>
|
||||
Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
|
||||
Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
Copyright (C) 2002, Lev Povalahev
|
||||
@ -46,7 +46,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
|
||||
<td valign="top">
|
||||
|
||||
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="left">
|
||||
<tr><td align="center"><i>Latest Release: <a href="https://sourceforge.net/projects/glew/files/glew/2.1.0/">2.1.0</a></i></td></tr>
|
||||
<tr><td align="center"><i>Latest Release: <a href="https://github.com/nigels-com/glew/releases/tag/glew-2.2.0">2.2.0</a></i></td></tr>
|
||||
<tr><td align="center"><br></td></tr>
|
||||
<tr><td align="center"><img src="./glew.png" alt="GLEW Logo" width="97" height="75"></td></tr>
|
||||
<tr><td align="center"><br></td></tr>
|
||||
@ -62,8 +62,6 @@ THE POSSIBILITY OF SUCH DAMAGE.
|
||||
<tr><td align="center"><a href="https://github.com/nigels-com/glew">GitHub</a></td></tr>
|
||||
<tr><td align="center"><a href="https://github.com/nigels-com/glew/issues">Issues</a></td></tr>
|
||||
<tr><td align="center"><a href="https://github.com/nigels-com/glew/pulls">Pull Requests</a></td></tr>
|
||||
<tr><td align="center"><a href="https://github.com/nigels-com/glew#authors">Authors</a></td></tr>
|
||||
<tr><td align="center"><a href="https://github.com/nigels-com/glew#copyright-and-licensing">Licensing</a></td></tr>
|
||||
<tr><td align="center"><br></tr>
|
||||
<tr><td align="center"><a href="https://sourceforge.net/projects/glew">SourceForge Page</a></td></tr>
|
||||
</table>
|
||||
@ -75,7 +73,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
<td valign="bottom">
|
||||
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="left">
|
||||
<tr><td align="center"><i>Last Update: 07-31-17</i></td></tr>
|
||||
<tr><td align="center"><i>Last Update: 03-15-20</i></td></tr>
|
||||
<tr><td align="center">
|
||||
<a href="http://www.opengl.org"><img src="./ogl_sm.jpg" width="68" height="35" border="0" alt="OpenGL Logo"></a><br/>
|
||||
<a href="https://github.com/nigels-com/glew"><img src="github.png" width="70" height="29" border="0" alt="GitHub Logo"></a><br/>
|
||||
|
@ -11,7 +11,7 @@
|
||||
//
|
||||
// Version
|
||||
//
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION GLEW_MAJOR, GLEW_MINOR, GLEW_MICRO, 0
|
||||
PRODUCTVERSION GLEW_MAJOR, GLEW_MINOR, GLEW_MICRO, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
@ -28,8 +28,9 @@ BEGIN
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments",
|
||||
VALUE "Comments",
|
||||
"The OpenGL Extension Wrangler Library\r\n"
|
||||
"Copyright (C) 2008-2019, Nigel Stewart <nigels[]users sourceforge net>\r\n"
|
||||
"Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>\r\n"
|
||||
"Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>\r\n"
|
||||
"Copyright (C) 2002, Lev Povalahev\r\n"
|
||||
@ -107,7 +108,7 @@ BEGIN
|
||||
VALUE "FileDescription", "Utility for listing pixelformat capabilities\0"
|
||||
VALUE "FileVersion", "GLEW_MAJOR,GLEW_MINOR,GLEW_MICRO,0\0"
|
||||
VALUE "InternalName", "visualinfo\0"
|
||||
VALUE "LegalCopyright", "© 2002-2008 Milan Ikits & Marcelo Magallon\0"
|
||||
VALUE "LegalCopyright", "(C) 2002-2019 Nigel Stewart & Milan Ikits & Marcelo Magallon\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", FILENAME "\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
|
22
azure-pipelines.yml
Normal file
22
azure-pipelines.yml
Normal file
@ -0,0 +1,22 @@
|
||||
schedules:
|
||||
- cron: "0 0 * * *"
|
||||
displayName: Daily midnight build
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
always: true
|
||||
|
||||
jobs:
|
||||
- job: NightlyUpdate
|
||||
pool:
|
||||
vmImage: 'ubuntu-latest'
|
||||
container: perlmint/glew-cmake:20190922
|
||||
steps:
|
||||
- checkout: self
|
||||
persistCredentials: true
|
||||
- bash: |
|
||||
export TEST_MODE=false
|
||||
git config --global user.email $GIT_USEREMAIL &&
|
||||
git config --global user.name $GIT_USERNAME &&
|
||||
unset SYSTEM # remove SYSTEM variable set by azure pipeline
|
||||
./glew-cmake/maintain.sh
|
@ -1,18 +1,12 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(glew LANGUAGES C)
|
||||
|
||||
if ( NOT DEFINED CMAKE_BUILD_TYPE )
|
||||
set( CMAKE_BUILD_TYPE Release CACHE STRING "Build type" )
|
||||
endif ()
|
||||
|
||||
project (glew)
|
||||
|
||||
cmake_minimum_required (VERSION 2.8.12)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if (COMMAND cmake_policy)
|
||||
cmake_policy (SET CMP0003 NEW)
|
||||
cmake_policy (SET CMP0042 NEW)
|
||||
endif()
|
||||
|
||||
set(CMAKE_DEBUG_POSTFIX d)
|
||||
|
||||
option (BUILD_UTILS "utilities" ON)
|
||||
@ -21,6 +15,9 @@ option (GLEW_OSMESA "OSMesa mode" OFF)
|
||||
if (APPLE)
|
||||
option (BUILD_FRAMEWORK "Build Framework bundle for OSX" OFF)
|
||||
endif ()
|
||||
option (GLEW_X11 "X11 mode" ON)
|
||||
option (GLEW_EGL "EGL mode" OFF)
|
||||
option (BUILD_SHARED_LIBS "install/link shared instead of static libs" ON)
|
||||
|
||||
set (GLEW_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
||||
|
||||
@ -33,16 +30,25 @@ file (STRINGS ${GLEW_DIR}/config/version _VERSION_PATCH_STRING REGEX "GLEW_MICR
|
||||
string (REGEX REPLACE "GLEW_MICRO[ ]*=[ ]*([0-9]+)" "\\1" CPACK_PACKAGE_VERSION_PATCH ${_VERSION_PATCH_STRING})
|
||||
set (GLEW_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
|
||||
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
if (NOT GLEW_CUSTOM_OUTPUT_DIRS)
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
endif()
|
||||
|
||||
find_package (OpenGL REQUIRED)
|
||||
|
||||
# X11 required when builing visualinfo and glewinfo,
|
||||
# but not for Windows or Apple OSX platforms
|
||||
if (BUILD_UTILS AND NOT WIN32 AND NOT APPLE)
|
||||
# prefer GLVND
|
||||
if (OPENGL_opengl_LIBRARY)
|
||||
set (GLEW_LIBRARIES ${OPENGL_opengl_LIBRARY})
|
||||
else ()
|
||||
set (GLEW_LIBRARIES ${OPENGL_gl_LIBRARY})
|
||||
endif ()
|
||||
|
||||
# X11 required except for Windows and Apple OSX platforms
|
||||
if (GLEW_X11 AND NOT WIN32 AND NOT APPLE)
|
||||
find_package (X11)
|
||||
list (APPEND GLEW_LIBRARIES ${OPENGL_glx_LIBRARY} ${X11_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
@ -52,8 +58,6 @@ else ()
|
||||
set (DLL_PREFIX lib)
|
||||
endif ()
|
||||
|
||||
set (GLEW_LIBRARIES ${OPENGL_LIBRARIES})
|
||||
|
||||
add_definitions (-DGLEW_NO_GLU)
|
||||
|
||||
#### Regal mode ####
|
||||
@ -77,15 +81,30 @@ if (GLEW_OSMESA)
|
||||
set (OSMESA_LIB_NAME OSMesa)
|
||||
endif ()
|
||||
add_definitions (-DGLEW_OSMESA)
|
||||
set (GLEW_LIBRARIES ${OSMESA_LIB_NAME} ${OPENGL_LIBRARIES})
|
||||
list (APPEND GLEW_LIBRARIES ${OSMESA_LIB_NAME})
|
||||
set (X11_LIBRARIES)
|
||||
endif ()
|
||||
|
||||
#### EGL ####
|
||||
|
||||
if (GLEW_EGL AND UNIX)
|
||||
add_definitions (-DGLEW_EGL)
|
||||
if (NOT OpenGL_EGL_FOUND)
|
||||
message (FATAL_ERROR "EGL library set but not found.")
|
||||
endif ()
|
||||
list (APPEND GLEW_LIBRARIES ${OPENGL_egl_LIBRARY})
|
||||
endif ()
|
||||
|
||||
#### GLEW ####
|
||||
|
||||
include_directories (${GLEW_DIR}/include)
|
||||
include_directories (${GLEW_DIR}/include ${X11_INCLUDE_DIR})
|
||||
|
||||
set (GLEW_PUBLIC_HEADERS_FILES ${GLEW_DIR}/include/GL/wglew.h ${GLEW_DIR}/include/GL/glew.h ${GLEW_DIR}/include/GL/glxew.h)
|
||||
set (GLEW_PUBLIC_HEADERS_FILES
|
||||
${GLEW_DIR}/include/GL/wglew.h
|
||||
${GLEW_DIR}/include/GL/glew.h
|
||||
${GLEW_DIR}/include/GL/glxew.h
|
||||
${GLEW_DIR}/include/GL/eglew.h
|
||||
)
|
||||
set (GLEW_SRC_FILES ${GLEW_DIR}/src/glew.c)
|
||||
|
||||
if (WIN32)
|
||||
@ -103,12 +122,16 @@ if (MSVC)
|
||||
# add options from visual studio project
|
||||
target_compile_definitions (glew PRIVATE "GLEW_BUILD;VC_EXTRALEAN")
|
||||
target_compile_definitions (glew_s PRIVATE "GLEW_STATIC;VC_EXTRALEAN")
|
||||
target_link_libraries (glew LINK_PRIVATE -BASE:0x62AA0000)
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i?86|x86|x86_32)$")
|
||||
target_link_libraries (glew LINK_PRIVATE -BASE:0x62AA0000)
|
||||
endif()
|
||||
# kill security checks which are dependent on stdlib
|
||||
target_compile_options (glew PRIVATE -GS-)
|
||||
target_compile_options (glew_s PRIVATE -GS-)
|
||||
# remove stdlib dependency
|
||||
target_link_libraries (glew LINK_PRIVATE -nodefaultlib -noentry)
|
||||
target_link_libraries (glew LINK_PRIVATE libvcruntime.lib)
|
||||
target_link_libraries (glew LINK_PRIVATE msvcrt.lib )
|
||||
string(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
|
||||
elseif (WIN32 AND ((CMAKE_C_COMPILER_ID MATCHES "GNU") OR (CMAKE_C_COMPILER_ID MATCHES "Clang")))
|
||||
# remove stdlib dependency on windows with GCC and Clang (for similar reasons
|
||||
@ -134,31 +157,24 @@ endif()
|
||||
target_link_libraries (glew LINK_PUBLIC ${GLEW_LIBRARIES})
|
||||
target_link_libraries (glew_s ${GLEW_LIBRARIES})
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 2.8.12)
|
||||
set(MAYBE_EXPORT "")
|
||||
else()
|
||||
target_compile_definitions(glew_s INTERFACE "GLEW_STATIC")
|
||||
foreach(t glew glew_s)
|
||||
target_include_directories(${t} PUBLIC $<INSTALL_INTERFACE:include>)
|
||||
endforeach()
|
||||
set(MAYBE_EXPORT EXPORT glew-targets)
|
||||
endif()
|
||||
target_compile_definitions(glew_s INTERFACE "GLEW_STATIC")
|
||||
foreach(t glew glew_s)
|
||||
target_include_directories(${t} PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
||||
endforeach()
|
||||
|
||||
set(targets_to_install "")
|
||||
if(NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
list(APPEND targets_to_install glew)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED BUILD_SHARED_LIBS OR NOT BUILD_SHARED_LIBS)
|
||||
else ()
|
||||
list(APPEND targets_to_install glew_s)
|
||||
endif()
|
||||
|
||||
install ( TARGETS ${targets_to_install}
|
||||
${MAYBE_EXPORT}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
FRAMEWORK DESTINATION ${CMAKE_INSTALL_PREFIX}
|
||||
EXPORT glew-targets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Runtime
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development
|
||||
FRAMEWORK DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT Runtime
|
||||
)
|
||||
|
||||
if (BUILD_UTILS)
|
||||
@ -167,7 +183,11 @@ if (BUILD_UTILS)
|
||||
list (APPEND GLEWINFO_SRC_FILES ${GLEW_DIR}/build/glewinfo.rc)
|
||||
endif ()
|
||||
add_executable (glewinfo ${GLEWINFO_SRC_FILES})
|
||||
target_link_libraries (glewinfo glew)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_link_libraries (glewinfo glew)
|
||||
else()
|
||||
target_link_libraries (glewinfo glew_s)
|
||||
endif()
|
||||
if (NOT WIN32)
|
||||
target_link_libraries(glewinfo ${X11_LIBRARIES})
|
||||
endif ()
|
||||
@ -177,13 +197,18 @@ if (BUILD_UTILS)
|
||||
list (APPEND VISUALINFO_SRC_FILES ${GLEW_DIR}/build/visualinfo.rc)
|
||||
endif ()
|
||||
add_executable (visualinfo ${VISUALINFO_SRC_FILES})
|
||||
target_link_libraries (visualinfo glew)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_link_libraries (visualinfo glew)
|
||||
else()
|
||||
target_link_libraries (visualinfo glew_s)
|
||||
endif()
|
||||
if (NOT WIN32)
|
||||
target_link_libraries(visualinfo ${X11_LIBRARIES})
|
||||
endif ()
|
||||
|
||||
install ( TARGETS glewinfo visualinfo
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
COMPONENT Runtime)
|
||||
endif ()
|
||||
|
||||
set (prefix ${CMAKE_INSTALL_PREFIX})
|
||||
@ -200,34 +225,35 @@ if (APPLE)
|
||||
set (requireslib)
|
||||
endif ()
|
||||
|
||||
configure_file (${GLEW_DIR}/glew.pc.in ${GLEW_DIR}/glew.pc @ONLY)
|
||||
configure_file (${GLEW_DIR}/glew.pc.in ${CMAKE_CURRENT_BINARY_DIR}/glew.pc @ONLY)
|
||||
|
||||
install(FILES ${GLEW_DIR}/glew.pc
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/glew.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
||||
COMPONENT Development
|
||||
)
|
||||
|
||||
if(WIN32 AND MSVC AND (NOT MSVC_VERSION LESS 1600) AND (NOT CMAKE_VERSION VERSION_LESS "3.1"))
|
||||
if(WIN32 AND MSVC AND (NOT MSVC_VERSION LESS 1600))
|
||||
install(
|
||||
FILES $<TARGET_PDB_FILE:glew>
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
CONFIGURATIONS Debug RelWithDebInfo
|
||||
COMPONENT Runtime
|
||||
)
|
||||
endif()
|
||||
|
||||
install (FILES
|
||||
${GLEW_DIR}/include/GL/wglew.h
|
||||
${GLEW_DIR}/include/GL/glew.h
|
||||
${GLEW_DIR}/include/GL/glxew.h
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/GL)
|
||||
install (
|
||||
FILES ${GLEW_PUBLIC_HEADERS_FILES}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/GL
|
||||
COMPONENT Development)
|
||||
|
||||
if(MAYBE_EXPORT)
|
||||
install(EXPORT glew-targets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glew
|
||||
NAMESPACE GLEW::)
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/glew-config.cmake
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CopyImportedTargetProperties.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glew)
|
||||
endif()
|
||||
install(EXPORT glew-targets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glew
|
||||
COMPONENT Development
|
||||
NAMESPACE GLEW::)
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/glew-config.cmake
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CopyImportedTargetProperties.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glew
|
||||
COMPONENT Development)
|
||||
|
||||
if(NOT TARGET uninstall)
|
||||
configure_file(
|
||||
|
@ -1,13 +1,13 @@
|
||||
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
|
||||
endif(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
|
||||
|
||||
if (NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
set (CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
|
||||
endif ()
|
||||
message(${CMAKE_INSTALL_PREFIX})
|
||||
|
||||
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
|
||||
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||
foreach(file ${files})
|
||||
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
|
||||
|
@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(glew-cmake-test)
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
project(glew-cmake-test LANGUAGES C)
|
||||
|
||||
find_package(GLEW REQUIRED CONFIG)
|
||||
find_package(GLEW REQUIRED CONFIG) # call twice to test multiple call
|
||||
@ -10,16 +10,10 @@ set_target_properties(cmake-test PROPERTIES DEBUG_POSTFIX _d)
|
||||
target_link_libraries(cmake-test PRIVATE GLEW::GLEW ${OPENGL_LIBRARIES})
|
||||
target_include_directories(cmake-test PRIVATE ${OPENGL_INCLUDE_DIR})
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.0)
|
||||
set(cgex $<CONFIGURATION>)
|
||||
else()
|
||||
set(cgex $<CONFIG>)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(cmake-test PRIVATE
|
||||
-DGLEW_CMAKE_TEST_CONFIG=${cgex}
|
||||
-DGLEW_CMAKE_TEST_CONFIG=$<CONFIG>
|
||||
-DGLEW_CMAKE_TEST_TARGET_FILE_NAME=$<TARGET_FILE_NAME:GLEW::GLEW>
|
||||
-DGLEW_CMAKE_TEST_TARGET_TYPE=$<TARGET_PROPERTY:GLEW::GLEW,TYPE>
|
||||
)
|
||||
|
||||
install(TARGETS cmake-test DESTINATION bin)
|
||||
install(TARGETS cmake-test DESTINATION bin COMPONENT Runtime)
|
||||
|
17
build/conan/.gitignore
vendored
17
build/conan/.gitignore
vendored
@ -1,17 +0,0 @@
|
||||
#Backup files
|
||||
*\~
|
||||
*swp
|
||||
|
||||
#OSX
|
||||
Thumbs.db
|
||||
.DS_Store
|
||||
|
||||
#Emacs buffers
|
||||
\#*\#
|
||||
\.#*
|
||||
|
||||
#Conan
|
||||
test_package/build
|
||||
conanfile.pyc
|
||||
conaninfo.txt
|
||||
conanbuildinfo.cmake
|
@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
if [[ "$(uname -s)" == 'Darwin' ]]; then
|
||||
brew update || brew update
|
||||
brew outdated pyenv || brew upgrade pyenv
|
||||
brew install pyenv-virtualenv
|
||||
brew install cmake || true
|
||||
|
||||
if which pyenv > /dev/null; then
|
||||
eval "$(pyenv init -)"
|
||||
fi
|
||||
|
||||
pyenv install 2.7.10
|
||||
pyenv virtualenv 2.7.10 conan
|
||||
pyenv rehash
|
||||
pyenv activate conan
|
||||
|
||||
fi
|
||||
|
||||
pip install conan_package_tools
|
||||
conan user
|
@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
if [[ "$(uname -s)" == 'Darwin' ]]; then
|
||||
if which pyenv > /dev/null; then
|
||||
eval "$(pyenv init -)"
|
||||
fi
|
||||
pyenv activate conan
|
||||
fi
|
||||
|
||||
python build.py
|
@ -1,18 +0,0 @@
|
||||
find_path(
|
||||
GLEW_INCLUDE_DIR
|
||||
NAMES
|
||||
GL
|
||||
PATHS
|
||||
include)
|
||||
|
||||
find_library(
|
||||
GLEW_LIBRARY
|
||||
NAMES
|
||||
GLEW GLEWd glew32 glew32s glew32d glew32sd
|
||||
PATHS
|
||||
lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_package_handle_standard_args(GLEW REQUIRED_VARS GLEW_LIBRARY GLEW_INCLUDE_DIR)
|
||||
|
@ -1,12 +0,0 @@
|
||||
from conan.packager import ConanMultiPackager
|
||||
import os, platform
|
||||
|
||||
if __name__ == "__main__":
|
||||
builder = ConanMultiPackager(args="--build missing")
|
||||
builder.add_common_builds()
|
||||
filtered_builds = []
|
||||
for settings, options, env_vars, build_requires in builder.builds:
|
||||
if not (settings["arch"] == "x86"):
|
||||
filtered_builds.append([settings, options, env_vars, build_requires])
|
||||
builder.builds = filtered_builds
|
||||
builder.run()
|
@ -1,143 +0,0 @@
|
||||
import os
|
||||
from conans import ConanFile, CMake
|
||||
from conans.tools import os_info, SystemPackageTool, ConanException
|
||||
from conans import tools, VisualStudioBuildEnvironment
|
||||
from conans.tools import build_sln_command, vcvars_command, replace_in_file, download, unzip
|
||||
|
||||
class GlewConan(ConanFile):
|
||||
name = "glew"
|
||||
version = "master"
|
||||
source_directory = "%s-%s" % (name, version) if version != "master" else "."
|
||||
description = "The GLEW library"
|
||||
generators = "cmake", "txt"
|
||||
settings = "os", "arch", "build_type", "compiler"
|
||||
options = {"shared": [True, False]}
|
||||
default_options = "shared=False"
|
||||
url="http://github.com/nigels-com/glew"
|
||||
license="https://github.com/nigels-com/glew#copyright-and-licensing"
|
||||
if version == "master":
|
||||
if os.path.isfile("Makefile"):
|
||||
exports_sources = "*"
|
||||
else:
|
||||
exports_sources = os.sep.join(["..", "..", "*"])
|
||||
else:
|
||||
exports = "FindGLEW.cmake"
|
||||
|
||||
def system_requirements(self):
|
||||
if os_info.is_linux:
|
||||
if os_info.with_apt:
|
||||
installer = SystemPackageTool()
|
||||
if self.version == "master":
|
||||
installer.install("build-essential")
|
||||
installer.install("libxmu-dev")
|
||||
installer.install("libxi-dev")
|
||||
installer.install("libgl-dev")
|
||||
installer.install("libosmesa-dev")
|
||||
installer.install("libglu1-mesa-dev")
|
||||
elif os_info.with_yum:
|
||||
installer = SystemPackageTool()
|
||||
if self.version == "master":
|
||||
installer.install("libXmu-devel")
|
||||
installer.install("libXi-devel")
|
||||
installer.install("libGL-devel")
|
||||
installer.install("mesa-libGLU-devel")
|
||||
else:
|
||||
self.output.warn("Could not determine Linux package manager, skipping system requirements installation.")
|
||||
|
||||
def configure(self):
|
||||
del self.settings.compiler.libcxx
|
||||
|
||||
def source(self):
|
||||
if self.version != "master":
|
||||
zip_name = "%s.tgz" % self.source_directory
|
||||
download("https://sourceforge.net/projects/glew/files/glew/%s/%s/download" % (self.version, zip_name), zip_name)
|
||||
unzip(zip_name)
|
||||
os.unlink(zip_name)
|
||||
|
||||
def build(self):
|
||||
if self.settings.os == "Windows" and self.version == "master":
|
||||
raise ConanException("Trunk builds are not supported on Windows (cannot build directly from master git repository).")
|
||||
|
||||
if self.settings.compiler == "Visual Studio":
|
||||
env = VisualStudioBuildEnvironment(self)
|
||||
with tools.environment_append(env.vars):
|
||||
version = min(12, int(self.settings.compiler.version.value))
|
||||
version = 10 if version == 11 else version
|
||||
cd_build = "cd %s\\%s\\build\\vc%s" % (self.conanfile_directory, self.source_directory, version)
|
||||
build_command = build_sln_command(self.settings, "glew.sln")
|
||||
vcvars = vcvars_command(self.settings)
|
||||
self.run("%s && %s && %s" % (vcvars, cd_build, build_command.replace("x86", "Win32")))
|
||||
else:
|
||||
if self.settings.os == "Windows":
|
||||
replace_in_file("%s/build/cmake/CMakeLists.txt" % self.source_directory, \
|
||||
"if(WIN32 AND (NOT MSVC_VERSION LESS 1600)", \
|
||||
"if(WIN32 AND MSVC AND (NOT MSVC_VERSION LESS 1600)")
|
||||
|
||||
if self.version == "master":
|
||||
self.run("make extensions")
|
||||
|
||||
cmake = CMake(self)
|
||||
cmake.configure(source_dir="%s/build/cmake" % self.source_directory, defs={"BUILD_UTILS": "OFF"})
|
||||
cmake.build()
|
||||
|
||||
def package(self):
|
||||
find_glew_dir = "%s/build/conan" % self.conanfile_directory if self.version == "master" else "."
|
||||
self.copy("FindGLEW.cmake", ".", find_glew_dir, keep_path=False)
|
||||
self.copy("include/*", ".", "%s" % self.source_directory, keep_path=True)
|
||||
self.copy("%s/license*" % self.source_directory, dst="licenses", ignore_case=True, keep_path=False)
|
||||
|
||||
if self.settings.os == "Windows":
|
||||
if self.settings.compiler == "Visual Studio":
|
||||
self.copy(pattern="*.pdb", dst="bin", keep_path=False)
|
||||
if self.options.shared:
|
||||
self.copy(pattern="*32.lib", dst="lib", keep_path=False)
|
||||
self.copy(pattern="*32d.lib", dst="lib", keep_path=False)
|
||||
self.copy(pattern="*.dll", dst="bin", keep_path=False)
|
||||
else:
|
||||
self.copy(pattern="*32s.lib", dst="lib", keep_path=False)
|
||||
self.copy(pattern="*32sd.lib", dst="lib", keep_path=False)
|
||||
else:
|
||||
if self.options.shared:
|
||||
self.copy(pattern="*32.dll.a", dst="lib", keep_path=False)
|
||||
self.copy(pattern="*32d.dll.a", dst="lib", keep_path=False)
|
||||
self.copy(pattern="*.dll", dst="bin", keep_path=False)
|
||||
else:
|
||||
self.copy(pattern="*32.a", dst="lib", keep_path=False)
|
||||
self.copy(pattern="*32d.a", dst="lib", keep_path=False)
|
||||
elif self.settings.os == "Macos":
|
||||
if self.options.shared:
|
||||
self.copy(pattern="*.dylib", dst="lib", keep_path=False)
|
||||
else:
|
||||
self.copy(pattern="*.a", dst="lib", keep_path=False)
|
||||
else:
|
||||
if self.options.shared:
|
||||
self.copy(pattern="*.so", dst="lib", keep_path=False)
|
||||
else:
|
||||
self.copy(pattern="*.a", dst="lib", keep_path=False)
|
||||
|
||||
def package_info(self):
|
||||
if self.settings.os == "Windows":
|
||||
self.cpp_info.libs = ['glew32']
|
||||
|
||||
if not self.options.shared:
|
||||
self.cpp_info.defines.append("GLEW_STATIC")
|
||||
|
||||
if self.settings.compiler == "Visual Studio":
|
||||
if not self.options.shared:
|
||||
self.cpp_info.libs[0] += "s"
|
||||
self.cpp_info.libs.append("OpenGL32.lib")
|
||||
if self.settings.compiler.runtime != "MT":
|
||||
self.cpp_info.exelinkflags.append('-NODEFAULTLIB:LIBCMTD')
|
||||
self.cpp_info.exelinkflags.append('-NODEFAULTLIB:LIBCMT')
|
||||
else:
|
||||
self.cpp_info.libs.append("opengl32")
|
||||
|
||||
else:
|
||||
self.cpp_info.libs = ['GLEW']
|
||||
if self.settings.os == "Macos":
|
||||
self.cpp_info.exelinkflags.append("-framework OpenGL")
|
||||
elif not self.options.shared:
|
||||
self.cpp_info.libs.append("GL")
|
||||
|
||||
if self.settings.build_type == "Debug":
|
||||
self.cpp_info.libs[0] += "d"
|
@ -1,9 +0,0 @@
|
||||
project(GlewTest)
|
||||
cmake_minimum_required(VERSION 3.0.0)
|
||||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||
conan_basic_setup()
|
||||
|
||||
add_executable(testGlew main.c)
|
||||
target_compile_definitions(testGlew PUBLIC "${CONAN_DEFINES}")
|
||||
target_link_libraries(testGlew PUBLIC "${CONAN_LIBS}")
|
||||
set_target_properties(testGlew PROPERTIES LINK_FLAGS "${CONAN_EXE_LINKER_FLAGS}")
|
@ -1,21 +0,0 @@
|
||||
from conans import ConanFile, CMake
|
||||
import os
|
||||
|
||||
class TestGlew(ConanFile):
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
generators = "cmake"
|
||||
|
||||
def build(self):
|
||||
cmake = CMake(self)
|
||||
self.run('cmake "%s" %s' % (self.conanfile_directory, cmake.command_line))
|
||||
self.run("cmake --build . %s" % cmake.build_config)
|
||||
|
||||
def test(self):
|
||||
self.run(os.sep.join([".","bin", "testGlew"]))
|
||||
|
||||
def imports(self):
|
||||
if self.settings.os == "Windows":
|
||||
self.copy(pattern="*.dll", dst="bin", src="bin")
|
||||
self.copy(pattern="*.pdb", dst="bin", src="bin")
|
||||
if self.settings.os == "Macos":
|
||||
self.copy(pattern="*.dylib", dst="bin", src="lib")
|
@ -1,6 +0,0 @@
|
||||
#include "GL/glew.h"
|
||||
|
||||
int main (){
|
||||
glewGetString(GLEW_VERSION);
|
||||
return 0;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user