mirror of
https://github.com/glfw/glfw.git
synced 2025-06-25 17:07:43 +00:00
Compare commits
2400 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e7ea71be03 | ||
|
cf4734ce8a | ||
|
21fea01161 | ||
|
a576a56a8d | ||
|
b850107a32 | ||
|
043378876a | ||
|
b35641f4a3 | ||
|
64906f8e64 | ||
|
51b6434ac4 | ||
|
dfebad786d | ||
|
97892c6037 | ||
|
8b574030a8 | ||
|
228e58262e | ||
|
3573c5a890 | ||
|
072f660d93 | ||
|
68dcea0d7f | ||
|
38ec7abd3b | ||
|
738dd6ff1d | ||
|
860c8ef38f | ||
|
42dc1ffaee | ||
|
bf945f1213 | ||
|
dc557ecf38 | ||
|
d24ee9953f | ||
|
7b6aead9fb | ||
|
e14e72a2e7 | ||
|
523d1d61ca | ||
|
4d9557aefe | ||
|
415df7e3ba | ||
|
fb9c23fbf2 | ||
|
d45cbc82c9 | ||
|
d7e7b164bc | ||
|
421dc66afb | ||
|
b864e4baeb | ||
|
f6f7ee2284 | ||
|
961e45bded | ||
|
e28397bda0 | ||
|
8f2f766f0d | ||
|
f6360eadee | ||
|
1fb7f0e120 | ||
|
0bb605cd79 | ||
|
559bd3adb9 | ||
|
65102e2005 | ||
|
dbf7cfc4dc | ||
|
42afd127a9 | ||
|
7bdcdf435a | ||
|
c8372cda08 | ||
|
1ce41b358b | ||
|
af5d250553 | ||
|
95d464bb4b | ||
|
bafece4cf7 | ||
|
64b4f0f30c | ||
|
a53ce7e8b8 | ||
|
f0ec791386 | ||
|
14e653358b | ||
|
690a15f929 | ||
|
b61f3fc479 | ||
|
a650c69cff | ||
|
2b3f919b60 | ||
|
a9cc7c7260 | ||
|
63397fb0d5 | ||
|
532bd66e7f | ||
|
244852a93a | ||
|
973a3c0b31 | ||
|
1a0bae7fa8 | ||
|
611099f745 | ||
|
3e73a5c76c | ||
|
e3e41ba339 | ||
|
fb10e95f78 | ||
|
d93868bcf3 | ||
|
275b92f887 | ||
|
6c1e3fd84c | ||
|
efffd492dd | ||
|
77ced84e9c | ||
|
8946f5314d | ||
|
2afd57bf9b | ||
|
a12311e596 | ||
|
bb951b4b71 | ||
|
5a0ab56ed7 | ||
|
30127690a2 | ||
|
6f1ddf51a1 | ||
|
6565c0cc04 | ||
|
edd38207a6 | ||
|
9953f7ead1 | ||
|
1be7bc546b | ||
|
4c283e4a3c | ||
|
e25c1cc74f | ||
|
72164e6921 | ||
|
a268b4b3a4 | ||
|
4baeadbd66 | ||
|
6ac0835ad2 | ||
|
ea6dd72c71 | ||
|
5e97447dd5 | ||
|
d3a7362430 | ||
|
1fe98a0d53 | ||
|
a360198f8f | ||
|
eeb403135d | ||
|
00e86d4b73 | ||
|
86d7bcb124 | ||
|
d7aeb1eae8 | ||
|
f74ff2aa10 | ||
|
c47894a9a3 | ||
|
42afff41fe | ||
|
23962c9dc7 | ||
|
ad264f5061 | ||
|
94310c5281 | ||
|
bdedec9932 | ||
|
9317970243 | ||
|
2590d4cdd4 | ||
|
51920ede68 | ||
|
291f4d89cd | ||
|
bc95384f4c | ||
|
becf1dc14b | ||
|
86bf5698ec | ||
|
7e2470d343 | ||
|
bbf661ca38 | ||
|
d81fcb93f1 | ||
|
c339dfc63d | ||
|
9afbcb442b | ||
|
d79afa8055 | ||
|
996826eec6 | ||
|
1de78b2ff9 | ||
|
7321b56cad | ||
|
c8521b7fda | ||
|
8e6c8d7eff | ||
|
ba796ec9c6 | ||
|
d107e497a9 | ||
|
d2058526cc | ||
|
cf29ff2b9d | ||
|
8ff8d67560 | ||
|
d2b88cf7ab | ||
|
200639712b | ||
|
507621977f | ||
|
29885c6942 | ||
|
2c3eb75748 | ||
|
73948e6c0f | ||
|
5a9ea8f99f | ||
|
4e8c4901e9 | ||
|
d9646631d6 | ||
|
6b39ab0074 | ||
|
40aa77a160 | ||
|
9f6da7e7c6 | ||
|
ab09dc8fb1 | ||
|
b4c3ef9d0f | ||
|
2c1d31009f | ||
|
ea3ea62708 | ||
|
eeeb56eb23 | ||
|
378e5fc814 | ||
|
7b152019da | ||
|
8e9a5d29a8 | ||
|
46cebb5081 | ||
|
68edc66aa4 | ||
|
ddd92a4fa8 | ||
|
5e4496cb42 | ||
|
0ede5f58c6 | ||
|
52405a9d59 | ||
|
9959dc69ca | ||
|
557a633b2d | ||
|
b1517e5b3e | ||
|
3f31519de8 | ||
|
1b2605dbcd | ||
|
93d70cb6a8 | ||
|
fa0ea5c41f | ||
|
8c5471d6cd | ||
|
fb94e4268b | ||
|
d097e35743 | ||
|
23e40548b1 | ||
|
9fdc425931 | ||
|
23ea072c41 | ||
|
659d161446 | ||
|
dbe810e403 | ||
|
afd22ebcf3 | ||
|
97820bc329 | ||
|
d9709904fe | ||
|
a87acd8c1f | ||
|
2a4dd9c28f | ||
|
c992226a9c | ||
|
0bd3e879e1 | ||
|
509f4131be | ||
|
01d7c331fd | ||
|
938a3c29b2 | ||
|
3ed6e9d89a | ||
|
9a80225ddf | ||
|
46c2e35c55 | ||
|
93a3ba8080 | ||
|
3eaf1255b2 | ||
|
6b48f2be97 | ||
|
00a663dafd | ||
|
3fa2360720 | ||
|
0b94e1b29b | ||
|
f27daa34ad | ||
|
6f2d7064be | ||
|
9cce2896ee | ||
|
23ab972724 | ||
|
fbdb53b9ca | ||
|
cd466cf9fd | ||
|
39f0e86228 | ||
|
efa9297a41 | ||
|
91c837ace5 | ||
|
6d9083af03 | ||
|
4cf510511c | ||
|
c1a79c1c41 | ||
|
8397b39afa | ||
|
735fc101f5 | ||
|
228428fa4f | ||
|
82e77dbff4 | ||
|
9a87635686 | ||
|
2b580012da | ||
|
5c463a9070 | ||
|
9b1f63bad9 | ||
|
1c9fcdc9df | ||
|
30b91c8b60 | ||
|
e0ae1c45df | ||
|
8f470597d6 | ||
|
57cbded076 | ||
|
41d8da1cea | ||
|
00967cbb8a | ||
|
dd8a678a66 | ||
|
97b9e49637 | ||
|
b2b087cd8e | ||
|
d299d9f788 | ||
|
ed1d9e1ca7 | ||
|
ab3ea8ac9f | ||
|
c812b9d87c | ||
|
8a72918bcd | ||
|
ab1b1edfd0 | ||
|
93e93135f2 | ||
|
e057666642 | ||
|
6b57e08bb0 | ||
|
2c0f34b60f | ||
|
ef6c9d8b4f | ||
|
c18851f52e | ||
|
55aad3c37b | ||
|
0f9a9578f3 | ||
|
7d73629e50 | ||
|
2efc598d70 | ||
|
2e12ef00bb | ||
|
3a60992a41 | ||
|
3a5c726d1b | ||
|
7be6a2cabe | ||
|
488008e0a2 | ||
|
a46f829de8 | ||
|
03af6b3d4c | ||
|
09ebf3f0bf | ||
|
e85b645b8a | ||
|
b9ed25d2e9 | ||
|
26b85215c0 | ||
|
6987294df9 | ||
|
71be34a6c3 | ||
|
7cc8b053b8 | ||
|
91a96ed434 | ||
|
c424fe5589 | ||
|
c50d53160f | ||
|
40b5a8a37c | ||
|
9180923ea0 | ||
|
a1a73ee862 | ||
|
e47cb7c1e2 | ||
|
4df24735ef | ||
|
d77aaa770f | ||
|
aa80d24d01 | ||
|
fd7e737216 | ||
|
6dd526fb1a | ||
|
2796e61af7 | ||
|
88a39006e3 | ||
|
5c948a6e6e | ||
|
8e725338bf | ||
|
060631c965 | ||
|
36f0bf00a9 | ||
|
84e165ef64 | ||
|
2db528d8cd | ||
|
78b19548d9 | ||
|
dfb26023fc | ||
|
9b7713cf92 | ||
|
3b3d58df47 | ||
|
510a08cde2 | ||
|
0d599026d0 | ||
|
6f8ec4075b | ||
|
98d6e8485b | ||
|
da6713cd09 | ||
|
d578c2ddfe | ||
|
74b4ceb835 | ||
|
c4fbe80d90 | ||
|
be7f4513c0 | ||
|
47193f15de | ||
|
80dc0533cf | ||
|
29b7669bc6 | ||
|
f35e2274cb | ||
|
3203599cac | ||
|
2df0ce07fa | ||
|
83a134a92f | ||
|
eb9c3bee71 | ||
|
0cd1916de3 | ||
|
77819c0c54 | ||
|
e52046955d | ||
|
55fcfb1bb6 | ||
|
203002ef2c | ||
|
85f5a51912 | ||
|
9ad9f5c52a | ||
|
5002522f73 | ||
|
91f18fb576 | ||
|
e37ba80b13 | ||
|
c3ad3d49ed | ||
|
209f6cf093 | ||
|
33d37782c6 | ||
|
229d628ec4 | ||
|
c28d420060 | ||
|
18df0baea6 | ||
|
a7b6f35500 | ||
|
0f5b095042 | ||
|
24cdc5afda | ||
|
75295f4878 | ||
|
040712ce99 | ||
|
2877fea550 | ||
|
e33db6d7aa | ||
|
afb127769a | ||
|
ed39ff43f9 | ||
|
98c9961f32 | ||
|
3bbb41eacc | ||
|
0b76e3a6f1 | ||
|
6857995498 | ||
|
fdc72edf81 | ||
|
f39ffefb6a | ||
|
ddd087d662 | ||
|
523fdf50c1 | ||
|
d3ede7b684 | ||
|
a465c1c32e | ||
|
2ae3e0c8d7 | ||
|
ad3dbeb65f | ||
|
05f6c13d11 | ||
|
edec334b32 | ||
|
26920a1a38 | ||
|
736a88b067 | ||
|
2c204ab52e | ||
|
e9c58bc181 | ||
|
62e175ef9f | ||
|
ce85c7dcaf | ||
|
5c3ebfb9cc | ||
|
7dfd84c458 | ||
|
685de9089f | ||
|
09653b8c54 | ||
|
72642ea0d1 | ||
|
8f050b5655 | ||
|
acf0c10e7a | ||
|
80e31ce9e1 | ||
|
d3c2121221 | ||
|
23e6e8e4b7 | ||
|
f60547ac80 | ||
|
06089a91a6 | ||
|
82ccbb3ef0 | ||
|
a8d8b760fb | ||
|
2d281d7928 | ||
|
89514cf0fc | ||
|
10e9033a29 | ||
|
29523dbfbf | ||
|
f843d53333 | ||
|
4cb36872a5 | ||
|
0f38382e25 | ||
|
f010335b8c | ||
|
b7a3af9b79 | ||
|
967282c2e6 | ||
|
8d216054ad | ||
|
34418951cc | ||
|
ad4a9e42f0 | ||
|
e0889736fd | ||
|
c132135332 | ||
|
4651165272 | ||
|
8d87be1268 | ||
|
89d3ea8d69 | ||
|
990dc4b388 | ||
|
a4460b694e | ||
|
4506175023 | ||
|
ba11e60859 | ||
|
2d45681bc3 | ||
|
4c110bba41 | ||
|
738b1c73b5 | ||
|
b386371f57 | ||
|
9c95cfb9f1 | ||
|
920d110b6c | ||
|
554cbdb205 | ||
|
955fbd9d26 | ||
|
07a5518c3e | ||
|
66a4882eb1 | ||
|
8d9231fe5e | ||
|
03cfe957e7 | ||
|
add0521efb | ||
|
535c3ce632 | ||
|
3ee5031fd7 | ||
|
9cc252a406 | ||
|
46950a5e61 | ||
|
1461c59aa2 | ||
|
b54fb0af10 | ||
|
8f9ff8503e | ||
|
aa803f7de5 | ||
|
34573798f4 | ||
|
8ff9ed92b4 | ||
|
723f3eb40d | ||
|
1eef3a363e | ||
|
367d06deaf | ||
|
a730acf8e5 | ||
|
adc202d2c3 | ||
|
d78b0a4ead | ||
|
1e0c3bca7f | ||
|
71742d9a27 | ||
|
a32cbf6d4f | ||
|
7ce1f3e1cf | ||
|
bb9d699ae6 | ||
|
203a7c59d2 | ||
|
3c2913dcb9 | ||
|
84b0923fe6 | ||
|
cd22e28495 | ||
|
363d471441 | ||
|
87970b7f26 | ||
|
1e987cb92e | ||
|
92b5c67b50 | ||
|
d3e4fcf8b7 | ||
|
ad01c1b614 | ||
|
789d2924c0 | ||
|
2e656afc49 | ||
|
20adc18aa5 | ||
|
152f50cd01 | ||
|
4a68926bfd | ||
|
a28adba06a | ||
|
97da62a027 | ||
|
e023618daa | ||
|
7f6aa587f8 | ||
|
df8d7bc892 | ||
|
0ce611958e | ||
|
1a7da42e6e | ||
|
bf99587005 | ||
|
293d19a153 | ||
|
b70259e52d | ||
|
fe7be39793 | ||
|
17a9e34fbc | ||
|
cb22c54119 | ||
|
37b7540db9 | ||
|
715b874db3 | ||
|
8aaea57421 | ||
|
25c521cbe5 | ||
|
c05acf6246 | ||
|
12c2ccd609 | ||
|
216ea3d735 | ||
|
c1ecd4673e | ||
|
7bede13b1d | ||
|
a3d1633e1d | ||
|
3f5dfeaf29 | ||
|
850893a39f | ||
|
79e7e65c9d | ||
|
855d338a65 | ||
|
8edbc4971d | ||
|
05b0e2fab2 | ||
|
7d060ba4f1 | ||
|
f8ef3ca719 | ||
|
094aa6d3c7 | ||
|
e24fe4b189 | ||
|
c2f0a0ae59 | ||
|
6281f498c8 | ||
|
68879081cb | ||
|
963e728881 | ||
|
900848ad0c | ||
|
cd01187b9d | ||
|
c19f36b28d | ||
|
53d86c64d7 | ||
|
fbfd7e65c8 | ||
|
d1efa32983 | ||
|
79de08db06 | ||
|
e40fa3bb94 | ||
|
9cd4d2fa20 | ||
|
37fc28bff6 | ||
|
706d1f1653 | ||
|
b3a98f8555 | ||
|
eacc1cafba | ||
|
a30cd6acef | ||
|
bb193325cc | ||
|
b55a517ae0 | ||
|
544790666b | ||
|
fb0f2f92a3 | ||
|
83d3fb08ec | ||
|
999962bd2f | ||
|
f75c251dec | ||
|
575d2971d4 | ||
|
2a78a2cf82 | ||
|
76a5f781db | ||
|
393eac458b | ||
|
db91507956 | ||
|
ee6ff939a5 | ||
|
68534cc2ce | ||
|
4005f70eef | ||
|
53d7622a3a | ||
|
41ebcf1eed | ||
|
0fe96ec202 | ||
|
3d52f7e345 | ||
|
f4d0365a5a | ||
|
309d79376f | ||
|
6efaaec9ce | ||
|
38dd515524 | ||
|
727db55c3a | ||
|
56a4cb0a3a | ||
|
ff9d9515f6 | ||
|
36ea36736d | ||
|
09f9773e6f | ||
|
bdfe6b09af | ||
|
b6834bf2a1 | ||
|
35f3b58c21 | ||
|
f5758d75d0 | ||
|
b7d0c6037d | ||
|
e31deedc99 | ||
|
6d51b39106 | ||
|
d0776e04a3 | ||
|
8b8d10bc01 | ||
|
0a9488e3f0 | ||
|
efe764b492 | ||
|
983c44b255 | ||
|
cca9008db2 | ||
|
0391b7b277 | ||
|
1d8d1ff3d0 | ||
|
4be0444ee6 | ||
|
6a20053102 | ||
|
7614d088e9 | ||
|
6ed5294223 | ||
|
157ebb80aa | ||
|
e7758c506d | ||
|
4cbe743b74 | ||
|
216d5e8402 | ||
|
63da04e5ce | ||
|
8e23579842 | ||
|
150744ecca | ||
|
8c8def5de5 | ||
|
4f077c4133 | ||
|
7c25dff002 | ||
|
daed5edd6e | ||
|
d7b7c3b12a | ||
|
62074f3dea | ||
|
518e26e16e | ||
|
22b586b3d8 | ||
|
4e557437f2 | ||
|
2ac7e20aaf | ||
|
85348c67cd | ||
|
071d7c0f46 | ||
|
71829a0f0d | ||
|
244948e174 | ||
|
d83849792b | ||
|
dffe203c17 | ||
|
87d5646f5d | ||
|
9a0e88a016 | ||
|
aff00d0dd8 | ||
|
111c02d74e | ||
|
58b48a3a00 | ||
|
201400b974 | ||
|
afa78b4270 | ||
|
0c90e1a33f | ||
|
01778329ec | ||
|
56092814f3 | ||
|
3dc7349c35 | ||
|
9e1ee3f263 | ||
|
ab34cc51c6 | ||
|
1d88a2e3d6 | ||
|
076bfd55be | ||
|
836e709503 | ||
|
3b95970482 | ||
|
b6f7ead3c5 | ||
|
1a5e07fd4b | ||
|
f010d8b77d | ||
|
6876cf8d7e | ||
|
52d8347d34 | ||
|
a89fcd20d8 | ||
|
5b73fc8b80 | ||
|
6f7c61c6b3 | ||
|
15e05adf67 | ||
|
787295b3af | ||
|
78380c7761 | ||
|
3b13228650 | ||
|
4e788fc6dc | ||
|
5a6001a83b | ||
|
df15a33e10 | ||
|
114776a246 | ||
|
fd79b02840 | ||
|
184377b493 | ||
|
04f21abb52 | ||
|
da236ba807 | ||
|
a39115a27b | ||
|
bbbbd3e870 | ||
|
e17ffcd0db | ||
|
9a3a8bc267 | ||
|
a646f51bca | ||
|
0e9ec7788b | ||
|
e3f916808d | ||
|
061a0263a9 | ||
|
85bce8a8ea | ||
|
ec621a00bd | ||
|
330f7da746 | ||
|
0beadfdc66 | ||
|
4c90e21e8f | ||
|
f90df24244 | ||
|
a25e8eb50d | ||
|
84f95a7d7f | ||
|
f4a7329604 | ||
|
9416a43404 | ||
|
33cd8b865d | ||
|
291f6dc32c | ||
|
52ba8c7f07 | ||
|
17ae300d96 | ||
|
9c62a21ba9 | ||
|
1f34295a74 | ||
|
4afa227a05 | ||
|
2c7f3ce91b | ||
|
b925a54ef1 | ||
|
729c9988d0 | ||
|
410890aa80 | ||
|
6de084000b | ||
|
9477311130 | ||
|
384ff74a46 | ||
|
f8d6801a50 | ||
|
3959ee8949 | ||
|
8ab40399d3 | ||
|
2bc52ca82e | ||
|
5aff72aa00 | ||
|
8b11867464 | ||
|
552209fe46 | ||
|
f5af421a6b | ||
|
5d1d1a01e3 | ||
|
3a8ebb1903 | ||
|
6ce6b50787 | ||
|
761f97d6b6 | ||
|
0b9e48fa3d | ||
|
1adfbde4d7 | ||
|
08e5a17063 | ||
|
7e8da57094 | ||
|
0dc1005c85 | ||
|
3327050ca6 | ||
|
5c928ff452 | ||
|
2f76f70c76 | ||
|
420b165bff | ||
|
a62a6c5019 | ||
|
d5f32dfb3b | ||
|
a6f8cc9d44 | ||
|
af8f9713dd | ||
|
0bccc3852b | ||
|
ac627706ef | ||
|
6b78419c9a | ||
|
9b140d08d7 | ||
|
35f3508ecd | ||
|
c940695eb0 | ||
|
0ef149c8f2 | ||
|
a506a8dc73 | ||
|
8d47dc5894 | ||
|
48aa567d0c | ||
|
53b1396a09 | ||
|
60e7364b30 | ||
|
166611cef5 | ||
|
0b2660f39f | ||
|
40d150c399 | ||
|
8aaf072842 | ||
|
2e6fb7fe22 | ||
|
2747e47393 | ||
|
1353f37a51 | ||
|
539535a367 | ||
|
73ef5f0abb | ||
|
58df92acad | ||
|
96f9f5c4b9 | ||
|
1ed1489831 | ||
|
bb1d917c2f | ||
|
59196f9ad8 | ||
|
9d7897f961 | ||
|
b3a79103a6 | ||
|
b9dfce0070 | ||
|
7765451d0f | ||
|
cd0dc76c7c | ||
|
da26eefc61 | ||
|
b488c3f87f | ||
|
05dd2fa298 | ||
|
a2674a9034 | ||
|
0cc13ceafc | ||
|
c01acc267a | ||
|
e0f7ce402b | ||
|
f771d41292 | ||
|
782e6b6cef | ||
|
f760b124ca | ||
|
5f60c22cfa | ||
|
5c92cd9f52 | ||
|
686e18fd72 | ||
|
3207fc7120 | ||
|
74b9f309a9 | ||
|
a122d91303 | ||
|
dfeacee000 | ||
|
1095a43708 | ||
|
6d2003d07a | ||
|
7da3e52c86 | ||
|
68e4261d73 | ||
|
e81d381256 | ||
|
d285a9fdeb | ||
|
6c031af245 | ||
|
49dbcfcb8c | ||
|
ceb20c7f97 | ||
|
4ae93e0547 | ||
|
9a3664b4a9 | ||
|
6ce2070392 | ||
|
e47832ffcf | ||
|
ad9eb768c9 | ||
|
854ce1db4e | ||
|
f5f060e6bf | ||
|
0dea8a4441 | ||
|
e6a6a99813 | ||
|
1cecb8beb0 | ||
|
36f8250321 | ||
|
b420ca7404 | ||
|
4e3b43383a | ||
|
8a69a0d7e5 | ||
|
2539d03747 | ||
|
bcb8558189 | ||
|
aec9fae8f3 | ||
|
d7f7b0e1b5 | ||
|
b66f105f3e | ||
|
bf1c62b261 | ||
|
3a3c32c6b1 | ||
|
81f475bccb | ||
|
c1f60ab5dc | ||
|
e47705d8fb | ||
|
8369880b56 | ||
|
cfc23cd087 | ||
|
69ff0b8ee0 | ||
|
e0c77f71f9 | ||
|
c72da994ba | ||
|
399c2a1fad | ||
|
9a87c2a4b4 | ||
|
fbf8aae44f | ||
|
7486e12f88 | ||
|
105cf32e0b | ||
|
a84a30ab63 | ||
|
250b94cd03 | ||
|
d4f5074535 | ||
|
91eebe922d | ||
|
51a465ee2b | ||
|
5f9dfe3d83 | ||
|
27295b508f | ||
|
ef5220d6b1 | ||
|
a17a1b2011 | ||
|
e07925c404 | ||
|
cf3a03a85d | ||
|
0c403c8ca6 | ||
|
844bc8031c | ||
|
67c720d117 | ||
|
d7ae90a790 | ||
|
41a19ed49c | ||
|
949275bbed | ||
|
cab41529da | ||
|
318e08d914 | ||
|
560304e0f4 | ||
|
9ecacf1d7f | ||
|
ee45b58647 | ||
|
215a05af3d | ||
|
a41a58a95e | ||
|
e65de2941c | ||
|
2c8e0512dd | ||
|
44b5d06583 | ||
|
350ba73267 | ||
|
9516df52a4 | ||
|
72366ac9a9 | ||
|
6aca3e99f0 | ||
|
4381b86b6b | ||
|
27d19d06ca | ||
|
4b8ac11aa3 | ||
|
a0a5cc57df | ||
|
0c27ed1d0e | ||
|
d1ae7bac60 | ||
|
40c7e471e3 | ||
|
76406c7894 | ||
|
d973acc123 | ||
|
46c7c1cdff | ||
|
13479ed27d | ||
|
a5e5b782c7 | ||
|
65cfe743af | ||
|
d862d56acb | ||
|
190673e779 | ||
|
789a2bcb39 | ||
|
5f1631cb0e | ||
|
a491b0698c | ||
|
562c17d131 | ||
|
7da87aaae7 | ||
|
15d91801b7 | ||
|
c5cb4a253a | ||
|
9372ba95fa | ||
|
aa5e313561 | ||
|
fe57e3c292 | ||
|
6b01affd89 | ||
|
bf292f0083 | ||
|
781fbbadb0 | ||
|
5dd207048c | ||
|
a3d28ef52c | ||
|
8149a5fc00 | ||
|
74a46dfa0c | ||
|
4ec7daf3e9 | ||
|
c3ca88055f | ||
|
54e8e0b092 | ||
|
b4a8eb9b19 | ||
|
28773a069e | ||
|
73a8ebb691 | ||
|
4e70c95aa3 | ||
|
9db156421f | ||
|
0b652a44d2 | ||
|
9b6d68ec70 | ||
|
4837b78ffe | ||
|
bc3be40f21 | ||
|
da3f20d860 | ||
|
fb0028c766 | ||
|
994c3b4e48 | ||
|
18307467b4 | ||
|
49c5d837b4 | ||
|
8a5fd0c5a4 | ||
|
a5ed740d9d | ||
|
a264d32987 | ||
|
081484ed34 | ||
|
506a6aafde | ||
|
a875a536b7 | ||
|
2551829f75 | ||
|
7e03bce138 | ||
|
ac30ef3e0c | ||
|
a43f545677 | ||
|
59055d585f | ||
|
8a1f4940fc | ||
|
5f4a6f689a | ||
|
c016b26852 | ||
|
db76abb63c | ||
|
c194193797 | ||
|
9dc365f192 | ||
|
c81def70be | ||
|
197193ac0b | ||
|
135d87aa3c | ||
|
2fb336268f | ||
|
9486ec0c02 | ||
|
dff6253ca7 | ||
|
bc7b19cbd1 | ||
|
ce9d124243 | ||
|
f6d44cedfd | ||
|
d74c18117d | ||
|
92c70b2a83 | ||
|
7dd14a4b20 | ||
|
fa60269245 | ||
|
6e6805000a | ||
|
b3544ca43e | ||
|
382943f2b0 | ||
|
ef6189f348 | ||
|
7dbdd2e6a5 | ||
|
80fde12fda | ||
|
a80788c17f | ||
|
a9f674e719 | ||
|
b5d4f24f74 | ||
|
d861d7bffe | ||
|
c42d8f3e5b | ||
|
50a6270e55 | ||
|
b804379463 | ||
|
359758bb53 | ||
|
e96dc5d219 | ||
|
2c519709be | ||
|
bd452016be | ||
|
bac15f9449 | ||
|
c819f27ce3 | ||
|
94cb0347ab | ||
|
953a1c3f8b | ||
|
70a3104c49 | ||
|
bc5523e994 | ||
|
8e288dc94c | ||
|
de23429455 | ||
|
08f01c31a0 | ||
|
20e522cdf4 | ||
|
c5f1ca3e41 | ||
|
b69fb99031 | ||
|
c88ee1c9d3 | ||
|
28d8507700 | ||
|
75294462b3 | ||
|
5fc4c01302 | ||
|
33683ec60e | ||
|
04f7f55f07 | ||
|
4d0ae4ffa7 | ||
|
82978bb3af | ||
|
376897a344 | ||
|
36c547875c | ||
|
692754a2c5 | ||
|
3a37a08998 | ||
|
7749aac50d | ||
|
1e20218b3d | ||
|
545f409592 | ||
|
8f852e0833 | ||
|
f71b55f83d | ||
|
d25248343e | ||
|
1bd0a55aa7 | ||
|
3d2540c373 | ||
|
3ec8f4a7f5 | ||
|
243b1bc292 | ||
|
7105ff2dfd | ||
|
7f02898264 | ||
|
aa8e8ab960 | ||
|
26aac53e1d | ||
|
2777f6a754 | ||
|
cbf23e5615 | ||
|
56ca0cb3b3 | ||
|
4cc5d2e623 | ||
|
f764836e58 | ||
|
2c7ef5b480 | ||
|
711b9694a1 | ||
|
efda4afb49 | ||
|
65748fb8f3 | ||
|
6abad2efd2 | ||
|
eecf83c5d0 | ||
|
2e039d9275 | ||
|
b430bc4935 | ||
|
062a1c22b5 | ||
|
a4d910b4a7 | ||
|
4f0b8b0dda | ||
|
7bd0af3089 | ||
|
84b13113ed | ||
|
62b7fe8311 | ||
|
773f4495f0 | ||
|
5bea122211 | ||
|
d232bcfcdd | ||
|
36f90800d8 | ||
|
c6b95e3b07 | ||
|
e463e85bba | ||
|
3a5e99e59a | ||
|
3262c29440 | ||
|
1d62157268 | ||
|
1f508530f0 | ||
|
fad9896d38 | ||
|
0c6b505619 | ||
|
2db3b9688d | ||
|
d834f01ca4 | ||
|
537ea4ccf1 | ||
|
51bb76c7c3 | ||
|
71e6ff386d | ||
|
98dde03ce1 | ||
|
e1d9e2ba73 | ||
|
84ec99bb01 | ||
|
d0c3fa900a | ||
|
267e06a41e | ||
|
bb6945a18a | ||
|
22a6c02a4c | ||
|
3fd4e79adb | ||
|
56aad76b16 | ||
|
feaa532886 | ||
|
e91d0fc499 | ||
|
3cf7645b96 | ||
|
e4aba7feaa | ||
|
a639d6e635 | ||
|
d44bfe0264 | ||
|
f61d0916fd | ||
|
c415c71947 | ||
|
144c98bcb3 | ||
|
fa025d8f80 | ||
|
700d1f28d8 | ||
|
0b01d850ed | ||
|
57bf6b2f75 | ||
|
ceb16cb5f1 | ||
|
0ccb690853 | ||
|
535491c4f3 | ||
|
7dc36dd7da | ||
|
c0eabc594f | ||
|
8ee589e43b | ||
|
cd290f767f | ||
|
a255e7ace6 | ||
|
5c5963f1c0 | ||
|
090b16bfae | ||
|
42a3e4434f | ||
|
15af302f77 | ||
|
be71147ad5 | ||
|
ff7d42a55e | ||
|
599fb3de34 | ||
|
a337c56848 | ||
|
b079610962 | ||
|
186e9372d5 | ||
|
ab118b2529 | ||
|
1f91697cd3 | ||
|
334a485968 | ||
|
0e74265426 | ||
|
3c3981a4f0 | ||
|
d0b7f539e2 | ||
|
62d296992e | ||
|
5f4e66b21a | ||
|
f03614277d | ||
|
45a62adf82 | ||
|
718609275d | ||
|
28f118f4de | ||
|
224e9205e0 | ||
|
bd23be2594 | ||
|
93962ec168 | ||
|
f4f1002d14 | ||
|
d7e30b1c74 | ||
|
3461d1c2a5 | ||
|
0fa77ea63a | ||
|
c585bf010b | ||
|
0267cebe00 | ||
|
f8a70aca67 | ||
|
422bf79e8f | ||
|
5644b66bac | ||
|
6e382c9b7f | ||
|
87458617e0 | ||
|
297999c9e1 | ||
|
b702577cd2 | ||
|
1857fc2272 | ||
|
a507872051 | ||
|
c0a3a9aefe | ||
|
5292914ce1 | ||
|
8d4fd40b64 | ||
|
02874d9c14 | ||
|
0d355379e0 | ||
|
c32dc3a085 | ||
|
cad22cb2f6 | ||
|
1fca33b3c1 | ||
|
9420e6f0d0 | ||
|
980fc9b52f | ||
|
e108c0de0d | ||
|
9e54b97cfa | ||
|
056c5d3f90 | ||
|
a4fbc6fe91 | ||
|
8055dad7e4 | ||
|
8d7e5cdb49 | ||
|
f8bcc7e65c | ||
|
ba761ab06e | ||
|
d0e8d06d95 | ||
|
3615d437a7 | ||
|
82ca58da04 | ||
|
4e3204d86d | ||
|
9883cb64f0 | ||
|
4b20fb705b | ||
|
a43d1a4937 | ||
|
3a2a97f15d | ||
|
4f14c1e776 | ||
|
d82e7b5cb1 | ||
|
0118743333 | ||
|
a726942bfe | ||
|
68fd4e8bb3 | ||
|
ba4e78e57f | ||
|
222ac78a44 | ||
|
bea4818030 | ||
|
f1d40fa046 | ||
|
6907629cbf | ||
|
e6d22346f9 | ||
|
154db76a6c | ||
|
3fd70cc513 | ||
|
f7733c7b4f | ||
|
5c752355cb | ||
|
c733ab0a22 | ||
|
be295ccbea | ||
|
c20754c4a6 | ||
|
621ece63c8 | ||
|
2fbb560eb7 | ||
|
7c3aaf8065 | ||
|
44af6bb936 | ||
|
1155c83013 | ||
|
9e29f556fd | ||
|
5f9cbd0ebc | ||
|
ec3784f3d7 | ||
|
782f7fe0c7 | ||
|
bcd8f9aff2 | ||
|
45bd991ea9 | ||
|
edf0a07174 | ||
|
36ce73bbfd | ||
|
1d95acdf56 | ||
|
2e70950c0f | ||
|
2a27eb95e4 | ||
|
e2fa82ffbb | ||
|
cf79f06257 | ||
|
90e22947c6 | ||
|
463ef7eb71 | ||
|
51ca41dd9f | ||
|
530b37f4db | ||
|
78e6a0063d | ||
|
7f4dde15e4 | ||
|
b41cd34143 | ||
|
d5ab3e919a | ||
|
a46104ee69 | ||
|
757cd3aea2 | ||
|
29d8ca4ce4 | ||
|
3d748cf530 | ||
|
babafc13db | ||
|
9b0c16596c | ||
|
2053f3ed22 | ||
|
55b1a16f90 | ||
|
ea7eb2ddab | ||
|
9a9568212c | ||
|
72c3908e14 | ||
|
cde0aaaab1 | ||
|
c90c7b9710 | ||
|
1635fe2826 | ||
|
9ac9d7b85a | ||
|
e29882523e | ||
|
3531c320af | ||
|
52c7a4fc7f | ||
|
3201eedc34 | ||
|
a533c9b3ca | ||
|
064dfaa549 | ||
|
751c6f9a27 | ||
|
8c611fd5d0 | ||
|
8e313d911b | ||
|
3b255af4c3 | ||
|
a59315ed6a | ||
|
f4a304ff03 | ||
|
86e7bf4169 | ||
|
91c1ff1b7d | ||
|
c4903d9267 | ||
|
cf0857f79a | ||
|
cc621765e5 | ||
|
17a15a20f2 | ||
|
c3ed70a4b7 | ||
|
88c5edb409 | ||
|
f9923e9095 | ||
|
df7f36a316 | ||
|
bb2ca1da13 | ||
|
f680001b95 | ||
|
18145a7f3d | ||
|
9bfdd218fb | ||
|
a9892acb94 | ||
|
041167895d | ||
|
fb01b16b94 | ||
|
bc5a24fee6 | ||
|
1fe340982f | ||
|
53c8c72c67 | ||
|
9bb50db6dd | ||
|
cc3552465d | ||
|
62993d9391 | ||
|
da8f3bc174 | ||
|
85fd5aa6c4 | ||
|
769f727e47 | ||
|
d9466050d9 | ||
|
5595fa3ae6 | ||
|
6dfc12a439 | ||
|
245461eb86 | ||
|
031a8f9583 | ||
|
6a199c1f5e | ||
|
64c034edfb | ||
|
c08abffc50 | ||
|
8b54e28c4e | ||
|
3c4b9a7eef | ||
|
92b3fd02e5 | ||
|
2de2589f91 | ||
|
0b3677c2b1 | ||
|
868f1e7bfc | ||
|
e779280802 | ||
|
1725d1c4f5 | ||
|
6bd264244a | ||
|
fac7d531ec | ||
|
5afcd0981b | ||
|
cc805c0963 | ||
|
e75af5f531 | ||
|
dcd2a19d90 | ||
|
3e884aea46 | ||
|
ab16fcc8db | ||
|
754b7feaa1 | ||
|
4d3f0fb5df | ||
|
15cad02235 | ||
|
e0b83bbe8d | ||
|
321062833a | ||
|
5ea6e6cda2 | ||
|
dede6d6886 | ||
|
685f2a5f91 | ||
|
eeac43c3f7 | ||
|
089ea9af22 | ||
|
5294439595 | ||
|
b3efdcb38a | ||
|
3238f2291f | ||
|
ed12a54afd | ||
|
338afe3c6d | ||
|
b1b21292b9 | ||
|
a67d8afbd4 | ||
|
d4cbe451fc | ||
|
096ace5a68 | ||
|
8d3595fb4d | ||
|
018ab7229b | ||
|
f4764f7288 | ||
|
ccef385f02 | ||
|
e1495c013d | ||
|
f82a8f09eb | ||
|
0be4f3f75a | ||
|
bf6551a3ca | ||
|
617a322bd8 | ||
|
fdfb5ab466 | ||
|
a9a5a0b016 | ||
|
8d1a64c831 | ||
|
15d89bdff6 | ||
|
2167bee551 | ||
|
7ef34eb06d | ||
|
c443b02472 | ||
|
fcc244ea6d | ||
|
8b9221d845 | ||
|
50eccd298a | ||
|
819a2205e5 | ||
|
5d8b04a7ac | ||
|
d222a40046 | ||
|
23dfeee4cb | ||
|
474fa73e6c | ||
|
0a3c4f5d80 | ||
|
2884915000 | ||
|
5f8108e8a9 | ||
|
b4c99aacd4 | ||
|
30f5f97370 | ||
|
34d20b0f03 | ||
|
94ffc12b38 | ||
|
ab3bfb4205 | ||
|
8d98a6e37d | ||
|
b88be7c1e9 | ||
|
77879736af | ||
|
0d4534733b | ||
|
2926ce4838 | ||
|
a8e551cffa | ||
|
a0dbffb8f2 | ||
|
dfc7eacd50 | ||
|
0c4ca85149 | ||
|
c9d691e65e | ||
|
60e82ba472 | ||
|
f51c219b1c | ||
|
31cea7fa24 | ||
|
58b21d336c | ||
|
5e5bc14468 | ||
|
8ed91e8a77 | ||
|
4e31dc5e6e | ||
|
1f8ec20b55 | ||
|
4a42364a19 | ||
|
9f7ec6b094 | ||
|
9dc18a62a6 | ||
|
5b65b9b860 | ||
|
552e40a4be | ||
|
79e16baca3 | ||
|
9a7656364e | ||
|
2de3605b4c | ||
|
d6b9d00ceb | ||
|
f67b610dd4 | ||
|
608f055c72 | ||
|
84d10b32c3 | ||
|
8bc0c5c2c0 | ||
|
97bf16e5b6 | ||
|
90f5edc0b8 | ||
|
c14a35e21e | ||
|
f4cd470bcb | ||
|
3c9011030f | ||
|
2040309d0c | ||
|
58cc4b2c5c | ||
|
b020467192 | ||
|
d10463ac91 | ||
|
cfb5cb8805 | ||
|
1d75b205cb | ||
|
f940a97500 | ||
|
ff6a8891d4 | ||
|
c29e4455bb | ||
|
9bfa499d94 | ||
|
53b193a161 | ||
|
e98102162f | ||
|
f5d3954568 | ||
|
ae53cd29ef | ||
|
a678665c49 | ||
|
8a8eefa0d8 | ||
|
525ad7bfb8 | ||
|
eb7c9994bf | ||
|
94c7aa0d67 | ||
|
f2617a671f | ||
|
4778d02c67 | ||
|
f710db6504 | ||
|
0e759c9422 | ||
|
a162004a90 | ||
|
ae44a28125 | ||
|
14856e8b60 | ||
|
73567ae5be | ||
|
0d5f7a9eab | ||
|
a199efae44 | ||
|
14ad79f035 | ||
|
f9b0dc9827 | ||
|
440e7e36f3 | ||
|
407a3e2860 | ||
|
5fbf4ddde8 | ||
|
6e69f63ffa | ||
|
eb732457ea | ||
|
973bf29622 | ||
|
bb3ab87a18 | ||
|
d6b3a60fbc | ||
|
6c421f131d | ||
|
93186e4999 | ||
|
2c1fc13ee4 | ||
|
20b12204af | ||
|
ee9dffcd66 | ||
|
370eac3c48 | ||
|
1034b6e0db | ||
|
ac94014ef8 | ||
|
9f91bd6ea9 | ||
|
84077401e9 | ||
|
10c18f8124 | ||
|
09e0714284 | ||
|
7c2c7858c6 | ||
|
9da2285b14 | ||
|
6158801aeb | ||
|
3d493b60f1 | ||
|
18ee28bf82 | ||
|
5f8431d7ca | ||
|
0ee9a03b1e | ||
|
c3cba58a71 | ||
|
ce4672d74b | ||
|
8dab9f6ab1 | ||
|
682f1cf203 | ||
|
0e8c4ea7ce | ||
|
fd72eb917e | ||
|
d81946a35b | ||
|
638c4b604e | ||
|
b8df6ae3c1 | ||
|
df434c839a | ||
|
c2858e9ed7 | ||
|
7c87948eaf | ||
|
30489c5aa1 | ||
|
390a66d2e7 | ||
|
9e6c0c747b | ||
|
8094a1c99e | ||
|
bfe2d42af4 | ||
|
1a250234ea | ||
|
3169179de1 | ||
|
fe9c7a01c5 | ||
|
65166858ff | ||
|
b5e24676a4 | ||
|
40ab709aac | ||
|
d18431338a | ||
|
cc87d5ab10 | ||
|
25cf67667f | ||
|
bb13275b72 | ||
|
9c513346ad | ||
|
68809869f9 | ||
|
1fe319d234 | ||
|
d630684654 | ||
|
8b81a03a5a | ||
|
9903f88947 | ||
|
d73ab0bd58 | ||
|
11e47f08b1 | ||
|
aef4edadd0 | ||
|
bf7cc2ffac | ||
|
adebcc7111 | ||
|
fb4f633243 | ||
|
49130ab8ec | ||
|
baed2dad56 | ||
|
98990217bc | ||
|
71018b4ab5 | ||
|
79e2433eb0 | ||
|
546c99a3a3 | ||
|
7b877c4e24 | ||
|
31cbb20ba2 | ||
|
f2756d0b3f | ||
|
9718675d86 | ||
|
80d181f12d | ||
|
a7a70cf34d | ||
|
2867ca1e5b | ||
|
a1154247fa | ||
|
fcedb0be32 | ||
|
bf09dba95b | ||
|
16bf872117 | ||
|
1be81a1540 | ||
|
81963967e5 | ||
|
66c0394ae1 | ||
|
f308228a19 | ||
|
56ecd62f58 | ||
|
94ee10e655 | ||
|
07cc6e00da | ||
|
6d463d36fa | ||
|
95e282d5a0 | ||
|
5aeb37d1b8 | ||
|
da68ec56c3 | ||
|
5d0d30db38 | ||
|
32e78aeb2e | ||
|
93e66661d3 | ||
|
ac009a5f5c | ||
|
51f0cd3b51 | ||
|
019609b6cd | ||
|
eed94448fd | ||
|
25b7eba4a0 | ||
|
176ab9a5d2 | ||
|
f4fb25b63d | ||
|
e3be6b8ae0 | ||
|
3d110d2e1b | ||
|
0b5023bc62 | ||
|
9dbc935afb | ||
|
f7dc6df02c | ||
|
f30acd8f74 | ||
|
16ae02ab85 | ||
|
4637c31d82 | ||
|
7f0d5e0a03 | ||
|
f8668c5a9f | ||
|
1955c37c48 | ||
|
d099181307 | ||
|
b97039f3f5 | ||
|
a368d89c94 | ||
|
d80d4be030 | ||
|
d8551b73f6 | ||
|
45ca8b8d19 | ||
|
58a247b26d | ||
|
2f8b71d7a1 | ||
|
ce5e649d3b | ||
|
80e4922b5e | ||
|
c23fca6343 | ||
|
0882fffc37 | ||
|
ad9458a14c | ||
|
0d6937b33b | ||
|
af866e05d2 | ||
|
b4ea2d32e6 | ||
|
0c70eb8d5c | ||
|
08737bdc02 | ||
|
0d9e71fe81 | ||
|
ac01da6953 | ||
|
99e72830ea | ||
|
3f852c321f | ||
|
15d102b75e | ||
|
0019f7a45e | ||
|
2d0ffd788b | ||
|
e27dc50689 | ||
|
b7a0f225ea | ||
|
29a75ab09d | ||
|
3ee7f8f695 | ||
|
e376404d38 | ||
|
079518617c | ||
|
549308051d | ||
|
5bc1c38159 | ||
|
f95c9d1bf3 | ||
|
75e44abf09 | ||
|
a397195d3f | ||
|
ab2247f8f3 | ||
|
5b7281bd41 | ||
|
85eda77d35 | ||
|
213dd2d0d6 | ||
|
00d2efb9ab | ||
|
4feede6dd5 | ||
|
c0bc10427c | ||
|
2d8d8f5917 | ||
|
472e5fc4a9 | ||
|
e55e616f1f | ||
|
50a228394f | ||
|
afbd589348 | ||
|
82284b86eb | ||
|
d3247a8c83 | ||
|
67c9155f3b | ||
|
8e899ccc29 | ||
|
d55c57b504 | ||
|
ea6c50d9e2 | ||
|
6634c47e57 | ||
|
2fa90ae19f | ||
|
2e9aff759e | ||
|
617c42b20a | ||
|
953106e74d | ||
|
07bf2b166b | ||
|
8c0512027f | ||
|
be51c201dd | ||
|
57f872054c | ||
|
9bb5e880ae | ||
|
9610d68f19 | ||
|
539a728063 | ||
|
58c05ba8ee | ||
|
d5de48ab53 | ||
|
99762ad7f0 | ||
|
6da26c8d6c | ||
|
d2952e4e92 | ||
|
206f9ca4bc | ||
|
d1a2ec4d20 | ||
|
78666204a1 | ||
|
2ca9a0979e | ||
|
5bcf9c76fd | ||
|
4dee58d480 | ||
|
32f482a6d8 | ||
|
0321bec232 | ||
|
2bb8517e9e | ||
|
f4ea29cd06 | ||
|
52f7684487 | ||
|
d2779aa765 | ||
|
a3007b9b0e | ||
|
14a3fe0ac0 | ||
|
beaeb0d4af | ||
|
c48127fa9e | ||
|
372e908682 | ||
|
bc7ebc1a89 | ||
|
186d03b32a | ||
|
c8ea64976f | ||
|
2023095d8e | ||
|
8597002a17 | ||
|
4f7102be26 | ||
|
e4e3e50867 | ||
|
fa0b5e1b85 | ||
|
018ae69b33 | ||
|
244d6d7823 | ||
|
d1d08ef99f | ||
|
85c6168bba | ||
|
2f5e230338 | ||
|
baa9cd8968 | ||
|
412eb6a611 | ||
|
4e8e25a521 | ||
|
731ff91acd | ||
|
b234e28d5d | ||
|
d6fcbdc38b | ||
|
f737e8ce9f | ||
|
6350641f0a | ||
|
16ddfafeaa | ||
|
4884232360 | ||
|
9457cf33d1 | ||
|
66b16f1fc1 | ||
|
2226e60944 | ||
|
9558b85f7b | ||
|
c9003b5547 | ||
|
9f63a8abfa | ||
|
4ff66a7818 | ||
|
72d58d7b93 | ||
|
11c15b562d | ||
|
9b81d72c46 | ||
|
b0277a129b | ||
|
120082ee3a | ||
|
6abb5cbcbb | ||
|
b215a989f5 | ||
|
5fe4dfb511 | ||
|
cf2eab5b4e | ||
|
55d0560746 | ||
|
1982543cd2 | ||
|
aaf2800c9c | ||
|
62414bff6e | ||
|
2376d3b16a | ||
|
6a65341e14 | ||
|
bff31f006e | ||
|
7410346c5c | ||
|
27a8b3c17b | ||
|
7c070f55be | ||
|
3d8aa53573 | ||
|
7c88c92778 | ||
|
21355e31db | ||
|
97dbd8b63b | ||
|
0df9cc2fc5 | ||
|
e2ce3026a0 | ||
|
6a8ade99c7 | ||
|
43fc399cd1 | ||
|
5ae781586f | ||
|
798d7c6d68 | ||
|
368dec7ac7 | ||
|
12dcfd08b8 | ||
|
0e0862cfc7 | ||
|
5b306f0390 | ||
|
d88347ee7d | ||
|
7a8516d296 | ||
|
c50aba1335 | ||
|
6d9a58bfef | ||
|
071a049f07 | ||
|
e019f7e7f2 | ||
|
315c9455d5 | ||
|
97b0c645bf | ||
|
53f46d32e2 | ||
|
e9560ef021 | ||
|
a44f2c0e65 | ||
|
c54b5da403 | ||
|
c745f434f5 | ||
|
3fa6f48ac6 | ||
|
ce8fe645f4 | ||
|
79eaf49ec0 | ||
|
9950d8a319 | ||
|
4928e2bf0a | ||
|
a570d0a129 | ||
|
918b4e81d2 | ||
|
dd96d0ac93 | ||
|
106a617fa8 | ||
|
3817b4e1c5 | ||
|
2ba461e348 | ||
|
5352e2caa0 | ||
|
463930761b | ||
|
980f955f6c | ||
|
f69829f7b4 | ||
|
c3fd757b03 | ||
|
343288c1f6 | ||
|
355b46e6c5 | ||
|
366b90be1a | ||
|
77a8f103d8 | ||
|
4250725a60 | ||
|
b151904316 | ||
|
558afefc04 | ||
|
21eabd3938 | ||
|
0c090a8c8b | ||
|
926d2beddb | ||
|
98bdd36231 | ||
|
8e870d4cc0 | ||
|
afb5449ca4 | ||
|
5a74b5008d | ||
|
72ac5badb0 | ||
|
3af0c47c97 | ||
|
a46c95c7f2 | ||
|
6801478a13 | ||
|
ef5a21496c | ||
|
67a55efa27 | ||
|
c5694b3013 | ||
|
466347a335 | ||
|
9cfaf0944c | ||
|
bfd564f257 | ||
|
43c1910453 | ||
|
260dbf0a1d | ||
|
f3e20ca437 | ||
|
a2867ff6ea | ||
|
9689f7b925 | ||
|
2037b5ce39 | ||
|
f4c5e6568e | ||
|
865bf67b1a | ||
|
f474b6da85 | ||
|
a578bc2fad | ||
|
5a11d19940 | ||
|
c28778e28c | ||
|
c873327fe3 | ||
|
d25b427efe | ||
|
9cd378caa7 | ||
|
b0258803c6 | ||
|
77eb94409c | ||
|
0735250eb1 | ||
|
fa21cd13d2 | ||
|
d74fffd5de | ||
|
e7722af9a2 | ||
|
0cd409bd6d | ||
|
2ea7f9769a | ||
|
221451b817 | ||
|
48a795c101 | ||
|
f29c963030 | ||
|
dd81707992 | ||
|
ec410fb6fe | ||
|
3edaa5280d | ||
|
51e415a026 | ||
|
04f559e28d | ||
|
ecda05af29 | ||
|
4661315192 | ||
|
0f488ac286 | ||
|
e649708cb2 | ||
|
f656d95339 | ||
|
6eae8f22dc | ||
|
21eeaffc23 | ||
|
831426ca63 | ||
|
58ceab5f1e | ||
|
766a9dc9fd | ||
|
0e8ba24f32 | ||
|
744cee6ec9 | ||
|
32eb50b75e | ||
|
887e58bd21 | ||
|
11a2413476 | ||
|
be4eb6fb2b | ||
|
9e56099edd | ||
|
d92bb41e25 | ||
|
69e351b44a | ||
|
ce161c2c02 | ||
|
f383f7721c | ||
|
1252016b9c | ||
|
1b17a5293c | ||
|
3e4752f99e | ||
|
f44307da4e | ||
|
fd127d59fa | ||
|
29b72c59f3 | ||
|
11376a2dd0 | ||
|
cc9168bda1 | ||
|
f4d0c83181 | ||
|
096efdf798 | ||
|
20735bf840 | ||
|
e3c3e780ae | ||
|
9190cf8796 | ||
|
d19a21bd01 | ||
|
94b8486d4b | ||
|
cce430fbfa | ||
|
5b8051581e | ||
|
0e8d129efb | ||
|
62012e3c68 | ||
|
b8c71e7f2d | ||
|
ac83639631 | ||
|
fef21361c5 | ||
|
368fa9475d | ||
|
a90ee65f7b | ||
|
e83be1d73a | ||
|
e8c3e54dda | ||
|
2aee114950 | ||
|
4d322a97e1 | ||
|
8210f89b12 | ||
|
a28baabefe | ||
|
e94d16667b | ||
|
c3db1cae3f | ||
|
017162e3fd | ||
|
fef25ea934 | ||
|
a9282bad29 | ||
|
67931bdeb2 | ||
|
85f867983f | ||
|
ec17161651 | ||
|
3d4bd9667a | ||
|
7420814fe2 | ||
|
8d6f265441 | ||
|
bc8b0480e9 | ||
|
046d281abc | ||
|
efc6b35615 | ||
|
bf747e32b4 | ||
|
ef15735161 | ||
|
99c65bb67c | ||
|
967e837c73 | ||
|
ca084d40c1 | ||
|
238ebb600d | ||
|
a49601ba87 | ||
|
aa10ec6e45 | ||
|
be935debe9 | ||
|
1c8a74b661 | ||
|
73ddbc3acd | ||
|
7f9840cecf | ||
|
cc3036860a | ||
|
2af40c3fe6 | ||
|
ea1958a948 | ||
|
9d42e146e7 | ||
|
c156b50e4c | ||
|
3752d68e7d | ||
|
cb860e8150 | ||
|
434238fcd4 | ||
|
2d10547266 | ||
|
f9a21281c4 | ||
|
d590eb074f | ||
|
66ff4aae89 | ||
|
450d0d69af | ||
|
28889954ef | ||
|
f0a55df963 | ||
|
40fff219b5 | ||
|
2ed818bc03 | ||
|
9017eaee08 | ||
|
38aae024cd | ||
|
1fc11c27e7 | ||
|
c4a8930909 | ||
|
a280c97321 | ||
|
dfd1c85916 | ||
|
fc86d741db | ||
|
ca38af0d83 | ||
|
f7584bf14c | ||
|
0090ce3df7 | ||
|
433db8f9f9 | ||
|
7e9e321c38 | ||
|
6ac1ed18ea | ||
|
54930ddd33 | ||
|
3e59b7345c | ||
|
838c4e938c | ||
|
f79a52fe9b | ||
|
2eb1657d91 | ||
|
e6a32db7b9 | ||
|
acce7ec9cf | ||
|
fbb2d5e10d | ||
|
f86edf8d3c | ||
|
08ba147241 | ||
|
2b6a139526 | ||
|
9f60cd18e3 | ||
|
ac7b3e405c | ||
|
bb3cb8f233 | ||
|
e745b0dd47 | ||
|
f17d60da64 | ||
|
afb6e485b7 | ||
|
ccfd6dde45 | ||
|
706868dad8 | ||
|
3b3a1390ad | ||
|
fafe1732b5 | ||
|
5ff7d9505f | ||
|
2e6a110181 | ||
|
1592b40e25 | ||
|
9cd0c101f0 | ||
|
3d62c9ed9d | ||
|
53fafad915 | ||
|
999f3556fd | ||
|
4f5731ac39 | ||
|
4aafdea5a7 | ||
|
c18d3aecbc | ||
|
f1c536fe13 | ||
|
ad9233e620 | ||
|
f88a609000 | ||
|
80ba9944e5 | ||
|
0f12be7549 | ||
|
b581799c9a | ||
|
067d1d6935 | ||
|
ada1fdc14d | ||
|
c98d09f15d | ||
|
a6676e6bc2 | ||
|
51e59f4873 | ||
|
74ed35792f | ||
|
25914d381a | ||
|
fcdef1d0a0 | ||
|
1d3240ff9c | ||
|
7c3706763a | ||
|
8bdb105897 | ||
|
d3775b973e | ||
|
e77a76a284 | ||
|
00b91a07cb | ||
|
52e47b5a53 | ||
|
7be62631ae | ||
|
d2686c8413 | ||
|
cba652e4f3 | ||
|
370cd14b46 | ||
|
d3e288cc4d | ||
|
06a6629eef | ||
|
a19490c291 | ||
|
d4eb88b255 | ||
|
c844fea9df | ||
|
923568a279 | ||
|
2c32503b10 | ||
|
fe0317aee5 | ||
|
751be1ae8c | ||
|
f48b63de38 | ||
|
3beb200c68 | ||
|
d43b743ff4 | ||
|
70423af38c | ||
|
f7006f64fb | ||
|
6431c26e8b | ||
|
04d05fbdc2 | ||
|
614debd13f | ||
|
2060de5ed0 | ||
|
d5e00e6b0f | ||
|
52d801bd19 | ||
|
ac09592355 | ||
|
fb418b26d7 | ||
|
4888d7d410 | ||
|
89bc316a7a | ||
|
c1b1e0aab1 | ||
|
2bea621f7d | ||
|
868f248696 | ||
|
30111efc6d | ||
|
a28236d939 | ||
|
6fd4a87881 | ||
|
9c5b994369 | ||
|
9befef1b03 | ||
|
0ff22e4a49 | ||
|
18b6ba0af4 | ||
|
9f14ac291f | ||
|
65d4652e92 | ||
|
613868b893 | ||
|
73abf8a800 | ||
|
3bb5c459d6 | ||
|
145ea03ca2 | ||
|
49f429018e | ||
|
66149a29da | ||
|
0ee8159f6c | ||
|
e81f4b29db | ||
|
1b82546b90 | ||
|
e250c226ca | ||
|
d67a0259cf | ||
|
7f2e4d8ace | ||
|
6f313ff245 | ||
|
a991c01731 | ||
|
b5aae7e901 | ||
|
5b7d6ed8b9 | ||
|
38856886e6 | ||
|
f2ba78e04b | ||
|
ae32d968b9 | ||
|
df5dcf5162 | ||
|
76801973e1 | ||
|
b6b8ff591d | ||
|
9a781cef53 | ||
|
aaccfd8201 | ||
|
4bccb3dc9f | ||
|
d8c278bf52 | ||
|
407385dc72 | ||
|
f6ec835599 | ||
|
5f17b61ff2 | ||
|
d203ccbf5e | ||
|
757eea2779 | ||
|
6a8e169001 | ||
|
9e86826eab | ||
|
278bffe059 | ||
|
f5b71f5329 | ||
|
20ac3d321f | ||
|
4adbeced25 | ||
|
7314501d62 | ||
|
1615edf5fb | ||
|
28d4c9e9f4 | ||
|
ed076b7c5b | ||
|
915a98c560 | ||
|
2d2756cbad | ||
|
03db3ed6e9 | ||
|
20bce151c1 | ||
|
85f6c6b2df | ||
|
bda031f4ac | ||
|
797ee8d8e3 | ||
|
0e846883bf | ||
|
72b3a7a59f | ||
|
32f38b97d5 | ||
|
7fd7dca375 | ||
|
0a668be1bf | ||
|
edb284f189 | ||
|
54cb23d234 | ||
|
c4c99727c5 | ||
|
57f4ba7b37 | ||
|
325729d0f6 | ||
|
cd49efa84e | ||
|
bc649e1632 | ||
|
3c1a83d61f | ||
|
4eb7cbac47 | ||
|
a502152075 | ||
|
ef80beab81 | ||
|
9d50a346f0 | ||
|
12a695696d | ||
|
e640d840b7 | ||
|
11d051b69a | ||
|
932a161d44 | ||
|
211bdab51f | ||
|
6fcedb5396 | ||
|
3f25610d2f | ||
|
078bd8ef40 | ||
|
e44fd87fa3 | ||
|
f000b5daff | ||
|
1e82832737 | ||
|
c301a1e51a | ||
|
e673bdc617 | ||
|
71cedc6cfe | ||
|
5034c6c65e | ||
|
f0f5d9f644 | ||
|
0b6a4313dd | ||
|
3b0b5dacf5 | ||
|
d97044d9ac | ||
|
99dc2c48bd | ||
|
95439ba529 | ||
|
e2d5071e59 | ||
|
135ed7feb4 | ||
|
bd345164d3 | ||
|
c41b029ca4 | ||
|
9e35bc7dae | ||
|
c2fd61fa01 | ||
|
7cbdae1bed | ||
|
3aebb0bfe3 | ||
|
8a7fa306ce | ||
|
bdd17c337f | ||
|
3bbc8e3191 | ||
|
eb3577c1eb | ||
|
9f1474c1d0 | ||
|
608a33f72b | ||
|
c580949417 | ||
|
ae4ece840d | ||
|
13e2ad2840 | ||
|
c234a19423 | ||
|
20574fa81f | ||
|
29e232f4b2 | ||
|
bc713dabc4 | ||
|
33c68a24a0 | ||
|
f96d865b93 | ||
|
925208d28f | ||
|
7ab7d8b4b1 | ||
|
5661d03be8 | ||
|
5eb2e83c82 | ||
|
c1e4c45c7a | ||
|
3503cba5d9 | ||
|
728a088cd7 | ||
|
17bcefeac1 | ||
|
6570d0c4b7 | ||
|
fb8a31ba3f | ||
|
e37dbd8b8d | ||
|
fc3acdacf6 | ||
|
0365f1ec82 | ||
|
99c925efd8 | ||
|
ea888114fa | ||
|
3a6fe042ea | ||
|
0d1dd82b89 | ||
|
ea73ccf22d | ||
|
86751b42a6 | ||
|
9a78fd049d | ||
|
cdea4209fc | ||
|
89f438de5a | ||
|
9dceda8a03 | ||
|
4e4b8727fc | ||
|
d2338f3a49 | ||
|
d998e3eebe | ||
|
b823f7151e | ||
|
793eef1d0a | ||
|
1e51813d05 | ||
|
ee33dcdf33 | ||
|
defaea3496 | ||
|
46fce40fd5 | ||
|
9f890bb6fa | ||
|
3b2e96e0b1 | ||
|
fca5a8ab48 | ||
|
5620895e88 | ||
|
337c77a39b | ||
|
26cfd75d05 | ||
|
9fb00f2ad0 | ||
|
487557b343 | ||
|
31f67dd3cc | ||
|
8221aadea3 | ||
|
3c9142f37e | ||
|
663ee327b0 | ||
|
de2d4c7763 | ||
|
5fa7e2faa4 | ||
|
da44625970 | ||
|
b2d2e30ac8 | ||
|
5dc9d0f581 | ||
|
6494da3101 | ||
|
e51e27fcab | ||
|
73216e5fb1 | ||
|
dd4d66d1bf | ||
|
4b63f70285 | ||
|
239ede725d | ||
|
22a09a53e6 | ||
|
a9b9c4cc33 | ||
|
e7bb03d8e7 | ||
|
59dbd3b6ce | ||
|
3107c9548d | ||
|
9f5658c8ac | ||
|
ca1f4db50c | ||
|
d3f5d036f8 | ||
|
baf574494d | ||
|
de3e413aab | ||
|
93b4c828c1 | ||
|
165171f9c8 | ||
|
0ea193c4e2 | ||
|
d956dbbd2c | ||
|
db49aa6bd9 | ||
|
9160a7ceb3 | ||
|
71c72db1e3 | ||
|
cb08dc574c | ||
|
c7f3bd0d22 | ||
|
bb3b3452f3 | ||
|
70ffae7430 | ||
|
4702be7488 | ||
|
97fc9b437d | ||
|
7669ade19c | ||
|
2be2e0fa86 | ||
|
bda18bc899 | ||
|
a10caa4631 | ||
|
8c4ce9a3de | ||
|
710586367c | ||
|
f3f0eaa59e | ||
|
cbcadded18 | ||
|
80c203f3bb | ||
|
001c50cfc6 | ||
|
3b64bae323 | ||
|
7da0ffa5ea | ||
|
bad778c1c4 | ||
|
6e103d5dca | ||
|
65870346e4 | ||
|
5e5fea2293 | ||
|
b6a72db2ad | ||
|
c56af32bb7 | ||
|
511183e76c | ||
|
2826f3d42f | ||
|
bdbad880c4 | ||
|
b0b77bc0f2 | ||
|
2accdb76bd | ||
|
be94eb67be | ||
|
08ea80b708 | ||
|
95c44ab298 | ||
|
41b82903a8 | ||
|
b955936ee1 | ||
|
d6975a708a | ||
|
eabc64fb7d | ||
|
96cdcec58a | ||
|
440466524e | ||
|
9b75bffc88 | ||
|
c2efe87cff | ||
|
1e452d5fca | ||
|
f7228bb562 | ||
|
386b60396f | ||
|
49d228207f | ||
|
d6e0a4390c | ||
|
ca21a5c7b4 | ||
|
f51cf81148 | ||
|
58a83ca8ad | ||
|
d93d9fb7be | ||
|
69c5559e53 | ||
|
ebe88c3869 | ||
|
a6bec2ebdc | ||
|
9ffeae554b | ||
|
422044b778 | ||
|
f21ac15c6c | ||
|
f22edf13dc | ||
|
b63b992fd6 | ||
|
7f7ad39e15 | ||
|
075140aefe | ||
|
453631773e | ||
|
8637612908 | ||
|
a247f7d797 | ||
|
23d34747f4 | ||
|
6466c9d406 | ||
|
832c2ffa3b | ||
|
951a9583fa | ||
|
5499fd307a | ||
|
e94fa1c9b3 | ||
|
7e91b26bb1 | ||
|
276b1bc07a | ||
|
12d49eaf6c | ||
|
0ebdad53e8 | ||
|
d0649e6868 | ||
|
2cc6caf182 | ||
|
80cef67580 | ||
|
d2d57c70e2 | ||
|
06899bd9a6 | ||
|
cf6c11cfaa | ||
|
06479ba535 | ||
|
ecd04539ec | ||
|
864ca4dd57 | ||
|
f079d0625d | ||
|
37c93ba031 | ||
|
addb977ef1 | ||
|
810bab7391 | ||
|
87883b592f | ||
|
b56fce1570 | ||
|
10c0eb648a | ||
|
ec9fe02a30 | ||
|
6b0f660180 | ||
|
12871db0f9 | ||
|
45efb935c5 | ||
|
2b52008405 | ||
|
7fec7a0569 | ||
|
12b6c56903 | ||
|
0a3b5952e0 | ||
|
66b462d6e1 | ||
|
02fdd6459e | ||
|
0df4e06f11 | ||
|
8f0f1cf6c1 | ||
|
ee27930628 | ||
|
a61d8dea36 | ||
|
eea46be4e6 | ||
|
fdc65e49e4 | ||
|
75f1dfaf8a | ||
|
72632a846b | ||
|
5668b64839 | ||
|
b3d0bd6081 | ||
|
1ea66b9033 | ||
|
e82e2b7570 | ||
|
001761ed58 | ||
|
5c98a44603 | ||
|
4cd493dd9a | ||
|
b4b210526a | ||
|
1bf33a7402 | ||
|
12903ee9b5 | ||
|
fc250c3df7 | ||
|
486354d63f | ||
|
9ac9c61433 | ||
|
580c7da559 | ||
|
994d8ae54d | ||
|
d9e43ea120 | ||
|
27462c1078 | ||
|
dc373d2e0e | ||
|
e046d0696b | ||
|
d4079ad3a2 | ||
|
b22a0ec7d8 | ||
|
d3e5a3024c | ||
|
9c315412e1 | ||
|
67c6a45e0e | ||
|
584d5f0f31 | ||
|
24f41c8c4c | ||
|
dc1b9ce7f0 | ||
|
43d6292328 | ||
|
3efaa065a5 | ||
|
a36e3a2033 | ||
|
bce20c3280 | ||
|
98b478fec1 | ||
|
9d3a3c32d6 | ||
|
d00579bf60 | ||
|
9d71eb46b8 | ||
|
5006ef3f56 | ||
|
4c06426d46 | ||
|
9f3636a103 | ||
|
6a41d5e7ad | ||
|
3489b759a0 | ||
|
d725eeaf84 | ||
|
37b20124f9 | ||
|
ba1f1f8ee9 | ||
|
ec7f4d3232 | ||
|
51c0c88772 | ||
|
afb04c9133 | ||
|
25878d68e0 | ||
|
cdf08c1ff3 | ||
|
43f4afef78 | ||
|
c117965072 | ||
|
048966bb44 | ||
|
23bf1b530b | ||
|
97d8ea8119 | ||
|
d946337724 | ||
|
7be8209d14 | ||
|
962497bdc9 | ||
|
496f559c9a | ||
|
0fda5b7b80 | ||
|
0ebe8ce4c5 | ||
|
f52ce00bf1 | ||
|
f5855968bb | ||
|
678cc54c44 | ||
|
dc5e56c2f3 | ||
|
efdbfd3883 | ||
|
e8f3de0f2e | ||
|
d95b77ebec | ||
|
154b01e8cf | ||
|
5fd9709a8b | ||
|
f62084ffea | ||
|
88660fdf64 | ||
|
f47e2f3ae4 | ||
|
318e8acfae | ||
|
b312f5e208 | ||
|
c9040bce55 | ||
|
ce52210832 | ||
|
37b10d1a0e | ||
|
143c52e4cd | ||
|
156cd33c7f | ||
|
bbae72cea2 | ||
|
02b1710ab2 | ||
|
e4a38c10f4 | ||
|
af5b82acf5 | ||
|
42efd26698 | ||
|
aee6b8765e | ||
|
a94a84b507 | ||
|
9dd3b8101a | ||
|
d84772d620 | ||
|
8e062afdd8 | ||
|
a7b75792ec | ||
|
9ea5291c48 | ||
|
219e697dd9 | ||
|
a3985c3406 | ||
|
0aca5082ab | ||
|
3795d78b14 | ||
|
a407a673dd | ||
|
074aafa814 | ||
|
b3509fd3de | ||
|
8aaa6d2162 | ||
|
22eca139fb | ||
|
1b1ef31228 | ||
|
bf123b5299 | ||
|
d4c5d4d104 | ||
|
ac9a6f8504 | ||
|
bf7cce25dc | ||
|
0eccf75f65 | ||
|
13fbb4748a | ||
|
95a07f3340 | ||
|
30306e5470 | ||
|
755f913b02 | ||
|
fb6fbcf700 | ||
|
adf130965c | ||
|
be65829055 | ||
|
e0084617d5 | ||
|
8b2da399ee | ||
|
e163d21f23 | ||
|
0d759c8c1a | ||
|
87ad8c0561 | ||
|
842aeb8c47 | ||
|
3dc53e21e5 | ||
|
f5cbdbab4f | ||
|
cf9079c783 | ||
|
0b65053ffd | ||
|
7c6a8775eb | ||
|
40da56fbf7 | ||
|
c8e068712b | ||
|
f6f0771770 | ||
|
4ad00fa388 | ||
|
4b4cb9ce66 | ||
|
67eadf1e97 | ||
|
6123937bde | ||
|
da3a77b4e3 | ||
|
255f9f0234 | ||
|
ba4504a9c7 | ||
|
7e13a4909e | ||
|
afe4aadade | ||
|
8db7528ac7 | ||
|
2d39dff84a | ||
|
b69b4a9f2a | ||
|
85a01bfd9b | ||
|
352a4f2757 | ||
|
41287694cb | ||
|
04a439a0a0 | ||
|
e528a8c7a4 | ||
|
362751e4ef | ||
|
0db3940cc4 | ||
|
e2bb5e1726 | ||
|
572ac09660 | ||
|
9f5a483256 | ||
|
cc752ad6a0 | ||
|
ce2ec035f4 | ||
|
20ed0a15a4 | ||
|
a02aeaf972 | ||
|
ca8912375c | ||
|
6b8d490249 | ||
|
84b512c62c | ||
|
1343ef5915 | ||
|
65f3bb01be | ||
|
10805cb6ec | ||
|
dd01dd7bef | ||
|
1057bd38cf | ||
|
fcd6ec99d3 | ||
|
d2113dc9f5 | ||
|
3d62ff0e07 | ||
|
90adbe0451 | ||
|
f6defeff5d | ||
|
0a1225d0df | ||
|
527952102a | ||
|
8a4e939a10 | ||
|
f8395886d3 | ||
|
9527c93a1c | ||
|
37e13361f5 | ||
|
bb6db74167 | ||
|
1f95fac699 | ||
|
24e4e674a5 | ||
|
460e5d792d | ||
|
02d821c0ab | ||
|
d12b34388d | ||
|
e686f5a249 | ||
|
33c7c28dde | ||
|
04c057238b | ||
|
bfe55118dd | ||
|
f825af06f0 | ||
|
2205bdd469 | ||
|
0f3b69c79d | ||
|
cf10e318d6 | ||
|
1ab9dbab60 | ||
|
4f0fc55385 | ||
|
23195693ed | ||
|
a7fa41612c | ||
|
5f91ea34de | ||
|
ea9c186e36 | ||
|
a97477337d | ||
|
fec6f187d1 | ||
|
1a96c294ee | ||
|
19a28e2c9f | ||
|
1984d40e33 | ||
|
cf4206d987 | ||
|
cc4c232956 | ||
|
226f85efcb | ||
|
2aa8e17c88 | ||
|
3365139a6c | ||
|
2cc3c16ab1 | ||
|
3a0b397054 | ||
|
b15eaeda16 | ||
|
e049190ff1 | ||
|
dba59cf903 | ||
|
56122cbe2f | ||
|
c77edaee34 | ||
|
21ce21cc07 | ||
|
6cf15615e8 | ||
|
a1399426c3 | ||
|
81249724e3 | ||
|
bdcffa90eb | ||
|
1ee4c4ba62 | ||
|
7935a366f4 | ||
|
08b3af4387 | ||
|
8e96402819 | ||
|
1c104a385d | ||
|
ec6f0811a0 | ||
|
a257e7a3ee | ||
|
acaddf9cd9 | ||
|
bb50368d55 | ||
|
8503d53018 | ||
|
8d4ba0aa83 | ||
|
5abf7841f8 | ||
|
ff67e06844 | ||
|
5f74c2afdf | ||
|
96b3f17d02 | ||
|
58c2c10cdb | ||
|
e6cc3c4752 | ||
|
9f0e359d73 | ||
|
82c5dfc30a | ||
|
ee2d036bbf | ||
|
cf363103d2 | ||
|
41af5aaae2 | ||
|
f0212f3f15 | ||
|
81144bb969 | ||
|
b00a7d0619 | ||
|
ef6dec17ba | ||
|
b067bb6304 | ||
|
ed18c145cd | ||
|
8247e6069d | ||
|
38ca109766 | ||
|
6d5753c548 | ||
|
0fa909a889 | ||
|
38ae319bea | ||
|
287e30239c | ||
|
530fc5a431 | ||
|
d3e25db395 | ||
|
f3cd42887d | ||
|
3c52cb1790 | ||
|
8309e0ecb0 | ||
|
22e9451192 | ||
|
a1641cdec9 | ||
|
8f0fd7ecf5 | ||
|
c7f564e866 | ||
|
c9ae3f4efe | ||
|
6d0698ba0e | ||
|
155da0cd09 | ||
|
b4f3adb6ee | ||
|
6b232bd8f6 | ||
|
323d4a484d | ||
|
6af25fb423 | ||
|
35b6c72634 | ||
|
5f7f6319eb | ||
|
47592fbf42 | ||
|
80a38c1e45 | ||
|
c599ea0737 | ||
|
9040c64e5b | ||
|
905073a506 | ||
|
656666e722 | ||
|
460c34df4b | ||
|
d1ea1ec21b | ||
|
e253beaa2b | ||
|
9021e52a6f | ||
|
5b6e67119f | ||
|
ad1739c63f | ||
|
b415b9aacf | ||
|
dc9d287e33 | ||
|
135be952fe | ||
|
c21a8573b4 | ||
|
5733b0e4cb | ||
|
5c3f8efd23 | ||
|
076d9311fa | ||
|
c5099ff407 | ||
|
4277e9f5d6 | ||
|
882b770ecb | ||
|
a21f586c3b | ||
|
2fbd948a67 | ||
|
49cf82a0ac | ||
|
6412dcb896 | ||
|
16e80258b8 | ||
|
b875bbcdf1 | ||
|
6b21c4f6c9 | ||
|
e8bceaa284 | ||
|
59abeeb097 | ||
|
d95b79f9eb | ||
|
1861cf4975 | ||
|
427c79b24b | ||
|
f3270d4ce8 | ||
|
4974585d04 | ||
|
5268914b3f |
47
.appveyor.yml
Normal file
47
.appveyor.yml
Normal file
@ -0,0 +1,47 @@
|
||||
image:
|
||||
- Visual Studio 2015
|
||||
branches:
|
||||
only:
|
||||
- ci
|
||||
- master
|
||||
- latest
|
||||
- 3.3-stable
|
||||
skip_tags: true
|
||||
environment:
|
||||
matrix:
|
||||
- GENERATOR: MinGW Makefiles
|
||||
BUILD_SHARED_LIBS: ON
|
||||
CFLAGS: -Werror
|
||||
- GENERATOR: MinGW Makefiles
|
||||
BUILD_SHARED_LIBS: OFF
|
||||
CFLAGS: -Werror
|
||||
- GENERATOR: Visual Studio 12 2013
|
||||
BUILD_SHARED_LIBS: ON
|
||||
CFLAGS: /WX
|
||||
- GENERATOR: Visual Studio 12 2013
|
||||
BUILD_SHARED_LIBS: OFF
|
||||
CFLAGS: /WX
|
||||
matrix:
|
||||
fast_finish: true
|
||||
for:
|
||||
-
|
||||
matrix:
|
||||
only:
|
||||
- GENERATOR: MinGW Makefiles
|
||||
build_script:
|
||||
- set PATH=%PATH:C:\Program Files\Git\usr\bin=C:\MinGW\bin%
|
||||
- cmake -B build -G "%GENERATOR%" -DBUILD_SHARED_LIBS=%BUILD_SHARED_LIBS%
|
||||
- cmake --build build
|
||||
-
|
||||
matrix:
|
||||
only:
|
||||
- GENERATOR: Visual Studio 12 2013
|
||||
build_script:
|
||||
- cmake -B build -G "%GENERATOR%" -DBUILD_SHARED_LIBS=%BUILD_SHARED_LIBS%
|
||||
- cmake --build build --target glfw
|
||||
notifications:
|
||||
- provider: Email
|
||||
to:
|
||||
- ci@glfw.org
|
||||
on_build_failure: true
|
||||
on_build_success: false
|
67
.editorconfig
Normal file
67
.editorconfig
Normal file
@ -0,0 +1,67 @@
|
||||
# EditorConfig for GLFW and its internal dependencies
|
||||
#
|
||||
# All files created by GLFW should indent with four spaces unless their format requires
|
||||
# otherwise. A few files still use other indent styles for historical reasons.
|
||||
#
|
||||
# Dependencies have (what seemed to be) their existing styles described. Those with
|
||||
# existing trailing whitespace have it preserved to avoid cluttering future commits.
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
|
||||
[include/GLFW/*.h]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[{src,examples,tests}/*.{c,m,h,rc,in}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[CMakeLists.txt]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[CMake/**.{cmake,in}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.{md}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[DoxygenLayout.xml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[docs/*.{scss,html}]
|
||||
indent_style = tab
|
||||
indent_size = unset
|
||||
|
||||
[deps/mingw/*.h]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
tab_width = 8
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[deps/getopt.{c,h}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[deps/linmath.h]
|
||||
indent_style = tab
|
||||
tab_width = 4
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[deps/nuklear*.h]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[deps/tinycthread.{c,h}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
5
.gitattributes
vendored
Normal file
5
.gitattributes
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
*.m linguist-language=Objective-C
|
||||
.gitignore export-ignore
|
||||
.gitattributes export-ignore
|
||||
.travis.yml export-ignore
|
||||
.appveyor.yml export-ignore
|
8
.github/CODEOWNERS
vendored
Normal file
8
.github/CODEOWNERS
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
* @elmindreda
|
||||
|
||||
docs/*.css @glfw/webdev
|
||||
docs/*.scss @glfw/webdev
|
||||
docs/*.html @glfw/webdev
|
||||
docs/*.xml @glfw/webdev
|
||||
|
100
.github/workflows/build.yml
vendored
Normal file
100
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,100 @@
|
||||
name: Build
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [ ci, master, latest, 3.3-stable ]
|
||||
workflow_dispatch:
|
||||
permissions:
|
||||
statuses: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-linux-clang:
|
||||
name: Linux (Clang)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 4
|
||||
env:
|
||||
CC: clang
|
||||
CFLAGS: -Werror
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libwayland-dev libxkbcommon-dev
|
||||
|
||||
- name: Configure Null shared library
|
||||
run: cmake -B build-null-shared -D GLFW_BUILD_WAYLAND=OFF -D GLFW_BUILD_X11=OFF -D BUILD_SHARED_LIBS=ON
|
||||
- name: Build Null shared library
|
||||
run: cmake --build build-null-shared --parallel
|
||||
|
||||
- name: Configure X11 shared library
|
||||
run: cmake -B build-x11-shared -D GLFW_BUILD_WAYLAND=OFF -D GLFW_BUILD_X11=ON -D BUILD_SHARED_LIBS=ON
|
||||
- name: Build X11 shared library
|
||||
run: cmake --build build-x11-shared --parallel
|
||||
|
||||
- name: Configure Wayland shared library
|
||||
run: cmake -B build-wayland-shared -D GLFW_BUILD_WAYLAND=ON -D GLFW_BUILD_X11=OFF -D BUILD_SHARED_LIBS=ON
|
||||
- name: Build Wayland shared library
|
||||
run: cmake --build build-wayland-shared --parallel
|
||||
|
||||
- name: Configure Wayland+X11 static library
|
||||
run: cmake -B build-full-static -D GLFW_BUILD_WAYLAND=ON -D GLFW_BUILD_X11=ON
|
||||
- name: Build Wayland+X11 static library
|
||||
run: cmake --build build-full-static --parallel
|
||||
|
||||
- name: Configure Wayland+X11 shared library
|
||||
run: cmake -B build-full-shared -D GLFW_BUILD_WAYLAND=ON -D BUILD_SHARED_LIBS=ON -D GLFW_BUILD_X11=ON
|
||||
- name: Build Wayland+X11 shared library
|
||||
run: cmake --build build-full-shared --parallel
|
||||
|
||||
build-macos-clang:
|
||||
name: macOS (Clang)
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 4
|
||||
env:
|
||||
CFLAGS: -Werror
|
||||
MACOSX_DEPLOYMENT_TARGET: 10.11
|
||||
CMAKE_OSX_ARCHITECTURES: x86_64;arm64
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Configure Null shared library
|
||||
run: cmake -B build-null-shared -D GLFW_BUILD_COCOA=OFF -D BUILD_SHARED_LIBS=ON
|
||||
- name: Build Null shared library
|
||||
run: cmake --build build-null-shared --parallel
|
||||
|
||||
- name: Configure Cocoa static library
|
||||
run: cmake -B build-cocoa-static
|
||||
- name: Build Cocoa static library
|
||||
run: cmake --build build-cocoa-static --parallel
|
||||
|
||||
- name: Configure Cocoa shared library
|
||||
run: cmake -B build-cocoa-shared -D BUILD_SHARED_LIBS=ON
|
||||
- name: Build Cocoa shared library
|
||||
run: cmake --build build-cocoa-shared --parallel
|
||||
|
||||
build-windows-vs2022:
|
||||
name: Windows (VS2022)
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 4
|
||||
env:
|
||||
CFLAGS: /WX
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Configure Win32 shared x86 library
|
||||
run: cmake -B build-win32-shared-x86 -G "Visual Studio 17 2022" -A Win32 -D BUILD_SHARED_LIBS=ON
|
||||
- name: Build Win32 shared x86 library
|
||||
run: cmake --build build-win32-shared-x86 --parallel
|
||||
|
||||
- name: Configure Win32 static x64 library
|
||||
run: cmake -B build-win32-static-x64 -G "Visual Studio 17 2022" -A x64
|
||||
- name: Build Win32 static x64 library
|
||||
run: cmake --build build-win32-static-x64 --parallel
|
||||
|
||||
- name: Configure Win32 shared x64 library
|
||||
run: cmake -B build-win32-shared-x64 -G "Visual Studio 17 2022" -A x64 -D BUILD_SHARED_LIBS=ON
|
||||
- name: Build Win32 shared x64 library
|
||||
run: cmake --build build-win32-shared-x64 --parallel
|
||||
|
60
.gitignore
vendored
60
.gitignore
vendored
@ -1,19 +1,46 @@
|
||||
# External junk
|
||||
.DS_Store
|
||||
# The canonical out-of-tree build subdirectory
|
||||
build
|
||||
build-*
|
||||
|
||||
# Visual Studio clutter
|
||||
_ReSharper*
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.suo
|
||||
*.dir
|
||||
*.vcxproj*
|
||||
*.sln
|
||||
.vs
|
||||
CMakeSettings.json
|
||||
Win32
|
||||
x64
|
||||
Debug
|
||||
Release
|
||||
MinSizeRel
|
||||
RelWithDebInfo
|
||||
*.opensdf
|
||||
|
||||
# CMake files
|
||||
# Xcode clutter
|
||||
GLFW.build
|
||||
GLFW.xcodeproj
|
||||
|
||||
# macOS clutter
|
||||
.DS_Store
|
||||
|
||||
# Makefile generator clutter
|
||||
Makefile
|
||||
|
||||
# Ninja generator clutter
|
||||
build.ninja
|
||||
rules.ninja
|
||||
.ninja_deps
|
||||
.ninja_log
|
||||
|
||||
# CMake clutter
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
CMakeScripts
|
||||
CMakeDoxyfile.in
|
||||
CMakeDoxygenDefaults.cmake
|
||||
cmake_install.cmake
|
||||
cmake_uninstall.cmake
|
||||
|
||||
@ -21,6 +48,7 @@ cmake_uninstall.cmake
|
||||
docs/Doxyfile
|
||||
docs/html
|
||||
docs/warnings.txt
|
||||
docs/doxygen_sqlite3.db
|
||||
src/glfw_config.h
|
||||
src/glfw3.pc
|
||||
src/glfw3Config.cmake
|
||||
@ -29,46 +57,48 @@ src/glfw3ConfigVersion.cmake
|
||||
# Compiled binaries
|
||||
src/libglfw.so
|
||||
src/libglfw.so.3
|
||||
src/libglfw.so.3.0
|
||||
src/libglfw.so.3.5
|
||||
src/libglfw.dylib
|
||||
src/libglfw.dylib
|
||||
src/libglfw.3.dylib
|
||||
src/libglfw.3.0.dylib
|
||||
src/libglfw.3.5.dylib
|
||||
src/libglfw3.a
|
||||
src/glfw3.lib
|
||||
src/glfw3.dll
|
||||
src/glfw3dll.lib
|
||||
src/glfw3dll.a
|
||||
src/libglfw3dll.a
|
||||
examples/*.app
|
||||
examples/*.exe
|
||||
examples/boing
|
||||
examples/gears
|
||||
examples/heightmap
|
||||
examples/offscreen
|
||||
examples/particles
|
||||
examples/splitview
|
||||
examples/simple
|
||||
examples/sharing
|
||||
examples/triangle-opengl
|
||||
examples/wave
|
||||
examples/windows
|
||||
tests/*.app
|
||||
tests/*.exe
|
||||
tests/accuracy
|
||||
tests/clipboard
|
||||
tests/cursor
|
||||
tests/cursoranim
|
||||
tests/defaults
|
||||
tests/empty
|
||||
tests/events
|
||||
tests/fsaa
|
||||
tests/gamma
|
||||
tests/glfwinfo
|
||||
tests/icon
|
||||
tests/iconify
|
||||
tests/inputlag
|
||||
tests/joysticks
|
||||
tests/monitors
|
||||
tests/peter
|
||||
tests/msaa
|
||||
tests/reopen
|
||||
tests/sharing
|
||||
tests/tearing
|
||||
tests/threads
|
||||
tests/timeout
|
||||
tests/title
|
||||
tests/version
|
||||
tests/triangle-vulkan
|
||||
tests/window
|
||||
tests/windows
|
||||
|
||||
|
10
.mailmap
Normal file
10
.mailmap
Normal file
@ -0,0 +1,10 @@
|
||||
Camilla Löwy <elmindreda@glfw.org> <elmindreda@users.sourceforge.net>
|
||||
Camilla Löwy <elmindreda@glfw.org> <elmindreda@elmindreda.org>
|
||||
Camilla Löwy <elmindreda@glfw.org>
|
||||
|
||||
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
|
||||
|
||||
Marcus Geelnard <m@bitsnbites.eu> <marcus256@users.sourceforge.net>
|
||||
Marcus Geelnard <m@bitsnbites.eu> <marcus@geelnards-pc.(none)>
|
||||
Marcus Geelnard <m@bitsnbites.eu>
|
||||
|
50
CMake/GenerateMappings.cmake
Normal file
50
CMake/GenerateMappings.cmake
Normal file
@ -0,0 +1,50 @@
|
||||
# Usage:
|
||||
# cmake -P GenerateMappings.cmake <path/to/mappings.h.in> <path/to/mappings.h>
|
||||
|
||||
cmake_policy(VERSION 3.16)
|
||||
|
||||
set(source_url "https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt")
|
||||
set(source_path "${CMAKE_CURRENT_BINARY_DIR}/gamecontrollerdb.txt")
|
||||
set(template_path "${CMAKE_ARGV3}")
|
||||
set(target_path "${CMAKE_ARGV4}")
|
||||
|
||||
if (NOT EXISTS "${template_path}")
|
||||
message(FATAL_ERROR "Failed to find template file ${template_path}")
|
||||
endif()
|
||||
|
||||
file(DOWNLOAD "${source_url}" "${source_path}"
|
||||
STATUS download_status
|
||||
TLS_VERIFY on)
|
||||
|
||||
list(GET download_status 0 status_code)
|
||||
list(GET download_status 1 status_message)
|
||||
|
||||
if (status_code)
|
||||
message(FATAL_ERROR "Failed to download ${source_url}: ${status_message}")
|
||||
endif()
|
||||
|
||||
file(STRINGS "${source_path}" lines)
|
||||
list(FILTER lines INCLUDE REGEX "^[0-9a-fA-F]")
|
||||
|
||||
foreach(line IN LISTS lines)
|
||||
if (line MATCHES "platform:Windows")
|
||||
if (GLFW_WIN32_MAPPINGS)
|
||||
string(APPEND GLFW_WIN32_MAPPINGS "\n")
|
||||
endif()
|
||||
string(APPEND GLFW_WIN32_MAPPINGS "\"${line}\",")
|
||||
elseif (line MATCHES "platform:Mac OS X")
|
||||
if (GLFW_COCOA_MAPPINGS)
|
||||
string(APPEND GLFW_COCOA_MAPPINGS "\n")
|
||||
endif()
|
||||
string(APPEND GLFW_COCOA_MAPPINGS "\"${line}\",")
|
||||
elseif (line MATCHES "platform:Linux")
|
||||
if (GLFW_LINUX_MAPPINGS)
|
||||
string(APPEND GLFW_LINUX_MAPPINGS "\n")
|
||||
endif()
|
||||
string(APPEND GLFW_LINUX_MAPPINGS "\"${line}\",")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
configure_file("${template_path}" "${target_path}" @ONLY NEWLINE_STYLE UNIX)
|
||||
file(REMOVE "${source_path}")
|
||||
|
@ -5,34 +5,34 @@
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${APPLE_GUI_EXECUTABLE}</string>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>${APPLE_GUI_INFO_STRING}</string>
|
||||
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>${APPLE_GUI_ICON}</string>
|
||||
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${APPLE_GUI_IDENTIFIER}</string>
|
||||
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>${APPLE_GUI_LONG_VERSION_STRING}</string>
|
||||
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${APPLE_GUI_BUNDLE_NAME}</string>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${APPLE_GUI_SHORT_VERSION_STRING}</string>
|
||||
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${APPLE_GUI_BUNDLE_VERSION}</string>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>LSRequiresCarbon</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>${APPLE_GUI_COPYRIGHT}</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -1,13 +0,0 @@
|
||||
# Define the environment for cross compiling from Linux to Win64
|
||||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
SET(CMAKE_SYSTEM_VERSION 1)
|
||||
SET(CMAKE_C_COMPILER "amd64-mingw32msvc-gcc")
|
||||
SET(CMAKE_CXX_COMPILER "amd64-mingw32msvc-g++")
|
||||
SET(CMAKE_RC_COMPILER "amd64-mingw32msvc-windres")
|
||||
SET(CMAKE_RANLIB "amd64-mingw32msvc-ranlib")
|
||||
|
||||
# Configure the behaviour of the find commands
|
||||
SET(CMAKE_FIND_ROOT_PATH "/usr/amd64-mingw32msvc")
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
@ -1,9 +1,9 @@
|
||||
|
||||
if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
|
||||
if (NOT EXISTS "@GLFW_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: \"@GLFW_BINARY_DIR@/install_manifest.txt\"")
|
||||
endif()
|
||||
|
||||
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||
file(READ "@GLFW_BINARY_DIR@/install_manifest.txt" files)
|
||||
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||
|
||||
foreach (file ${files})
|
13
CMake/glfw3.pc.in
Normal file
13
CMake/glfw3.pc.in
Normal file
@ -0,0 +1,13 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||
|
||||
Name: GLFW
|
||||
Description: A multi-platform library for OpenGL, window and input
|
||||
Version: @GLFW_VERSION@
|
||||
URL: https://www.glfw.org/
|
||||
Requires.private: @GLFW_PKG_CONFIG_REQUIRES_PRIVATE@
|
||||
Libs: -L${libdir} -l@GLFW_LIB_NAME@@GLFW_LIB_NAME_SUFFIX@
|
||||
Libs.private: @GLFW_PKG_CONFIG_LIBS_PRIVATE@
|
||||
Cflags: -I${includedir}
|
3
CMake/glfw3Config.cmake.in
Normal file
3
CMake/glfw3Config.cmake.in
Normal file
@ -0,0 +1,3 @@
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(Threads)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/glfw3Targets.cmake")
|
@ -1,13 +0,0 @@
|
||||
# Define the environment for cross compiling from Linux to Win32
|
||||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
SET(CMAKE_SYSTEM_VERSION 1)
|
||||
SET(CMAKE_C_COMPILER "i586-mingw32msvc-gcc")
|
||||
SET(CMAKE_CXX_COMPILER "i586-mingw32msvc-g++")
|
||||
SET(CMAKE_RC_COMPILER "i586-mingw32msvc-windres")
|
||||
SET(CMAKE_RANLIB "i586-mingw32msvc-ranlib")
|
||||
|
||||
# Configure the behaviour of the find commands
|
||||
SET(CMAKE_FIND_ROOT_PATH "/usr/i586-mingw32msvc")
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
@ -1,13 +0,0 @@
|
||||
# Define the environment for cross compiling from Linux to Win32
|
||||
SET(CMAKE_SYSTEM_NAME Windows) # Target system name
|
||||
SET(CMAKE_SYSTEM_VERSION 1)
|
||||
SET(CMAKE_C_COMPILER "i686-pc-mingw32-gcc")
|
||||
SET(CMAKE_CXX_COMPILER "i686-pc-mingw32-g++")
|
||||
SET(CMAKE_RC_COMPILER "i686-pc-mingw32-windres")
|
||||
SET(CMAKE_RANLIB "i686-pc-mingw32-ranlib")
|
||||
|
||||
#Configure the behaviour of the find commands
|
||||
SET(CMAKE_FIND_ROOT_PATH "/opt/mingw/usr/i686-pc-mingw32")
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
13
CMake/i686-w64-mingw32-clang.cmake
Normal file
13
CMake/i686-w64-mingw32-clang.cmake
Normal file
@ -0,0 +1,13 @@
|
||||
# Define the environment for cross-compiling with 32-bit MinGW-w64 Clang
|
||||
SET(CMAKE_SYSTEM_NAME Windows) # Target system name
|
||||
SET(CMAKE_SYSTEM_VERSION 1)
|
||||
SET(CMAKE_C_COMPILER "i686-w64-mingw32-clang")
|
||||
SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-clang++")
|
||||
SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres")
|
||||
SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib")
|
||||
|
||||
# Configure the behaviour of the find commands
|
||||
SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32")
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
@ -1,4 +1,4 @@
|
||||
# Define the environment for cross compiling from Linux to Win32
|
||||
# Define the environment for cross-compiling with 32-bit MinGW-w64 GCC
|
||||
SET(CMAKE_SYSTEM_NAME Windows) # Target system name
|
||||
SET(CMAKE_SYSTEM_VERSION 1)
|
||||
SET(CMAKE_C_COMPILER "i686-w64-mingw32-gcc")
|
||||
@ -6,7 +6,7 @@ SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-g++")
|
||||
SET(CMAKE_RC_COMPILER "i686-w64-mingw32-windres")
|
||||
SET(CMAKE_RANLIB "i686-w64-mingw32-ranlib")
|
||||
|
||||
# Configure the behaviour of the find commands
|
||||
# Configure the behaviour of the find commands
|
||||
SET(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32")
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
|
@ -1,16 +0,0 @@
|
||||
# Find EGL
|
||||
#
|
||||
# EGL_INCLUDE_DIR
|
||||
# EGL_LIBRARY
|
||||
# EGL_FOUND
|
||||
|
||||
find_path(EGL_INCLUDE_DIR NAMES EGL/egl.h PATHS /opt/vc/include)
|
||||
|
||||
set(EGL_NAMES ${EGL_NAMES} egl EGL)
|
||||
find_library(EGL_LIBRARY NAMES ${EGL_NAMES} PATHS /opt/vc/lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(EGL DEFAULT_MSG EGL_LIBRARY EGL_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(EGL_INCLUDE_DIR EGL_LIBRARY)
|
||||
|
17
CMake/modules/FindEpollShim.cmake
Normal file
17
CMake/modules/FindEpollShim.cmake
Normal file
@ -0,0 +1,17 @@
|
||||
# Find EpollShim
|
||||
# Once done, this will define
|
||||
#
|
||||
# EPOLLSHIM_FOUND - System has EpollShim
|
||||
# EPOLLSHIM_INCLUDE_DIRS - The EpollShim include directories
|
||||
# EPOLLSHIM_LIBRARIES - The libraries needed to use EpollShim
|
||||
|
||||
find_path(EPOLLSHIM_INCLUDE_DIRS NAMES sys/epoll.h sys/timerfd.h HINTS /usr/local/include/libepoll-shim)
|
||||
find_library(EPOLLSHIM_LIBRARIES NAMES epoll-shim libepoll-shim HINTS /usr/local/lib)
|
||||
|
||||
if (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES)
|
||||
set(EPOLLSHIM_FOUND TRUE)
|
||||
endif (EPOLLSHIM_INCLUDE_DIRS AND EPOLLSHIM_LIBRARIES)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(EpollShim DEFAULT_MSG EPOLLSHIM_LIBRARIES EPOLLSHIM_INCLUDE_DIRS)
|
||||
mark_as_advanced(EPOLLSHIM_INCLUDE_DIRS EPOLLSHIM_LIBRARIES)
|
@ -1,16 +0,0 @@
|
||||
# Find GLESv1
|
||||
#
|
||||
# GLESv1_INCLUDE_DIR
|
||||
# GLESv1_LIBRARY
|
||||
# GLESv1_FOUND
|
||||
|
||||
find_path(GLESv1_INCLUDE_DIR NAMES GLES/gl.h PATHS /opt/vc/include)
|
||||
|
||||
set(GLESv1_NAMES ${GLESv1_NAMES} GLESv1_CM)
|
||||
find_library(GLESv1_LIBRARY NAMES ${GLESv1_NAMES} PATHS /opt/vc/lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GLESv1 DEFAULT_MSG GLESv1_LIBRARY GLESv1_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(GLESv1_INCLUDE_DIR GLESv1_LIBRARY)
|
||||
|
@ -1,16 +0,0 @@
|
||||
# Find GLESv2
|
||||
#
|
||||
# GLESv2_INCLUDE_DIR
|
||||
# GLESv2_LIBRARY
|
||||
# GLESv2_FOUND
|
||||
|
||||
find_path(GLESv2_INCLUDE_DIR NAMES GLES2/gl2.h PATHS /opt/vc/include)
|
||||
|
||||
set(GLESv2_NAMES ${GLESv2_NAMES} GLESv2)
|
||||
find_library(GLESv2_LIBRARY NAMES ${GLESv2_NAMES} PATHS /opt/vc/lib)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GLESv2 DEFAULT_MSG GLESv2_LIBRARY GLESv2_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(GLESv2_INCLUDE_DIR GLESv2_LIBRARY)
|
||||
|
@ -1,18 +0,0 @@
|
||||
# Try to find Mir on a Unix system
|
||||
#
|
||||
# This will define:
|
||||
#
|
||||
# MIR_LIBRARIES - Link these to use Wayland
|
||||
# MIR_INCLUDE_DIR - Include directory for Wayland
|
||||
#
|
||||
# Copyright (c) 2014 Brandon Schaefer <brandon.schaefer@canonical.com>
|
||||
|
||||
if (NOT WIN32)
|
||||
|
||||
find_package (PkgConfig)
|
||||
pkg_check_modules (PKG_MIR QUIET mirclient)
|
||||
|
||||
set (MIR_INCLUDE_DIR ${PKG_MIR_INCLUDE_DIRS})
|
||||
set (MIR_LIBRARIES ${PKG_MIR_LIBRARIES})
|
||||
|
||||
endif ()
|
@ -1,66 +0,0 @@
|
||||
# Try to find Wayland on a Unix system
|
||||
#
|
||||
# This will define:
|
||||
#
|
||||
# WAYLAND_FOUND - True if Wayland is found
|
||||
# WAYLAND_LIBRARIES - Link these to use Wayland
|
||||
# WAYLAND_INCLUDE_DIR - Include directory for Wayland
|
||||
# WAYLAND_DEFINITIONS - Compiler flags for using Wayland
|
||||
#
|
||||
# In addition the following more fine grained variables will be defined:
|
||||
#
|
||||
# WAYLAND_CLIENT_FOUND WAYLAND_CLIENT_INCLUDE_DIR WAYLAND_CLIENT_LIBRARIES
|
||||
# WAYLAND_SERVER_FOUND WAYLAND_SERVER_INCLUDE_DIR WAYLAND_SERVER_LIBRARIES
|
||||
# WAYLAND_EGL_FOUND WAYLAND_EGL_INCLUDE_DIR WAYLAND_EGL_LIBRARIES
|
||||
#
|
||||
# Copyright (c) 2013 Martin Gräßlin <mgraesslin@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
IF (NOT WIN32)
|
||||
IF (WAYLAND_INCLUDE_DIR AND WAYLAND_LIBRARIES)
|
||||
# In the cache already
|
||||
SET(WAYLAND_FIND_QUIETLY TRUE)
|
||||
ENDIF ()
|
||||
|
||||
# Use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
PKG_CHECK_MODULES(PKG_WAYLAND QUIET wayland-client wayland-server wayland-egl wayland-cursor)
|
||||
|
||||
SET(WAYLAND_DEFINITIONS ${PKG_WAYLAND_CFLAGS})
|
||||
|
||||
FIND_PATH(WAYLAND_CLIENT_INCLUDE_DIR NAMES wayland-client.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
|
||||
FIND_PATH(WAYLAND_SERVER_INCLUDE_DIR NAMES wayland-server.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
|
||||
FIND_PATH(WAYLAND_EGL_INCLUDE_DIR NAMES wayland-egl.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
|
||||
FIND_PATH(WAYLAND_CURSOR_INCLUDE_DIR NAMES wayland-cursor.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
|
||||
|
||||
FIND_LIBRARY(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
|
||||
FIND_LIBRARY(WAYLAND_SERVER_LIBRARIES NAMES wayland-server HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
|
||||
FIND_LIBRARY(WAYLAND_EGL_LIBRARIES NAMES wayland-egl HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
|
||||
FIND_LIBRARY(WAYLAND_CURSOR_LIBRARIES NAMES wayland-cursor HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
|
||||
|
||||
set(WAYLAND_INCLUDE_DIR ${WAYLAND_CLIENT_INCLUDE_DIR} ${WAYLAND_SERVER_INCLUDE_DIR} ${WAYLAND_EGL_INCLUDE_DIR} ${WAYLAND_CURSOR_INCLUDE_DIR})
|
||||
|
||||
set(WAYLAND_LIBRARIES ${WAYLAND_CLIENT_LIBRARIES} ${WAYLAND_SERVER_LIBRARIES} ${WAYLAND_EGL_LIBRARIES} ${WAYLAND_CURSOR_LIBRARIES})
|
||||
|
||||
list(REMOVE_DUPLICATES WAYLAND_INCLUDE_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_CLIENT DEFAULT_MSG WAYLAND_CLIENT_LIBRARIES WAYLAND_CLIENT_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_SERVER DEFAULT_MSG WAYLAND_SERVER_LIBRARIES WAYLAND_SERVER_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_EGL DEFAULT_MSG WAYLAND_EGL_LIBRARIES WAYLAND_EGL_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_CURSOR DEFAULT_MSG WAYLAND_CURSOR_LIBRARIES WAYLAND_CURSOR_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND DEFAULT_MSG WAYLAND_LIBRARIES WAYLAND_INCLUDE_DIR)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
WAYLAND_INCLUDE_DIR WAYLAND_LIBRARIES
|
||||
WAYLAND_CLIENT_INCLUDE_DIR WAYLAND_CLIENT_LIBRARIES
|
||||
WAYLAND_SERVER_INCLUDE_DIR WAYLAND_SERVER_LIBRARIES
|
||||
WAYLAND_EGL_INCLUDE_DIR WAYLAND_EGL_LIBRARIES
|
||||
WAYLAND_CURSOR_INCLUDE_DIR WAYLAND_CURSOR_LIBRARIES
|
||||
)
|
||||
|
||||
ENDIF ()
|
@ -1,34 +0,0 @@
|
||||
# - Try to find XKBCommon
|
||||
# Once done, this will define
|
||||
#
|
||||
# XKBCOMMON_FOUND - System has XKBCommon
|
||||
# XKBCOMMON_INCLUDE_DIRS - The XKBCommon include directories
|
||||
# XKBCOMMON_LIBRARIES - The libraries needed to use XKBCommon
|
||||
# XKBCOMMON_DEFINITIONS - Compiler switches required for using XKBCommon
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_XKBCOMMON QUIET xkbcommon)
|
||||
set(XKBCOMMON_DEFINITIONS ${PC_XKBCOMMON_CFLAGS_OTHER})
|
||||
|
||||
find_path(XKBCOMMON_INCLUDE_DIR
|
||||
NAMES xkbcommon/xkbcommon.h
|
||||
HINTS ${PC_XKBCOMMON_INCLUDE_DIR} ${PC_XKBCOMMON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
find_library(XKBCOMMON_LIBRARY
|
||||
NAMES xkbcommon
|
||||
HINTS ${PC_XKBCOMMON_LIBRARY} ${PC_XKBCOMMON_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
set(XKBCOMMON_LIBRARIES ${XKBCOMMON_LIBRARY})
|
||||
set(XKBCOMMON_LIBRARY_DIRS ${XKBCOMMON_LIBRARY_DIRS})
|
||||
set(XKBCOMMON_INCLUDE_DIRS ${XKBCOMMON_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(XKBCommon DEFAULT_MSG
|
||||
XKBCOMMON_LIBRARY
|
||||
XKBCOMMON_INCLUDE_DIR
|
||||
)
|
||||
|
||||
mark_as_advanced(XKBCOMMON_LIBRARY XKBCOMMON_INCLUDE_DIR)
|
||||
|
13
CMake/x86_64-w64-mingw32-clang.cmake
Normal file
13
CMake/x86_64-w64-mingw32-clang.cmake
Normal file
@ -0,0 +1,13 @@
|
||||
# Define the environment for cross-compiling with 64-bit MinGW-w64 Clang
|
||||
SET(CMAKE_SYSTEM_NAME Windows) # Target system name
|
||||
SET(CMAKE_SYSTEM_VERSION 1)
|
||||
SET(CMAKE_C_COMPILER "x86_64-w64-mingw32-clang")
|
||||
SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-clang++")
|
||||
SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres")
|
||||
SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib")
|
||||
|
||||
# Configure the behaviour of the find commands
|
||||
SET(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32")
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
@ -1,4 +1,4 @@
|
||||
# Define the environment for cross compiling from Linux to Win32
|
||||
# Define the environment for cross-compiling with 64-bit MinGW-w64 GCC
|
||||
SET(CMAKE_SYSTEM_NAME Windows) # Target system name
|
||||
SET(CMAKE_SYSTEM_VERSION 1)
|
||||
SET(CMAKE_C_COMPILER "x86_64-w64-mingw32-gcc")
|
||||
@ -6,7 +6,7 @@ SET(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-g++")
|
||||
SET(CMAKE_RC_COMPILER "x86_64-w64-mingw32-windres")
|
||||
SET(CMAKE_RANLIB "x86_64-w64-mingw32-ranlib")
|
||||
|
||||
# Configure the behaviour of the find commands
|
||||
# Configure the behaviour of the find commands
|
||||
SET(CMAKE_FIND_ROOT_PATH "/usr/x86_64-w64-mingw32")
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
|
572
CMakeLists.txt
572
CMakeLists.txt
@ -1,511 +1,78 @@
|
||||
project(GLFW C)
|
||||
cmake_minimum_required(VERSION 3.16...3.28 FATAL_ERROR)
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
|
||||
if (CMAKE_VERSION VERSION_EQUAL "3.0" OR CMAKE_VERSION VERSION_GREATER "3.0")
|
||||
# Until all major package systems have moved to CMake 3,
|
||||
# we stick with the older INSTALL_NAME_DIR mechanism
|
||||
cmake_policy(SET CMP0042 OLD)
|
||||
endif()
|
||||
|
||||
set(GLFW_VERSION_MAJOR "3")
|
||||
set(GLFW_VERSION_MINOR "1")
|
||||
set(GLFW_VERSION_PATCH "1")
|
||||
set(GLFW_VERSION_EXTRA "")
|
||||
set(GLFW_VERSION "${GLFW_VERSION_MAJOR}.${GLFW_VERSION_MINOR}")
|
||||
set(GLFW_VERSION_FULL "${GLFW_VERSION}.${GLFW_VERSION_PATCH}${GLFW_VERSION_EXTRA}")
|
||||
set(LIB_SUFFIX "" CACHE STRING "Takes an empty string or 64. Directory where lib will be installed: lib or lib64")
|
||||
project(GLFW VERSION 3.5.0 LANGUAGES C HOMEPAGE_URL "https://www.glfw.org/")
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
string(COMPARE EQUAL "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}" GLFW_STANDALONE)
|
||||
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
|
||||
option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" ON)
|
||||
option(GLFW_BUILD_TESTS "Build the GLFW test programs" ON)
|
||||
option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" ${GLFW_STANDALONE})
|
||||
option(GLFW_BUILD_TESTS "Build the GLFW test programs" ${GLFW_STANDALONE})
|
||||
option(GLFW_BUILD_DOCS "Build the GLFW documentation" ON)
|
||||
option(GLFW_INSTALL "Generate installation target" ON)
|
||||
option(GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF)
|
||||
|
||||
if (WIN32)
|
||||
option(GLFW_USE_DWM_SWAP_INTERVAL "Set swap interval even when DWM compositing is enabled" OFF)
|
||||
option(GLFW_USE_OPTIMUS_HPG "Force use of high-performance GPU on Optimus systems" OFF)
|
||||
include(GNUInstallDirs)
|
||||
include(CMakeDependentOption)
|
||||
|
||||
if (GLFW_USE_OSMESA)
|
||||
message(FATAL_ERROR "GLFW_USE_OSMESA has been removed; set the GLFW_PLATFORM init hint")
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
option(GLFW_BUILD_UNIVERSAL "Build GLFW as a Universal Binary" OFF)
|
||||
option(GLFW_USE_CHDIR "Make glfwInit chdir to Contents/Resources" ON)
|
||||
option(GLFW_USE_MENUBAR "Populate the menu bar on first window creation" ON)
|
||||
option(GLFW_USE_RETINA "Use the full resolution of Retina displays" ON)
|
||||
else()
|
||||
option(GLFW_USE_EGL "Use EGL for context creation" OFF)
|
||||
if (DEFINED GLFW_USE_WAYLAND AND UNIX AND NOT APPLE)
|
||||
message(FATAL_ERROR
|
||||
"GLFW_USE_WAYLAND has been removed; delete the CMake cache and set GLFW_BUILD_WAYLAND and GLFW_BUILD_X11 instead")
|
||||
endif()
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
option(GLFW_USE_WAYLAND "Use Wayland for context creation (implies EGL as well)" OFF)
|
||||
option(GLFW_USE_MIR "Use Mir for context creation (implies EGL as well)" OFF)
|
||||
endif()
|
||||
cmake_dependent_option(GLFW_BUILD_WIN32 "Build support for Win32" ON "WIN32" OFF)
|
||||
cmake_dependent_option(GLFW_BUILD_COCOA "Build support for Cocoa" ON "APPLE" OFF)
|
||||
cmake_dependent_option(GLFW_BUILD_X11 "Build support for X11" ON "UNIX;NOT APPLE" OFF)
|
||||
cmake_dependent_option(GLFW_BUILD_WAYLAND "Build support for Wayland" ON "UNIX;NOT APPLE" OFF)
|
||||
|
||||
if (MSVC)
|
||||
option(USE_MSVC_RUNTIME_LIBRARY_DLL "Use MSVC runtime library DLL" ON)
|
||||
endif()
|
||||
cmake_dependent_option(GLFW_USE_HYBRID_HPG "Force use of high-performance GPU on hybrid systems" OFF
|
||||
"WIN32" OFF)
|
||||
cmake_dependent_option(USE_MSVC_RUNTIME_LIBRARY_DLL "Use MSVC runtime library DLL" ON
|
||||
"MSVC" OFF)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set(_GLFW_BUILD_DLL 1)
|
||||
endif()
|
||||
set(GLFW_LIBRARY_TYPE "${GLFW_LIBRARY_TYPE}" CACHE STRING
|
||||
"Library type override for GLFW (SHARED, STATIC, OBJECT, or empty to follow BUILD_SHARED_LIBS)")
|
||||
|
||||
if (GLFW_USE_WAYLAND)
|
||||
set(GLFW_USE_EGL ON)
|
||||
elseif (GLFW_USE_MIR)
|
||||
set(GLFW_USE_EGL ON)
|
||||
endif()
|
||||
|
||||
if (GLFW_USE_EGL)
|
||||
set(GLFW_CLIENT_LIBRARY "opengl" CACHE STRING
|
||||
"The client library to use; one of opengl, glesv1 or glesv2")
|
||||
|
||||
if (${GLFW_CLIENT_LIBRARY} STREQUAL "opengl")
|
||||
set(_GLFW_USE_OPENGL 1)
|
||||
elseif (${GLFW_CLIENT_LIBRARY} STREQUAL "glesv1")
|
||||
set(_GLFW_USE_GLESV1 1)
|
||||
elseif (${GLFW_CLIENT_LIBRARY} STREQUAL "glesv2")
|
||||
set(_GLFW_USE_GLESV2 1)
|
||||
if (GLFW_LIBRARY_TYPE)
|
||||
if (GLFW_LIBRARY_TYPE STREQUAL "SHARED")
|
||||
set(GLFW_BUILD_SHARED_LIBRARY TRUE)
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported client library")
|
||||
endif()
|
||||
|
||||
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMake/modules")
|
||||
find_package(EGL REQUIRED)
|
||||
|
||||
if (NOT _GLFW_USE_OPENGL)
|
||||
set(GLFW_BUILD_EXAMPLES OFF)
|
||||
set(GLFW_BUILD_TESTS OFF)
|
||||
message(STATUS "NOTE: Examples and tests require OpenGL")
|
||||
set(GLFW_BUILD_SHARED_LIBRARY FALSE)
|
||||
endif()
|
||||
else()
|
||||
set(_GLFW_USE_OPENGL 1)
|
||||
set(GLFW_BUILD_SHARED_LIBRARY ${BUILD_SHARED_LIBS})
|
||||
endif()
|
||||
|
||||
if (_GLFW_USE_OPENGL)
|
||||
find_package(OpenGL REQUIRED)
|
||||
elseif (_GLFW_USE_GLESV1)
|
||||
find_package(GLESv1 REQUIRED)
|
||||
elseif (_GLFW_USE_GLESV2)
|
||||
find_package(GLESv2 REQUIRED)
|
||||
endif()
|
||||
list(APPEND CMAKE_MODULE_PATH "${GLFW_SOURCE_DIR}/CMake/modules")
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
if (GLFW_BUILD_DOCS)
|
||||
set(DOXYGEN_SKIP_DOT TRUE)
|
||||
find_package(Doxygen)
|
||||
|
||||
if (GLFW_DOCUMENT_INTERNALS)
|
||||
set(GLFW_INTERNAL_DOCS "${GLFW_SOURCE_DIR}/src/internal.h ${GLFW_SOURCE_DIR}/docs/internal.dox")
|
||||
endif()
|
||||
#--------------------------------------------------------------------
|
||||
# Report backend selection
|
||||
#--------------------------------------------------------------------
|
||||
if (GLFW_BUILD_WIN32)
|
||||
message(STATUS "Including Win32 support")
|
||||
endif()
|
||||
if (GLFW_BUILD_COCOA)
|
||||
message(STATUS "Including Cocoa support")
|
||||
endif()
|
||||
if (GLFW_BUILD_WAYLAND)
|
||||
message(STATUS "Including Wayland support")
|
||||
endif()
|
||||
if (GLFW_BUILD_X11)
|
||||
message(STATUS "Including X11 support")
|
||||
endif()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Set compiler specific flags
|
||||
# Apply Microsoft C runtime library option
|
||||
# This is here because it also applies to tests and examples
|
||||
#--------------------------------------------------------------------
|
||||
if (UNIX)
|
||||
add_definitions(-Wall)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_definitions(-fvisibility=hidden)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
|
||||
if (NOT USE_MSVC_RUNTIME_LIBRARY_DLL)
|
||||
foreach (flag CMAKE_C_FLAGS
|
||||
CMAKE_C_FLAGS_DEBUG
|
||||
CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_MINSIZEREL
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO)
|
||||
|
||||
if (${flag} MATCHES "/MD")
|
||||
string(REGEX REPLACE "/MD" "/MT" ${flag} "${${flag}}")
|
||||
endif()
|
||||
if (${flag} MATCHES "/MDd")
|
||||
string(REGEX REPLACE "/MDd" "/MTd" ${flag} "${${flag}}")
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (MINGW)
|
||||
# Enable link-time exploit mitigation features enabled by default on MSVC
|
||||
|
||||
include(CheckCCompilerFlag)
|
||||
|
||||
# Compatibility with data execution prevention (DEP)
|
||||
set(CMAKE_REQUIRED_FLAGS "-Wl,--nxcompat")
|
||||
check_c_compiler_flag("" _GLFW_HAS_DEP)
|
||||
if (_GLFW_HAS_DEP)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--nxcompat ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
endif()
|
||||
|
||||
# Compatibility with address space layout randomization (ASLR)
|
||||
set(CMAKE_REQUIRED_FLAGS "-Wl,--dynamicbase")
|
||||
check_c_compiler_flag("" _GLFW_HAS_ASLR)
|
||||
if (_GLFW_HAS_ASLR)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--dynamicbase ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
endif()
|
||||
|
||||
# Compatibility with 64-bit address space layout randomization (ASLR)
|
||||
set(CMAKE_REQUIRED_FLAGS "-Wl,--high-entropy-va")
|
||||
check_c_compiler_flag("" _GLFW_HAS_64ASLR)
|
||||
if (_GLFW_HAS_64ASLR)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--high-entropy-va ${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Detect and select backend APIs
|
||||
#--------------------------------------------------------------------
|
||||
if (WIN32)
|
||||
set(_GLFW_WIN32 1)
|
||||
message(STATUS "Using Win32 for window creation")
|
||||
|
||||
if (GLFW_USE_EGL)
|
||||
set(_GLFW_EGL 1)
|
||||
message(STATUS "Using EGL for context creation")
|
||||
else()
|
||||
set(_GLFW_WGL 1)
|
||||
message(STATUS "Using WGL for context creation")
|
||||
endif()
|
||||
elseif (APPLE)
|
||||
set(_GLFW_COCOA 1)
|
||||
message(STATUS "Using Cocoa for window creation")
|
||||
set(_GLFW_NSGL 1)
|
||||
message(STATUS "Using NSGL for context creation")
|
||||
elseif (UNIX)
|
||||
if (GLFW_USE_WAYLAND)
|
||||
set(_GLFW_WAYLAND 1)
|
||||
message(STATUS "Using Wayland for window creation")
|
||||
elseif (GLFW_USE_MIR)
|
||||
set(_GLFW_MIR 1)
|
||||
message(STATUS "Using Mir for window creation")
|
||||
else()
|
||||
set(_GLFW_X11 1)
|
||||
message(STATUS "Using X11 for window creation")
|
||||
endif()
|
||||
|
||||
if (GLFW_USE_EGL)
|
||||
set(_GLFW_EGL 1)
|
||||
message(STATUS "Using EGL for context creation")
|
||||
else()
|
||||
set(_GLFW_GLX 1)
|
||||
message(STATUS "Using GLX for context creation")
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "No supported platform was detected")
|
||||
endif()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Use Win32 for window creation
|
||||
#--------------------------------------------------------------------
|
||||
if (_GLFW_WIN32)
|
||||
|
||||
list(APPEND glfw_PKG_LIBS "-lgdi32")
|
||||
|
||||
if (GLFW_USE_DWM_SWAP_INTERVAL)
|
||||
set(_GLFW_USE_DWM_SWAP_INTERVAL 1)
|
||||
endif()
|
||||
if (GLFW_USE_OPTIMUS_HPG)
|
||||
set(_GLFW_USE_OPTIMUS_HPG 1)
|
||||
endif()
|
||||
|
||||
# HACK: When building on MinGW, WINVER and UNICODE need to be defined before
|
||||
# the inclusion of stddef.h (by glfw3.h), which is itself included before
|
||||
# win32_platform.h. We define them here until a saner solution can be found
|
||||
# NOTE: MinGW-w64 and Visual C++ do /not/ need this hack.
|
||||
if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
|
||||
add_definitions(-DUNICODE -DWINVER=0x0501)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Use WGL for context creation
|
||||
#--------------------------------------------------------------------
|
||||
if (_GLFW_WGL)
|
||||
|
||||
list(APPEND glfw_PKG_LIBS "-lopengl32")
|
||||
|
||||
list(APPEND glfw_INCLUDE_DIRS "${OPENGL_INCLUDE_DIR}")
|
||||
list(APPEND glfw_LIBRARIES "${OPENGL_gl_LIBRARY}")
|
||||
endif()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Use X11 for window creation
|
||||
#--------------------------------------------------------------------
|
||||
if (_GLFW_X11)
|
||||
|
||||
find_package(X11 REQUIRED)
|
||||
|
||||
list(APPEND glfw_PKG_DEPS "x11")
|
||||
|
||||
# Set up library and include paths
|
||||
list(APPEND glfw_INCLUDE_DIRS "${X11_X11_INCLUDE_PATH}")
|
||||
list(APPEND glfw_LIBRARIES "${X11_X11_LIB}" "${CMAKE_THREAD_LIBS_INIT}")
|
||||
if (UNIX AND NOT APPLE)
|
||||
list(APPEND glfw_LIBRARIES "${RT_LIBRARY}")
|
||||
endif()
|
||||
|
||||
# Check for XRandR (modern resolution switching and gamma control)
|
||||
if (NOT X11_Xrandr_FOUND)
|
||||
message(FATAL_ERROR "The RandR library and headers were not found")
|
||||
endif()
|
||||
|
||||
list(APPEND glfw_INCLUDE_DIRS "${X11_Xrandr_INCLUDE_PATH}")
|
||||
list(APPEND glfw_LIBRARIES "${X11_Xrandr_LIB}")
|
||||
list(APPEND glfw_PKG_DEPS "xrandr")
|
||||
|
||||
# Check for Xinerama (legacy multi-monitor support)
|
||||
if (NOT X11_Xinerama_FOUND)
|
||||
message(FATAL_ERROR "The Xinerama library and headers were not found")
|
||||
endif()
|
||||
|
||||
list(APPEND glfw_INCLUDE_DIRS "${X11_Xinerama_INCLUDE_PATH}")
|
||||
list(APPEND glfw_LIBRARIES "${X11_Xinerama_LIB}")
|
||||
list(APPEND glfw_PKG_DEPS "xinerama")
|
||||
|
||||
# Check for XInput (high-resolution cursor motion)
|
||||
if (X11_Xinput_FOUND)
|
||||
list(APPEND glfw_INCLUDE_DIRS "${X11_Xinput_INCLUDE_PATH}")
|
||||
list(APPEND glfw_PKG_DEPS "xi")
|
||||
|
||||
if (X11_Xinput_LIB)
|
||||
list(APPEND glfw_LIBRARIES "${X11_Xinput_LIB}")
|
||||
else()
|
||||
# Backwards compatibility (bug in CMake 2.8.7)
|
||||
list(APPEND glfw_LIBRARIES Xi)
|
||||
endif()
|
||||
|
||||
set(_GLFW_HAS_XINPUT TRUE)
|
||||
endif()
|
||||
|
||||
# Check for Xf86VidMode (fallback gamma control)
|
||||
if (X11_xf86vmode_FOUND)
|
||||
list(APPEND glfw_INCLUDE_DIRS "${X11_xf86vmode_INCLUDE_PATH}")
|
||||
list(APPEND glfw_PKG_DEPS "xxf86vm")
|
||||
|
||||
if (X11_Xxf86vm_LIB)
|
||||
list(APPEND glfw_LIBRARIES "${X11_Xxf86vm_LIB}")
|
||||
else()
|
||||
# Backwards compatibility (see CMake bug 0006976)
|
||||
list(APPEND glfw_LIBRARIES Xxf86vm)
|
||||
endif()
|
||||
|
||||
set(_GLFW_HAS_XF86VM TRUE)
|
||||
endif()
|
||||
|
||||
# Check for Xkb (X keyboard extension)
|
||||
if (NOT X11_Xkb_FOUND)
|
||||
message(FATAL_ERROR "The X keyboard extension headers were not found")
|
||||
endif()
|
||||
|
||||
list(APPEND glfw_INCLUDE_DIR "${X11_Xkb_INCLUDE_PATH}")
|
||||
|
||||
find_library(RT_LIBRARY rt)
|
||||
mark_as_advanced(RT_LIBRARY)
|
||||
if (RT_LIBRARY)
|
||||
list(APPEND glfw_LIBRARIES "${RT_LIBRARY}")
|
||||
list(APPEND glfw_PKG_LIBS "-lrt")
|
||||
endif()
|
||||
|
||||
find_library(MATH_LIBRARY m)
|
||||
mark_as_advanced(MATH_LIBRARY)
|
||||
if (MATH_LIBRARY)
|
||||
list(APPEND glfw_LIBRARIES "${MATH_LIBRARY}")
|
||||
list(APPEND glfw_PKG_LIBS "-lm")
|
||||
endif()
|
||||
|
||||
# Check for Xcursor
|
||||
if (NOT X11_Xcursor_FOUND)
|
||||
message(FATAL_ERROR "The Xcursor libraries and headers were not found")
|
||||
endif()
|
||||
|
||||
list(APPEND glfw_INCLUDE_DIR "${X11_Xcursor_INCLUDE_PATH}")
|
||||
list(APPEND glfw_LIBRARIES "${X11_Xcursor_LIB}")
|
||||
list(APPEND glfw_PKG_DEPS "xcursor")
|
||||
|
||||
endif()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Use Wayland for window creation
|
||||
#--------------------------------------------------------------------
|
||||
if (_GLFW_WAYLAND)
|
||||
find_package(Wayland REQUIRED)
|
||||
list(APPEND glfw_PKG_DEPS "wayland-egl")
|
||||
|
||||
list(APPEND glfw_INCLUDE_DIRS "${WAYLAND_INCLUDE_DIR}")
|
||||
list(APPEND glfw_LIBRARIES "${WAYLAND_LIBRARIES}" "${CMAKE_THREAD_LIBS_INIT}")
|
||||
|
||||
find_package(XKBCommon REQUIRED)
|
||||
list(APPEND glfw_PKG_DEPS "xkbcommon")
|
||||
list(APPEND glfw_INCLUDE_DIRS "${XKBCOMMON_INCLUDE_DIRS}")
|
||||
list(APPEND glfw_LIBRARIES "${XKBCOMMON_LIBRARY}")
|
||||
|
||||
find_library(MATH_LIBRARY m)
|
||||
mark_as_advanced(MATH_LIBRARY)
|
||||
if (MATH_LIBRARY)
|
||||
list(APPEND glfw_LIBRARIES "${MATH_LIBRARY}")
|
||||
list(APPEND glfw_PKG_LIBS "-lm")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Use Mir for window creation
|
||||
#--------------------------------------------------------------------
|
||||
if (_GLFW_MIR)
|
||||
find_package(Mir REQUIRED)
|
||||
list(APPEND glfw_PKG_DEPS "mirclient")
|
||||
|
||||
list(APPEND glfw_INCLUDE_DIRS "${MIR_INCLUDE_DIR}")
|
||||
list(APPEND glfw_LIBRARIES "${MIR_LIBRARIES}" "${CMAKE_THREAD_LIBS_INIT}")
|
||||
|
||||
find_package(XKBCommon REQUIRED)
|
||||
list(APPEND glfw_PKG_DEPS "xkbcommon")
|
||||
list(APPEND glfw_INCLUDE_DIRS "${XKBCOMMON_INCLUDE_DIRS}")
|
||||
list(APPEND glfw_LIBRARIES "${XKBCOMMON_LIBRARY}")
|
||||
|
||||
find_library(MATH_LIBRARY m)
|
||||
mark_as_advanced(MATH_LIBRARY)
|
||||
if (MATH_LIBRARY)
|
||||
list(APPEND glfw_LIBRARIES "${MATH_LIBRARY}")
|
||||
list(APPEND glfw_PKG_LIBS "-lm")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Use GLX for context creation
|
||||
#--------------------------------------------------------------------
|
||||
if (_GLFW_GLX)
|
||||
|
||||
list(APPEND glfw_INCLUDE_DIRS "${OPENGL_INCLUDE_DIR}")
|
||||
list(APPEND glfw_LIBRARIES "${OPENGL_gl_LIBRARY}")
|
||||
|
||||
list(APPEND glfw_PKG_DEPS "gl")
|
||||
|
||||
include(CheckFunctionExists)
|
||||
|
||||
set(CMAKE_REQUIRED_LIBRARIES "${OPENGL_gl_LIBRARY}")
|
||||
check_function_exists(glXGetProcAddress _GLFW_HAS_GLXGETPROCADDRESS)
|
||||
check_function_exists(glXGetProcAddressARB _GLFW_HAS_GLXGETPROCADDRESSARB)
|
||||
check_function_exists(glXGetProcAddressEXT _GLFW_HAS_GLXGETPROCADDRESSEXT)
|
||||
|
||||
if (NOT _GLFW_HAS_GLXGETPROCADDRESS AND
|
||||
NOT _GLFW_HAS_GLXGETPROCADDRESSARB AND
|
||||
NOT _GLFW_HAS_GLXGETPROCADDRESSEXT)
|
||||
message(WARNING "No glXGetProcAddressXXX variant found")
|
||||
|
||||
# Check for dlopen support as a fallback
|
||||
|
||||
set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_DL_LIBS}")
|
||||
check_function_exists(dlopen _GLFW_HAS_DLOPEN)
|
||||
if (NOT _GLFW_HAS_DLOPEN)
|
||||
message(FATAL_ERROR "No entry point retrieval mechanism found")
|
||||
endif()
|
||||
|
||||
if (CMAKE_DL_LIBS)
|
||||
list(APPEND glfw_LIBRARIES "${CMAKE_DL_LIBS}")
|
||||
list(APPEND glfw_PKG_LIBS "-l${CMAKE_DL_LIBS}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Use EGL for context creation
|
||||
#--------------------------------------------------------------------
|
||||
if (_GLFW_EGL)
|
||||
|
||||
list(APPEND glfw_INCLUDE_DIRS "${EGL_INCLUDE_DIR}")
|
||||
list(APPEND glfw_LIBRARIES "${EGL_LIBRARY}")
|
||||
|
||||
list(APPEND glfw_PKG_DEPS "egl")
|
||||
|
||||
if (_GLFW_USE_OPENGL)
|
||||
list(APPEND glfw_LIBRARIES "${OPENGL_gl_LIBRARY}")
|
||||
list(APPEND glfw_INCLUDE_DIRS "${OPENGL_INCLUDE_DIR}")
|
||||
list(APPEND glfw_PKG_DEPS "gl")
|
||||
elseif (_GLFW_USE_GLESV1)
|
||||
list(APPEND glfw_LIBRARIES "${GLESv1_LIBRARY}")
|
||||
list(APPEND glfw_INCLUDE_DIRS "${GLESv1_INCLUDE_DIR}")
|
||||
list(APPEND glfw_PKG_DEPS "glesv1_cm")
|
||||
elseif (_GLFW_USE_GLESV2)
|
||||
list(APPEND glfw_LIBRARIES "${GLESv2_LIBRARY}")
|
||||
list(APPEND glfw_INCLUDE_DIRS "${GLESv2_INCLUDE_DIR}")
|
||||
list(APPEND glfw_PKG_DEPS "glesv2")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Use Cocoa for window creation and NSOpenGL for context creation
|
||||
#--------------------------------------------------------------------
|
||||
if (_GLFW_COCOA AND _GLFW_NSGL)
|
||||
|
||||
if (GLFW_USE_MENUBAR)
|
||||
set(_GLFW_USE_MENUBAR 1)
|
||||
endif()
|
||||
|
||||
if (GLFW_USE_CHDIR)
|
||||
set(_GLFW_USE_CHDIR 1)
|
||||
endif()
|
||||
|
||||
if (GLFW_USE_RETINA)
|
||||
set(_GLFW_USE_RETINA 1)
|
||||
endif()
|
||||
|
||||
if (GLFW_BUILD_UNIVERSAL)
|
||||
message(STATUS "Building GLFW as Universal Binaries")
|
||||
set(CMAKE_OSX_ARCHITECTURES i386;x86_64)
|
||||
else()
|
||||
message(STATUS "Building GLFW only for the native architecture")
|
||||
endif()
|
||||
|
||||
# Set up library and include paths
|
||||
find_library(COCOA_FRAMEWORK Cocoa)
|
||||
find_library(IOKIT_FRAMEWORK IOKit)
|
||||
find_library(CORE_FOUNDATION_FRAMEWORK CoreFoundation)
|
||||
find_library(CORE_VIDEO_FRAMEWORK CoreVideo)
|
||||
mark_as_advanced(COCOA_FRAMEWORK
|
||||
IOKIT_FRAMEWORK
|
||||
CORE_FOUNDATION_FRAMEWORK
|
||||
CORE_VIDEO_FRAMEWORK)
|
||||
list(APPEND glfw_LIBRARIES "${COCOA_FRAMEWORK}"
|
||||
"${OPENGL_gl_LIBRARY}"
|
||||
"${IOKIT_FRAMEWORK}"
|
||||
"${CORE_FOUNDATION_FRAMEWORK}"
|
||||
"${CORE_VIDEO_FRAMEWORK}")
|
||||
|
||||
set(glfw_PKG_DEPS "")
|
||||
set(glfw_PKG_LIBS "-framework Cocoa -framework OpenGL -framework IOKit -framework CoreFoundation -framework CoreVideo")
|
||||
endif()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Export GLFW library dependencies
|
||||
#--------------------------------------------------------------------
|
||||
set(GLFW_LIBRARIES ${glfw_LIBRARIES} CACHE STRING "Dependencies of GLFW")
|
||||
foreach(arg ${glfw_PKG_DEPS})
|
||||
set(GLFW_PKG_DEPS "${GLFW_PKG_DEPS} ${arg}")
|
||||
endforeach()
|
||||
foreach(arg ${glfw_PKG_LIBS})
|
||||
set(GLFW_PKG_LIBS "${GLFW_PKG_LIBS} ${arg}")
|
||||
endforeach()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Choose library output name
|
||||
#--------------------------------------------------------------------
|
||||
if (BUILD_SHARED_LIBS AND UNIX)
|
||||
# On Unix-like systems, shared libraries can use the soname system.
|
||||
set(GLFW_LIB_NAME glfw)
|
||||
else()
|
||||
set(GLFW_LIB_NAME glfw3)
|
||||
if (MSVC AND NOT USE_MSVC_RUNTIME_LIBRARY_DLL)
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
@ -513,33 +80,17 @@ endif()
|
||||
#--------------------------------------------------------------------
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
if (UNIX)
|
||||
set(GLFW_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/lib/cmake/glfw3/")
|
||||
else()
|
||||
set(GLFW_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/")
|
||||
endif()
|
||||
set(GLFW_CONFIG_PATH "${CMAKE_INSTALL_LIBDIR}/cmake/glfw3")
|
||||
|
||||
configure_package_config_file("${GLFW_SOURCE_DIR}/src/glfw3Config.cmake.in"
|
||||
"${GLFW_BINARY_DIR}/src/glfw3Config.cmake"
|
||||
configure_package_config_file(CMake/glfw3Config.cmake.in
|
||||
src/glfw3Config.cmake
|
||||
INSTALL_DESTINATION "${GLFW_CONFIG_PATH}"
|
||||
PATH_VARS CMAKE_INSTALL_PREFIX
|
||||
NO_CHECK_REQUIRED_COMPONENTS_MACRO)
|
||||
|
||||
write_basic_package_version_file("${GLFW_BINARY_DIR}/src/glfw3ConfigVersion.cmake"
|
||||
VERSION ${GLFW_VERSION_FULL}
|
||||
write_basic_package_version_file(src/glfw3ConfigVersion.cmake
|
||||
VERSION ${GLFW_VERSION}
|
||||
COMPATIBILITY SameMajorVersion)
|
||||
|
||||
if (GLFW_BUILD_DOCS)
|
||||
configure_file("${GLFW_SOURCE_DIR}/docs/Doxyfile.in"
|
||||
"${GLFW_BINARY_DIR}/docs/Doxyfile" @ONLY)
|
||||
endif()
|
||||
|
||||
configure_file("${GLFW_SOURCE_DIR}/src/glfw_config.h.in"
|
||||
"${GLFW_BINARY_DIR}/src/glfw_config.h" @ONLY)
|
||||
|
||||
configure_file("${GLFW_SOURCE_DIR}/src/glfw3.pc.in"
|
||||
"${GLFW_BINARY_DIR}/src/glfw3.pc" @ONLY)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Add subdirectories
|
||||
#--------------------------------------------------------------------
|
||||
@ -553,7 +104,7 @@ if (GLFW_BUILD_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
if (DOXYGEN_FOUND AND GLFW_BUILD_DOCS)
|
||||
if (GLFW_BUILD_DOCS)
|
||||
add_subdirectory(docs)
|
||||
endif()
|
||||
|
||||
@ -562,25 +113,28 @@ endif()
|
||||
# The library is installed by src/CMakeLists.txt
|
||||
#--------------------------------------------------------------------
|
||||
if (GLFW_INSTALL)
|
||||
install(DIRECTORY include/GLFW DESTINATION include
|
||||
install(DIRECTORY include/GLFW DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
FILES_MATCHING PATTERN glfw3.h PATTERN glfw3native.h)
|
||||
|
||||
install(FILES "${GLFW_BINARY_DIR}/src/glfw3Config.cmake"
|
||||
"${GLFW_BINARY_DIR}/src/glfw3ConfigVersion.cmake"
|
||||
DESTINATION lib${LIB_SUFFIX}/cmake/glfw)
|
||||
DESTINATION "${GLFW_CONFIG_PATH}")
|
||||
|
||||
install(EXPORT glfwTargets DESTINATION lib${LIB_SUFFIX}/cmake/glfw)
|
||||
install(EXPORT glfwTargets FILE glfw3Targets.cmake
|
||||
EXPORT_LINK_INTERFACE_LIBRARIES
|
||||
DESTINATION "${GLFW_CONFIG_PATH}")
|
||||
install(FILES "${GLFW_BINARY_DIR}/src/glfw3.pc"
|
||||
DESTINATION lib${LIB_SUFFIX}/pkgconfig)
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
|
||||
# Only generate this target if no higher-level project already has
|
||||
if (NOT TARGET uninstall)
|
||||
configure_file("${GLFW_SOURCE_DIR}/cmake_uninstall.cmake.in"
|
||||
"${GLFW_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)
|
||||
configure_file(CMake/cmake_uninstall.cmake.in
|
||||
cmake_uninstall.cmake IMMEDIATE @ONLY)
|
||||
|
||||
add_custom_target(uninstall
|
||||
"${CMAKE_COMMAND}" -P
|
||||
"${GLFW_BINARY_DIR}/cmake_uninstall.cmake")
|
||||
set_target_properties(uninstall PROPERTIES FOLDER "GLFW3")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
300
CONTRIBUTORS.md
Normal file
300
CONTRIBUTORS.md
Normal file
@ -0,0 +1,300 @@
|
||||
# Acknowledgements
|
||||
|
||||
GLFW exists because people around the world donated their time and lent their
|
||||
skills. This list only includes contributions to the main repository and
|
||||
excludes other invaluable contributions like language bindings and text and
|
||||
video tutorials.
|
||||
|
||||
- Bobyshev Alexander
|
||||
- Laurent Aphecetche
|
||||
- Matt Arsenault
|
||||
- Takuro Ashie
|
||||
- ashishgamedev
|
||||
- David Avedissian
|
||||
- Luca Bacci
|
||||
- Keith Bauer
|
||||
- John Bartholomew
|
||||
- Coşku Baş
|
||||
- Bayemite
|
||||
- Niklas Behrens
|
||||
- Andrew Belt
|
||||
- Nevyn Bengtsson
|
||||
- Niklas Bergström
|
||||
- Denis Bernard
|
||||
- BiBi
|
||||
- Doug Binks
|
||||
- blanco
|
||||
- Waris Boonyasiriwat
|
||||
- Kyle Brenneman
|
||||
- Rok Breulj
|
||||
- TheBrokenRail
|
||||
- Kai Burjack
|
||||
- Martin Capitanio
|
||||
- Nicolas Caramelli
|
||||
- David Carlier
|
||||
- Arturo Castro
|
||||
- Jose Luis Cercós Pita
|
||||
- Chi-kwan Chan
|
||||
- Victor Chernyakin
|
||||
- TheChocolateOre
|
||||
- Ali Chraghi
|
||||
- Joseph Chua
|
||||
- Ian Clarkson
|
||||
- Michał Cichoń
|
||||
- Lambert Clara
|
||||
- Anna Clarke
|
||||
- Josh Codd
|
||||
- Yaron Cohen-Tal
|
||||
- Omar Cornut
|
||||
- Andrew Corrigan
|
||||
- Bailey Cosier
|
||||
- Noel Cower
|
||||
- James Cowgill
|
||||
- CuriouserThing
|
||||
- Bill Currie
|
||||
- Jason Daly
|
||||
- danhambleton
|
||||
- Jarrod Davis
|
||||
- Olivier Delannoy
|
||||
- Paul R. Deppe
|
||||
- Michael Dickens
|
||||
- Роман Донченко
|
||||
- Mario Dorn
|
||||
- Wolfgang Draxinger
|
||||
- Jonathan Dummer
|
||||
- Ralph Eastwood
|
||||
- Fredrik Ehnbom
|
||||
- Robin Eklind
|
||||
- Jan Ekström
|
||||
- Siavash Eliasi
|
||||
- er-azh
|
||||
- Ahmad Fatoum
|
||||
- Nikita Fediuchin
|
||||
- Felipe Ferreira
|
||||
- Michael Fogleman
|
||||
- forworldm
|
||||
- Jason Francis
|
||||
- Gerald Franz
|
||||
- Mário Freitas
|
||||
- GeO4d
|
||||
- Marcus Geelnard
|
||||
- Gegy
|
||||
- ghuser404
|
||||
- Charles Giessen
|
||||
- Ryan C. Gordon
|
||||
- Stephen Gowen
|
||||
- Kovid Goyal
|
||||
- Kevin Grandemange
|
||||
- Eloi Marín Gratacós
|
||||
- Grzesiek11
|
||||
- Stefan Gustavson
|
||||
- Andrew Gutekanst
|
||||
- Stephen Gutekanst
|
||||
- Jonathan Hale
|
||||
- Daniel Hauser
|
||||
- hdf89shfdfs
|
||||
- Moritz Heinemann
|
||||
- Sylvain Hellegouarch
|
||||
- Björn Hempel
|
||||
- Matthew Henry
|
||||
- heromyth
|
||||
- Lucas Hinderberger
|
||||
- Paul Holden
|
||||
- Hajime Hoshi
|
||||
- Warren Hu
|
||||
- Charles Huber
|
||||
- Brent Huisman
|
||||
- Florian Hülsmann
|
||||
- illustris
|
||||
- InKryption
|
||||
- IntellectualKitty
|
||||
- Aaron Jacobs
|
||||
- JannikGM
|
||||
- Erik S. V. Jansson
|
||||
- jjYBdx4IL
|
||||
- Peter Johnson
|
||||
- Toni Jovanoski
|
||||
- Arseny Kapoulkine
|
||||
- Cem Karan
|
||||
- Osman Keskin
|
||||
- Koray Kilinc
|
||||
- Josh Kilmer
|
||||
- Byunghoon Kim
|
||||
- Cameron King
|
||||
- Peter Knut
|
||||
- Christoph Kubisch
|
||||
- Yuri Kunde Schlesner
|
||||
- Rokas Kupstys
|
||||
- Konstantin Käfer
|
||||
- Eric Larson
|
||||
- Guillaume Lebrun
|
||||
- Francis Lecavalier
|
||||
- Jong Won Lee
|
||||
- Robin Leffmann
|
||||
- Glenn Lewis
|
||||
- Shane Liesegang
|
||||
- Anders Lindqvist
|
||||
- Leon Linhart
|
||||
- Marco Lizza
|
||||
- lo-v-ol
|
||||
- Eyal Lotem
|
||||
- Aaron Loucks
|
||||
- Ned Loynd
|
||||
- Luflosi
|
||||
- lukect
|
||||
- Tristam MacDonald
|
||||
- Jean-Luc Mackail
|
||||
- Hans Mackowiak
|
||||
- Ramiro Magno
|
||||
- Дмитри Малышев
|
||||
- Zbigniew Mandziejewicz
|
||||
- Adam Marcus
|
||||
- Célestin Marot
|
||||
- Kyle McDonald
|
||||
- David V. McKay
|
||||
- David Medlock
|
||||
- Bryce Mehring
|
||||
- Jonathan Mercier
|
||||
- Marcel Metz
|
||||
- Liam Middlebrook
|
||||
- mightgoyardstill
|
||||
- Ave Milia
|
||||
- Icyllis Milica
|
||||
- Jonathan Miller
|
||||
- Kenneth Miller
|
||||
- Bruce Mitchener
|
||||
- Jack Moffitt
|
||||
- Ravi Mohan
|
||||
- Jeff Molofee
|
||||
- Alexander Monakov
|
||||
- Pierre Morel
|
||||
- Jon Morton
|
||||
- Pierre Moulon
|
||||
- Martins Mozeiko
|
||||
- Pascal Muetschard
|
||||
- James Murphy
|
||||
- Julian Møller
|
||||
- Julius Häger
|
||||
- Nat!
|
||||
- NateIsStalling
|
||||
- ndogxj
|
||||
- F. Nedelec
|
||||
- n3rdopolis
|
||||
- Kristian Nielsen
|
||||
- Joel Niemelä
|
||||
- Victor Nova
|
||||
- Kamil Nowakowski
|
||||
- onox
|
||||
- Denis Ovod
|
||||
- Ozzy
|
||||
- Andri Pálsson
|
||||
- luz paz
|
||||
- Peoro
|
||||
- Braden Pellett
|
||||
- Christopher Pelloux
|
||||
- Michael Pennington
|
||||
- Arturo J. Pérez
|
||||
- Vladimir Perminov
|
||||
- Olivier Perret
|
||||
- Anthony Pesch
|
||||
- Orson Peters
|
||||
- Emmanuel Gil Peyrot
|
||||
- Cyril Pichard
|
||||
- Pilzschaf
|
||||
- Keith Pitt
|
||||
- Stanislav Podgorskiy
|
||||
- Konstantin Podsvirov
|
||||
- Nathan Poirier
|
||||
- Pokechu22
|
||||
- Alexandre Pretyman
|
||||
- Pablo Prietz
|
||||
- przemekmirek
|
||||
- pthom
|
||||
- Martin Pulec
|
||||
- Guillaume Racicot
|
||||
- Juan Ramos
|
||||
- Christian Rauch
|
||||
- Philip Rideout
|
||||
- Eddie Ringle
|
||||
- Max Risuhin
|
||||
- Joe Roback
|
||||
- Jorge Rodriguez
|
||||
- Jari Ronkainen
|
||||
- Luca Rood
|
||||
- Ed Ropple
|
||||
- Aleksey Rybalkin
|
||||
- Mikko Rytkönen
|
||||
- Riku Salminen
|
||||
- Yoshinori Sano
|
||||
- Brandon Schaefer
|
||||
- Sebastian Schuberth
|
||||
- Scr3amer
|
||||
- Jan Schuerkamp
|
||||
- Christian Sdunek
|
||||
- Matt Sealey
|
||||
- Steve Sexton
|
||||
- Arkady Shapkin
|
||||
- Mingjie Shen
|
||||
- Ali Sherief
|
||||
- Yoshiki Shibukawa
|
||||
- Dmitri Shuralyov
|
||||
- Joao da Silva
|
||||
- Daniel Sieger
|
||||
- Daljit Singh
|
||||
- Michael Skec
|
||||
- Daniel Skorupski
|
||||
- Slemmie
|
||||
- Anthony Smith
|
||||
- Bradley Smith
|
||||
- Cliff Smolinsky
|
||||
- Patrick Snape
|
||||
- Erlend Sogge Heggen
|
||||
- Olivier Sohn
|
||||
- Julian Squires
|
||||
- Johannes Stein
|
||||
- Pontus Stenetorp
|
||||
- Michael Stocker
|
||||
- Justin Stoecker
|
||||
- Elviss Strazdins
|
||||
- Paul Sultana
|
||||
- Nathan Sweet
|
||||
- TTK-Bandit
|
||||
- Nuno Teixeira
|
||||
- Jared Tiala
|
||||
- Sergey Tikhomirov
|
||||
- Arthur Tombs
|
||||
- TronicLabs
|
||||
- Ioannis Tsakpinis
|
||||
- Samuli Tuomola
|
||||
- Matthew Turner
|
||||
- urraka
|
||||
- Elias Vanderstuyft
|
||||
- Stef Velzel
|
||||
- Jari Vetoniemi
|
||||
- Ricardo Vieira
|
||||
- Nicholas Vitovitch
|
||||
- Vladimír Vondruš
|
||||
- Simon Voordouw
|
||||
- Corentin Wallez
|
||||
- Torsten Walluhn
|
||||
- Patrick Walton
|
||||
- Jim Wang
|
||||
- Xo Wang
|
||||
- Andre Weissflog
|
||||
- Jay Weisskopf
|
||||
- Frank Wille
|
||||
- Andy Williams
|
||||
- Joel Winarske
|
||||
- Richard A. Wilkes
|
||||
- Tatsuya Yatagawa
|
||||
- Ryogo Yoshimura
|
||||
- Lukas Zanner
|
||||
- Andrey Zholos
|
||||
- Aihui Zhu
|
||||
- Santi Zupancic
|
||||
- Jonas Ådahl
|
||||
- Lasse Öörni
|
||||
- Leonard König
|
||||
- All the unmentioned and anonymous contributors in the GLFW community, for bug
|
||||
reports, patches, feedback, testing and encouragement
|
||||
|
@ -1,5 +1,6 @@
|
||||
Copyright (c) 2002-2006 Marcus Geelnard
|
||||
Copyright (c) 2006-2010 Camilla Berglund <elmindreda@elmindreda.org>
|
||||
|
||||
Copyright (c) 2006-2019 Camilla Löwy
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
290
README.md
290
README.md
@ -1,213 +1,153 @@
|
||||
# GLFW
|
||||
|
||||
[](https://github.com/glfw/glfw/actions)
|
||||
[](https://ci.appveyor.com/project/elmindreda/glfw)
|
||||
|
||||
## Introduction
|
||||
|
||||
GLFW is a free, Open Source, multi-platform library for OpenGL and OpenGL ES
|
||||
GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan
|
||||
application development. It provides a simple, platform-independent API for
|
||||
creating windows and contexts, reading input, handling events, etc.
|
||||
creating windows, contexts and surfaces, reading input, handling events, etc.
|
||||
|
||||
Version 3.1.1 adds fixes for a number of bugs that together affect all supported
|
||||
platforms, most notably workarounds for bugs in some popular window managers.
|
||||
GLFW natively supports Windows, macOS and Linux and other Unix-like systems. On
|
||||
Linux both Wayland and X11 are supported.
|
||||
|
||||
GLFW is licensed under the [zlib/libpng
|
||||
license](https://www.glfw.org/license.html).
|
||||
|
||||
You can [download](https://www.glfw.org/download.html) the latest stable release
|
||||
as source or Windows binaries. Each release starting with 3.0 also has
|
||||
a corresponding [annotated tag](https://github.com/glfw/glfw/releases) with
|
||||
source and binary archives.
|
||||
|
||||
The [documentation](https://www.glfw.org/docs/latest/) is available online and is
|
||||
included in all source and binary archives. See the [release
|
||||
notes](https://www.glfw.org/docs/latest/news.html) for new features, caveats and
|
||||
deprecations in the latest release. For more details see the [version
|
||||
history](https://www.glfw.org/changelog.html).
|
||||
|
||||
The `master` branch is the stable integration branch and _should_ always compile
|
||||
and run on all supported platforms, although details of newly added features may
|
||||
change until they have been included in a release. New features and many bug
|
||||
fixes live in [other branches](https://github.com/glfw/glfw/branches/all) until
|
||||
they are stable enough to merge.
|
||||
|
||||
If you are new to GLFW, you may find the
|
||||
[introductory tutorial](http://www.glfw.org/docs/latest/quick.html) for GLFW
|
||||
3 useful. If you have used GLFW 2 in the past, there is a
|
||||
[transition guide](http://www.glfw.org/docs/latest/moving.html) for moving to
|
||||
the GLFW 3 API.
|
||||
[tutorial](https://www.glfw.org/docs/latest/quick.html) for GLFW 3 useful. If
|
||||
you have used GLFW 2 in the past, there is a [transition
|
||||
guide](https://www.glfw.org/docs/latest/moving.html) for moving to the GLFW
|
||||
3 API.
|
||||
|
||||
Note that a number of source files have been added or renamed in 3.1, which may
|
||||
require you to update any custom build files you have.
|
||||
GLFW exists because of the contributions of [many people](CONTRIBUTORS.md)
|
||||
around the world, whether by reporting bugs, providing community support, adding
|
||||
features, reviewing or testing code, debugging, proofreading docs, suggesting
|
||||
features or fixing bugs.
|
||||
|
||||
|
||||
## Compiling GLFW
|
||||
|
||||
See the [Compiling GLFW](http://www.glfw.org/docs/latest/compile.html) guide in
|
||||
the GLFW documentation.
|
||||
GLFW is written primarily in C99, with parts of macOS support being written in
|
||||
Objective-C. GLFW itself requires only the headers and libraries for your OS
|
||||
and window system. It does not need any additional headers for context creation
|
||||
APIs (WGL, GLX, EGL, NSGL, OSMesa) or rendering APIs (OpenGL, OpenGL ES, Vulkan)
|
||||
to enable support for them.
|
||||
|
||||
GLFW supports compilation on Windows with Visual C++ 2013 and later, MinGW and
|
||||
MinGW-w64, on macOS with Clang and on Linux and other Unix-like systems with GCC
|
||||
and Clang. It will likely compile in other environments as well, but this is
|
||||
not regularly tested.
|
||||
|
||||
There are [pre-compiled binaries](https://www.glfw.org/download.html) available
|
||||
for all supported compilers on Windows and macOS.
|
||||
|
||||
See the [compilation guide](https://www.glfw.org/docs/latest/compile.html) for
|
||||
more information about how to compile GLFW yourself.
|
||||
|
||||
|
||||
## Using GLFW
|
||||
|
||||
See the
|
||||
[Building programs that use GLFW](http://www.glfw.org/docs/latest/build.html)
|
||||
guide in the GLFW documentation.
|
||||
See the [documentation](https://www.glfw.org/docs/latest/) for tutorials, guides
|
||||
and the API reference.
|
||||
|
||||
|
||||
## Contributing to GLFW
|
||||
|
||||
See the [contribution
|
||||
guide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for
|
||||
more information.
|
||||
|
||||
|
||||
## System requirements
|
||||
|
||||
GLFW supports Windows XP and later and macOS 10.11 and later. Linux and other
|
||||
Unix-like systems running the X Window System are supported even without
|
||||
a desktop environment or modern extensions, although some features require
|
||||
a running window or clipboard manager. The OSMesa backend requires Mesa 6.3.
|
||||
|
||||
See the [compatibility guide](https://www.glfw.org/docs/latest/compat.html)
|
||||
in the documentation for more information.
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
GLFW itself needs only CMake 3.16 or later and the headers and libraries for your
|
||||
OS and window system.
|
||||
|
||||
The examples and test programs depend on a number of tiny libraries. These are
|
||||
located in the `deps/` directory.
|
||||
|
||||
- [getopt\_port](https://github.com/kimgr/getopt_port/) for examples
|
||||
with command-line options
|
||||
- [TinyCThread](https://github.com/tinycthread/tinycthread) for threaded
|
||||
examples
|
||||
- [glad2](https://github.com/Dav1dde/glad) for loading OpenGL and Vulkan
|
||||
functions
|
||||
- [linmath.h](https://github.com/datenwolf/linmath.h) for linear algebra in
|
||||
examples
|
||||
- [Nuklear](https://github.com/Immediate-Mode-UI/Nuklear) for test and example UI
|
||||
- [stb\_image\_write](https://github.com/nothings/stb) for writing images to disk
|
||||
|
||||
The documentation is generated with [Doxygen](https://doxygen.org/) if CMake can
|
||||
find that tool.
|
||||
|
||||
|
||||
## Reporting bugs
|
||||
|
||||
Bugs are reported to our [issue tracker](https://github.com/glfw/glfw/issues).
|
||||
Please always include the name and version of the OS where the bug occurs and
|
||||
the version of GLFW used. If you have cloned it, include the commit ID used.
|
||||
|
||||
If it's a build issue, please also include the build log and the name and
|
||||
version of your development environment.
|
||||
|
||||
If it's a context creation issue, please also include the make and model of your
|
||||
graphics card and the version of your driver.
|
||||
|
||||
This will help both us and other people experiencing the same bug.
|
||||
Please check the [contribution
|
||||
guide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for
|
||||
information on what to include when reporting a bug.
|
||||
|
||||
|
||||
## Dependencies
|
||||
## Changelog since 3.4
|
||||
|
||||
GLFW bundles a number of dependencies in the `deps/` directory.
|
||||
|
||||
- [Khronos extension headers](https://www.opengl.org/registry/) for API
|
||||
extension symbols used by GLFW
|
||||
- [getopt\_port](https://github.com/kimgr/getopt_port/) for examples
|
||||
with command-line options
|
||||
- [TinyCThread](https://github.com/tinycthread/tinycthread) for threaded
|
||||
examples
|
||||
- An OpenGL 3.2 core loader generated by
|
||||
[glad](https://github.com/Dav1dde/glad) for examples using modern OpenGL
|
||||
|
||||
|
||||
## Changelog
|
||||
|
||||
- Made library compilation fail if any header option macros are defined
|
||||
- Removed support for LCC and Borland C++
|
||||
- Bugfix: `glfwSetTime` silently accepted invalid values
|
||||
- [Cocoa] Bugfix: `NSHighResolutionCapable` was not enabled for test and
|
||||
example programs
|
||||
- [Cocoa] Bugfix: Sleeping monitors were not included in the monitor list
|
||||
- [Cocoa] Bugfix: `glfwSetWindowSize` did not change the video mode for full
|
||||
screen windows
|
||||
- [X11] Added support for Cygwin-X
|
||||
- [X11] Made XInput2 optional at compile-time
|
||||
- [X11] Made Xxf86vm optional at compile-time
|
||||
- [X11] Bugfix: Moved `_NET_REQUEST_FRAME_EXTENTS` request to
|
||||
`glfwGetWindowFrameSize` and added protocol-breaking timeout
|
||||
as a workaround for broken support in Unity, Fluxbox and Xfwm
|
||||
- [X11] Bugfix: Mouse button `GLFW_MOUSE_BUTTON_4` was never used
|
||||
- [X11] Bugfix: `glfwTerminate` could close an unrelated file descriptor
|
||||
- [X11] Bugfix: Some WMs (KWM, Fluxbox) did not respect cursor redefinition
|
||||
- [WGL] Bugfix: The context flags debug bit was not set for OpenGL ES
|
||||
- [GLX] Bugfix: The context flags debug bit was not set for OpenGL ES
|
||||
- [EGL] Bugfix: The context flags debug bit was not set for OpenGL ES
|
||||
- Added `GLFW_UNLIMITED_MOUSE_BUTTONS` input mode that allows mouse buttons beyond
|
||||
the limit of the mouse button tokens to be reported (#2423)
|
||||
- Updated minimum CMake version to 3.16 (#2541)
|
||||
- [Cocoa] Added `QuartzCore` framework as link-time dependency
|
||||
- [Cocoa] Removed support for OS X 10.10 Yosemite and earlier (#2506)
|
||||
- [Wayland] Bugfix: The fractional scaling related objects were not destroyed
|
||||
- [Wayland] Bugfix: `glfwInit` would segfault on compositor with no seat (#2517)
|
||||
- [Wayland] Bugfix: A drag entering a non-GLFW surface could cause a segfault
|
||||
- [X11] Bugfix: Running without a WM could trigger an assert (#2593,#2601,#2631)
|
||||
- [Null] Added Vulkan 'window' surface creation via `VK_EXT_headless_surface`
|
||||
- [Null] Added EGL context creation on Mesa via `EGL_MESA_platform_surfaceless`
|
||||
- [EGL] Allowed native access on Wayland with `GLFW_CONTEXT_CREATION_API` set to
|
||||
`GLFW_NATIVE_CONTEXT_API` (#2518)
|
||||
|
||||
|
||||
## Contact
|
||||
|
||||
The official website for GLFW is [glfw.org](http://www.glfw.org/). There you
|
||||
can find the latest version of GLFW, as well as news, documentation and other
|
||||
information about the project.
|
||||
On [glfw.org](https://www.glfw.org/) you can find the latest version of GLFW, as
|
||||
well as news, documentation and other information about the project.
|
||||
|
||||
If you have questions related to the use of GLFW, we have a
|
||||
[support forum](https://sourceforge.net/p/glfw/discussion/247562/), and the IRC
|
||||
channel `#glfw` on [Freenode](http://freenode.net/).
|
||||
[forum](https://discourse.glfw.org/).
|
||||
|
||||
If you have a bug to report, a patch to submit or a feature you'd like to
|
||||
request, please file it in the
|
||||
[issue tracker](https://github.com/glfw/glfw/issues) on GitHub.
|
||||
|
||||
Finally, if you're interested in helping out with the development of GLFW or
|
||||
porting it to your favorite platform, we have an occasionally active
|
||||
[developer's mailing list](https://lists.stacken.kth.se/mailman/listinfo/glfw-dev),
|
||||
or you could join us on `#glfw`.
|
||||
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
GLFW exists because people around the world donated their time and lent their
|
||||
skills.
|
||||
|
||||
- Bobyshev Alexander
|
||||
- artblanc
|
||||
- arturo
|
||||
- Matt Arsenault
|
||||
- Keith Bauer
|
||||
- John Bartholomew
|
||||
- Niklas Behrens
|
||||
- Niklas Bergström
|
||||
- Doug Binks
|
||||
- blanco
|
||||
- Martin Capitanio
|
||||
- Lambert Clara
|
||||
- Andrew Corrigan
|
||||
- Noel Cower
|
||||
- Jarrod Davis
|
||||
- Olivier Delannoy
|
||||
- Paul R. Deppe
|
||||
- Michael Dickens
|
||||
- Jonathan Dummer
|
||||
- Ralph Eastwood
|
||||
- Siavash Eliasi
|
||||
- Michael Fogleman
|
||||
- Gerald Franz
|
||||
- GeO4d
|
||||
- Marcus Geelnard
|
||||
- Eloi Marín Gratacós
|
||||
- Stefan Gustavson
|
||||
- Sylvain Hellegouarch
|
||||
- Matthew Henry
|
||||
- heromyth
|
||||
- Lucas Hinderberger
|
||||
- Paul Holden
|
||||
- Toni Jovanoski
|
||||
- Arseny Kapoulkine
|
||||
- Osman Keskin
|
||||
- Cameron King
|
||||
- Peter Knut
|
||||
- Robin Leffmann
|
||||
- Glenn Lewis
|
||||
- Shane Liesegang
|
||||
- Дмитри Малышев
|
||||
- Martins Mozeiko
|
||||
- Tristam MacDonald
|
||||
- Hans Mackowiak
|
||||
- Kyle McDonald
|
||||
- David Medlock
|
||||
- Bryce Mehring
|
||||
- Jonathan Mercier
|
||||
- Marcel Metz
|
||||
- Jonathan Miller
|
||||
- Kenneth Miller
|
||||
- Bruce Mitchener
|
||||
- Jack Moffitt
|
||||
- Jeff Molofee
|
||||
- Jon Morton
|
||||
- Pierre Moulon
|
||||
- Julian Møller
|
||||
- Kamil Nowakowski
|
||||
- Ozzy
|
||||
- Andri Pálsson
|
||||
- Peoro
|
||||
- Braden Pellett
|
||||
- Arturo J. Pérez
|
||||
- Cyril Pichard
|
||||
- Pieroman
|
||||
- Jorge Rodriguez
|
||||
- Ed Ropple
|
||||
- Aleksey Rybalkin
|
||||
- Riku Salminen
|
||||
- Brandon Schaefer
|
||||
- Sebastian Schuberth
|
||||
- Matt Sealey
|
||||
- SephiRok
|
||||
- Steve Sexton
|
||||
- Systemcluster
|
||||
- Dmitri Shuralyov
|
||||
- Daniel Skorupski
|
||||
- Bradley Smith
|
||||
- Julian Squires
|
||||
- Johannes Stein
|
||||
- Justin Stoecker
|
||||
- Nathan Sweet
|
||||
- TTK-Bandit
|
||||
- Sergey Tikhomirov
|
||||
- A. Tombs
|
||||
- Samuli Tuomola
|
||||
- urraka
|
||||
- Jari Vetoniemi
|
||||
- Ricardo Vieira
|
||||
- Simon Voordouw
|
||||
- Torsten Walluhn
|
||||
- Patrick Walton
|
||||
- Jay Weisskopf
|
||||
- Frank Wille
|
||||
- yuriks
|
||||
- Santi Zupancic
|
||||
- Jonas Ådahl
|
||||
- Lasse Öörni
|
||||
- All the unmentioned and anonymous contributors in the GLFW community, for bug
|
||||
reports, patches, feedback, testing and encouragement
|
||||
porting it to your favorite platform, join us on the forum or GitHub.
|
||||
|
||||
|
565
deps/EGL/eglext.h
vendored
565
deps/EGL/eglext.h
vendored
@ -1,565 +0,0 @@
|
||||
#ifndef __eglext_h_
|
||||
#define __eglext_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2007-2013 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#include <EGL/eglplatform.h>
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number */
|
||||
/* Current version at http://www.khronos.org/registry/egl/ */
|
||||
/* $Revision: 20690 $ on $Date: 2013-02-22 17:15:05 -0800 (Fri, 22 Feb 2013) $ */
|
||||
#define EGL_EGLEXT_VERSION 15
|
||||
|
||||
#ifndef EGL_KHR_config_attribs
|
||||
#define EGL_KHR_config_attribs 1
|
||||
#define EGL_CONFORMANT_KHR 0x3042 /* EGLConfig attribute */
|
||||
#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 /* EGL_SURFACE_TYPE bitfield */
|
||||
#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 /* EGL_SURFACE_TYPE bitfield */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_lock_surface
|
||||
#define EGL_KHR_lock_surface 1
|
||||
#define EGL_READ_SURFACE_BIT_KHR 0x0001 /* EGL_LOCK_USAGE_HINT_KHR bitfield */
|
||||
#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 /* EGL_LOCK_USAGE_HINT_KHR bitfield */
|
||||
#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 /* EGL_SURFACE_TYPE bitfield */
|
||||
#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 /* EGL_SURFACE_TYPE bitfield */
|
||||
#define EGL_MATCH_FORMAT_KHR 0x3043 /* EGLConfig attribute */
|
||||
#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 /* EGL_MATCH_FORMAT_KHR value */
|
||||
#define EGL_FORMAT_RGB_565_KHR 0x30C1 /* EGL_MATCH_FORMAT_KHR value */
|
||||
#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 /* EGL_MATCH_FORMAT_KHR value */
|
||||
#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 /* EGL_MATCH_FORMAT_KHR value */
|
||||
#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 /* eglLockSurfaceKHR attribute */
|
||||
#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 /* eglLockSurfaceKHR attribute */
|
||||
#define EGL_BITMAP_POINTER_KHR 0x30C6 /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PITCH_KHR 0x30C7 /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_ORIGIN_KHR 0x30C8 /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC /* eglQuerySurface attribute */
|
||||
#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD /* eglQuerySurface attribute */
|
||||
#define EGL_LOWER_LEFT_KHR 0x30CE /* EGL_BITMAP_ORIGIN_KHR value */
|
||||
#define EGL_UPPER_LEFT_KHR 0x30CF /* EGL_BITMAP_ORIGIN_KHR value */
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay display, EGLSurface surface);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_image
|
||||
#define EGL_KHR_image 1
|
||||
#define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */
|
||||
typedef void *EGLImageKHR;
|
||||
#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0)
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_vg_parent_image
|
||||
#define EGL_KHR_vg_parent_image 1
|
||||
#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_gl_texture_2D_image
|
||||
#define EGL_KHR_gl_texture_2D_image 1
|
||||
#define EGL_GL_TEXTURE_2D_KHR 0x30B1 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC /* eglCreateImageKHR attribute */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_gl_texture_cubemap_image
|
||||
#define EGL_KHR_gl_texture_cubemap_image 1
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 /* eglCreateImageKHR target */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_gl_texture_3D_image
|
||||
#define EGL_KHR_gl_texture_3D_image 1
|
||||
#define EGL_GL_TEXTURE_3D_KHR 0x30B2 /* eglCreateImageKHR target */
|
||||
#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_gl_renderbuffer_image
|
||||
#define EGL_KHR_gl_renderbuffer_image 1
|
||||
#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_INT64 /* EGLTimeKHR requires 64-bit uint support */
|
||||
#ifndef EGL_KHR_reusable_sync
|
||||
#define EGL_KHR_reusable_sync 1
|
||||
|
||||
typedef void* EGLSyncKHR;
|
||||
typedef khronos_utime_nanoseconds_t EGLTimeKHR;
|
||||
|
||||
#define EGL_SYNC_STATUS_KHR 0x30F1
|
||||
#define EGL_SIGNALED_KHR 0x30F2
|
||||
#define EGL_UNSIGNALED_KHR 0x30F3
|
||||
#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5
|
||||
#define EGL_CONDITION_SATISFIED_KHR 0x30F6
|
||||
#define EGL_SYNC_TYPE_KHR 0x30F7
|
||||
#define EGL_SYNC_REUSABLE_KHR 0x30FA
|
||||
#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 /* eglClientWaitSyncKHR <flags> bitfield */
|
||||
#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull
|
||||
#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0)
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync);
|
||||
EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);
|
||||
typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_image_base
|
||||
#define EGL_KHR_image_base 1
|
||||
/* Most interfaces defined by EGL_KHR_image_pixmap above */
|
||||
#define EGL_IMAGE_PRESERVED_KHR 0x30D2 /* eglCreateImageKHR attribute */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_image_pixmap
|
||||
#define EGL_KHR_image_pixmap 1
|
||||
/* Interfaces defined by EGL_KHR_image above */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_IMG_context_priority
|
||||
#define EGL_IMG_context_priority 1
|
||||
#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100
|
||||
#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101
|
||||
#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102
|
||||
#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_lock_surface2
|
||||
#define EGL_KHR_lock_surface2 1
|
||||
#define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110
|
||||
#endif
|
||||
|
||||
#ifndef EGL_NV_coverage_sample
|
||||
#define EGL_NV_coverage_sample 1
|
||||
#define EGL_COVERAGE_BUFFERS_NV 0x30E0
|
||||
#define EGL_COVERAGE_SAMPLES_NV 0x30E1
|
||||
#endif
|
||||
|
||||
#ifndef EGL_NV_depth_nonlinear
|
||||
#define EGL_NV_depth_nonlinear 1
|
||||
#define EGL_DEPTH_ENCODING_NV 0x30E2
|
||||
#define EGL_DEPTH_ENCODING_NONE_NV 0
|
||||
#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_INT64 /* EGLTimeNV requires 64-bit uint support */
|
||||
#ifndef EGL_NV_sync
|
||||
#define EGL_NV_sync 1
|
||||
#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6
|
||||
#define EGL_SYNC_STATUS_NV 0x30E7
|
||||
#define EGL_SIGNALED_NV 0x30E8
|
||||
#define EGL_UNSIGNALED_NV 0x30E9
|
||||
#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001
|
||||
#define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull
|
||||
#define EGL_ALREADY_SIGNALED_NV 0x30EA
|
||||
#define EGL_TIMEOUT_EXPIRED_NV 0x30EB
|
||||
#define EGL_CONDITION_SATISFIED_NV 0x30EC
|
||||
#define EGL_SYNC_TYPE_NV 0x30ED
|
||||
#define EGL_SYNC_CONDITION_NV 0x30EE
|
||||
#define EGL_SYNC_FENCE_NV 0x30EF
|
||||
#define EGL_NO_SYNC_NV ((EGLSyncNV)0)
|
||||
typedef void* EGLSyncNV;
|
||||
typedef khronos_utime_nanoseconds_t EGLTimeNV;
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV (EGLSyncNV sync);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV (EGLSyncNV sync);
|
||||
EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV (EGLSyncNV sync, EGLenum mode);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync);
|
||||
typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_INT64 /* Dependent on EGL_KHR_reusable_sync which requires 64-bit uint support */
|
||||
#ifndef EGL_KHR_fence_sync
|
||||
#define EGL_KHR_fence_sync 1
|
||||
/* Reuses most tokens and entry points from EGL_KHR_reusable_sync */
|
||||
#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0
|
||||
#define EGL_SYNC_CONDITION_KHR 0x30F8
|
||||
#define EGL_SYNC_FENCE_KHR 0x30F9
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef EGL_HI_clientpixmap
|
||||
#define EGL_HI_clientpixmap 1
|
||||
|
||||
/* Surface Attribute */
|
||||
#define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74
|
||||
/*
|
||||
* Structure representing a client pixmap
|
||||
* (pixmap's data is in client-space memory).
|
||||
*/
|
||||
struct EGLClientPixmapHI
|
||||
{
|
||||
void* pData;
|
||||
EGLint iWidth;
|
||||
EGLint iHeight;
|
||||
EGLint iStride;
|
||||
};
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI(EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap);
|
||||
#endif /* EGL_HI_clientpixmap */
|
||||
|
||||
#ifndef EGL_HI_colorformats
|
||||
#define EGL_HI_colorformats 1
|
||||
/* Config Attribute */
|
||||
#define EGL_COLOR_FORMAT_HI 0x8F70
|
||||
/* Color Formats */
|
||||
#define EGL_COLOR_RGB_HI 0x8F71
|
||||
#define EGL_COLOR_RGBA_HI 0x8F72
|
||||
#define EGL_COLOR_ARGB_HI 0x8F73
|
||||
#endif /* EGL_HI_colorformats */
|
||||
|
||||
#ifndef EGL_MESA_drm_image
|
||||
#define EGL_MESA_drm_image 1
|
||||
#define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0 /* CreateDRMImageMESA attribute */
|
||||
#define EGL_DRM_BUFFER_USE_MESA 0x31D1 /* CreateDRMImageMESA attribute */
|
||||
#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2 /* EGL_IMAGE_FORMAT_MESA attribute value */
|
||||
#define EGL_DRM_BUFFER_MESA 0x31D3 /* eglCreateImageKHR target */
|
||||
#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4
|
||||
#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x00000001 /* EGL_DRM_BUFFER_USE_MESA bits */
|
||||
#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x00000002 /* EGL_DRM_BUFFER_USE_MESA bits */
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_NV_post_sub_buffer
|
||||
#define EGL_NV_post_sub_buffer 1
|
||||
#define EGL_POST_SUB_BUFFER_SUPPORTED_NV 0x30BE
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_ANGLE_query_surface_pointer
|
||||
#define EGL_ANGLE_query_surface_pointer 1
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean eglQuerySurfacePointerANGLE(EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
|
||||
#endif
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle
|
||||
#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1
|
||||
#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200
|
||||
#endif
|
||||
|
||||
#ifndef EGL_NV_coverage_sample_resolve
|
||||
#define EGL_NV_coverage_sample_resolve 1
|
||||
#define EGL_COVERAGE_SAMPLE_RESOLVE_NV 0x3131
|
||||
#define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132
|
||||
#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_INT64 /* EGLuint64NV requires 64-bit uint support */
|
||||
#ifndef EGL_NV_system_time
|
||||
#define EGL_NV_system_time 1
|
||||
typedef khronos_utime_nanoseconds_t EGLuint64NV;
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV(void);
|
||||
EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV(void);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void);
|
||||
typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_INT64 /* EGLuint64KHR requires 64-bit uint support */
|
||||
#ifndef EGL_KHR_stream
|
||||
#define EGL_KHR_stream 1
|
||||
typedef void* EGLStreamKHR;
|
||||
typedef khronos_uint64_t EGLuint64KHR;
|
||||
#define EGL_NO_STREAM_KHR ((EGLStreamKHR)0)
|
||||
#define EGL_CONSUMER_LATENCY_USEC_KHR 0x3210
|
||||
#define EGL_PRODUCER_FRAME_KHR 0x3212
|
||||
#define EGL_CONSUMER_FRAME_KHR 0x3213
|
||||
#define EGL_STREAM_STATE_KHR 0x3214
|
||||
#define EGL_STREAM_STATE_CREATED_KHR 0x3215
|
||||
#define EGL_STREAM_STATE_CONNECTING_KHR 0x3216
|
||||
#define EGL_STREAM_STATE_EMPTY_KHR 0x3217
|
||||
#define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218
|
||||
#define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219
|
||||
#define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A
|
||||
#define EGL_BAD_STREAM_KHR 0x321B
|
||||
#define EGL_BAD_STATE_KHR 0x321C
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_list);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC)(EGLDisplay dpy, const EGLint *attrib_list);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef EGL_KHR_stream /* Requires KHR_stream extension */
|
||||
#ifndef EGL_KHR_stream_consumer_gltexture
|
||||
#define EGL_KHR_stream_consumer_gltexture 1
|
||||
#define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef EGL_KHR_stream /* Requires KHR_stream extension */
|
||||
#ifndef EGL_KHR_stream_producer_eglsurface
|
||||
#define EGL_KHR_stream_producer_eglsurface 1
|
||||
#define EGL_STREAM_BIT_KHR 0x0800
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR(EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC)(EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef EGL_KHR_stream /* Requires KHR_stream extension */
|
||||
#ifndef EGL_KHR_stream_producer_aldatalocator
|
||||
#define EGL_KHR_stream_producer_aldatalocator 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef EGL_KHR_stream /* Requires KHR_stream extension */
|
||||
#ifndef EGL_KHR_stream_fifo
|
||||
#define EGL_KHR_stream_fifo 1
|
||||
/* reuse EGLTimeKHR */
|
||||
#define EGL_STREAM_FIFO_LENGTH_KHR 0x31FC
|
||||
#define EGL_STREAM_TIME_NOW_KHR 0x31FD
|
||||
#define EGL_STREAM_TIME_CONSUMER_KHR 0x31FE
|
||||
#define EGL_STREAM_TIME_PRODUCER_KHR 0x31FF
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef EGL_EXT_create_context_robustness
|
||||
#define EGL_EXT_create_context_robustness 1
|
||||
#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF
|
||||
#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138
|
||||
#define EGL_NO_RESET_NOTIFICATION_EXT 0x31BE
|
||||
#define EGL_LOSE_CONTEXT_ON_RESET_EXT 0x31BF
|
||||
#endif
|
||||
|
||||
#ifndef EGL_ANGLE_d3d_share_handle_client_buffer
|
||||
#define EGL_ANGLE_d3d_share_handle_client_buffer 1
|
||||
/* reuse EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_create_context
|
||||
#define EGL_KHR_create_context 1
|
||||
#define EGL_CONTEXT_MAJOR_VERSION_KHR EGL_CONTEXT_CLIENT_VERSION
|
||||
#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB
|
||||
#define EGL_CONTEXT_FLAGS_KHR 0x30FC
|
||||
#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD
|
||||
#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD
|
||||
#define EGL_NO_RESET_NOTIFICATION_KHR 0x31BE
|
||||
#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31BF
|
||||
#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001
|
||||
#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002
|
||||
#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004
|
||||
#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001
|
||||
#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002
|
||||
#define EGL_OPENGL_ES3_BIT_KHR 0x00000040
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_surfaceless_context
|
||||
#define EGL_KHR_surfaceless_context 1
|
||||
/* No tokens/entry points, just relaxes an error condition */
|
||||
#endif
|
||||
|
||||
#ifdef EGL_KHR_stream /* Requires KHR_stream extension */
|
||||
#ifndef EGL_KHR_stream_cross_process_fd
|
||||
#define EGL_KHR_stream_cross_process_fd 1
|
||||
typedef int EGLNativeFileDescriptorKHR;
|
||||
#define EGL_NO_FILE_DESCRIPTOR_KHR ((EGLNativeFileDescriptorKHR)(-1))
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR(EGLDisplay dpy, EGLStreamKHR stream);
|
||||
EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream);
|
||||
typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC)(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef EGL_EXT_multiview_window
|
||||
#define EGL_EXT_multiview_window 1
|
||||
#define EGL_MULTIVIEW_VIEW_COUNT_EXT 0x3134
|
||||
#endif
|
||||
|
||||
#ifndef EGL_KHR_wait_sync
|
||||
#define EGL_KHR_wait_sync 1
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC)(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_NV_post_convert_rounding
|
||||
#define EGL_NV_post_convert_rounding 1
|
||||
/* No tokens or entry points, just relaxes behavior of SwapBuffers */
|
||||
#endif
|
||||
|
||||
#ifndef EGL_NV_native_query
|
||||
#define EGL_NV_native_query 1
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV( EGLDisplay dpy, EGLNativeDisplayType* display_id);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV( EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType* window);
|
||||
EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV( EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType* pixmap);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC)(EGLDisplay dpy, EGLNativeDisplayType *display_id);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC)(EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC)(EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_NV_3dvision_surface
|
||||
#define EGL_NV_3dvision_surface 1
|
||||
#define EGL_AUTO_STEREO_NV 0x3136
|
||||
#endif
|
||||
|
||||
#ifndef EGL_ANDROID_framebuffer_target
|
||||
#define EGL_ANDROID_framebuffer_target 1
|
||||
#define EGL_FRAMEBUFFER_TARGET_ANDROID 0x3147
|
||||
#endif
|
||||
|
||||
#ifndef EGL_ANDROID_blob_cache
|
||||
#define EGL_ANDROID_blob_cache 1
|
||||
typedef khronos_ssize_t EGLsizeiANDROID;
|
||||
typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize);
|
||||
typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize);
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC)(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_ANDROID_image_native_buffer
|
||||
#define EGL_ANDROID_image_native_buffer 1
|
||||
#define EGL_NATIVE_BUFFER_ANDROID 0x3140
|
||||
#endif
|
||||
|
||||
#ifndef EGL_ANDROID_native_fence_sync
|
||||
#define EGL_ANDROID_native_fence_sync 1
|
||||
#define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144
|
||||
#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145
|
||||
#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146
|
||||
#define EGL_NO_NATIVE_FENCE_FD_ANDROID -1
|
||||
#ifdef EGL_EGLEXT_PROTOTYPES
|
||||
EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID( EGLDisplay dpy, EGLSyncKHR);
|
||||
#endif /* EGL_EGLEXT_PROTOTYPES */
|
||||
typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC)(EGLDisplay dpy, EGLSyncKHR);
|
||||
#endif
|
||||
|
||||
#ifndef EGL_ANDROID_recordable
|
||||
#define EGL_ANDROID_recordable 1
|
||||
#define EGL_RECORDABLE_ANDROID 0x3142
|
||||
#endif
|
||||
|
||||
#ifndef EGL_EXT_buffer_age
|
||||
#define EGL_EXT_buffer_age 1
|
||||
#define EGL_BUFFER_AGE_EXT 0x313D
|
||||
#endif
|
||||
|
||||
#ifndef EGL_EXT_image_dma_buf_import
|
||||
#define EGL_EXT_image_dma_buf_import 1
|
||||
#define EGL_LINUX_DMA_BUF_EXT 0x3270
|
||||
#define EGL_LINUX_DRM_FOURCC_EXT 0x3271
|
||||
#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272
|
||||
#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273
|
||||
#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274
|
||||
#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275
|
||||
#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276
|
||||
#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277
|
||||
#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278
|
||||
#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279
|
||||
#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A
|
||||
#define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B
|
||||
#define EGL_SAMPLE_RANGE_HINT_EXT 0x327C
|
||||
#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D
|
||||
#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E
|
||||
#define EGL_ITU_REC601_EXT 0x327F
|
||||
#define EGL_ITU_REC709_EXT 0x3280
|
||||
#define EGL_ITU_REC2020_EXT 0x3281
|
||||
#define EGL_YUV_FULL_RANGE_EXT 0x3282
|
||||
#define EGL_YUV_NARROW_RANGE_EXT 0x3283
|
||||
#define EGL_YUV_CHROMA_SITING_0_EXT 0x3284
|
||||
#define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __eglext_h_ */
|
11626
deps/GL/glext.h
vendored
11626
deps/GL/glext.h
vendored
File diff suppressed because it is too large
Load Diff
906
deps/GL/glxext.h
vendored
906
deps/GL/glxext.h
vendored
@ -1,906 +0,0 @@
|
||||
#ifndef __glxext_h_
|
||||
#define __glxext_h_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2013-2014 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
/*
|
||||
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||
** API Registry. The current version of the Registry, generator scripts
|
||||
** used to make the header, and the header can be found at
|
||||
** http://www.opengl.org/registry/
|
||||
**
|
||||
** Khronos $Revision: 27684 $ on $Date: 2014-08-11 01:21:35 -0700 (Mon, 11 Aug 2014) $
|
||||
*/
|
||||
|
||||
#define GLX_GLXEXT_VERSION 20140810
|
||||
|
||||
/* Generated C header for:
|
||||
* API: glx
|
||||
* Versions considered: .*
|
||||
* Versions emitted: 1\.[3-9]
|
||||
* Default extensions included: glx
|
||||
* Additional extensions included: _nomatch_^
|
||||
* Extensions removed: _nomatch_^
|
||||
*/
|
||||
|
||||
#ifndef GLX_VERSION_1_3
|
||||
#define GLX_VERSION_1_3 1
|
||||
typedef XID GLXContextID;
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
||||
typedef XID GLXWindow;
|
||||
typedef XID GLXPbuffer;
|
||||
#define GLX_WINDOW_BIT 0x00000001
|
||||
#define GLX_PIXMAP_BIT 0x00000002
|
||||
#define GLX_PBUFFER_BIT 0x00000004
|
||||
#define GLX_RGBA_BIT 0x00000001
|
||||
#define GLX_COLOR_INDEX_BIT 0x00000002
|
||||
#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
|
||||
#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
|
||||
#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
|
||||
#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
|
||||
#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
|
||||
#define GLX_AUX_BUFFERS_BIT 0x00000010
|
||||
#define GLX_DEPTH_BUFFER_BIT 0x00000020
|
||||
#define GLX_STENCIL_BUFFER_BIT 0x00000040
|
||||
#define GLX_ACCUM_BUFFER_BIT 0x00000080
|
||||
#define GLX_CONFIG_CAVEAT 0x20
|
||||
#define GLX_X_VISUAL_TYPE 0x22
|
||||
#define GLX_TRANSPARENT_TYPE 0x23
|
||||
#define GLX_TRANSPARENT_INDEX_VALUE 0x24
|
||||
#define GLX_TRANSPARENT_RED_VALUE 0x25
|
||||
#define GLX_TRANSPARENT_GREEN_VALUE 0x26
|
||||
#define GLX_TRANSPARENT_BLUE_VALUE 0x27
|
||||
#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
|
||||
#define GLX_DONT_CARE 0xFFFFFFFF
|
||||
#define GLX_NONE 0x8000
|
||||
#define GLX_SLOW_CONFIG 0x8001
|
||||
#define GLX_TRUE_COLOR 0x8002
|
||||
#define GLX_DIRECT_COLOR 0x8003
|
||||
#define GLX_PSEUDO_COLOR 0x8004
|
||||
#define GLX_STATIC_COLOR 0x8005
|
||||
#define GLX_GRAY_SCALE 0x8006
|
||||
#define GLX_STATIC_GRAY 0x8007
|
||||
#define GLX_TRANSPARENT_RGB 0x8008
|
||||
#define GLX_TRANSPARENT_INDEX 0x8009
|
||||
#define GLX_VISUAL_ID 0x800B
|
||||
#define GLX_SCREEN 0x800C
|
||||
#define GLX_NON_CONFORMANT_CONFIG 0x800D
|
||||
#define GLX_DRAWABLE_TYPE 0x8010
|
||||
#define GLX_RENDER_TYPE 0x8011
|
||||
#define GLX_X_RENDERABLE 0x8012
|
||||
#define GLX_FBCONFIG_ID 0x8013
|
||||
#define GLX_RGBA_TYPE 0x8014
|
||||
#define GLX_COLOR_INDEX_TYPE 0x8015
|
||||
#define GLX_MAX_PBUFFER_WIDTH 0x8016
|
||||
#define GLX_MAX_PBUFFER_HEIGHT 0x8017
|
||||
#define GLX_MAX_PBUFFER_PIXELS 0x8018
|
||||
#define GLX_PRESERVED_CONTENTS 0x801B
|
||||
#define GLX_LARGEST_PBUFFER 0x801C
|
||||
#define GLX_WIDTH 0x801D
|
||||
#define GLX_HEIGHT 0x801E
|
||||
#define GLX_EVENT_MASK 0x801F
|
||||
#define GLX_DAMAGED 0x8020
|
||||
#define GLX_SAVED 0x8021
|
||||
#define GLX_WINDOW 0x8022
|
||||
#define GLX_PBUFFER 0x8023
|
||||
#define GLX_PBUFFER_HEIGHT 0x8040
|
||||
#define GLX_PBUFFER_WIDTH 0x8041
|
||||
typedef GLXFBConfig *( *PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
|
||||
typedef GLXFBConfig *( *PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
|
||||
typedef int ( *PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
|
||||
typedef XVisualInfo *( *PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
|
||||
typedef GLXWindow ( *PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
|
||||
typedef void ( *PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
|
||||
typedef GLXPixmap ( *PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
|
||||
typedef void ( *PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
|
||||
typedef GLXPbuffer ( *PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
|
||||
typedef void ( *PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
|
||||
typedef void ( *PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
|
||||
typedef GLXContext ( *PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
||||
typedef Bool ( *PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
typedef GLXDrawable ( *PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
|
||||
typedef int ( *PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
|
||||
typedef void ( *PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
|
||||
typedef void ( *PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLXFBConfig *glXGetFBConfigs (Display *dpy, int screen, int *nelements);
|
||||
GLXFBConfig *glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements);
|
||||
int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value);
|
||||
XVisualInfo *glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config);
|
||||
GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
|
||||
void glXDestroyWindow (Display *dpy, GLXWindow win);
|
||||
GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
|
||||
void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap);
|
||||
GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list);
|
||||
void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf);
|
||||
void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
|
||||
GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
||||
Bool glXMakeContextCurrent (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
GLXDrawable glXGetCurrentReadDrawable (void);
|
||||
int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value);
|
||||
void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask);
|
||||
void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
|
||||
#endif
|
||||
#endif /* GLX_VERSION_1_3 */
|
||||
|
||||
#ifndef GLX_VERSION_1_4
|
||||
#define GLX_VERSION_1_4 1
|
||||
typedef void ( *__GLXextFuncPtr)(void);
|
||||
#define GLX_SAMPLE_BUFFERS 100000
|
||||
#define GLX_SAMPLES 100001
|
||||
typedef __GLXextFuncPtr ( *PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
__GLXextFuncPtr glXGetProcAddress (const GLubyte *procName);
|
||||
#endif
|
||||
#endif /* GLX_VERSION_1_4 */
|
||||
|
||||
#ifndef GLX_ARB_context_flush_control
|
||||
#define GLX_ARB_context_flush_control 1
|
||||
#define GLX_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
|
||||
#define GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
|
||||
#define GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
|
||||
#endif /* GLX_ARB_context_flush_control */
|
||||
|
||||
#ifndef GLX_ARB_create_context
|
||||
#define GLX_ARB_create_context 1
|
||||
#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001
|
||||
#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
|
||||
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
#define GLX_CONTEXT_FLAGS_ARB 0x2094
|
||||
typedef GLXContext ( *PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLXContext glXCreateContextAttribsARB (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
|
||||
#endif
|
||||
#endif /* GLX_ARB_create_context */
|
||||
|
||||
#ifndef GLX_ARB_create_context_profile
|
||||
#define GLX_ARB_create_context_profile 1
|
||||
#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
||||
#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
|
||||
#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
|
||||
#endif /* GLX_ARB_create_context_profile */
|
||||
|
||||
#ifndef GLX_ARB_create_context_robustness
|
||||
#define GLX_ARB_create_context_robustness 1
|
||||
#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
|
||||
#define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252
|
||||
#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
|
||||
#define GLX_NO_RESET_NOTIFICATION_ARB 0x8261
|
||||
#endif /* GLX_ARB_create_context_robustness */
|
||||
|
||||
#ifndef GLX_ARB_fbconfig_float
|
||||
#define GLX_ARB_fbconfig_float 1
|
||||
#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
|
||||
#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
|
||||
#endif /* GLX_ARB_fbconfig_float */
|
||||
|
||||
#ifndef GLX_ARB_framebuffer_sRGB
|
||||
#define GLX_ARB_framebuffer_sRGB 1
|
||||
#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2
|
||||
#endif /* GLX_ARB_framebuffer_sRGB */
|
||||
|
||||
#ifndef GLX_ARB_get_proc_address
|
||||
#define GLX_ARB_get_proc_address 1
|
||||
typedef __GLXextFuncPtr ( *PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
__GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName);
|
||||
#endif
|
||||
#endif /* GLX_ARB_get_proc_address */
|
||||
|
||||
#ifndef GLX_ARB_multisample
|
||||
#define GLX_ARB_multisample 1
|
||||
#define GLX_SAMPLE_BUFFERS_ARB 100000
|
||||
#define GLX_SAMPLES_ARB 100001
|
||||
#endif /* GLX_ARB_multisample */
|
||||
|
||||
#ifndef GLX_ARB_robustness_application_isolation
|
||||
#define GLX_ARB_robustness_application_isolation 1
|
||||
#define GLX_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
|
||||
#endif /* GLX_ARB_robustness_application_isolation */
|
||||
|
||||
#ifndef GLX_ARB_robustness_share_group_isolation
|
||||
#define GLX_ARB_robustness_share_group_isolation 1
|
||||
#endif /* GLX_ARB_robustness_share_group_isolation */
|
||||
|
||||
#ifndef GLX_ARB_vertex_buffer_object
|
||||
#define GLX_ARB_vertex_buffer_object 1
|
||||
#define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095
|
||||
#endif /* GLX_ARB_vertex_buffer_object */
|
||||
|
||||
#ifndef GLX_3DFX_multisample
|
||||
#define GLX_3DFX_multisample 1
|
||||
#define GLX_SAMPLE_BUFFERS_3DFX 0x8050
|
||||
#define GLX_SAMPLES_3DFX 0x8051
|
||||
#endif /* GLX_3DFX_multisample */
|
||||
|
||||
#ifndef GLX_AMD_gpu_association
|
||||
#define GLX_AMD_gpu_association 1
|
||||
#define GLX_GPU_VENDOR_AMD 0x1F00
|
||||
#define GLX_GPU_RENDERER_STRING_AMD 0x1F01
|
||||
#define GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
|
||||
#define GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
|
||||
#define GLX_GPU_RAM_AMD 0x21A3
|
||||
#define GLX_GPU_CLOCK_AMD 0x21A4
|
||||
#define GLX_GPU_NUM_PIPES_AMD 0x21A5
|
||||
#define GLX_GPU_NUM_SIMD_AMD 0x21A6
|
||||
#define GLX_GPU_NUM_RB_AMD 0x21A7
|
||||
#define GLX_GPU_NUM_SPI_AMD 0x21A8
|
||||
#endif /* GLX_AMD_gpu_association */
|
||||
|
||||
#ifndef GLX_EXT_buffer_age
|
||||
#define GLX_EXT_buffer_age 1
|
||||
#define GLX_BACK_BUFFER_AGE_EXT 0x20F4
|
||||
#endif /* GLX_EXT_buffer_age */
|
||||
|
||||
#ifndef GLX_EXT_create_context_es2_profile
|
||||
#define GLX_EXT_create_context_es2_profile 1
|
||||
#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
|
||||
#endif /* GLX_EXT_create_context_es2_profile */
|
||||
|
||||
#ifndef GLX_EXT_create_context_es_profile
|
||||
#define GLX_EXT_create_context_es_profile 1
|
||||
#define GLX_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
|
||||
#endif /* GLX_EXT_create_context_es_profile */
|
||||
|
||||
#ifndef GLX_EXT_fbconfig_packed_float
|
||||
#define GLX_EXT_fbconfig_packed_float 1
|
||||
#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1
|
||||
#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008
|
||||
#endif /* GLX_EXT_fbconfig_packed_float */
|
||||
|
||||
#ifndef GLX_EXT_framebuffer_sRGB
|
||||
#define GLX_EXT_framebuffer_sRGB 1
|
||||
#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
|
||||
#endif /* GLX_EXT_framebuffer_sRGB */
|
||||
|
||||
#ifndef GLX_EXT_import_context
|
||||
#define GLX_EXT_import_context 1
|
||||
#define GLX_SHARE_CONTEXT_EXT 0x800A
|
||||
#define GLX_VISUAL_ID_EXT 0x800B
|
||||
#define GLX_SCREEN_EXT 0x800C
|
||||
typedef Display *( *PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
|
||||
typedef int ( *PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
|
||||
typedef GLXContextID ( *PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
|
||||
typedef GLXContext ( *PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
|
||||
typedef void ( *PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Display *glXGetCurrentDisplayEXT (void);
|
||||
int glXQueryContextInfoEXT (Display *dpy, GLXContext context, int attribute, int *value);
|
||||
GLXContextID glXGetContextIDEXT (const GLXContext context);
|
||||
GLXContext glXImportContextEXT (Display *dpy, GLXContextID contextID);
|
||||
void glXFreeContextEXT (Display *dpy, GLXContext context);
|
||||
#endif
|
||||
#endif /* GLX_EXT_import_context */
|
||||
|
||||
#ifndef GLX_EXT_stereo_tree
|
||||
#define GLX_EXT_stereo_tree 1
|
||||
typedef struct {
|
||||
int type;
|
||||
unsigned long serial;
|
||||
Bool send_event;
|
||||
Display *display;
|
||||
int extension;
|
||||
int evtype;
|
||||
GLXDrawable window;
|
||||
Bool stereo_tree;
|
||||
} GLXStereoNotifyEventEXT;
|
||||
#define GLX_STEREO_TREE_EXT 0x20F5
|
||||
#define GLX_STEREO_NOTIFY_MASK_EXT 0x00000001
|
||||
#define GLX_STEREO_NOTIFY_EXT 0x00000000
|
||||
#endif /* GLX_EXT_stereo_tree */
|
||||
|
||||
#ifndef GLX_EXT_swap_control
|
||||
#define GLX_EXT_swap_control 1
|
||||
#define GLX_SWAP_INTERVAL_EXT 0x20F1
|
||||
#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2
|
||||
typedef void ( *PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable, int interval);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXSwapIntervalEXT (Display *dpy, GLXDrawable drawable, int interval);
|
||||
#endif
|
||||
#endif /* GLX_EXT_swap_control */
|
||||
|
||||
#ifndef GLX_EXT_swap_control_tear
|
||||
#define GLX_EXT_swap_control_tear 1
|
||||
#define GLX_LATE_SWAPS_TEAR_EXT 0x20F3
|
||||
#endif /* GLX_EXT_swap_control_tear */
|
||||
|
||||
#ifndef GLX_EXT_texture_from_pixmap
|
||||
#define GLX_EXT_texture_from_pixmap 1
|
||||
#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
|
||||
#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
|
||||
#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
|
||||
#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
|
||||
#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
|
||||
#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
|
||||
#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
|
||||
#define GLX_Y_INVERTED_EXT 0x20D4
|
||||
#define GLX_TEXTURE_FORMAT_EXT 0x20D5
|
||||
#define GLX_TEXTURE_TARGET_EXT 0x20D6
|
||||
#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
|
||||
#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
|
||||
#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
|
||||
#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
|
||||
#define GLX_TEXTURE_1D_EXT 0x20DB
|
||||
#define GLX_TEXTURE_2D_EXT 0x20DC
|
||||
#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
|
||||
#define GLX_FRONT_LEFT_EXT 0x20DE
|
||||
#define GLX_FRONT_RIGHT_EXT 0x20DF
|
||||
#define GLX_BACK_LEFT_EXT 0x20E0
|
||||
#define GLX_BACK_RIGHT_EXT 0x20E1
|
||||
#define GLX_FRONT_EXT 0x20DE
|
||||
#define GLX_BACK_EXT 0x20E0
|
||||
#define GLX_AUX0_EXT 0x20E2
|
||||
#define GLX_AUX1_EXT 0x20E3
|
||||
#define GLX_AUX2_EXT 0x20E4
|
||||
#define GLX_AUX3_EXT 0x20E5
|
||||
#define GLX_AUX4_EXT 0x20E6
|
||||
#define GLX_AUX5_EXT 0x20E7
|
||||
#define GLX_AUX6_EXT 0x20E8
|
||||
#define GLX_AUX7_EXT 0x20E9
|
||||
#define GLX_AUX8_EXT 0x20EA
|
||||
#define GLX_AUX9_EXT 0x20EB
|
||||
typedef void ( *PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
|
||||
typedef void ( *PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXBindTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
|
||||
void glXReleaseTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer);
|
||||
#endif
|
||||
#endif /* GLX_EXT_texture_from_pixmap */
|
||||
|
||||
#ifndef GLX_EXT_visual_info
|
||||
#define GLX_EXT_visual_info 1
|
||||
#define GLX_X_VISUAL_TYPE_EXT 0x22
|
||||
#define GLX_TRANSPARENT_TYPE_EXT 0x23
|
||||
#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
|
||||
#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
|
||||
#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
|
||||
#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
|
||||
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
|
||||
#define GLX_NONE_EXT 0x8000
|
||||
#define GLX_TRUE_COLOR_EXT 0x8002
|
||||
#define GLX_DIRECT_COLOR_EXT 0x8003
|
||||
#define GLX_PSEUDO_COLOR_EXT 0x8004
|
||||
#define GLX_STATIC_COLOR_EXT 0x8005
|
||||
#define GLX_GRAY_SCALE_EXT 0x8006
|
||||
#define GLX_STATIC_GRAY_EXT 0x8007
|
||||
#define GLX_TRANSPARENT_RGB_EXT 0x8008
|
||||
#define GLX_TRANSPARENT_INDEX_EXT 0x8009
|
||||
#endif /* GLX_EXT_visual_info */
|
||||
|
||||
#ifndef GLX_EXT_visual_rating
|
||||
#define GLX_EXT_visual_rating 1
|
||||
#define GLX_VISUAL_CAVEAT_EXT 0x20
|
||||
#define GLX_SLOW_VISUAL_EXT 0x8001
|
||||
#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
|
||||
#endif /* GLX_EXT_visual_rating */
|
||||
|
||||
#ifndef GLX_INTEL_swap_event
|
||||
#define GLX_INTEL_swap_event 1
|
||||
#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000
|
||||
#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180
|
||||
#define GLX_COPY_COMPLETE_INTEL 0x8181
|
||||
#define GLX_FLIP_COMPLETE_INTEL 0x8182
|
||||
#endif /* GLX_INTEL_swap_event */
|
||||
|
||||
#ifndef GLX_MESA_agp_offset
|
||||
#define GLX_MESA_agp_offset 1
|
||||
typedef unsigned int ( *PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
unsigned int glXGetAGPOffsetMESA (const void *pointer);
|
||||
#endif
|
||||
#endif /* GLX_MESA_agp_offset */
|
||||
|
||||
#ifndef GLX_MESA_copy_sub_buffer
|
||||
#define GLX_MESA_copy_sub_buffer 1
|
||||
typedef void ( *PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXCopySubBufferMESA (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
|
||||
#endif
|
||||
#endif /* GLX_MESA_copy_sub_buffer */
|
||||
|
||||
#ifndef GLX_MESA_pixmap_colormap
|
||||
#define GLX_MESA_pixmap_colormap 1
|
||||
typedef GLXPixmap ( *PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLXPixmap glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
|
||||
#endif
|
||||
#endif /* GLX_MESA_pixmap_colormap */
|
||||
|
||||
#ifndef GLX_MESA_query_renderer
|
||||
#define GLX_MESA_query_renderer 1
|
||||
#define GLX_RENDERER_VENDOR_ID_MESA 0x8183
|
||||
#define GLX_RENDERER_DEVICE_ID_MESA 0x8184
|
||||
#define GLX_RENDERER_VERSION_MESA 0x8185
|
||||
#define GLX_RENDERER_ACCELERATED_MESA 0x8186
|
||||
#define GLX_RENDERER_VIDEO_MEMORY_MESA 0x8187
|
||||
#define GLX_RENDERER_UNIFIED_MEMORY_ARCHITECTURE_MESA 0x8188
|
||||
#define GLX_RENDERER_PREFERRED_PROFILE_MESA 0x8189
|
||||
#define GLX_RENDERER_OPENGL_CORE_PROFILE_VERSION_MESA 0x818A
|
||||
#define GLX_RENDERER_OPENGL_COMPATIBILITY_PROFILE_VERSION_MESA 0x818B
|
||||
#define GLX_RENDERER_OPENGL_ES_PROFILE_VERSION_MESA 0x818C
|
||||
#define GLX_RENDERER_OPENGL_ES2_PROFILE_VERSION_MESA 0x818D
|
||||
#define GLX_RENDERER_ID_MESA 0x818E
|
||||
typedef Bool ( *PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC) (int attribute, unsigned int *value);
|
||||
typedef const char *( *PFNGLXQUERYCURRENTRENDERERSTRINGMESAPROC) (int attribute);
|
||||
typedef Bool ( *PFNGLXQUERYRENDERERINTEGERMESAPROC) (Display *dpy, int screen, int renderer, int attribute, unsigned int *value);
|
||||
typedef const char *( *PFNGLXQUERYRENDERERSTRINGMESAPROC) (Display *dpy, int screen, int renderer, int attribute);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXQueryCurrentRendererIntegerMESA (int attribute, unsigned int *value);
|
||||
const char *glXQueryCurrentRendererStringMESA (int attribute);
|
||||
Bool glXQueryRendererIntegerMESA (Display *dpy, int screen, int renderer, int attribute, unsigned int *value);
|
||||
const char *glXQueryRendererStringMESA (Display *dpy, int screen, int renderer, int attribute);
|
||||
#endif
|
||||
#endif /* GLX_MESA_query_renderer */
|
||||
|
||||
#ifndef GLX_MESA_release_buffers
|
||||
#define GLX_MESA_release_buffers 1
|
||||
typedef Bool ( *PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXReleaseBuffersMESA (Display *dpy, GLXDrawable drawable);
|
||||
#endif
|
||||
#endif /* GLX_MESA_release_buffers */
|
||||
|
||||
#ifndef GLX_MESA_set_3dfx_mode
|
||||
#define GLX_MESA_set_3dfx_mode 1
|
||||
#define GLX_3DFX_WINDOW_MODE_MESA 0x1
|
||||
#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2
|
||||
typedef Bool ( *PFNGLXSET3DFXMODEMESAPROC) (int mode);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXSet3DfxModeMESA (int mode);
|
||||
#endif
|
||||
#endif /* GLX_MESA_set_3dfx_mode */
|
||||
|
||||
#ifndef GLX_NV_copy_buffer
|
||||
#define GLX_NV_copy_buffer 1
|
||||
typedef void ( *PFNGLXCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
typedef void ( *PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXCopyBufferSubDataNV (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
void glXNamedCopyBufferSubDataNV (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
#endif
|
||||
#endif /* GLX_NV_copy_buffer */
|
||||
|
||||
#ifndef GLX_NV_copy_image
|
||||
#define GLX_NV_copy_image 1
|
||||
typedef void ( *PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
#endif
|
||||
#endif /* GLX_NV_copy_image */
|
||||
|
||||
#ifndef GLX_NV_delay_before_swap
|
||||
#define GLX_NV_delay_before_swap 1
|
||||
typedef Bool ( *PFNGLXDELAYBEFORESWAPNVPROC) (Display *dpy, GLXDrawable drawable, GLfloat seconds);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXDelayBeforeSwapNV (Display *dpy, GLXDrawable drawable, GLfloat seconds);
|
||||
#endif
|
||||
#endif /* GLX_NV_delay_before_swap */
|
||||
|
||||
#ifndef GLX_NV_float_buffer
|
||||
#define GLX_NV_float_buffer 1
|
||||
#define GLX_FLOAT_COMPONENTS_NV 0x20B0
|
||||
#endif /* GLX_NV_float_buffer */
|
||||
|
||||
#ifndef GLX_NV_multisample_coverage
|
||||
#define GLX_NV_multisample_coverage 1
|
||||
#define GLX_COVERAGE_SAMPLES_NV 100001
|
||||
#define GLX_COLOR_SAMPLES_NV 0x20B3
|
||||
#endif /* GLX_NV_multisample_coverage */
|
||||
|
||||
#ifndef GLX_NV_present_video
|
||||
#define GLX_NV_present_video 1
|
||||
#define GLX_NUM_VIDEO_SLOTS_NV 0x20F0
|
||||
typedef unsigned int *( *PFNGLXENUMERATEVIDEODEVICESNVPROC) (Display *dpy, int screen, int *nelements);
|
||||
typedef int ( *PFNGLXBINDVIDEODEVICENVPROC) (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
unsigned int *glXEnumerateVideoDevicesNV (Display *dpy, int screen, int *nelements);
|
||||
int glXBindVideoDeviceNV (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list);
|
||||
#endif
|
||||
#endif /* GLX_NV_present_video */
|
||||
|
||||
#ifndef GLX_NV_swap_group
|
||||
#define GLX_NV_swap_group 1
|
||||
typedef Bool ( *PFNGLXJOINSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint group);
|
||||
typedef Bool ( *PFNGLXBINDSWAPBARRIERNVPROC) (Display *dpy, GLuint group, GLuint barrier);
|
||||
typedef Bool ( *PFNGLXQUERYSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier);
|
||||
typedef Bool ( *PFNGLXQUERYMAXSWAPGROUPSNVPROC) (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers);
|
||||
typedef Bool ( *PFNGLXQUERYFRAMECOUNTNVPROC) (Display *dpy, int screen, GLuint *count);
|
||||
typedef Bool ( *PFNGLXRESETFRAMECOUNTNVPROC) (Display *dpy, int screen);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXJoinSwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint group);
|
||||
Bool glXBindSwapBarrierNV (Display *dpy, GLuint group, GLuint barrier);
|
||||
Bool glXQuerySwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier);
|
||||
Bool glXQueryMaxSwapGroupsNV (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers);
|
||||
Bool glXQueryFrameCountNV (Display *dpy, int screen, GLuint *count);
|
||||
Bool glXResetFrameCountNV (Display *dpy, int screen);
|
||||
#endif
|
||||
#endif /* GLX_NV_swap_group */
|
||||
|
||||
#ifndef GLX_NV_video_capture
|
||||
#define GLX_NV_video_capture 1
|
||||
typedef XID GLXVideoCaptureDeviceNV;
|
||||
#define GLX_DEVICE_ID_NV 0x20CD
|
||||
#define GLX_UNIQUE_ID_NV 0x20CE
|
||||
#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
|
||||
typedef int ( *PFNGLXBINDVIDEOCAPTUREDEVICENVPROC) (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
|
||||
typedef GLXVideoCaptureDeviceNV *( *PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC) (Display *dpy, int screen, int *nelements);
|
||||
typedef void ( *PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device);
|
||||
typedef int ( *PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value);
|
||||
typedef void ( *PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXBindVideoCaptureDeviceNV (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device);
|
||||
GLXVideoCaptureDeviceNV *glXEnumerateVideoCaptureDevicesNV (Display *dpy, int screen, int *nelements);
|
||||
void glXLockVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device);
|
||||
int glXQueryVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value);
|
||||
void glXReleaseVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device);
|
||||
#endif
|
||||
#endif /* GLX_NV_video_capture */
|
||||
|
||||
#ifndef GLX_NV_video_out
|
||||
#define GLX_NV_video_out 1
|
||||
typedef unsigned int GLXVideoDeviceNV;
|
||||
#define GLX_VIDEO_OUT_COLOR_NV 0x20C3
|
||||
#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4
|
||||
#define GLX_VIDEO_OUT_DEPTH_NV 0x20C5
|
||||
#define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
|
||||
#define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
|
||||
#define GLX_VIDEO_OUT_FRAME_NV 0x20C8
|
||||
#define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9
|
||||
#define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA
|
||||
#define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB
|
||||
#define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC
|
||||
typedef int ( *PFNGLXGETVIDEODEVICENVPROC) (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
|
||||
typedef int ( *PFNGLXRELEASEVIDEODEVICENVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice);
|
||||
typedef int ( *PFNGLXBINDVIDEOIMAGENVPROC) (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer);
|
||||
typedef int ( *PFNGLXRELEASEVIDEOIMAGENVPROC) (Display *dpy, GLXPbuffer pbuf);
|
||||
typedef int ( *PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock);
|
||||
typedef int ( *PFNGLXGETVIDEOINFONVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXGetVideoDeviceNV (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice);
|
||||
int glXReleaseVideoDeviceNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice);
|
||||
int glXBindVideoImageNV (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer);
|
||||
int glXReleaseVideoImageNV (Display *dpy, GLXPbuffer pbuf);
|
||||
int glXSendPbufferToVideoNV (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock);
|
||||
int glXGetVideoInfoNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||
#endif
|
||||
#endif /* GLX_NV_video_out */
|
||||
|
||||
#ifndef GLX_OML_swap_method
|
||||
#define GLX_OML_swap_method 1
|
||||
#define GLX_SWAP_METHOD_OML 0x8060
|
||||
#define GLX_SWAP_EXCHANGE_OML 0x8061
|
||||
#define GLX_SWAP_COPY_OML 0x8062
|
||||
#define GLX_SWAP_UNDEFINED_OML 0x8063
|
||||
#endif /* GLX_OML_swap_method */
|
||||
|
||||
#ifndef GLX_OML_sync_control
|
||||
#define GLX_OML_sync_control 1
|
||||
#ifndef GLEXT_64_TYPES_DEFINED
|
||||
/* This code block is duplicated in glext.h, so must be protected */
|
||||
#define GLEXT_64_TYPES_DEFINED
|
||||
/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
|
||||
/* (as used in the GLX_OML_sync_control extension). */
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#include <inttypes.h>
|
||||
#elif defined(__sun__) || defined(__digital__)
|
||||
#include <inttypes.h>
|
||||
#if defined(__STDC__)
|
||||
#if defined(__arch64__) || defined(_LP64)
|
||||
typedef long int int64_t;
|
||||
typedef unsigned long int uint64_t;
|
||||
#else
|
||||
typedef long long int int64_t;
|
||||
typedef unsigned long long int uint64_t;
|
||||
#endif /* __arch64__ */
|
||||
#endif /* __STDC__ */
|
||||
#elif defined( __VMS ) || defined(__sgi)
|
||||
#include <inttypes.h>
|
||||
#elif defined(__SCO__) || defined(__USLC__)
|
||||
#include <stdint.h>
|
||||
#elif defined(__UNIXOS2__) || defined(__SOL64__)
|
||||
typedef long int int32_t;
|
||||
typedef long long int int64_t;
|
||||
typedef unsigned long long int uint64_t;
|
||||
#elif defined(_WIN32) && defined(__GNUC__)
|
||||
#include <stdint.h>
|
||||
#elif defined(_WIN32)
|
||||
typedef __int32 int32_t;
|
||||
typedef __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#else
|
||||
/* Fallback if nothing above works */
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
#endif
|
||||
typedef Bool ( *PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
typedef Bool ( *PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
|
||||
typedef int64_t ( *PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
|
||||
typedef Bool ( *PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
typedef Bool ( *PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXGetSyncValuesOML (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
Bool glXGetMscRateOML (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
|
||||
int64_t glXSwapBuffersMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
|
||||
Bool glXWaitForMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
Bool glXWaitForSbcOML (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
#endif
|
||||
#endif /* GLX_OML_sync_control */
|
||||
|
||||
#ifndef GLX_SGIS_blended_overlay
|
||||
#define GLX_SGIS_blended_overlay 1
|
||||
#define GLX_BLENDED_RGBA_SGIS 0x8025
|
||||
#endif /* GLX_SGIS_blended_overlay */
|
||||
|
||||
#ifndef GLX_SGIS_multisample
|
||||
#define GLX_SGIS_multisample 1
|
||||
#define GLX_SAMPLE_BUFFERS_SGIS 100000
|
||||
#define GLX_SAMPLES_SGIS 100001
|
||||
#endif /* GLX_SGIS_multisample */
|
||||
|
||||
#ifndef GLX_SGIS_shared_multisample
|
||||
#define GLX_SGIS_shared_multisample 1
|
||||
#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
|
||||
#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
|
||||
#endif /* GLX_SGIS_shared_multisample */
|
||||
|
||||
#ifndef GLX_SGIX_dmbuffer
|
||||
#define GLX_SGIX_dmbuffer 1
|
||||
typedef XID GLXPbufferSGIX;
|
||||
#ifdef _DM_BUFFER_H_
|
||||
#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024
|
||||
typedef Bool ( *PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXAssociateDMPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
|
||||
#endif
|
||||
#endif /* _DM_BUFFER_H_ */
|
||||
#endif /* GLX_SGIX_dmbuffer */
|
||||
|
||||
#ifndef GLX_SGIX_fbconfig
|
||||
#define GLX_SGIX_fbconfig 1
|
||||
typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
|
||||
#define GLX_WINDOW_BIT_SGIX 0x00000001
|
||||
#define GLX_PIXMAP_BIT_SGIX 0x00000002
|
||||
#define GLX_RGBA_BIT_SGIX 0x00000001
|
||||
#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
|
||||
#define GLX_DRAWABLE_TYPE_SGIX 0x8010
|
||||
#define GLX_RENDER_TYPE_SGIX 0x8011
|
||||
#define GLX_X_RENDERABLE_SGIX 0x8012
|
||||
#define GLX_FBCONFIG_ID_SGIX 0x8013
|
||||
#define GLX_RGBA_TYPE_SGIX 0x8014
|
||||
#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
|
||||
typedef int ( *PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
|
||||
typedef GLXFBConfigSGIX *( *PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
|
||||
typedef GLXPixmap ( *PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
|
||||
typedef GLXContext ( *PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
|
||||
typedef XVisualInfo *( *PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
|
||||
typedef GLXFBConfigSGIX ( *PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXGetFBConfigAttribSGIX (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
|
||||
GLXFBConfigSGIX *glXChooseFBConfigSGIX (Display *dpy, int screen, int *attrib_list, int *nelements);
|
||||
GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
|
||||
GLXContext glXCreateContextWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
|
||||
XVisualInfo *glXGetVisualFromFBConfigSGIX (Display *dpy, GLXFBConfigSGIX config);
|
||||
GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *dpy, XVisualInfo *vis);
|
||||
#endif
|
||||
#endif /* GLX_SGIX_fbconfig */
|
||||
|
||||
#ifndef GLX_SGIX_hyperpipe
|
||||
#define GLX_SGIX_hyperpipe 1
|
||||
typedef struct {
|
||||
char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
|
||||
int networkId;
|
||||
} GLXHyperpipeNetworkSGIX;
|
||||
typedef struct {
|
||||
char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
|
||||
int channel;
|
||||
unsigned int participationType;
|
||||
int timeSlice;
|
||||
} GLXHyperpipeConfigSGIX;
|
||||
typedef struct {
|
||||
char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
|
||||
int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
|
||||
int destXOrigin, destYOrigin, destWidth, destHeight;
|
||||
} GLXPipeRect;
|
||||
typedef struct {
|
||||
char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
|
||||
int XOrigin, YOrigin, maxHeight, maxWidth;
|
||||
} GLXPipeRectLimits;
|
||||
#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
|
||||
#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
|
||||
#define GLX_BAD_HYPERPIPE_SGIX 92
|
||||
#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001
|
||||
#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002
|
||||
#define GLX_PIPE_RECT_SGIX 0x00000001
|
||||
#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002
|
||||
#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003
|
||||
#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004
|
||||
#define GLX_HYPERPIPE_ID_SGIX 0x8030
|
||||
typedef GLXHyperpipeNetworkSGIX *( *PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes);
|
||||
typedef int ( *PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
|
||||
typedef GLXHyperpipeConfigSGIX *( *PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes);
|
||||
typedef int ( *PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId);
|
||||
typedef int ( *PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId);
|
||||
typedef int ( *PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
|
||||
typedef int ( *PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
|
||||
typedef int ( *PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLXHyperpipeNetworkSGIX *glXQueryHyperpipeNetworkSGIX (Display *dpy, int *npipes);
|
||||
int glXHyperpipeConfigSGIX (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId);
|
||||
GLXHyperpipeConfigSGIX *glXQueryHyperpipeConfigSGIX (Display *dpy, int hpId, int *npipes);
|
||||
int glXDestroyHyperpipeConfigSGIX (Display *dpy, int hpId);
|
||||
int glXBindHyperpipeSGIX (Display *dpy, int hpId);
|
||||
int glXQueryHyperpipeBestAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList);
|
||||
int glXHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList);
|
||||
int glXQueryHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList);
|
||||
#endif
|
||||
#endif /* GLX_SGIX_hyperpipe */
|
||||
|
||||
#ifndef GLX_SGIX_pbuffer
|
||||
#define GLX_SGIX_pbuffer 1
|
||||
#define GLX_PBUFFER_BIT_SGIX 0x00000004
|
||||
#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
|
||||
#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
|
||||
#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
|
||||
#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
|
||||
#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
|
||||
#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
|
||||
#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
|
||||
#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
|
||||
#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
|
||||
#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
|
||||
#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
|
||||
#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
|
||||
#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
|
||||
#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
|
||||
#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
|
||||
#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
|
||||
#define GLX_LARGEST_PBUFFER_SGIX 0x801C
|
||||
#define GLX_WIDTH_SGIX 0x801D
|
||||
#define GLX_HEIGHT_SGIX 0x801E
|
||||
#define GLX_EVENT_MASK_SGIX 0x801F
|
||||
#define GLX_DAMAGED_SGIX 0x8020
|
||||
#define GLX_SAVED_SGIX 0x8021
|
||||
#define GLX_WINDOW_SGIX 0x8022
|
||||
#define GLX_PBUFFER_SGIX 0x8023
|
||||
typedef GLXPbufferSGIX ( *PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
|
||||
typedef void ( *PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
|
||||
typedef int ( *PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
|
||||
typedef void ( *PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
|
||||
typedef void ( *PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
|
||||
void glXDestroyGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf);
|
||||
int glXQueryGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
|
||||
void glXSelectEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long mask);
|
||||
void glXGetSelectedEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long *mask);
|
||||
#endif
|
||||
#endif /* GLX_SGIX_pbuffer */
|
||||
|
||||
#ifndef GLX_SGIX_swap_barrier
|
||||
#define GLX_SGIX_swap_barrier 1
|
||||
typedef void ( *PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
|
||||
typedef Bool ( *PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXBindSwapBarrierSGIX (Display *dpy, GLXDrawable drawable, int barrier);
|
||||
Bool glXQueryMaxSwapBarriersSGIX (Display *dpy, int screen, int *max);
|
||||
#endif
|
||||
#endif /* GLX_SGIX_swap_barrier */
|
||||
|
||||
#ifndef GLX_SGIX_swap_group
|
||||
#define GLX_SGIX_swap_group 1
|
||||
typedef void ( *PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXJoinSwapGroupSGIX (Display *dpy, GLXDrawable drawable, GLXDrawable member);
|
||||
#endif
|
||||
#endif /* GLX_SGIX_swap_group */
|
||||
|
||||
#ifndef GLX_SGIX_video_resize
|
||||
#define GLX_SGIX_video_resize 1
|
||||
#define GLX_SYNC_FRAME_SGIX 0x00000000
|
||||
#define GLX_SYNC_SWAP_SGIX 0x00000001
|
||||
typedef int ( *PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
|
||||
typedef int ( *PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
|
||||
typedef int ( *PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
|
||||
typedef int ( *PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
|
||||
typedef int ( *PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXBindChannelToWindowSGIX (Display *display, int screen, int channel, Window window);
|
||||
int glXChannelRectSGIX (Display *display, int screen, int channel, int x, int y, int w, int h);
|
||||
int glXQueryChannelRectSGIX (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
|
||||
int glXQueryChannelDeltasSGIX (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
|
||||
int glXChannelRectSyncSGIX (Display *display, int screen, int channel, GLenum synctype);
|
||||
#endif
|
||||
#endif /* GLX_SGIX_video_resize */
|
||||
|
||||
#ifndef GLX_SGIX_video_source
|
||||
#define GLX_SGIX_video_source 1
|
||||
typedef XID GLXVideoSourceSGIX;
|
||||
#ifdef _VL_H
|
||||
typedef GLXVideoSourceSGIX ( *PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
|
||||
typedef void ( *PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
|
||||
void glXDestroyGLXVideoSourceSGIX (Display *dpy, GLXVideoSourceSGIX glxvideosource);
|
||||
#endif
|
||||
#endif /* _VL_H */
|
||||
#endif /* GLX_SGIX_video_source */
|
||||
|
||||
#ifndef GLX_SGIX_visual_select_group
|
||||
#define GLX_SGIX_visual_select_group 1
|
||||
#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
|
||||
#endif /* GLX_SGIX_visual_select_group */
|
||||
|
||||
#ifndef GLX_SGI_cushion
|
||||
#define GLX_SGI_cushion 1
|
||||
typedef void ( *PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
void glXCushionSGI (Display *dpy, Window window, float cushion);
|
||||
#endif
|
||||
#endif /* GLX_SGI_cushion */
|
||||
|
||||
#ifndef GLX_SGI_make_current_read
|
||||
#define GLX_SGI_make_current_read 1
|
||||
typedef Bool ( *PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
typedef GLXDrawable ( *PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Bool glXMakeCurrentReadSGI (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
GLXDrawable glXGetCurrentReadDrawableSGI (void);
|
||||
#endif
|
||||
#endif /* GLX_SGI_make_current_read */
|
||||
|
||||
#ifndef GLX_SGI_swap_control
|
||||
#define GLX_SGI_swap_control 1
|
||||
typedef int ( *PFNGLXSWAPINTERVALSGIPROC) (int interval);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXSwapIntervalSGI (int interval);
|
||||
#endif
|
||||
#endif /* GLX_SGI_swap_control */
|
||||
|
||||
#ifndef GLX_SGI_video_sync
|
||||
#define GLX_SGI_video_sync 1
|
||||
typedef int ( *PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
|
||||
typedef int ( *PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
int glXGetVideoSyncSGI (unsigned int *count);
|
||||
int glXWaitVideoSyncSGI (int divisor, int remainder, unsigned int *count);
|
||||
#endif
|
||||
#endif /* GLX_SGI_video_sync */
|
||||
|
||||
#ifndef GLX_SUN_get_transparent_index
|
||||
#define GLX_SUN_get_transparent_index 1
|
||||
typedef Status ( *PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
|
||||
#ifdef GLX_GLXEXT_PROTOTYPES
|
||||
Status glXGetTransparentIndexSUN (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
|
||||
#endif
|
||||
#endif /* GLX_SUN_get_transparent_index */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
840
deps/GL/wglext.h
vendored
840
deps/GL/wglext.h
vendored
@ -1,840 +0,0 @@
|
||||
#ifndef __wglext_h_
|
||||
#define __wglext_h_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2013-2014 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
/*
|
||||
** This header is generated from the Khronos OpenGL / OpenGL ES XML
|
||||
** API Registry. The current version of the Registry, generator scripts
|
||||
** used to make the header, and the header can be found at
|
||||
** http://www.opengl.org/registry/
|
||||
**
|
||||
** Khronos $Revision: 27684 $ on $Date: 2014-08-11 01:21:35 -0700 (Mon, 11 Aug 2014) $
|
||||
*/
|
||||
|
||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#define WGL_WGLEXT_VERSION 20140810
|
||||
|
||||
/* Generated C header for:
|
||||
* API: wgl
|
||||
* Versions considered: .*
|
||||
* Versions emitted: _nomatch_^
|
||||
* Default extensions included: wgl
|
||||
* Additional extensions included: _nomatch_^
|
||||
* Extensions removed: _nomatch_^
|
||||
*/
|
||||
|
||||
#ifndef WGL_ARB_buffer_region
|
||||
#define WGL_ARB_buffer_region 1
|
||||
#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
|
||||
#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002
|
||||
#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004
|
||||
#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008
|
||||
typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType);
|
||||
typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion);
|
||||
typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height);
|
||||
typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
HANDLE WINAPI wglCreateBufferRegionARB (HDC hDC, int iLayerPlane, UINT uType);
|
||||
VOID WINAPI wglDeleteBufferRegionARB (HANDLE hRegion);
|
||||
BOOL WINAPI wglSaveBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height);
|
||||
BOOL WINAPI wglRestoreBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
|
||||
#endif
|
||||
#endif /* WGL_ARB_buffer_region */
|
||||
|
||||
#ifndef WGL_ARB_context_flush_control
|
||||
#define WGL_ARB_context_flush_control 1
|
||||
#define WGL_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097
|
||||
#define WGL_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0
|
||||
#define WGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098
|
||||
#endif /* WGL_ARB_context_flush_control */
|
||||
|
||||
#ifndef WGL_ARB_create_context
|
||||
#define WGL_ARB_create_context 1
|
||||
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
|
||||
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
|
||||
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
|
||||
#define WGL_CONTEXT_FLAGS_ARB 0x2094
|
||||
#define ERROR_INVALID_VERSION_ARB 0x2095
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
HGLRC WINAPI wglCreateContextAttribsARB (HDC hDC, HGLRC hShareContext, const int *attribList);
|
||||
#endif
|
||||
#endif /* WGL_ARB_create_context */
|
||||
|
||||
#ifndef WGL_ARB_create_context_profile
|
||||
#define WGL_ARB_create_context_profile 1
|
||||
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
|
||||
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
||||
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
|
||||
#define ERROR_INVALID_PROFILE_ARB 0x2096
|
||||
#endif /* WGL_ARB_create_context_profile */
|
||||
|
||||
#ifndef WGL_ARB_create_context_robustness
|
||||
#define WGL_ARB_create_context_robustness 1
|
||||
#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
|
||||
#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
|
||||
#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
|
||||
#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261
|
||||
#endif /* WGL_ARB_create_context_robustness */
|
||||
|
||||
#ifndef WGL_ARB_extensions_string
|
||||
#define WGL_ARB_extensions_string 1
|
||||
typedef const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
const char *WINAPI wglGetExtensionsStringARB (HDC hdc);
|
||||
#endif
|
||||
#endif /* WGL_ARB_extensions_string */
|
||||
|
||||
#ifndef WGL_ARB_framebuffer_sRGB
|
||||
#define WGL_ARB_framebuffer_sRGB 1
|
||||
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9
|
||||
#endif /* WGL_ARB_framebuffer_sRGB */
|
||||
|
||||
#ifndef WGL_ARB_make_current_read
|
||||
#define WGL_ARB_make_current_read 1
|
||||
#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
|
||||
#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
|
||||
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglMakeContextCurrentARB (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
HDC WINAPI wglGetCurrentReadDCARB (void);
|
||||
#endif
|
||||
#endif /* WGL_ARB_make_current_read */
|
||||
|
||||
#ifndef WGL_ARB_multisample
|
||||
#define WGL_ARB_multisample 1
|
||||
#define WGL_SAMPLE_BUFFERS_ARB 0x2041
|
||||
#define WGL_SAMPLES_ARB 0x2042
|
||||
#endif /* WGL_ARB_multisample */
|
||||
|
||||
#ifndef WGL_ARB_pbuffer
|
||||
#define WGL_ARB_pbuffer 1
|
||||
DECLARE_HANDLE(HPBUFFERARB);
|
||||
#define WGL_DRAW_TO_PBUFFER_ARB 0x202D
|
||||
#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
|
||||
#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
|
||||
#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
|
||||
#define WGL_PBUFFER_LARGEST_ARB 0x2033
|
||||
#define WGL_PBUFFER_WIDTH_ARB 0x2034
|
||||
#define WGL_PBUFFER_HEIGHT_ARB 0x2035
|
||||
#define WGL_PBUFFER_LOST_ARB 0x2036
|
||||
typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer);
|
||||
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC);
|
||||
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
HPBUFFERARB WINAPI wglCreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB hPbuffer);
|
||||
int WINAPI wglReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC);
|
||||
BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB hPbuffer);
|
||||
BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
|
||||
#endif
|
||||
#endif /* WGL_ARB_pbuffer */
|
||||
|
||||
#ifndef WGL_ARB_pixel_format
|
||||
#define WGL_ARB_pixel_format 1
|
||||
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
||||
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
||||
#define WGL_DRAW_TO_BITMAP_ARB 0x2002
|
||||
#define WGL_ACCELERATION_ARB 0x2003
|
||||
#define WGL_NEED_PALETTE_ARB 0x2004
|
||||
#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
|
||||
#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
|
||||
#define WGL_SWAP_METHOD_ARB 0x2007
|
||||
#define WGL_NUMBER_OVERLAYS_ARB 0x2008
|
||||
#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
|
||||
#define WGL_TRANSPARENT_ARB 0x200A
|
||||
#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
|
||||
#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
|
||||
#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
|
||||
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
|
||||
#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
|
||||
#define WGL_SHARE_DEPTH_ARB 0x200C
|
||||
#define WGL_SHARE_STENCIL_ARB 0x200D
|
||||
#define WGL_SHARE_ACCUM_ARB 0x200E
|
||||
#define WGL_SUPPORT_GDI_ARB 0x200F
|
||||
#define WGL_SUPPORT_OPENGL_ARB 0x2010
|
||||
#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
||||
#define WGL_STEREO_ARB 0x2012
|
||||
#define WGL_PIXEL_TYPE_ARB 0x2013
|
||||
#define WGL_COLOR_BITS_ARB 0x2014
|
||||
#define WGL_RED_BITS_ARB 0x2015
|
||||
#define WGL_RED_SHIFT_ARB 0x2016
|
||||
#define WGL_GREEN_BITS_ARB 0x2017
|
||||
#define WGL_GREEN_SHIFT_ARB 0x2018
|
||||
#define WGL_BLUE_BITS_ARB 0x2019
|
||||
#define WGL_BLUE_SHIFT_ARB 0x201A
|
||||
#define WGL_ALPHA_BITS_ARB 0x201B
|
||||
#define WGL_ALPHA_SHIFT_ARB 0x201C
|
||||
#define WGL_ACCUM_BITS_ARB 0x201D
|
||||
#define WGL_ACCUM_RED_BITS_ARB 0x201E
|
||||
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
|
||||
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
|
||||
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
|
||||
#define WGL_DEPTH_BITS_ARB 0x2022
|
||||
#define WGL_STENCIL_BITS_ARB 0x2023
|
||||
#define WGL_AUX_BUFFERS_ARB 0x2024
|
||||
#define WGL_NO_ACCELERATION_ARB 0x2025
|
||||
#define WGL_GENERIC_ACCELERATION_ARB 0x2026
|
||||
#define WGL_FULL_ACCELERATION_ARB 0x2027
|
||||
#define WGL_SWAP_EXCHANGE_ARB 0x2028
|
||||
#define WGL_SWAP_COPY_ARB 0x2029
|
||||
#define WGL_SWAP_UNDEFINED_ARB 0x202A
|
||||
#define WGL_TYPE_RGBA_ARB 0x202B
|
||||
#define WGL_TYPE_COLORINDEX_ARB 0x202C
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
|
||||
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
||||
BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
|
||||
BOOL WINAPI wglChoosePixelFormatARB (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#endif
|
||||
#endif /* WGL_ARB_pixel_format */
|
||||
|
||||
#ifndef WGL_ARB_pixel_format_float
|
||||
#define WGL_ARB_pixel_format_float 1
|
||||
#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0
|
||||
#endif /* WGL_ARB_pixel_format_float */
|
||||
|
||||
#ifndef WGL_ARB_render_texture
|
||||
#define WGL_ARB_render_texture 1
|
||||
#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
|
||||
#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
|
||||
#define WGL_TEXTURE_FORMAT_ARB 0x2072
|
||||
#define WGL_TEXTURE_TARGET_ARB 0x2073
|
||||
#define WGL_MIPMAP_TEXTURE_ARB 0x2074
|
||||
#define WGL_TEXTURE_RGB_ARB 0x2075
|
||||
#define WGL_TEXTURE_RGBA_ARB 0x2076
|
||||
#define WGL_NO_TEXTURE_ARB 0x2077
|
||||
#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
|
||||
#define WGL_TEXTURE_1D_ARB 0x2079
|
||||
#define WGL_TEXTURE_2D_ARB 0x207A
|
||||
#define WGL_MIPMAP_LEVEL_ARB 0x207B
|
||||
#define WGL_CUBE_MAP_FACE_ARB 0x207C
|
||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
|
||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
|
||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
|
||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
|
||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
|
||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
|
||||
#define WGL_FRONT_LEFT_ARB 0x2083
|
||||
#define WGL_FRONT_RIGHT_ARB 0x2084
|
||||
#define WGL_BACK_LEFT_ARB 0x2085
|
||||
#define WGL_BACK_RIGHT_ARB 0x2086
|
||||
#define WGL_AUX0_ARB 0x2087
|
||||
#define WGL_AUX1_ARB 0x2088
|
||||
#define WGL_AUX2_ARB 0x2089
|
||||
#define WGL_AUX3_ARB 0x208A
|
||||
#define WGL_AUX4_ARB 0x208B
|
||||
#define WGL_AUX5_ARB 0x208C
|
||||
#define WGL_AUX6_ARB 0x208D
|
||||
#define WGL_AUX7_ARB 0x208E
|
||||
#define WGL_AUX8_ARB 0x208F
|
||||
#define WGL_AUX9_ARB 0x2090
|
||||
typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB hPbuffer, const int *piAttribList);
|
||||
#endif
|
||||
#endif /* WGL_ARB_render_texture */
|
||||
|
||||
#ifndef WGL_ARB_robustness_application_isolation
|
||||
#define WGL_ARB_robustness_application_isolation 1
|
||||
#define WGL_CONTEXT_RESET_ISOLATION_BIT_ARB 0x00000008
|
||||
#endif /* WGL_ARB_robustness_application_isolation */
|
||||
|
||||
#ifndef WGL_ARB_robustness_share_group_isolation
|
||||
#define WGL_ARB_robustness_share_group_isolation 1
|
||||
#endif /* WGL_ARB_robustness_share_group_isolation */
|
||||
|
||||
#ifndef WGL_3DFX_multisample
|
||||
#define WGL_3DFX_multisample 1
|
||||
#define WGL_SAMPLE_BUFFERS_3DFX 0x2060
|
||||
#define WGL_SAMPLES_3DFX 0x2061
|
||||
#endif /* WGL_3DFX_multisample */
|
||||
|
||||
#ifndef WGL_3DL_stereo_control
|
||||
#define WGL_3DL_stereo_control 1
|
||||
#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055
|
||||
#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056
|
||||
#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057
|
||||
#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058
|
||||
typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglSetStereoEmitterState3DL (HDC hDC, UINT uState);
|
||||
#endif
|
||||
#endif /* WGL_3DL_stereo_control */
|
||||
|
||||
#ifndef WGL_AMD_gpu_association
|
||||
#define WGL_AMD_gpu_association 1
|
||||
#define WGL_GPU_VENDOR_AMD 0x1F00
|
||||
#define WGL_GPU_RENDERER_STRING_AMD 0x1F01
|
||||
#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
|
||||
#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
|
||||
#define WGL_GPU_RAM_AMD 0x21A3
|
||||
#define WGL_GPU_CLOCK_AMD 0x21A4
|
||||
#define WGL_GPU_NUM_PIPES_AMD 0x21A5
|
||||
#define WGL_GPU_NUM_SIMD_AMD 0x21A6
|
||||
#define WGL_GPU_NUM_RB_AMD 0x21A7
|
||||
#define WGL_GPU_NUM_SPI_AMD 0x21A8
|
||||
typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT *ids);
|
||||
typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, int property, GLenum dataType, UINT size, void *data);
|
||||
typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc);
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id);
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int *attribList);
|
||||
typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc);
|
||||
typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc);
|
||||
typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
|
||||
typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
UINT WINAPI wglGetGPUIDsAMD (UINT maxCount, UINT *ids);
|
||||
INT WINAPI wglGetGPUInfoAMD (UINT id, int property, GLenum dataType, UINT size, void *data);
|
||||
UINT WINAPI wglGetContextGPUIDAMD (HGLRC hglrc);
|
||||
HGLRC WINAPI wglCreateAssociatedContextAMD (UINT id);
|
||||
HGLRC WINAPI wglCreateAssociatedContextAttribsAMD (UINT id, HGLRC hShareContext, const int *attribList);
|
||||
BOOL WINAPI wglDeleteAssociatedContextAMD (HGLRC hglrc);
|
||||
BOOL WINAPI wglMakeAssociatedContextCurrentAMD (HGLRC hglrc);
|
||||
HGLRC WINAPI wglGetCurrentAssociatedContextAMD (void);
|
||||
VOID WINAPI wglBlitContextFramebufferAMD (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
#endif
|
||||
#endif /* WGL_AMD_gpu_association */
|
||||
|
||||
#ifndef WGL_ATI_pixel_format_float
|
||||
#define WGL_ATI_pixel_format_float 1
|
||||
#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0
|
||||
#endif /* WGL_ATI_pixel_format_float */
|
||||
|
||||
#ifndef WGL_EXT_create_context_es2_profile
|
||||
#define WGL_EXT_create_context_es2_profile 1
|
||||
#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
|
||||
#endif /* WGL_EXT_create_context_es2_profile */
|
||||
|
||||
#ifndef WGL_EXT_create_context_es_profile
|
||||
#define WGL_EXT_create_context_es_profile 1
|
||||
#define WGL_CONTEXT_ES_PROFILE_BIT_EXT 0x00000004
|
||||
#endif /* WGL_EXT_create_context_es_profile */
|
||||
|
||||
#ifndef WGL_EXT_depth_float
|
||||
#define WGL_EXT_depth_float 1
|
||||
#define WGL_DEPTH_FLOAT_EXT 0x2040
|
||||
#endif /* WGL_EXT_depth_float */
|
||||
|
||||
#ifndef WGL_EXT_display_color_table
|
||||
#define WGL_EXT_display_color_table 1
|
||||
typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||
typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length);
|
||||
typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||
typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort id);
|
||||
GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *table, GLuint length);
|
||||
GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort id);
|
||||
VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort id);
|
||||
#endif
|
||||
#endif /* WGL_EXT_display_color_table */
|
||||
|
||||
#ifndef WGL_EXT_extensions_string
|
||||
#define WGL_EXT_extensions_string 1
|
||||
typedef const char *(WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
const char *WINAPI wglGetExtensionsStringEXT (void);
|
||||
#endif
|
||||
#endif /* WGL_EXT_extensions_string */
|
||||
|
||||
#ifndef WGL_EXT_framebuffer_sRGB
|
||||
#define WGL_EXT_framebuffer_sRGB 1
|
||||
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9
|
||||
#endif /* WGL_EXT_framebuffer_sRGB */
|
||||
|
||||
#ifndef WGL_EXT_make_current_read
|
||||
#define WGL_EXT_make_current_read 1
|
||||
#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
|
||||
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglMakeContextCurrentEXT (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
HDC WINAPI wglGetCurrentReadDCEXT (void);
|
||||
#endif
|
||||
#endif /* WGL_EXT_make_current_read */
|
||||
|
||||
#ifndef WGL_EXT_multisample
|
||||
#define WGL_EXT_multisample 1
|
||||
#define WGL_SAMPLE_BUFFERS_EXT 0x2041
|
||||
#define WGL_SAMPLES_EXT 0x2042
|
||||
#endif /* WGL_EXT_multisample */
|
||||
|
||||
#ifndef WGL_EXT_pbuffer
|
||||
#define WGL_EXT_pbuffer 1
|
||||
DECLARE_HANDLE(HPBUFFEREXT);
|
||||
#define WGL_DRAW_TO_PBUFFER_EXT 0x202D
|
||||
#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E
|
||||
#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F
|
||||
#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030
|
||||
#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031
|
||||
#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032
|
||||
#define WGL_PBUFFER_LARGEST_EXT 0x2033
|
||||
#define WGL_PBUFFER_WIDTH_EXT 0x2034
|
||||
#define WGL_PBUFFER_HEIGHT_EXT 0x2035
|
||||
typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer);
|
||||
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC);
|
||||
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT hPbuffer);
|
||||
int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT hPbuffer, HDC hDC);
|
||||
BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT hPbuffer);
|
||||
BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
|
||||
#endif
|
||||
#endif /* WGL_EXT_pbuffer */
|
||||
|
||||
#ifndef WGL_EXT_pixel_format
|
||||
#define WGL_EXT_pixel_format 1
|
||||
#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000
|
||||
#define WGL_DRAW_TO_WINDOW_EXT 0x2001
|
||||
#define WGL_DRAW_TO_BITMAP_EXT 0x2002
|
||||
#define WGL_ACCELERATION_EXT 0x2003
|
||||
#define WGL_NEED_PALETTE_EXT 0x2004
|
||||
#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005
|
||||
#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006
|
||||
#define WGL_SWAP_METHOD_EXT 0x2007
|
||||
#define WGL_NUMBER_OVERLAYS_EXT 0x2008
|
||||
#define WGL_NUMBER_UNDERLAYS_EXT 0x2009
|
||||
#define WGL_TRANSPARENT_EXT 0x200A
|
||||
#define WGL_TRANSPARENT_VALUE_EXT 0x200B
|
||||
#define WGL_SHARE_DEPTH_EXT 0x200C
|
||||
#define WGL_SHARE_STENCIL_EXT 0x200D
|
||||
#define WGL_SHARE_ACCUM_EXT 0x200E
|
||||
#define WGL_SUPPORT_GDI_EXT 0x200F
|
||||
#define WGL_SUPPORT_OPENGL_EXT 0x2010
|
||||
#define WGL_DOUBLE_BUFFER_EXT 0x2011
|
||||
#define WGL_STEREO_EXT 0x2012
|
||||
#define WGL_PIXEL_TYPE_EXT 0x2013
|
||||
#define WGL_COLOR_BITS_EXT 0x2014
|
||||
#define WGL_RED_BITS_EXT 0x2015
|
||||
#define WGL_RED_SHIFT_EXT 0x2016
|
||||
#define WGL_GREEN_BITS_EXT 0x2017
|
||||
#define WGL_GREEN_SHIFT_EXT 0x2018
|
||||
#define WGL_BLUE_BITS_EXT 0x2019
|
||||
#define WGL_BLUE_SHIFT_EXT 0x201A
|
||||
#define WGL_ALPHA_BITS_EXT 0x201B
|
||||
#define WGL_ALPHA_SHIFT_EXT 0x201C
|
||||
#define WGL_ACCUM_BITS_EXT 0x201D
|
||||
#define WGL_ACCUM_RED_BITS_EXT 0x201E
|
||||
#define WGL_ACCUM_GREEN_BITS_EXT 0x201F
|
||||
#define WGL_ACCUM_BLUE_BITS_EXT 0x2020
|
||||
#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021
|
||||
#define WGL_DEPTH_BITS_EXT 0x2022
|
||||
#define WGL_STENCIL_BITS_EXT 0x2023
|
||||
#define WGL_AUX_BUFFERS_EXT 0x2024
|
||||
#define WGL_NO_ACCELERATION_EXT 0x2025
|
||||
#define WGL_GENERIC_ACCELERATION_EXT 0x2026
|
||||
#define WGL_FULL_ACCELERATION_EXT 0x2027
|
||||
#define WGL_SWAP_EXCHANGE_EXT 0x2028
|
||||
#define WGL_SWAP_COPY_EXT 0x2029
|
||||
#define WGL_SWAP_UNDEFINED_EXT 0x202A
|
||||
#define WGL_TYPE_RGBA_EXT 0x202B
|
||||
#define WGL_TYPE_COLORINDEX_EXT 0x202C
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
|
||||
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
|
||||
BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
|
||||
BOOL WINAPI wglChoosePixelFormatEXT (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#endif
|
||||
#endif /* WGL_EXT_pixel_format */
|
||||
|
||||
#ifndef WGL_EXT_pixel_format_packed_float
|
||||
#define WGL_EXT_pixel_format_packed_float 1
|
||||
#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8
|
||||
#endif /* WGL_EXT_pixel_format_packed_float */
|
||||
|
||||
#ifndef WGL_EXT_swap_control
|
||||
#define WGL_EXT_swap_control 1
|
||||
typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
||||
typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglSwapIntervalEXT (int interval);
|
||||
int WINAPI wglGetSwapIntervalEXT (void);
|
||||
#endif
|
||||
#endif /* WGL_EXT_swap_control */
|
||||
|
||||
#ifndef WGL_EXT_swap_control_tear
|
||||
#define WGL_EXT_swap_control_tear 1
|
||||
#endif /* WGL_EXT_swap_control_tear */
|
||||
|
||||
#ifndef WGL_I3D_digital_video_control
|
||||
#define WGL_I3D_digital_video_control 1
|
||||
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050
|
||||
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051
|
||||
#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052
|
||||
#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053
|
||||
typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
|
||||
typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC hDC, int iAttribute, int *piValue);
|
||||
BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC hDC, int iAttribute, const int *piValue);
|
||||
#endif
|
||||
#endif /* WGL_I3D_digital_video_control */
|
||||
|
||||
#ifndef WGL_I3D_gamma
|
||||
#define WGL_I3D_gamma 1
|
||||
#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E
|
||||
#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F
|
||||
typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
|
||||
typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
|
||||
typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetGammaTableParametersI3D (HDC hDC, int iAttribute, int *piValue);
|
||||
BOOL WINAPI wglSetGammaTableParametersI3D (HDC hDC, int iAttribute, const int *piValue);
|
||||
BOOL WINAPI wglGetGammaTableI3D (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
|
||||
BOOL WINAPI wglSetGammaTableI3D (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
|
||||
#endif
|
||||
#endif /* WGL_I3D_gamma */
|
||||
|
||||
#ifndef WGL_I3D_genlock
|
||||
#define WGL_I3D_genlock 1
|
||||
#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044
|
||||
#define WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D 0x2045
|
||||
#define WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D 0x2046
|
||||
#define WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D 0x2047
|
||||
#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048
|
||||
#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049
|
||||
#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A
|
||||
#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B
|
||||
#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C
|
||||
typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC);
|
||||
typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC);
|
||||
typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag);
|
||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource);
|
||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge);
|
||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate);
|
||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglEnableGenlockI3D (HDC hDC);
|
||||
BOOL WINAPI wglDisableGenlockI3D (HDC hDC);
|
||||
BOOL WINAPI wglIsEnabledGenlockI3D (HDC hDC, BOOL *pFlag);
|
||||
BOOL WINAPI wglGenlockSourceI3D (HDC hDC, UINT uSource);
|
||||
BOOL WINAPI wglGetGenlockSourceI3D (HDC hDC, UINT *uSource);
|
||||
BOOL WINAPI wglGenlockSourceEdgeI3D (HDC hDC, UINT uEdge);
|
||||
BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC hDC, UINT *uEdge);
|
||||
BOOL WINAPI wglGenlockSampleRateI3D (HDC hDC, UINT uRate);
|
||||
BOOL WINAPI wglGetGenlockSampleRateI3D (HDC hDC, UINT *uRate);
|
||||
BOOL WINAPI wglGenlockSourceDelayI3D (HDC hDC, UINT uDelay);
|
||||
BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC hDC, UINT *uDelay);
|
||||
BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
|
||||
#endif
|
||||
#endif /* WGL_I3D_genlock */
|
||||
|
||||
#ifndef WGL_I3D_image_buffer
|
||||
#define WGL_I3D_image_buffer 1
|
||||
#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001
|
||||
#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002
|
||||
typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags);
|
||||
typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress);
|
||||
typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
LPVOID WINAPI wglCreateImageBufferI3D (HDC hDC, DWORD dwSize, UINT uFlags);
|
||||
BOOL WINAPI wglDestroyImageBufferI3D (HDC hDC, LPVOID pAddress);
|
||||
BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
|
||||
BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC hDC, const LPVOID *pAddress, UINT count);
|
||||
#endif
|
||||
#endif /* WGL_I3D_image_buffer */
|
||||
|
||||
#ifndef WGL_I3D_swap_frame_lock
|
||||
#define WGL_I3D_swap_frame_lock 1
|
||||
typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void);
|
||||
typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void);
|
||||
typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglEnableFrameLockI3D (void);
|
||||
BOOL WINAPI wglDisableFrameLockI3D (void);
|
||||
BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *pFlag);
|
||||
BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *pFlag);
|
||||
#endif
|
||||
#endif /* WGL_I3D_swap_frame_lock */
|
||||
|
||||
#ifndef WGL_I3D_swap_frame_usage
|
||||
#define WGL_I3D_swap_frame_usage 1
|
||||
typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage);
|
||||
typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void);
|
||||
typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetFrameUsageI3D (float *pUsage);
|
||||
BOOL WINAPI wglBeginFrameTrackingI3D (void);
|
||||
BOOL WINAPI wglEndFrameTrackingI3D (void);
|
||||
BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
|
||||
#endif
|
||||
#endif /* WGL_I3D_swap_frame_usage */
|
||||
|
||||
#ifndef WGL_NV_DX_interop
|
||||
#define WGL_NV_DX_interop 1
|
||||
#define WGL_ACCESS_READ_ONLY_NV 0x00000000
|
||||
#define WGL_ACCESS_READ_WRITE_NV 0x00000001
|
||||
#define WGL_ACCESS_WRITE_DISCARD_NV 0x00000002
|
||||
typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLENVPROC) (void *dxObject, HANDLE shareHandle);
|
||||
typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICENVPROC) (void *dxDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICENVPROC) (HANDLE hDevice);
|
||||
typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access);
|
||||
typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE hObject);
|
||||
typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access);
|
||||
typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||
typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglDXSetResourceShareHandleNV (void *dxObject, HANDLE shareHandle);
|
||||
HANDLE WINAPI wglDXOpenDeviceNV (void *dxDevice);
|
||||
BOOL WINAPI wglDXCloseDeviceNV (HANDLE hDevice);
|
||||
HANDLE WINAPI wglDXRegisterObjectNV (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access);
|
||||
BOOL WINAPI wglDXUnregisterObjectNV (HANDLE hDevice, HANDLE hObject);
|
||||
BOOL WINAPI wglDXObjectAccessNV (HANDLE hObject, GLenum access);
|
||||
BOOL WINAPI wglDXLockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||
BOOL WINAPI wglDXUnlockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||
#endif
|
||||
#endif /* WGL_NV_DX_interop */
|
||||
|
||||
#ifndef WGL_NV_DX_interop2
|
||||
#define WGL_NV_DX_interop2 1
|
||||
#endif /* WGL_NV_DX_interop2 */
|
||||
|
||||
#ifndef WGL_NV_copy_image
|
||||
#define WGL_NV_copy_image 1
|
||||
typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (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);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI 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);
|
||||
#endif
|
||||
#endif /* WGL_NV_copy_image */
|
||||
|
||||
#ifndef WGL_NV_delay_before_swap
|
||||
#define WGL_NV_delay_before_swap 1
|
||||
typedef BOOL (WINAPI * PFNWGLDELAYBEFORESWAPNVPROC) (HDC hDC, GLfloat seconds);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglDelayBeforeSwapNV (HDC hDC, GLfloat seconds);
|
||||
#endif
|
||||
#endif /* WGL_NV_delay_before_swap */
|
||||
|
||||
#ifndef WGL_NV_float_buffer
|
||||
#define WGL_NV_float_buffer 1
|
||||
#define WGL_FLOAT_COMPONENTS_NV 0x20B0
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
|
||||
#define WGL_TEXTURE_FLOAT_R_NV 0x20B5
|
||||
#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6
|
||||
#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7
|
||||
#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8
|
||||
#endif /* WGL_NV_float_buffer */
|
||||
|
||||
#ifndef WGL_NV_gpu_affinity
|
||||
#define WGL_NV_gpu_affinity 1
|
||||
DECLARE_HANDLE(HGPUNV);
|
||||
struct _GPU_DEVICE {
|
||||
DWORD cb;
|
||||
CHAR DeviceName[32];
|
||||
CHAR DeviceString[128];
|
||||
DWORD Flags;
|
||||
RECT rcVirtualScreen;
|
||||
};
|
||||
typedef struct _GPU_DEVICE *PGPU_DEVICE;
|
||||
#define ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0
|
||||
#define ERROR_MISSING_AFFINITY_MASK_NV 0x20D1
|
||||
typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
|
||||
typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
|
||||
typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList);
|
||||
typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
|
||||
typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglEnumGpusNV (UINT iGpuIndex, HGPUNV *phGpu);
|
||||
BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
|
||||
HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *phGpuList);
|
||||
BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
|
||||
BOOL WINAPI wglDeleteDCNV (HDC hdc);
|
||||
#endif
|
||||
#endif /* WGL_NV_gpu_affinity */
|
||||
|
||||
#ifndef WGL_NV_multisample_coverage
|
||||
#define WGL_NV_multisample_coverage 1
|
||||
#define WGL_COVERAGE_SAMPLES_NV 0x2042
|
||||
#define WGL_COLOR_SAMPLES_NV 0x20B9
|
||||
#endif /* WGL_NV_multisample_coverage */
|
||||
|
||||
#ifndef WGL_NV_present_video
|
||||
#define WGL_NV_present_video 1
|
||||
DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
|
||||
#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0
|
||||
typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList);
|
||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
int WINAPI wglEnumerateVideoDevicesNV (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList);
|
||||
BOOL WINAPI wglBindVideoDeviceNV (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
|
||||
BOOL WINAPI wglQueryCurrentContextNV (int iAttribute, int *piValue);
|
||||
#endif
|
||||
#endif /* WGL_NV_present_video */
|
||||
|
||||
#ifndef WGL_NV_render_depth_texture
|
||||
#define WGL_NV_render_depth_texture 1
|
||||
#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
|
||||
#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
|
||||
#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
|
||||
#define WGL_DEPTH_COMPONENT_NV 0x20A7
|
||||
#endif /* WGL_NV_render_depth_texture */
|
||||
|
||||
#ifndef WGL_NV_render_texture_rectangle
|
||||
#define WGL_NV_render_texture_rectangle 1
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1
|
||||
#define WGL_TEXTURE_RECTANGLE_NV 0x20A2
|
||||
#endif /* WGL_NV_render_texture_rectangle */
|
||||
|
||||
#ifndef WGL_NV_swap_group
|
||||
#define WGL_NV_swap_group 1
|
||||
typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);
|
||||
typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count);
|
||||
typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglJoinSwapGroupNV (HDC hDC, GLuint group);
|
||||
BOOL WINAPI wglBindSwapBarrierNV (GLuint group, GLuint barrier);
|
||||
BOOL WINAPI wglQuerySwapGroupNV (HDC hDC, GLuint *group, GLuint *barrier);
|
||||
BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
|
||||
BOOL WINAPI wglQueryFrameCountNV (HDC hDC, GLuint *count);
|
||||
BOOL WINAPI wglResetFrameCountNV (HDC hDC);
|
||||
#endif
|
||||
#endif /* WGL_NV_swap_group */
|
||||
|
||||
#ifndef WGL_NV_vertex_array_range
|
||||
#define WGL_NV_vertex_array_range 1
|
||||
typedef void *(WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
|
||||
typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
void *WINAPI wglAllocateMemoryNV (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
|
||||
void WINAPI wglFreeMemoryNV (void *pointer);
|
||||
#endif
|
||||
#endif /* WGL_NV_vertex_array_range */
|
||||
|
||||
#ifndef WGL_NV_video_capture
|
||||
#define WGL_NV_video_capture 1
|
||||
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
|
||||
#define WGL_UNIQUE_ID_NV 0x20CE
|
||||
#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
|
||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
|
||||
typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
|
||||
typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglBindVideoCaptureDeviceNV (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
|
||||
UINT WINAPI wglEnumerateVideoCaptureDevicesNV (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
|
||||
BOOL WINAPI wglLockVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||
BOOL WINAPI wglQueryVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
|
||||
BOOL WINAPI wglReleaseVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||
#endif
|
||||
#endif /* WGL_NV_video_capture */
|
||||
|
||||
#ifndef WGL_NV_video_output
|
||||
#define WGL_NV_video_output 1
|
||||
DECLARE_HANDLE(HPVIDEODEV);
|
||||
#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0
|
||||
#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1
|
||||
#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2
|
||||
#define WGL_VIDEO_OUT_COLOR_NV 0x20C3
|
||||
#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4
|
||||
#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5
|
||||
#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
|
||||
#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
|
||||
#define WGL_VIDEO_OUT_FRAME 0x20C8
|
||||
#define WGL_VIDEO_OUT_FIELD_1 0x20C9
|
||||
#define WGL_VIDEO_OUT_FIELD_2 0x20CA
|
||||
#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB
|
||||
#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC
|
||||
typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
|
||||
typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetVideoDeviceNV (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
|
||||
BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV hVideoDevice);
|
||||
BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
|
||||
BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||
#endif
|
||||
#endif /* WGL_NV_video_output */
|
||||
|
||||
#ifndef WGL_OML_sync_control
|
||||
#define WGL_OML_sync_control 1
|
||||
typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator);
|
||||
typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||
typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||
typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
BOOL WINAPI wglGetSyncValuesOML (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
BOOL WINAPI wglGetMscRateOML (HDC hdc, INT32 *numerator, INT32 *denominator);
|
||||
INT64 WINAPI wglSwapBuffersMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||
INT64 WINAPI wglSwapLayerBuffersMscOML (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||
BOOL WINAPI wglWaitForMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
BOOL WINAPI wglWaitForSbcOML (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
#endif
|
||||
#endif /* WGL_OML_sync_control */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
282
deps/KHR/khrplatform.h
vendored
282
deps/KHR/khrplatform.h
vendored
@ -1,282 +0,0 @@
|
||||
#ifndef __khrplatform_h_
|
||||
#define __khrplatform_h_
|
||||
|
||||
/*
|
||||
** Copyright (c) 2008-2009 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
/* Khronos platform-specific types and definitions.
|
||||
*
|
||||
* $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $
|
||||
*
|
||||
* Adopters may modify this file to suit their platform. Adopters are
|
||||
* encouraged to submit platform specific modifications to the Khronos
|
||||
* group so that they can be included in future versions of this file.
|
||||
* Please submit changes by sending them to the public Khronos Bugzilla
|
||||
* (http://khronos.org/bugzilla) by filing a bug against product
|
||||
* "Khronos (general)" component "Registry".
|
||||
*
|
||||
* A predefined template which fills in some of the bug fields can be
|
||||
* reached using http://tinyurl.com/khrplatform-h-bugreport, but you
|
||||
* must create a Bugzilla login first.
|
||||
*
|
||||
*
|
||||
* See the Implementer's Guidelines for information about where this file
|
||||
* should be located on your system and for more details of its use:
|
||||
* http://www.khronos.org/registry/implementers_guide.pdf
|
||||
*
|
||||
* This file should be included as
|
||||
* #include <KHR/khrplatform.h>
|
||||
* by Khronos client API header files that use its types and defines.
|
||||
*
|
||||
* The types in khrplatform.h should only be used to define API-specific types.
|
||||
*
|
||||
* Types defined in khrplatform.h:
|
||||
* khronos_int8_t signed 8 bit
|
||||
* khronos_uint8_t unsigned 8 bit
|
||||
* khronos_int16_t signed 16 bit
|
||||
* khronos_uint16_t unsigned 16 bit
|
||||
* khronos_int32_t signed 32 bit
|
||||
* khronos_uint32_t unsigned 32 bit
|
||||
* khronos_int64_t signed 64 bit
|
||||
* khronos_uint64_t unsigned 64 bit
|
||||
* khronos_intptr_t signed same number of bits as a pointer
|
||||
* khronos_uintptr_t unsigned same number of bits as a pointer
|
||||
* khronos_ssize_t signed size
|
||||
* khronos_usize_t unsigned size
|
||||
* khronos_float_t signed 32 bit floating point
|
||||
* khronos_time_ns_t unsigned 64 bit time in nanoseconds
|
||||
* khronos_utime_nanoseconds_t unsigned time interval or absolute time in
|
||||
* nanoseconds
|
||||
* khronos_stime_nanoseconds_t signed time interval in nanoseconds
|
||||
* khronos_boolean_enum_t enumerated boolean type. This should
|
||||
* only be used as a base type when a client API's boolean type is
|
||||
* an enum. Client APIs which use an integer or other type for
|
||||
* booleans cannot use this as the base type for their boolean.
|
||||
*
|
||||
* Tokens defined in khrplatform.h:
|
||||
*
|
||||
* KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
|
||||
*
|
||||
* KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
|
||||
* KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
|
||||
*
|
||||
* Calling convention macros defined in this file:
|
||||
* KHRONOS_APICALL
|
||||
* KHRONOS_APIENTRY
|
||||
* KHRONOS_APIATTRIBUTES
|
||||
*
|
||||
* These may be used in function prototypes as:
|
||||
*
|
||||
* KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
|
||||
* int arg1,
|
||||
* int arg2) KHRONOS_APIATTRIBUTES;
|
||||
*/
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APICALL
|
||||
*-------------------------------------------------------------------------
|
||||
* This precedes the return type of the function in the function prototype.
|
||||
*/
|
||||
#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
|
||||
# define KHRONOS_APICALL __declspec(dllimport)
|
||||
#elif defined (__SYMBIAN32__)
|
||||
# define KHRONOS_APICALL IMPORT_C
|
||||
#else
|
||||
# define KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APIENTRY
|
||||
*-------------------------------------------------------------------------
|
||||
* This follows the return type of the function and precedes the function
|
||||
* name in the function prototype.
|
||||
*/
|
||||
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
|
||||
/* Win32 but not WinCE */
|
||||
# define KHRONOS_APIENTRY __stdcall
|
||||
#else
|
||||
# define KHRONOS_APIENTRY
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APIATTRIBUTES
|
||||
*-------------------------------------------------------------------------
|
||||
* This follows the closing parenthesis of the function prototype arguments.
|
||||
*/
|
||||
#if defined (__ARMCC_2__)
|
||||
#define KHRONOS_APIATTRIBUTES __softfp
|
||||
#else
|
||||
#define KHRONOS_APIATTRIBUTES
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* basic type definitions
|
||||
*-----------------------------------------------------------------------*/
|
||||
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
|
||||
|
||||
|
||||
/*
|
||||
* Using <stdint.h>
|
||||
*/
|
||||
#include <stdint.h>
|
||||
typedef int32_t khronos_int32_t;
|
||||
typedef uint32_t khronos_uint32_t;
|
||||
typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(__VMS ) || defined(__sgi)
|
||||
|
||||
/*
|
||||
* Using <inttypes.h>
|
||||
*/
|
||||
#include <inttypes.h>
|
||||
typedef int32_t khronos_int32_t;
|
||||
typedef uint32_t khronos_uint32_t;
|
||||
typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
|
||||
|
||||
/*
|
||||
* Win32
|
||||
*/
|
||||
typedef __int32 khronos_int32_t;
|
||||
typedef unsigned __int32 khronos_uint32_t;
|
||||
typedef __int64 khronos_int64_t;
|
||||
typedef unsigned __int64 khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(__sun__) || defined(__digital__)
|
||||
|
||||
/*
|
||||
* Sun or Digital
|
||||
*/
|
||||
typedef int khronos_int32_t;
|
||||
typedef unsigned int khronos_uint32_t;
|
||||
#if defined(__arch64__) || defined(_LP64)
|
||||
typedef long int khronos_int64_t;
|
||||
typedef unsigned long int khronos_uint64_t;
|
||||
#else
|
||||
typedef long long int khronos_int64_t;
|
||||
typedef unsigned long long int khronos_uint64_t;
|
||||
#endif /* __arch64__ */
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif 0
|
||||
|
||||
/*
|
||||
* Hypothetical platform with no float or int64 support
|
||||
*/
|
||||
typedef int khronos_int32_t;
|
||||
typedef unsigned int khronos_uint32_t;
|
||||
#define KHRONOS_SUPPORT_INT64 0
|
||||
#define KHRONOS_SUPPORT_FLOAT 0
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* Generic fallback
|
||||
*/
|
||||
#include <stdint.h>
|
||||
typedef int32_t khronos_int32_t;
|
||||
typedef uint32_t khronos_uint32_t;
|
||||
typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Types that are (so far) the same on all platforms
|
||||
*/
|
||||
typedef signed char khronos_int8_t;
|
||||
typedef unsigned char khronos_uint8_t;
|
||||
typedef signed short int khronos_int16_t;
|
||||
typedef unsigned short int khronos_uint16_t;
|
||||
|
||||
/*
|
||||
* Types that differ between LLP64 and LP64 architectures - in LLP64,
|
||||
* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
|
||||
* to be the only LLP64 architecture in current use.
|
||||
*/
|
||||
#ifdef _WIN64
|
||||
typedef signed long long int khronos_intptr_t;
|
||||
typedef unsigned long long int khronos_uintptr_t;
|
||||
typedef signed long long int khronos_ssize_t;
|
||||
typedef unsigned long long int khronos_usize_t;
|
||||
#else
|
||||
typedef signed long int khronos_intptr_t;
|
||||
typedef unsigned long int khronos_uintptr_t;
|
||||
typedef signed long int khronos_ssize_t;
|
||||
typedef unsigned long int khronos_usize_t;
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_FLOAT
|
||||
/*
|
||||
* Float type
|
||||
*/
|
||||
typedef float khronos_float_t;
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_INT64
|
||||
/* Time types
|
||||
*
|
||||
* These types can be used to represent a time interval in nanoseconds or
|
||||
* an absolute Unadjusted System Time. Unadjusted System Time is the number
|
||||
* of nanoseconds since some arbitrary system event (e.g. since the last
|
||||
* time the system booted). The Unadjusted System Time is an unsigned
|
||||
* 64 bit value that wraps back to 0 every 584 years. Time intervals
|
||||
* may be either signed or unsigned.
|
||||
*/
|
||||
typedef khronos_uint64_t khronos_utime_nanoseconds_t;
|
||||
typedef khronos_int64_t khronos_stime_nanoseconds_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Dummy value used to pad enum types to 32 bits.
|
||||
*/
|
||||
#ifndef KHRONOS_MAX_ENUM
|
||||
#define KHRONOS_MAX_ENUM 0x7FFFFFFF
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Enumerated boolean type
|
||||
*
|
||||
* Values other than zero should be considered to be true. Therefore
|
||||
* comparisons should not be made against KHRONOS_TRUE.
|
||||
*/
|
||||
typedef enum {
|
||||
KHRONOS_FALSE = 0,
|
||||
KHRONOS_TRUE = 1,
|
||||
KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
|
||||
} khronos_boolean_enum_t;
|
||||
|
||||
#endif /* __khrplatform_h_ */
|
753
deps/glad.c
vendored
753
deps/glad.c
vendored
@ -1,753 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <glad/glad.h>
|
||||
|
||||
struct gladGLversionStruct GLVersion;
|
||||
|
||||
#if defined(GL_ES_VERSION_3_0) || defined(GL_VERSION_3_0)
|
||||
#define _GLAD_IS_SOME_NEW_VERSION 1
|
||||
#endif
|
||||
|
||||
int GLAD_GL_VERSION_1_0;
|
||||
int GLAD_GL_VERSION_1_1;
|
||||
int GLAD_GL_VERSION_1_2;
|
||||
int GLAD_GL_VERSION_1_3;
|
||||
int GLAD_GL_VERSION_1_4;
|
||||
int GLAD_GL_VERSION_1_5;
|
||||
int GLAD_GL_VERSION_2_0;
|
||||
int GLAD_GL_VERSION_2_1;
|
||||
int GLAD_GL_VERSION_3_0;
|
||||
int GLAD_GL_VERSION_3_1;
|
||||
int GLAD_GL_VERSION_3_2;
|
||||
PFNGLDELETEVERTEXARRAYSPROC glad_glDeleteVertexArrays;
|
||||
PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback;
|
||||
PFNGLFLUSHPROC glad_glFlush;
|
||||
PFNGLCOPYTEXIMAGE1DPROC glad_glCopyTexImage1D;
|
||||
PFNGLCLEARCOLORPROC glad_glClearColor;
|
||||
PFNGLVERTEXATTRIBI3UIPROC glad_glVertexAttribI3ui;
|
||||
PFNGLGETUNIFORMBLOCKINDEXPROC glad_glGetUniformBlockIndex;
|
||||
PFNGLVERTEXATTRIB4NIVPROC glad_glVertexAttrib4Niv;
|
||||
PFNGLCLEARBUFFERIVPROC glad_glClearBufferiv;
|
||||
PFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate;
|
||||
PFNGLGETVERTEXATTRIBPOINTERVPROC glad_glGetVertexAttribPointerv;
|
||||
PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetFramebufferAttachmentParameteriv;
|
||||
PFNGLBINDFRAGDATALOCATIONPROC glad_glBindFragDataLocation;
|
||||
PFNGLLINKPROGRAMPROC glad_glLinkProgram;
|
||||
PFNGLBINDTEXTUREPROC glad_glBindTexture;
|
||||
PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glad_glGetActiveUniformBlockName;
|
||||
PFNGLVERTEXATTRIBI2UIVPROC glad_glVertexAttribI2uiv;
|
||||
PFNGLFENCESYNCPROC glad_glFenceSync;
|
||||
PFNGLUNIFORM3UIPROC glad_glUniform3ui;
|
||||
PFNGLUNIFORM2UIVPROC glad_glUniform2uiv;
|
||||
PFNGLGETSTRINGPROC glad_glGetString;
|
||||
PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D;
|
||||
PFNGLDETACHSHADERPROC glad_glDetachShader;
|
||||
PFNGLVERTEXATTRIBI4UIVPROC glad_glVertexAttribI4uiv;
|
||||
PFNGLGENBUFFERSPROC glad_glGenBuffers;
|
||||
PFNGLENDQUERYPROC glad_glEndQuery;
|
||||
PFNGLPOINTPARAMETERFVPROC glad_glPointParameterfv;
|
||||
PFNGLLINEWIDTHPROC glad_glLineWidth;
|
||||
PFNGLUNIFORM2FVPROC glad_glUniform2fv;
|
||||
PFNGLDRAWELEMENTSINSTANCEDPROC glad_glDrawElementsInstanced;
|
||||
PFNGLGETINTEGERI_VPROC glad_glGetIntegeri_v;
|
||||
PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation;
|
||||
PFNGLCOMPILESHADERPROC glad_glCompileShader;
|
||||
PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glad_glGetTransformFeedbackVarying;
|
||||
PFNGLDELETETEXTURESPROC glad_glDeleteTextures;
|
||||
PFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate;
|
||||
PFNGLUNIFORMMATRIX3FVPROC glad_glUniformMatrix3fv;
|
||||
PFNGLPOLYGONMODEPROC glad_glPolygonMode;
|
||||
PFNGLBINDBUFFERRANGEPROC glad_glBindBufferRange;
|
||||
PFNGLVERTEXATTRIB4FPROC glad_glVertexAttrib4f;
|
||||
PFNGLGENRENDERBUFFERSPROC glad_glGenRenderbuffers;
|
||||
PFNGLVERTEXATTRIB4DPROC glad_glVertexAttrib4d;
|
||||
PFNGLVERTEXATTRIB1FPROC glad_glVertexAttrib1f;
|
||||
PFNGLGETBUFFERPARAMETERI64VPROC glad_glGetBufferParameteri64v;
|
||||
PFNGLISSYNCPROC glad_glIsSync;
|
||||
PFNGLCLAMPCOLORPROC glad_glClampColor;
|
||||
PFNGLUNIFORM4IVPROC glad_glUniform4iv;
|
||||
PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv;
|
||||
PFNGLCLEARSTENCILPROC glad_glClearStencil;
|
||||
PFNGLFRAMEBUFFERTEXTUREPROC glad_glFramebufferTexture;
|
||||
PFNGLUNIFORMMATRIX2X3FVPROC glad_glUniformMatrix2x3fv;
|
||||
PFNGLVERTEXATTRIB4SPROC glad_glVertexAttrib4s;
|
||||
PFNGLDRAWELEMENTSBASEVERTEXPROC glad_glDrawElementsBaseVertex;
|
||||
PFNGLGETVERTEXATTRIBIUIVPROC glad_glGetVertexAttribIuiv;
|
||||
PFNGLENABLEIPROC glad_glEnablei;
|
||||
PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage;
|
||||
PFNGLVERTEXATTRIB4NUSVPROC glad_glVertexAttrib4Nusv;
|
||||
PFNGLGENTEXTURESPROC glad_glGenTextures;
|
||||
PFNGLDEPTHFUNCPROC glad_glDepthFunc;
|
||||
PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D;
|
||||
PFNGLGETRENDERBUFFERPARAMETERIVPROC glad_glGetRenderbufferParameteriv;
|
||||
PFNGLUNIFORM1FPROC glad_glUniform1f;
|
||||
PFNGLGETVERTEXATTRIBFVPROC glad_glGetVertexAttribfv;
|
||||
PFNGLVERTEXATTRIBI4BVPROC glad_glVertexAttribI4bv;
|
||||
PFNGLVERTEXATTRIB4NBVPROC glad_glVertexAttrib4Nbv;
|
||||
PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv;
|
||||
PFNGLGETCOMPRESSEDTEXIMAGEPROC glad_glGetCompressedTexImage;
|
||||
PFNGLISVERTEXARRAYPROC glad_glIsVertexArray;
|
||||
PFNGLCREATESHADERPROC glad_glCreateShader;
|
||||
PFNGLISBUFFERPROC glad_glIsBuffer;
|
||||
PFNGLUNIFORM1IPROC glad_glUniform1i;
|
||||
PFNGLVERTEXATTRIB3SPROC glad_glVertexAttrib3s;
|
||||
PFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib;
|
||||
PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D;
|
||||
PFNGLVERTEXATTRIB3DVPROC glad_glVertexAttrib3dv;
|
||||
PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D;
|
||||
PFNGLDISABLEPROC glad_glDisable;
|
||||
PFNGLUNIFORM2IPROC glad_glUniform2i;
|
||||
PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate;
|
||||
PFNGLLOGICOPPROC glad_glLogicOp;
|
||||
PFNGLVERTEXATTRIBI4SVPROC glad_glVertexAttribI4sv;
|
||||
PFNGLGETPROGRAMIVPROC glad_glGetProgramiv;
|
||||
PFNGLCOLORMASKPROC glad_glColorMask;
|
||||
PFNGLHINTPROC glad_glHint;
|
||||
PFNGLVERTEXATTRIB1SPROC glad_glVertexAttrib1s;
|
||||
PFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer;
|
||||
PFNGLTEXPARAMETERIIVPROC glad_glTexParameterIiv;
|
||||
PFNGLBLENDEQUATIONPROC glad_glBlendEquation;
|
||||
PFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation;
|
||||
PFNGLSAMPLEMASKIPROC glad_glSampleMaski;
|
||||
PFNGLBINDFRAMEBUFFERPROC glad_glBindFramebuffer;
|
||||
PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback;
|
||||
PFNGLCULLFACEPROC glad_glCullFace;
|
||||
PFNGLUNIFORMMATRIX3X2FVPROC glad_glUniformMatrix3x2fv;
|
||||
PFNGLVERTEXATTRIB4USVPROC glad_glVertexAttrib4usv;
|
||||
PFNGLUNIFORM4FVPROC glad_glUniform4fv;
|
||||
PFNGLGETTEXPARAMETERIUIVPROC glad_glGetTexParameterIuiv;
|
||||
PFNGLDELETEFRAMEBUFFERSPROC glad_glDeleteFramebuffers;
|
||||
PFNGLUNIFORM1UIVPROC glad_glUniform1uiv;
|
||||
PFNGLPOINTSIZEPROC glad_glPointSize;
|
||||
PFNGLGETSTRINGIPROC glad_glGetStringi;
|
||||
PFNGLVERTEXATTRIB2DVPROC glad_glVertexAttrib2dv;
|
||||
PFNGLVERTEXATTRIBI1IVPROC glad_glVertexAttribI1iv;
|
||||
PFNGLDELETEPROGRAMPROC glad_glDeleteProgram;
|
||||
PFNGLVERTEXATTRIB4NUIVPROC glad_glVertexAttrib4Nuiv;
|
||||
PFNGLGENQUERIESPROC glad_glGenQueries;
|
||||
PFNGLWAITSYNCPROC glad_glWaitSync;
|
||||
PFNGLATTACHSHADERPROC glad_glAttachShader;
|
||||
PFNGLBLITFRAMEBUFFERPROC glad_glBlitFramebuffer;
|
||||
PFNGLRENDERBUFFERSTORAGEPROC glad_glRenderbufferStorage;
|
||||
PFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv;
|
||||
PFNGLUNIFORM3IPROC glad_glUniform3i;
|
||||
PFNGLCOMPRESSEDTEXIMAGE1DPROC glad_glCompressedTexImage1D;
|
||||
PFNGLCOPYTEXSUBIMAGE1DPROC glad_glCopyTexSubImage1D;
|
||||
PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glad_glDrawRangeElementsBaseVertex;
|
||||
PFNGLCHECKFRAMEBUFFERSTATUSPROC glad_glCheckFramebufferStatus;
|
||||
PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D;
|
||||
PFNGLGETINTEGER64I_VPROC glad_glGetInteger64i_v;
|
||||
PFNGLPROVOKINGVERTEXPROC glad_glProvokingVertex;
|
||||
PFNGLGETMULTISAMPLEFVPROC glad_glGetMultisamplefv;
|
||||
PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D;
|
||||
PFNGLUNIFORM3FPROC glad_glUniform3f;
|
||||
PFNGLVERTEXATTRIB4UBVPROC glad_glVertexAttrib4ubv;
|
||||
PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv;
|
||||
PFNGLUNIFORMMATRIX4X2FVPROC glad_glUniformMatrix4x2fv;
|
||||
PFNGLENDCONDITIONALRENDERPROC glad_glEndConditionalRender;
|
||||
PFNGLDRAWELEMENTSPROC glad_glDrawElements;
|
||||
PFNGLCOLORMASKIPROC glad_glColorMaski;
|
||||
PFNGLISENABLEDIPROC glad_glIsEnabledi;
|
||||
PFNGLVERTEXATTRIB1DVPROC glad_glVertexAttrib1dv;
|
||||
PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements;
|
||||
PFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv;
|
||||
PFNGLGENVERTEXARRAYSPROC glad_glGenVertexArrays;
|
||||
PFNGLBINDBUFFERBASEPROC glad_glBindBufferBase;
|
||||
PFNGLBUFFERSUBDATAPROC glad_glBufferSubData;
|
||||
PFNGLUNIFORM1IVPROC glad_glUniform1iv;
|
||||
PFNGLGETQUERYOBJECTIVPROC glad_glGetQueryObjectiv;
|
||||
PFNGLUNIFORM4UIVPROC glad_glUniform4uiv;
|
||||
PFNGLREADBUFFERPROC glad_glReadBuffer;
|
||||
PFNGLCOPYBUFFERSUBDATAPROC glad_glCopyBufferSubData;
|
||||
PFNGLBINDVERTEXARRAYPROC glad_glBindVertexArray;
|
||||
PFNGLCLIENTWAITSYNCPROC glad_glClientWaitSync;
|
||||
PFNGLBEGINCONDITIONALRENDERPROC glad_glBeginConditionalRender;
|
||||
PFNGLVERTEXATTRIB3SVPROC glad_glVertexAttrib3sv;
|
||||
PFNGLVERTEXATTRIBI2UIPROC glad_glVertexAttribI2ui;
|
||||
PFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap;
|
||||
PFNGLMULTIDRAWARRAYSPROC glad_glMultiDrawArrays;
|
||||
PFNGLFRAMEBUFFERTEXTURE1DPROC glad_glFramebufferTexture1D;
|
||||
PFNGLGETSHADERIVPROC glad_glGetShaderiv;
|
||||
PFNGLGETACTIVEUNIFORMBLOCKIVPROC glad_glGetActiveUniformBlockiv;
|
||||
PFNGLUNIFORMMATRIX3X4FVPROC glad_glUniformMatrix3x4fv;
|
||||
PFNGLVERTEXATTRIB3FPROC glad_glVertexAttrib3f;
|
||||
PFNGLVERTEXATTRIB4UIVPROC glad_glVertexAttrib4uiv;
|
||||
PFNGLPOINTPARAMETERIPROC glad_glPointParameteri;
|
||||
PFNGLBLENDCOLORPROC glad_glBlendColor;
|
||||
PFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray;
|
||||
PFNGLUNMAPBUFFERPROC glad_glUnmapBuffer;
|
||||
PFNGLDEPTHMASKPROC glad_glDepthMask;
|
||||
PFNGLPOINTPARAMETERFPROC glad_glPointParameterf;
|
||||
PFNGLDISABLEIPROC glad_glDisablei;
|
||||
PFNGLGETDOUBLEVPROC glad_glGetDoublev;
|
||||
PFNGLVERTEXATTRIBI4IVPROC glad_glVertexAttribI4iv;
|
||||
PFNGLVERTEXATTRIB1SVPROC glad_glVertexAttrib1sv;
|
||||
PFNGLSHADERSOURCEPROC glad_glShaderSource;
|
||||
PFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer;
|
||||
PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D;
|
||||
PFNGLVERTEXATTRIBI3UIVPROC glad_glVertexAttribI3uiv;
|
||||
PFNGLVERTEXATTRIBI2IVPROC glad_glVertexAttribI2iv;
|
||||
PFNGLDRAWARRAYSPROC glad_glDrawArrays;
|
||||
PFNGLUNIFORM1UIPROC glad_glUniform1ui;
|
||||
PFNGLISPROGRAMPROC glad_glIsProgram;
|
||||
PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv;
|
||||
PFNGLGETFRAGDATALOCATIONPROC glad_glGetFragDataLocation;
|
||||
PFNGLGETSYNCIVPROC glad_glGetSynciv;
|
||||
PFNGLGETUNIFORMIVPROC glad_glGetUniformiv;
|
||||
PFNGLVERTEXATTRIBI2IPROC glad_glVertexAttribI2i;
|
||||
PFNGLUNIFORM4IPROC glad_glUniform4i;
|
||||
PFNGLVERTEXATTRIB3DPROC glad_glVertexAttrib3d;
|
||||
PFNGLCLEARPROC glad_glClear;
|
||||
PFNGLVERTEXATTRIB4FVPROC glad_glVertexAttrib4fv;
|
||||
PFNGLGETACTIVEUNIFORMNAMEPROC glad_glGetActiveUniformName;
|
||||
PFNGLUNIFORM2FPROC glad_glUniform2f;
|
||||
PFNGLTEXIMAGE2DMULTISAMPLEPROC glad_glTexImage2DMultisample;
|
||||
PFNGLACTIVETEXTUREPROC glad_glActiveTexture;
|
||||
PFNGLBEGINQUERYPROC glad_glBeginQuery;
|
||||
PFNGLUNIFORM2IVPROC glad_glUniform2iv;
|
||||
PFNGLBINDBUFFERPROC glad_glBindBuffer;
|
||||
PFNGLISENABLEDPROC glad_glIsEnabled;
|
||||
PFNGLSTENCILOPPROC glad_glStencilOp;
|
||||
PFNGLREADPIXELSPROC glad_glReadPixels;
|
||||
PFNGLCLEARDEPTHPROC glad_glClearDepth;
|
||||
PFNGLVERTEXATTRIBI3IVPROC glad_glVertexAttribI3iv;
|
||||
PFNGLUNIFORM4FPROC glad_glUniform4f;
|
||||
PFNGLFRAMEBUFFERTEXTURE2DPROC glad_glFramebufferTexture2D;
|
||||
PFNGLMAPBUFFERPROC glad_glMapBuffer;
|
||||
PFNGLVERTEXATTRIB1DPROC glad_glVertexAttrib1d;
|
||||
PFNGLVERTEXATTRIB4NUBPROC glad_glVertexAttrib4Nub;
|
||||
PFNGLUNIFORM3FVPROC glad_glUniform3fv;
|
||||
PFNGLGETUNIFORMFVPROC glad_glGetUniformfv;
|
||||
PFNGLBUFFERDATAPROC glad_glBufferData;
|
||||
PFNGLGETTEXPARAMETERIIVPROC glad_glGetTexParameterIiv;
|
||||
PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D;
|
||||
PFNGLTEXIMAGE1DPROC glad_glTexImage1D;
|
||||
PFNGLDELETESYNCPROC glad_glDeleteSync;
|
||||
PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D;
|
||||
PFNGLGETERRORPROC glad_glGetError;
|
||||
PFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers;
|
||||
PFNGLGETVERTEXATTRIBIVPROC glad_glGetVertexAttribiv;
|
||||
PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv;
|
||||
PFNGLMULTIDRAWELEMENTSPROC glad_glMultiDrawElements;
|
||||
PFNGLVERTEXATTRIB3FVPROC glad_glVertexAttrib3fv;
|
||||
PFNGLGETFLOATVPROC glad_glGetFloatv;
|
||||
PFNGLTEXSUBIMAGE1DPROC glad_glTexSubImage1D;
|
||||
PFNGLUNIFORM3IVPROC glad_glUniform3iv;
|
||||
PFNGLGETTEXIMAGEPROC glad_glGetTexImage;
|
||||
PFNGLVERTEXATTRIB2FVPROC glad_glVertexAttrib2fv;
|
||||
PFNGLUSEPROGRAMPROC glad_glUseProgram;
|
||||
PFNGLVERTEXATTRIB4IVPROC glad_glVertexAttrib4iv;
|
||||
PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv;
|
||||
PFNGLVERTEXATTRIBI1IPROC glad_glVertexAttribI1i;
|
||||
PFNGLGENFRAMEBUFFERSPROC glad_glGenFramebuffers;
|
||||
PFNGLFRAMEBUFFERRENDERBUFFERPROC glad_glFramebufferRenderbuffer;
|
||||
PFNGLDRAWBUFFERSPROC glad_glDrawBuffers;
|
||||
PFNGLCLEARBUFFERFVPROC glad_glClearBufferfv;
|
||||
PFNGLSTENCILFUNCPROC glad_glStencilFunc;
|
||||
PFNGLGETINTEGERVPROC glad_glGetIntegerv;
|
||||
PFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders;
|
||||
PFNGLUNIFORMBLOCKBINDINGPROC glad_glUniformBlockBinding;
|
||||
PFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer;
|
||||
PFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv;
|
||||
PFNGLGETVERTEXATTRIBIIVPROC glad_glGetVertexAttribIiv;
|
||||
PFNGLDRAWBUFFERPROC glad_glDrawBuffer;
|
||||
PFNGLFRAMEBUFFERTEXTURE3DPROC glad_glFramebufferTexture3D;
|
||||
PFNGLUNIFORM1FVPROC glad_glUniform1fv;
|
||||
PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glRenderbufferStorageMultisample;
|
||||
PFNGLMAPBUFFERRANGEPROC glad_glMapBufferRange;
|
||||
PFNGLISQUERYPROC glad_glIsQuery;
|
||||
PFNGLVERTEXATTRIB4NUBVPROC glad_glVertexAttrib4Nubv;
|
||||
PFNGLUNIFORMMATRIX2FVPROC glad_glUniformMatrix2fv;
|
||||
PFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray;
|
||||
PFNGLVERTEXATTRIB4SVPROC glad_glVertexAttrib4sv;
|
||||
PFNGLGETQUERYIVPROC glad_glGetQueryiv;
|
||||
PFNGLTEXIMAGE2DPROC glad_glTexImage2D;
|
||||
PFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog;
|
||||
PFNGLSTENCILMASKPROC glad_glStencilMask;
|
||||
PFNGLUNIFORM4UIPROC glad_glUniform4ui;
|
||||
PFNGLUNIFORMMATRIX2X4FVPROC glad_glUniformMatrix2x4fv;
|
||||
PFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog;
|
||||
PFNGLISTEXTUREPROC glad_glIsTexture;
|
||||
PFNGLGETUNIFORMINDICESPROC glad_glGetUniformIndices;
|
||||
PFNGLISSHADERPROC glad_glIsShader;
|
||||
PFNGLGETSHADERSOURCEPROC glad_glGetShaderSource;
|
||||
PFNGLVERTEXATTRIBI4UBVPROC glad_glVertexAttribI4ubv;
|
||||
PFNGLVERTEXATTRIB4BVPROC glad_glVertexAttrib4bv;
|
||||
PFNGLGETINTEGER64VPROC glad_glGetInteger64v;
|
||||
PFNGLVERTEXATTRIBPOINTERPROC glad_glVertexAttribPointer;
|
||||
PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv;
|
||||
PFNGLGETBUFFERSUBDATAPROC glad_glGetBufferSubData;
|
||||
PFNGLVERTEXATTRIB1FVPROC glad_glVertexAttrib1fv;
|
||||
PFNGLTEXPARAMETERIUIVPROC glad_glTexParameterIuiv;
|
||||
PFNGLENABLEPROC glad_glEnable;
|
||||
PFNGLGETACTIVEUNIFORMSIVPROC glad_glGetActiveUniformsiv;
|
||||
PFNGLDRAWARRAYSINSTANCEDPROC glad_glDrawArraysInstanced;
|
||||
PFNGLVERTEXATTRIBI4IPROC glad_glVertexAttribI4i;
|
||||
PFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate;
|
||||
PFNGLDELETEQUERIESPROC glad_glDeleteQueries;
|
||||
PFNGLPOINTPARAMETERIVPROC glad_glPointParameteriv;
|
||||
PFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate;
|
||||
PFNGLVERTEXATTRIBI1UIPROC glad_glVertexAttribI1ui;
|
||||
PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glad_glCompressedTexSubImage1D;
|
||||
PFNGLFINISHPROC glad_glFinish;
|
||||
PFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation;
|
||||
PFNGLVERTEXATTRIB4DVPROC glad_glVertexAttrib4dv;
|
||||
PFNGLVERTEXATTRIB2SVPROC glad_glVertexAttrib2sv;
|
||||
PFNGLDELETESHADERPROC glad_glDeleteShader;
|
||||
PFNGLBLENDFUNCPROC glad_glBlendFunc;
|
||||
PFNGLCREATEPROGRAMPROC glad_glCreateProgram;
|
||||
PFNGLTEXIMAGE3DPROC glad_glTexImage3D;
|
||||
PFNGLVERTEXATTRIB4NSVPROC glad_glVertexAttrib4Nsv;
|
||||
PFNGLISFRAMEBUFFERPROC glad_glIsFramebuffer;
|
||||
PFNGLVERTEXATTRIBI4UIPROC glad_glVertexAttribI4ui;
|
||||
PFNGLFLUSHMAPPEDBUFFERRANGEPROC glad_glFlushMappedBufferRange;
|
||||
PFNGLVIEWPORTPROC glad_glViewport;
|
||||
PFNGLVERTEXATTRIBI1UIVPROC glad_glVertexAttribI1uiv;
|
||||
PFNGLVERTEXATTRIB2DPROC glad_glVertexAttrib2d;
|
||||
PFNGLTRANSFORMFEEDBACKVARYINGSPROC glad_glTransformFeedbackVaryings;
|
||||
PFNGLVERTEXATTRIB2FPROC glad_glVertexAttrib2f;
|
||||
PFNGLGETVERTEXATTRIBDVPROC glad_glGetVertexAttribdv;
|
||||
PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glad_glMultiDrawElementsBaseVertex;
|
||||
PFNGLPRIMITIVERESTARTINDEXPROC glad_glPrimitiveRestartIndex;
|
||||
PFNGLUNIFORM2UIPROC glad_glUniform2ui;
|
||||
PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset;
|
||||
PFNGLGETUNIFORMUIVPROC glad_glGetUniformuiv;
|
||||
PFNGLVERTEXATTRIBI3IPROC glad_glVertexAttribI3i;
|
||||
PFNGLVERTEXATTRIB2SPROC glad_glVertexAttrib2s;
|
||||
PFNGLTEXIMAGE3DMULTISAMPLEPROC glad_glTexImage3DMultisample;
|
||||
PFNGLUNIFORMMATRIX4FVPROC glad_glUniformMatrix4fv;
|
||||
PFNGLDEPTHRANGEPROC glad_glDepthRange;
|
||||
PFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform;
|
||||
PFNGLVERTEXATTRIBI4USVPROC glad_glVertexAttribI4usv;
|
||||
PFNGLTEXPARAMETERFPROC glad_glTexParameterf;
|
||||
PFNGLCLEARBUFFERFIPROC glad_glClearBufferfi;
|
||||
PFNGLTEXPARAMETERIPROC glad_glTexParameteri;
|
||||
PFNGLFRONTFACEPROC glad_glFrontFace;
|
||||
PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers;
|
||||
PFNGLSCISSORPROC glad_glScissor;
|
||||
PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glad_glDrawElementsInstancedBaseVertex;
|
||||
PFNGLGETBOOLEANVPROC glad_glGetBooleanv;
|
||||
PFNGLTEXBUFFERPROC glad_glTexBuffer;
|
||||
PFNGLPIXELSTOREIPROC glad_glPixelStorei;
|
||||
PFNGLVALIDATEPROGRAMPROC glad_glValidateProgram;
|
||||
PFNGLPIXELSTOREFPROC glad_glPixelStoref;
|
||||
PFNGLCLEARBUFFERUIVPROC glad_glClearBufferuiv;
|
||||
PFNGLUNIFORM3UIVPROC glad_glUniform3uiv;
|
||||
PFNGLGETBOOLEANI_VPROC glad_glGetBooleani_v;
|
||||
PFNGLVERTEXATTRIBIPOINTERPROC glad_glVertexAttribIPointer;
|
||||
static void load_GL_VERSION_1_0(GLADloadproc load) {
|
||||
if(!GLAD_GL_VERSION_1_0) return;
|
||||
glad_glCullFace = (PFNGLCULLFACEPROC)load("glCullFace");
|
||||
glad_glFrontFace = (PFNGLFRONTFACEPROC)load("glFrontFace");
|
||||
glad_glHint = (PFNGLHINTPROC)load("glHint");
|
||||
glad_glLineWidth = (PFNGLLINEWIDTHPROC)load("glLineWidth");
|
||||
glad_glPointSize = (PFNGLPOINTSIZEPROC)load("glPointSize");
|
||||
glad_glPolygonMode = (PFNGLPOLYGONMODEPROC)load("glPolygonMode");
|
||||
glad_glScissor = (PFNGLSCISSORPROC)load("glScissor");
|
||||
glad_glTexParameterf = (PFNGLTEXPARAMETERFPROC)load("glTexParameterf");
|
||||
glad_glTexParameterfv = (PFNGLTEXPARAMETERFVPROC)load("glTexParameterfv");
|
||||
glad_glTexParameteri = (PFNGLTEXPARAMETERIPROC)load("glTexParameteri");
|
||||
glad_glTexParameteriv = (PFNGLTEXPARAMETERIVPROC)load("glTexParameteriv");
|
||||
glad_glTexImage1D = (PFNGLTEXIMAGE1DPROC)load("glTexImage1D");
|
||||
glad_glTexImage2D = (PFNGLTEXIMAGE2DPROC)load("glTexImage2D");
|
||||
glad_glDrawBuffer = (PFNGLDRAWBUFFERPROC)load("glDrawBuffer");
|
||||
glad_glClear = (PFNGLCLEARPROC)load("glClear");
|
||||
glad_glClearColor = (PFNGLCLEARCOLORPROC)load("glClearColor");
|
||||
glad_glClearStencil = (PFNGLCLEARSTENCILPROC)load("glClearStencil");
|
||||
glad_glClearDepth = (PFNGLCLEARDEPTHPROC)load("glClearDepth");
|
||||
glad_glStencilMask = (PFNGLSTENCILMASKPROC)load("glStencilMask");
|
||||
glad_glColorMask = (PFNGLCOLORMASKPROC)load("glColorMask");
|
||||
glad_glDepthMask = (PFNGLDEPTHMASKPROC)load("glDepthMask");
|
||||
glad_glDisable = (PFNGLDISABLEPROC)load("glDisable");
|
||||
glad_glEnable = (PFNGLENABLEPROC)load("glEnable");
|
||||
glad_glFinish = (PFNGLFINISHPROC)load("glFinish");
|
||||
glad_glFlush = (PFNGLFLUSHPROC)load("glFlush");
|
||||
glad_glBlendFunc = (PFNGLBLENDFUNCPROC)load("glBlendFunc");
|
||||
glad_glLogicOp = (PFNGLLOGICOPPROC)load("glLogicOp");
|
||||
glad_glStencilFunc = (PFNGLSTENCILFUNCPROC)load("glStencilFunc");
|
||||
glad_glStencilOp = (PFNGLSTENCILOPPROC)load("glStencilOp");
|
||||
glad_glDepthFunc = (PFNGLDEPTHFUNCPROC)load("glDepthFunc");
|
||||
glad_glPixelStoref = (PFNGLPIXELSTOREFPROC)load("glPixelStoref");
|
||||
glad_glPixelStorei = (PFNGLPIXELSTOREIPROC)load("glPixelStorei");
|
||||
glad_glReadBuffer = (PFNGLREADBUFFERPROC)load("glReadBuffer");
|
||||
glad_glReadPixels = (PFNGLREADPIXELSPROC)load("glReadPixels");
|
||||
glad_glGetBooleanv = (PFNGLGETBOOLEANVPROC)load("glGetBooleanv");
|
||||
glad_glGetDoublev = (PFNGLGETDOUBLEVPROC)load("glGetDoublev");
|
||||
glad_glGetError = (PFNGLGETERRORPROC)load("glGetError");
|
||||
glad_glGetFloatv = (PFNGLGETFLOATVPROC)load("glGetFloatv");
|
||||
glad_glGetIntegerv = (PFNGLGETINTEGERVPROC)load("glGetIntegerv");
|
||||
glad_glGetString = (PFNGLGETSTRINGPROC)load("glGetString");
|
||||
glad_glGetTexImage = (PFNGLGETTEXIMAGEPROC)load("glGetTexImage");
|
||||
glad_glGetTexParameterfv = (PFNGLGETTEXPARAMETERFVPROC)load("glGetTexParameterfv");
|
||||
glad_glGetTexParameteriv = (PFNGLGETTEXPARAMETERIVPROC)load("glGetTexParameteriv");
|
||||
glad_glGetTexLevelParameterfv = (PFNGLGETTEXLEVELPARAMETERFVPROC)load("glGetTexLevelParameterfv");
|
||||
glad_glGetTexLevelParameteriv = (PFNGLGETTEXLEVELPARAMETERIVPROC)load("glGetTexLevelParameteriv");
|
||||
glad_glIsEnabled = (PFNGLISENABLEDPROC)load("glIsEnabled");
|
||||
glad_glDepthRange = (PFNGLDEPTHRANGEPROC)load("glDepthRange");
|
||||
glad_glViewport = (PFNGLVIEWPORTPROC)load("glViewport");
|
||||
}
|
||||
static void load_GL_VERSION_1_1(GLADloadproc load) {
|
||||
if(!GLAD_GL_VERSION_1_1) return;
|
||||
glad_glDrawArrays = (PFNGLDRAWARRAYSPROC)load("glDrawArrays");
|
||||
glad_glDrawElements = (PFNGLDRAWELEMENTSPROC)load("glDrawElements");
|
||||
glad_glPolygonOffset = (PFNGLPOLYGONOFFSETPROC)load("glPolygonOffset");
|
||||
glad_glCopyTexImage1D = (PFNGLCOPYTEXIMAGE1DPROC)load("glCopyTexImage1D");
|
||||
glad_glCopyTexImage2D = (PFNGLCOPYTEXIMAGE2DPROC)load("glCopyTexImage2D");
|
||||
glad_glCopyTexSubImage1D = (PFNGLCOPYTEXSUBIMAGE1DPROC)load("glCopyTexSubImage1D");
|
||||
glad_glCopyTexSubImage2D = (PFNGLCOPYTEXSUBIMAGE2DPROC)load("glCopyTexSubImage2D");
|
||||
glad_glTexSubImage1D = (PFNGLTEXSUBIMAGE1DPROC)load("glTexSubImage1D");
|
||||
glad_glTexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC)load("glTexSubImage2D");
|
||||
glad_glBindTexture = (PFNGLBINDTEXTUREPROC)load("glBindTexture");
|
||||
glad_glDeleteTextures = (PFNGLDELETETEXTURESPROC)load("glDeleteTextures");
|
||||
glad_glGenTextures = (PFNGLGENTEXTURESPROC)load("glGenTextures");
|
||||
glad_glIsTexture = (PFNGLISTEXTUREPROC)load("glIsTexture");
|
||||
}
|
||||
static void load_GL_VERSION_1_2(GLADloadproc load) {
|
||||
if(!GLAD_GL_VERSION_1_2) return;
|
||||
glad_glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)load("glDrawRangeElements");
|
||||
glad_glTexImage3D = (PFNGLTEXIMAGE3DPROC)load("glTexImage3D");
|
||||
glad_glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC)load("glTexSubImage3D");
|
||||
glad_glCopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC)load("glCopyTexSubImage3D");
|
||||
}
|
||||
static void load_GL_VERSION_1_3(GLADloadproc load) {
|
||||
if(!GLAD_GL_VERSION_1_3) return;
|
||||
glad_glActiveTexture = (PFNGLACTIVETEXTUREPROC)load("glActiveTexture");
|
||||
glad_glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC)load("glSampleCoverage");
|
||||
glad_glCompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC)load("glCompressedTexImage3D");
|
||||
glad_glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC)load("glCompressedTexImage2D");
|
||||
glad_glCompressedTexImage1D = (PFNGLCOMPRESSEDTEXIMAGE1DPROC)load("glCompressedTexImage1D");
|
||||
glad_glCompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)load("glCompressedTexSubImage3D");
|
||||
glad_glCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)load("glCompressedTexSubImage2D");
|
||||
glad_glCompressedTexSubImage1D = (PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)load("glCompressedTexSubImage1D");
|
||||
glad_glGetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC)load("glGetCompressedTexImage");
|
||||
}
|
||||
static void load_GL_VERSION_1_4(GLADloadproc load) {
|
||||
if(!GLAD_GL_VERSION_1_4) return;
|
||||
glad_glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC)load("glBlendFuncSeparate");
|
||||
glad_glMultiDrawArrays = (PFNGLMULTIDRAWARRAYSPROC)load("glMultiDrawArrays");
|
||||
glad_glMultiDrawElements = (PFNGLMULTIDRAWELEMENTSPROC)load("glMultiDrawElements");
|
||||
glad_glPointParameterf = (PFNGLPOINTPARAMETERFPROC)load("glPointParameterf");
|
||||
glad_glPointParameterfv = (PFNGLPOINTPARAMETERFVPROC)load("glPointParameterfv");
|
||||
glad_glPointParameteri = (PFNGLPOINTPARAMETERIPROC)load("glPointParameteri");
|
||||
glad_glPointParameteriv = (PFNGLPOINTPARAMETERIVPROC)load("glPointParameteriv");
|
||||
glad_glBlendColor = (PFNGLBLENDCOLORPROC)load("glBlendColor");
|
||||
glad_glBlendEquation = (PFNGLBLENDEQUATIONPROC)load("glBlendEquation");
|
||||
}
|
||||
static void load_GL_VERSION_1_5(GLADloadproc load) {
|
||||
if(!GLAD_GL_VERSION_1_5) return;
|
||||
glad_glGenQueries = (PFNGLGENQUERIESPROC)load("glGenQueries");
|
||||
glad_glDeleteQueries = (PFNGLDELETEQUERIESPROC)load("glDeleteQueries");
|
||||
glad_glIsQuery = (PFNGLISQUERYPROC)load("glIsQuery");
|
||||
glad_glBeginQuery = (PFNGLBEGINQUERYPROC)load("glBeginQuery");
|
||||
glad_glEndQuery = (PFNGLENDQUERYPROC)load("glEndQuery");
|
||||
glad_glGetQueryiv = (PFNGLGETQUERYIVPROC)load("glGetQueryiv");
|
||||
glad_glGetQueryObjectiv = (PFNGLGETQUERYOBJECTIVPROC)load("glGetQueryObjectiv");
|
||||
glad_glGetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC)load("glGetQueryObjectuiv");
|
||||
glad_glBindBuffer = (PFNGLBINDBUFFERPROC)load("glBindBuffer");
|
||||
glad_glDeleteBuffers = (PFNGLDELETEBUFFERSPROC)load("glDeleteBuffers");
|
||||
glad_glGenBuffers = (PFNGLGENBUFFERSPROC)load("glGenBuffers");
|
||||
glad_glIsBuffer = (PFNGLISBUFFERPROC)load("glIsBuffer");
|
||||
glad_glBufferData = (PFNGLBUFFERDATAPROC)load("glBufferData");
|
||||
glad_glBufferSubData = (PFNGLBUFFERSUBDATAPROC)load("glBufferSubData");
|
||||
glad_glGetBufferSubData = (PFNGLGETBUFFERSUBDATAPROC)load("glGetBufferSubData");
|
||||
glad_glMapBuffer = (PFNGLMAPBUFFERPROC)load("glMapBuffer");
|
||||
glad_glUnmapBuffer = (PFNGLUNMAPBUFFERPROC)load("glUnmapBuffer");
|
||||
glad_glGetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC)load("glGetBufferParameteriv");
|
||||
glad_glGetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC)load("glGetBufferPointerv");
|
||||
}
|
||||
static void load_GL_VERSION_2_0(GLADloadproc load) {
|
||||
if(!GLAD_GL_VERSION_2_0) return;
|
||||
glad_glBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC)load("glBlendEquationSeparate");
|
||||
glad_glDrawBuffers = (PFNGLDRAWBUFFERSPROC)load("glDrawBuffers");
|
||||
glad_glStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC)load("glStencilOpSeparate");
|
||||
glad_glStencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC)load("glStencilFuncSeparate");
|
||||
glad_glStencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC)load("glStencilMaskSeparate");
|
||||
glad_glAttachShader = (PFNGLATTACHSHADERPROC)load("glAttachShader");
|
||||
glad_glBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC)load("glBindAttribLocation");
|
||||
glad_glCompileShader = (PFNGLCOMPILESHADERPROC)load("glCompileShader");
|
||||
glad_glCreateProgram = (PFNGLCREATEPROGRAMPROC)load("glCreateProgram");
|
||||
glad_glCreateShader = (PFNGLCREATESHADERPROC)load("glCreateShader");
|
||||
glad_glDeleteProgram = (PFNGLDELETEPROGRAMPROC)load("glDeleteProgram");
|
||||
glad_glDeleteShader = (PFNGLDELETESHADERPROC)load("glDeleteShader");
|
||||
glad_glDetachShader = (PFNGLDETACHSHADERPROC)load("glDetachShader");
|
||||
glad_glDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC)load("glDisableVertexAttribArray");
|
||||
glad_glEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC)load("glEnableVertexAttribArray");
|
||||
glad_glGetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC)load("glGetActiveAttrib");
|
||||
glad_glGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC)load("glGetActiveUniform");
|
||||
glad_glGetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC)load("glGetAttachedShaders");
|
||||
glad_glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC)load("glGetAttribLocation");
|
||||
glad_glGetProgramiv = (PFNGLGETPROGRAMIVPROC)load("glGetProgramiv");
|
||||
glad_glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC)load("glGetProgramInfoLog");
|
||||
glad_glGetShaderiv = (PFNGLGETSHADERIVPROC)load("glGetShaderiv");
|
||||
glad_glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC)load("glGetShaderInfoLog");
|
||||
glad_glGetShaderSource = (PFNGLGETSHADERSOURCEPROC)load("glGetShaderSource");
|
||||
glad_glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC)load("glGetUniformLocation");
|
||||
glad_glGetUniformfv = (PFNGLGETUNIFORMFVPROC)load("glGetUniformfv");
|
||||
glad_glGetUniformiv = (PFNGLGETUNIFORMIVPROC)load("glGetUniformiv");
|
||||
glad_glGetVertexAttribdv = (PFNGLGETVERTEXATTRIBDVPROC)load("glGetVertexAttribdv");
|
||||
glad_glGetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC)load("glGetVertexAttribfv");
|
||||
glad_glGetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC)load("glGetVertexAttribiv");
|
||||
glad_glGetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC)load("glGetVertexAttribPointerv");
|
||||
glad_glIsProgram = (PFNGLISPROGRAMPROC)load("glIsProgram");
|
||||
glad_glIsShader = (PFNGLISSHADERPROC)load("glIsShader");
|
||||
glad_glLinkProgram = (PFNGLLINKPROGRAMPROC)load("glLinkProgram");
|
||||
glad_glShaderSource = (PFNGLSHADERSOURCEPROC)load("glShaderSource");
|
||||
glad_glUseProgram = (PFNGLUSEPROGRAMPROC)load("glUseProgram");
|
||||
glad_glUniform1f = (PFNGLUNIFORM1FPROC)load("glUniform1f");
|
||||
glad_glUniform2f = (PFNGLUNIFORM2FPROC)load("glUniform2f");
|
||||
glad_glUniform3f = (PFNGLUNIFORM3FPROC)load("glUniform3f");
|
||||
glad_glUniform4f = (PFNGLUNIFORM4FPROC)load("glUniform4f");
|
||||
glad_glUniform1i = (PFNGLUNIFORM1IPROC)load("glUniform1i");
|
||||
glad_glUniform2i = (PFNGLUNIFORM2IPROC)load("glUniform2i");
|
||||
glad_glUniform3i = (PFNGLUNIFORM3IPROC)load("glUniform3i");
|
||||
glad_glUniform4i = (PFNGLUNIFORM4IPROC)load("glUniform4i");
|
||||
glad_glUniform1fv = (PFNGLUNIFORM1FVPROC)load("glUniform1fv");
|
||||
glad_glUniform2fv = (PFNGLUNIFORM2FVPROC)load("glUniform2fv");
|
||||
glad_glUniform3fv = (PFNGLUNIFORM3FVPROC)load("glUniform3fv");
|
||||
glad_glUniform4fv = (PFNGLUNIFORM4FVPROC)load("glUniform4fv");
|
||||
glad_glUniform1iv = (PFNGLUNIFORM1IVPROC)load("glUniform1iv");
|
||||
glad_glUniform2iv = (PFNGLUNIFORM2IVPROC)load("glUniform2iv");
|
||||
glad_glUniform3iv = (PFNGLUNIFORM3IVPROC)load("glUniform3iv");
|
||||
glad_glUniform4iv = (PFNGLUNIFORM4IVPROC)load("glUniform4iv");
|
||||
glad_glUniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC)load("glUniformMatrix2fv");
|
||||
glad_glUniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC)load("glUniformMatrix3fv");
|
||||
glad_glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC)load("glUniformMatrix4fv");
|
||||
glad_glValidateProgram = (PFNGLVALIDATEPROGRAMPROC)load("glValidateProgram");
|
||||
glad_glVertexAttrib1d = (PFNGLVERTEXATTRIB1DPROC)load("glVertexAttrib1d");
|
||||
glad_glVertexAttrib1dv = (PFNGLVERTEXATTRIB1DVPROC)load("glVertexAttrib1dv");
|
||||
glad_glVertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC)load("glVertexAttrib1f");
|
||||
glad_glVertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC)load("glVertexAttrib1fv");
|
||||
glad_glVertexAttrib1s = (PFNGLVERTEXATTRIB1SPROC)load("glVertexAttrib1s");
|
||||
glad_glVertexAttrib1sv = (PFNGLVERTEXATTRIB1SVPROC)load("glVertexAttrib1sv");
|
||||
glad_glVertexAttrib2d = (PFNGLVERTEXATTRIB2DPROC)load("glVertexAttrib2d");
|
||||
glad_glVertexAttrib2dv = (PFNGLVERTEXATTRIB2DVPROC)load("glVertexAttrib2dv");
|
||||
glad_glVertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC)load("glVertexAttrib2f");
|
||||
glad_glVertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC)load("glVertexAttrib2fv");
|
||||
glad_glVertexAttrib2s = (PFNGLVERTEXATTRIB2SPROC)load("glVertexAttrib2s");
|
||||
glad_glVertexAttrib2sv = (PFNGLVERTEXATTRIB2SVPROC)load("glVertexAttrib2sv");
|
||||
glad_glVertexAttrib3d = (PFNGLVERTEXATTRIB3DPROC)load("glVertexAttrib3d");
|
||||
glad_glVertexAttrib3dv = (PFNGLVERTEXATTRIB3DVPROC)load("glVertexAttrib3dv");
|
||||
glad_glVertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC)load("glVertexAttrib3f");
|
||||
glad_glVertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC)load("glVertexAttrib3fv");
|
||||
glad_glVertexAttrib3s = (PFNGLVERTEXATTRIB3SPROC)load("glVertexAttrib3s");
|
||||
glad_glVertexAttrib3sv = (PFNGLVERTEXATTRIB3SVPROC)load("glVertexAttrib3sv");
|
||||
glad_glVertexAttrib4Nbv = (PFNGLVERTEXATTRIB4NBVPROC)load("glVertexAttrib4Nbv");
|
||||
glad_glVertexAttrib4Niv = (PFNGLVERTEXATTRIB4NIVPROC)load("glVertexAttrib4Niv");
|
||||
glad_glVertexAttrib4Nsv = (PFNGLVERTEXATTRIB4NSVPROC)load("glVertexAttrib4Nsv");
|
||||
glad_glVertexAttrib4Nub = (PFNGLVERTEXATTRIB4NUBPROC)load("glVertexAttrib4Nub");
|
||||
glad_glVertexAttrib4Nubv = (PFNGLVERTEXATTRIB4NUBVPROC)load("glVertexAttrib4Nubv");
|
||||
glad_glVertexAttrib4Nuiv = (PFNGLVERTEXATTRIB4NUIVPROC)load("glVertexAttrib4Nuiv");
|
||||
glad_glVertexAttrib4Nusv = (PFNGLVERTEXATTRIB4NUSVPROC)load("glVertexAttrib4Nusv");
|
||||
glad_glVertexAttrib4bv = (PFNGLVERTEXATTRIB4BVPROC)load("glVertexAttrib4bv");
|
||||
glad_glVertexAttrib4d = (PFNGLVERTEXATTRIB4DPROC)load("glVertexAttrib4d");
|
||||
glad_glVertexAttrib4dv = (PFNGLVERTEXATTRIB4DVPROC)load("glVertexAttrib4dv");
|
||||
glad_glVertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC)load("glVertexAttrib4f");
|
||||
glad_glVertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC)load("glVertexAttrib4fv");
|
||||
glad_glVertexAttrib4iv = (PFNGLVERTEXATTRIB4IVPROC)load("glVertexAttrib4iv");
|
||||
glad_glVertexAttrib4s = (PFNGLVERTEXATTRIB4SPROC)load("glVertexAttrib4s");
|
||||
glad_glVertexAttrib4sv = (PFNGLVERTEXATTRIB4SVPROC)load("glVertexAttrib4sv");
|
||||
glad_glVertexAttrib4ubv = (PFNGLVERTEXATTRIB4UBVPROC)load("glVertexAttrib4ubv");
|
||||
glad_glVertexAttrib4uiv = (PFNGLVERTEXATTRIB4UIVPROC)load("glVertexAttrib4uiv");
|
||||
glad_glVertexAttrib4usv = (PFNGLVERTEXATTRIB4USVPROC)load("glVertexAttrib4usv");
|
||||
glad_glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC)load("glVertexAttribPointer");
|
||||
}
|
||||
static void load_GL_VERSION_2_1(GLADloadproc load) {
|
||||
if(!GLAD_GL_VERSION_2_1) return;
|
||||
glad_glUniformMatrix2x3fv = (PFNGLUNIFORMMATRIX2X3FVPROC)load("glUniformMatrix2x3fv");
|
||||
glad_glUniformMatrix3x2fv = (PFNGLUNIFORMMATRIX3X2FVPROC)load("glUniformMatrix3x2fv");
|
||||
glad_glUniformMatrix2x4fv = (PFNGLUNIFORMMATRIX2X4FVPROC)load("glUniformMatrix2x4fv");
|
||||
glad_glUniformMatrix4x2fv = (PFNGLUNIFORMMATRIX4X2FVPROC)load("glUniformMatrix4x2fv");
|
||||
glad_glUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC)load("glUniformMatrix3x4fv");
|
||||
glad_glUniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC)load("glUniformMatrix4x3fv");
|
||||
}
|
||||
static void load_GL_VERSION_3_0(GLADloadproc load) {
|
||||
if(!GLAD_GL_VERSION_3_0) return;
|
||||
glad_glColorMaski = (PFNGLCOLORMASKIPROC)load("glColorMaski");
|
||||
glad_glGetBooleani_v = (PFNGLGETBOOLEANI_VPROC)load("glGetBooleani_v");
|
||||
glad_glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC)load("glGetIntegeri_v");
|
||||
glad_glEnablei = (PFNGLENABLEIPROC)load("glEnablei");
|
||||
glad_glDisablei = (PFNGLDISABLEIPROC)load("glDisablei");
|
||||
glad_glIsEnabledi = (PFNGLISENABLEDIPROC)load("glIsEnabledi");
|
||||
glad_glBeginTransformFeedback = (PFNGLBEGINTRANSFORMFEEDBACKPROC)load("glBeginTransformFeedback");
|
||||
glad_glEndTransformFeedback = (PFNGLENDTRANSFORMFEEDBACKPROC)load("glEndTransformFeedback");
|
||||
glad_glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC)load("glBindBufferRange");
|
||||
glad_glBindBufferBase = (PFNGLBINDBUFFERBASEPROC)load("glBindBufferBase");
|
||||
glad_glTransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC)load("glTransformFeedbackVaryings");
|
||||
glad_glGetTransformFeedbackVarying = (PFNGLGETTRANSFORMFEEDBACKVARYINGPROC)load("glGetTransformFeedbackVarying");
|
||||
glad_glClampColor = (PFNGLCLAMPCOLORPROC)load("glClampColor");
|
||||
glad_glBeginConditionalRender = (PFNGLBEGINCONDITIONALRENDERPROC)load("glBeginConditionalRender");
|
||||
glad_glEndConditionalRender = (PFNGLENDCONDITIONALRENDERPROC)load("glEndConditionalRender");
|
||||
glad_glVertexAttribIPointer = (PFNGLVERTEXATTRIBIPOINTERPROC)load("glVertexAttribIPointer");
|
||||
glad_glGetVertexAttribIiv = (PFNGLGETVERTEXATTRIBIIVPROC)load("glGetVertexAttribIiv");
|
||||
glad_glGetVertexAttribIuiv = (PFNGLGETVERTEXATTRIBIUIVPROC)load("glGetVertexAttribIuiv");
|
||||
glad_glVertexAttribI1i = (PFNGLVERTEXATTRIBI1IPROC)load("glVertexAttribI1i");
|
||||
glad_glVertexAttribI2i = (PFNGLVERTEXATTRIBI2IPROC)load("glVertexAttribI2i");
|
||||
glad_glVertexAttribI3i = (PFNGLVERTEXATTRIBI3IPROC)load("glVertexAttribI3i");
|
||||
glad_glVertexAttribI4i = (PFNGLVERTEXATTRIBI4IPROC)load("glVertexAttribI4i");
|
||||
glad_glVertexAttribI1ui = (PFNGLVERTEXATTRIBI1UIPROC)load("glVertexAttribI1ui");
|
||||
glad_glVertexAttribI2ui = (PFNGLVERTEXATTRIBI2UIPROC)load("glVertexAttribI2ui");
|
||||
glad_glVertexAttribI3ui = (PFNGLVERTEXATTRIBI3UIPROC)load("glVertexAttribI3ui");
|
||||
glad_glVertexAttribI4ui = (PFNGLVERTEXATTRIBI4UIPROC)load("glVertexAttribI4ui");
|
||||
glad_glVertexAttribI1iv = (PFNGLVERTEXATTRIBI1IVPROC)load("glVertexAttribI1iv");
|
||||
glad_glVertexAttribI2iv = (PFNGLVERTEXATTRIBI2IVPROC)load("glVertexAttribI2iv");
|
||||
glad_glVertexAttribI3iv = (PFNGLVERTEXATTRIBI3IVPROC)load("glVertexAttribI3iv");
|
||||
glad_glVertexAttribI4iv = (PFNGLVERTEXATTRIBI4IVPROC)load("glVertexAttribI4iv");
|
||||
glad_glVertexAttribI1uiv = (PFNGLVERTEXATTRIBI1UIVPROC)load("glVertexAttribI1uiv");
|
||||
glad_glVertexAttribI2uiv = (PFNGLVERTEXATTRIBI2UIVPROC)load("glVertexAttribI2uiv");
|
||||
glad_glVertexAttribI3uiv = (PFNGLVERTEXATTRIBI3UIVPROC)load("glVertexAttribI3uiv");
|
||||
glad_glVertexAttribI4uiv = (PFNGLVERTEXATTRIBI4UIVPROC)load("glVertexAttribI4uiv");
|
||||
glad_glVertexAttribI4bv = (PFNGLVERTEXATTRIBI4BVPROC)load("glVertexAttribI4bv");
|
||||
glad_glVertexAttribI4sv = (PFNGLVERTEXATTRIBI4SVPROC)load("glVertexAttribI4sv");
|
||||
glad_glVertexAttribI4ubv = (PFNGLVERTEXATTRIBI4UBVPROC)load("glVertexAttribI4ubv");
|
||||
glad_glVertexAttribI4usv = (PFNGLVERTEXATTRIBI4USVPROC)load("glVertexAttribI4usv");
|
||||
glad_glGetUniformuiv = (PFNGLGETUNIFORMUIVPROC)load("glGetUniformuiv");
|
||||
glad_glBindFragDataLocation = (PFNGLBINDFRAGDATALOCATIONPROC)load("glBindFragDataLocation");
|
||||
glad_glGetFragDataLocation = (PFNGLGETFRAGDATALOCATIONPROC)load("glGetFragDataLocation");
|
||||
glad_glUniform1ui = (PFNGLUNIFORM1UIPROC)load("glUniform1ui");
|
||||
glad_glUniform2ui = (PFNGLUNIFORM2UIPROC)load("glUniform2ui");
|
||||
glad_glUniform3ui = (PFNGLUNIFORM3UIPROC)load("glUniform3ui");
|
||||
glad_glUniform4ui = (PFNGLUNIFORM4UIPROC)load("glUniform4ui");
|
||||
glad_glUniform1uiv = (PFNGLUNIFORM1UIVPROC)load("glUniform1uiv");
|
||||
glad_glUniform2uiv = (PFNGLUNIFORM2UIVPROC)load("glUniform2uiv");
|
||||
glad_glUniform3uiv = (PFNGLUNIFORM3UIVPROC)load("glUniform3uiv");
|
||||
glad_glUniform4uiv = (PFNGLUNIFORM4UIVPROC)load("glUniform4uiv");
|
||||
glad_glTexParameterIiv = (PFNGLTEXPARAMETERIIVPROC)load("glTexParameterIiv");
|
||||
glad_glTexParameterIuiv = (PFNGLTEXPARAMETERIUIVPROC)load("glTexParameterIuiv");
|
||||
glad_glGetTexParameterIiv = (PFNGLGETTEXPARAMETERIIVPROC)load("glGetTexParameterIiv");
|
||||
glad_glGetTexParameterIuiv = (PFNGLGETTEXPARAMETERIUIVPROC)load("glGetTexParameterIuiv");
|
||||
glad_glClearBufferiv = (PFNGLCLEARBUFFERIVPROC)load("glClearBufferiv");
|
||||
glad_glClearBufferuiv = (PFNGLCLEARBUFFERUIVPROC)load("glClearBufferuiv");
|
||||
glad_glClearBufferfv = (PFNGLCLEARBUFFERFVPROC)load("glClearBufferfv");
|
||||
glad_glClearBufferfi = (PFNGLCLEARBUFFERFIPROC)load("glClearBufferfi");
|
||||
glad_glGetStringi = (PFNGLGETSTRINGIPROC)load("glGetStringi");
|
||||
glad_glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC)load("glIsRenderbuffer");
|
||||
glad_glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC)load("glBindRenderbuffer");
|
||||
glad_glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC)load("glDeleteRenderbuffers");
|
||||
glad_glGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC)load("glGenRenderbuffers");
|
||||
glad_glRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC)load("glRenderbufferStorage");
|
||||
glad_glGetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC)load("glGetRenderbufferParameteriv");
|
||||
glad_glIsFramebuffer = (PFNGLISFRAMEBUFFERPROC)load("glIsFramebuffer");
|
||||
glad_glBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC)load("glBindFramebuffer");
|
||||
glad_glDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC)load("glDeleteFramebuffers");
|
||||
glad_glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC)load("glGenFramebuffers");
|
||||
glad_glCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC)load("glCheckFramebufferStatus");
|
||||
glad_glFramebufferTexture1D = (PFNGLFRAMEBUFFERTEXTURE1DPROC)load("glFramebufferTexture1D");
|
||||
glad_glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC)load("glFramebufferTexture2D");
|
||||
glad_glFramebufferTexture3D = (PFNGLFRAMEBUFFERTEXTURE3DPROC)load("glFramebufferTexture3D");
|
||||
glad_glFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC)load("glFramebufferRenderbuffer");
|
||||
glad_glGetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)load("glGetFramebufferAttachmentParameteriv");
|
||||
glad_glGenerateMipmap = (PFNGLGENERATEMIPMAPPROC)load("glGenerateMipmap");
|
||||
glad_glBlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC)load("glBlitFramebuffer");
|
||||
glad_glRenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)load("glRenderbufferStorageMultisample");
|
||||
glad_glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC)load("glFramebufferTextureLayer");
|
||||
glad_glMapBufferRange = (PFNGLMAPBUFFERRANGEPROC)load("glMapBufferRange");
|
||||
glad_glFlushMappedBufferRange = (PFNGLFLUSHMAPPEDBUFFERRANGEPROC)load("glFlushMappedBufferRange");
|
||||
glad_glBindVertexArray = (PFNGLBINDVERTEXARRAYPROC)load("glBindVertexArray");
|
||||
glad_glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC)load("glDeleteVertexArrays");
|
||||
glad_glGenVertexArrays = (PFNGLGENVERTEXARRAYSPROC)load("glGenVertexArrays");
|
||||
glad_glIsVertexArray = (PFNGLISVERTEXARRAYPROC)load("glIsVertexArray");
|
||||
}
|
||||
static void load_GL_VERSION_3_1(GLADloadproc load) {
|
||||
if(!GLAD_GL_VERSION_3_1) return;
|
||||
glad_glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC)load("glDrawArraysInstanced");
|
||||
glad_glDrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDPROC)load("glDrawElementsInstanced");
|
||||
glad_glTexBuffer = (PFNGLTEXBUFFERPROC)load("glTexBuffer");
|
||||
glad_glPrimitiveRestartIndex = (PFNGLPRIMITIVERESTARTINDEXPROC)load("glPrimitiveRestartIndex");
|
||||
glad_glCopyBufferSubData = (PFNGLCOPYBUFFERSUBDATAPROC)load("glCopyBufferSubData");
|
||||
glad_glGetUniformIndices = (PFNGLGETUNIFORMINDICESPROC)load("glGetUniformIndices");
|
||||
glad_glGetActiveUniformsiv = (PFNGLGETACTIVEUNIFORMSIVPROC)load("glGetActiveUniformsiv");
|
||||
glad_glGetActiveUniformName = (PFNGLGETACTIVEUNIFORMNAMEPROC)load("glGetActiveUniformName");
|
||||
glad_glGetUniformBlockIndex = (PFNGLGETUNIFORMBLOCKINDEXPROC)load("glGetUniformBlockIndex");
|
||||
glad_glGetActiveUniformBlockiv = (PFNGLGETACTIVEUNIFORMBLOCKIVPROC)load("glGetActiveUniformBlockiv");
|
||||
glad_glGetActiveUniformBlockName = (PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC)load("glGetActiveUniformBlockName");
|
||||
glad_glUniformBlockBinding = (PFNGLUNIFORMBLOCKBINDINGPROC)load("glUniformBlockBinding");
|
||||
}
|
||||
static void load_GL_VERSION_3_2(GLADloadproc load) {
|
||||
if(!GLAD_GL_VERSION_3_2) return;
|
||||
glad_glDrawElementsBaseVertex = (PFNGLDRAWELEMENTSBASEVERTEXPROC)load("glDrawElementsBaseVertex");
|
||||
glad_glDrawRangeElementsBaseVertex = (PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC)load("glDrawRangeElementsBaseVertex");
|
||||
glad_glDrawElementsInstancedBaseVertex = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)load("glDrawElementsInstancedBaseVertex");
|
||||
glad_glMultiDrawElementsBaseVertex = (PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC)load("glMultiDrawElementsBaseVertex");
|
||||
glad_glProvokingVertex = (PFNGLPROVOKINGVERTEXPROC)load("glProvokingVertex");
|
||||
glad_glFenceSync = (PFNGLFENCESYNCPROC)load("glFenceSync");
|
||||
glad_glIsSync = (PFNGLISSYNCPROC)load("glIsSync");
|
||||
glad_glDeleteSync = (PFNGLDELETESYNCPROC)load("glDeleteSync");
|
||||
glad_glClientWaitSync = (PFNGLCLIENTWAITSYNCPROC)load("glClientWaitSync");
|
||||
glad_glWaitSync = (PFNGLWAITSYNCPROC)load("glWaitSync");
|
||||
glad_glGetInteger64v = (PFNGLGETINTEGER64VPROC)load("glGetInteger64v");
|
||||
glad_glGetSynciv = (PFNGLGETSYNCIVPROC)load("glGetSynciv");
|
||||
glad_glGetInteger64i_v = (PFNGLGETINTEGER64I_VPROC)load("glGetInteger64i_v");
|
||||
glad_glGetBufferParameteri64v = (PFNGLGETBUFFERPARAMETERI64VPROC)load("glGetBufferParameteri64v");
|
||||
glad_glFramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREPROC)load("glFramebufferTexture");
|
||||
glad_glTexImage2DMultisample = (PFNGLTEXIMAGE2DMULTISAMPLEPROC)load("glTexImage2DMultisample");
|
||||
glad_glTexImage3DMultisample = (PFNGLTEXIMAGE3DMULTISAMPLEPROC)load("glTexImage3DMultisample");
|
||||
glad_glGetMultisamplefv = (PFNGLGETMULTISAMPLEFVPROC)load("glGetMultisamplefv");
|
||||
glad_glSampleMaski = (PFNGLSAMPLEMASKIPROC)load("glSampleMaski");
|
||||
}
|
||||
static void find_extensionsGL(void) {
|
||||
}
|
||||
|
||||
static void find_coreGL(void) {
|
||||
|
||||
/* Thank you @elmindreda
|
||||
* https://github.com/elmindreda/greg/blob/master/templates/greg.c.in#L176
|
||||
* https://github.com/glfw/glfw/blob/master/src/context.c#L36
|
||||
*/
|
||||
int i, major, minor;
|
||||
|
||||
const char* version;
|
||||
const char* prefixes[] = {
|
||||
"OpenGL ES-CM ",
|
||||
"OpenGL ES-CL ",
|
||||
"OpenGL ES ",
|
||||
NULL
|
||||
};
|
||||
|
||||
version = (const char*) glGetString(GL_VERSION);
|
||||
if (!version) return;
|
||||
|
||||
for (i = 0; prefixes[i]; i++) {
|
||||
const size_t length = strlen(prefixes[i]);
|
||||
if (strncmp(version, prefixes[i], length) == 0) {
|
||||
version += length;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sscanf(version, "%d.%d", &major, &minor);
|
||||
GLVersion.major = major; GLVersion.minor = minor;
|
||||
GLAD_GL_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1;
|
||||
GLAD_GL_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1;
|
||||
GLAD_GL_VERSION_1_2 = (major == 1 && minor >= 2) || major > 1;
|
||||
GLAD_GL_VERSION_1_3 = (major == 1 && minor >= 3) || major > 1;
|
||||
GLAD_GL_VERSION_1_4 = (major == 1 && minor >= 4) || major > 1;
|
||||
GLAD_GL_VERSION_1_5 = (major == 1 && minor >= 5) || major > 1;
|
||||
GLAD_GL_VERSION_2_0 = (major == 2 && minor >= 0) || major > 2;
|
||||
GLAD_GL_VERSION_2_1 = (major == 2 && minor >= 1) || major > 2;
|
||||
GLAD_GL_VERSION_3_0 = (major == 3 && minor >= 0) || major > 3;
|
||||
GLAD_GL_VERSION_3_1 = (major == 3 && minor >= 1) || major > 3;
|
||||
GLAD_GL_VERSION_3_2 = (major == 3 && minor >= 2) || major > 3;
|
||||
}
|
||||
|
||||
int gladLoadGLLoader(GLADloadproc load) {
|
||||
GLVersion.major = 0; GLVersion.minor = 0;
|
||||
glGetString = (PFNGLGETSTRINGPROC)load("glGetString");
|
||||
if(glGetString == NULL) return 0;
|
||||
if(glGetString(GL_VERSION) == NULL) return 0;
|
||||
find_coreGL();
|
||||
load_GL_VERSION_1_0(load);
|
||||
load_GL_VERSION_1_1(load);
|
||||
load_GL_VERSION_1_2(load);
|
||||
load_GL_VERSION_1_3(load);
|
||||
load_GL_VERSION_1_4(load);
|
||||
load_GL_VERSION_1_5(load);
|
||||
load_GL_VERSION_2_0(load);
|
||||
load_GL_VERSION_2_1(load);
|
||||
load_GL_VERSION_3_0(load);
|
||||
load_GL_VERSION_3_1(load);
|
||||
load_GL_VERSION_3_2(load);
|
||||
|
||||
find_extensionsGL();
|
||||
return GLVersion.major != 0 || GLVersion.minor != 0;
|
||||
}
|
||||
|
5996
deps/glad/gl.h
vendored
Normal file
5996
deps/glad/gl.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1930
deps/glad/glad.h
vendored
1930
deps/glad/glad.h
vendored
File diff suppressed because it is too large
Load Diff
1805
deps/glad/gles2.h
vendored
Normal file
1805
deps/glad/gles2.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6330
deps/glad/vulkan.h
vendored
Normal file
6330
deps/glad/vulkan.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
606
deps/linmath.h
vendored
Normal file
606
deps/linmath.h
vendored
Normal file
@ -0,0 +1,606 @@
|
||||
#ifndef LINMATH_H
|
||||
#define LINMATH_H
|
||||
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
/* 2021-03-21 Camilla Löwy <elmindreda@elmindreda.org>
|
||||
* - Replaced double constants with float equivalents
|
||||
*/
|
||||
|
||||
#ifdef LINMATH_NO_INLINE
|
||||
#define LINMATH_H_FUNC static
|
||||
#else
|
||||
#define LINMATH_H_FUNC static inline
|
||||
#endif
|
||||
|
||||
#define LINMATH_H_DEFINE_VEC(n) \
|
||||
typedef float vec##n[n]; \
|
||||
LINMATH_H_FUNC void vec##n##_add(vec##n r, vec##n const a, vec##n const b) \
|
||||
{ \
|
||||
int i; \
|
||||
for(i=0; i<n; ++i) \
|
||||
r[i] = a[i] + b[i]; \
|
||||
} \
|
||||
LINMATH_H_FUNC void vec##n##_sub(vec##n r, vec##n const a, vec##n const b) \
|
||||
{ \
|
||||
int i; \
|
||||
for(i=0; i<n; ++i) \
|
||||
r[i] = a[i] - b[i]; \
|
||||
} \
|
||||
LINMATH_H_FUNC void vec##n##_scale(vec##n r, vec##n const v, float const s) \
|
||||
{ \
|
||||
int i; \
|
||||
for(i=0; i<n; ++i) \
|
||||
r[i] = v[i] * s; \
|
||||
} \
|
||||
LINMATH_H_FUNC float vec##n##_mul_inner(vec##n const a, vec##n const b) \
|
||||
{ \
|
||||
float p = 0.f; \
|
||||
int i; \
|
||||
for(i=0; i<n; ++i) \
|
||||
p += b[i]*a[i]; \
|
||||
return p; \
|
||||
} \
|
||||
LINMATH_H_FUNC float vec##n##_len(vec##n const v) \
|
||||
{ \
|
||||
return sqrtf(vec##n##_mul_inner(v,v)); \
|
||||
} \
|
||||
LINMATH_H_FUNC void vec##n##_norm(vec##n r, vec##n const v) \
|
||||
{ \
|
||||
float k = 1.f / vec##n##_len(v); \
|
||||
vec##n##_scale(r, v, k); \
|
||||
} \
|
||||
LINMATH_H_FUNC void vec##n##_min(vec##n r, vec##n const a, vec##n const b) \
|
||||
{ \
|
||||
int i; \
|
||||
for(i=0; i<n; ++i) \
|
||||
r[i] = a[i]<b[i] ? a[i] : b[i]; \
|
||||
} \
|
||||
LINMATH_H_FUNC void vec##n##_max(vec##n r, vec##n const a, vec##n const b) \
|
||||
{ \
|
||||
int i; \
|
||||
for(i=0; i<n; ++i) \
|
||||
r[i] = a[i]>b[i] ? a[i] : b[i]; \
|
||||
} \
|
||||
LINMATH_H_FUNC void vec##n##_dup(vec##n r, vec##n const src) \
|
||||
{ \
|
||||
int i; \
|
||||
for(i=0; i<n; ++i) \
|
||||
r[i] = src[i]; \
|
||||
}
|
||||
|
||||
LINMATH_H_DEFINE_VEC(2)
|
||||
LINMATH_H_DEFINE_VEC(3)
|
||||
LINMATH_H_DEFINE_VEC(4)
|
||||
|
||||
LINMATH_H_FUNC void vec3_mul_cross(vec3 r, vec3 const a, vec3 const b)
|
||||
{
|
||||
r[0] = a[1]*b[2] - a[2]*b[1];
|
||||
r[1] = a[2]*b[0] - a[0]*b[2];
|
||||
r[2] = a[0]*b[1] - a[1]*b[0];
|
||||
}
|
||||
|
||||
LINMATH_H_FUNC void vec3_reflect(vec3 r, vec3 const v, vec3 const n)
|
||||
{
|
||||
float p = 2.f * vec3_mul_inner(v, n);
|
||||
int i;
|
||||
for(i=0;i<3;++i)
|
||||
r[i] = v[i] - p*n[i];
|
||||
}
|
||||
|
||||
LINMATH_H_FUNC void vec4_mul_cross(vec4 r, vec4 const a, vec4 const b)
|
||||
{
|
||||
r[0] = a[1]*b[2] - a[2]*b[1];
|
||||
r[1] = a[2]*b[0] - a[0]*b[2];
|
||||
r[2] = a[0]*b[1] - a[1]*b[0];
|
||||
r[3] = 1.f;
|
||||
}
|
||||
|
||||
LINMATH_H_FUNC void vec4_reflect(vec4 r, vec4 const v, vec4 const n)
|
||||
{
|
||||
float p = 2.f*vec4_mul_inner(v, n);
|
||||
int i;
|
||||
for(i=0;i<4;++i)
|
||||
r[i] = v[i] - p*n[i];
|
||||
}
|
||||
|
||||
typedef vec4 mat4x4[4];
|
||||
LINMATH_H_FUNC void mat4x4_identity(mat4x4 M)
|
||||
{
|
||||
int i, j;
|
||||
for(i=0; i<4; ++i)
|
||||
for(j=0; j<4; ++j)
|
||||
M[i][j] = i==j ? 1.f : 0.f;
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_dup(mat4x4 M, mat4x4 const N)
|
||||
{
|
||||
int i;
|
||||
for(i=0; i<4; ++i)
|
||||
vec4_dup(M[i], N[i]);
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_row(vec4 r, mat4x4 const M, int i)
|
||||
{
|
||||
int k;
|
||||
for(k=0; k<4; ++k)
|
||||
r[k] = M[k][i];
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_col(vec4 r, mat4x4 const M, int i)
|
||||
{
|
||||
int k;
|
||||
for(k=0; k<4; ++k)
|
||||
r[k] = M[i][k];
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_transpose(mat4x4 M, mat4x4 const N)
|
||||
{
|
||||
// Note: if M and N are the same, the user has to
|
||||
// explicitly make a copy of M and set it to N.
|
||||
int i, j;
|
||||
for(j=0; j<4; ++j)
|
||||
for(i=0; i<4; ++i)
|
||||
M[i][j] = N[j][i];
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_add(mat4x4 M, mat4x4 const a, mat4x4 const b)
|
||||
{
|
||||
int i;
|
||||
for(i=0; i<4; ++i)
|
||||
vec4_add(M[i], a[i], b[i]);
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_sub(mat4x4 M, mat4x4 const a, mat4x4 const b)
|
||||
{
|
||||
int i;
|
||||
for(i=0; i<4; ++i)
|
||||
vec4_sub(M[i], a[i], b[i]);
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_scale(mat4x4 M, mat4x4 const a, float k)
|
||||
{
|
||||
int i;
|
||||
for(i=0; i<4; ++i)
|
||||
vec4_scale(M[i], a[i], k);
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_scale_aniso(mat4x4 M, mat4x4 const a, float x, float y, float z)
|
||||
{
|
||||
vec4_scale(M[0], a[0], x);
|
||||
vec4_scale(M[1], a[1], y);
|
||||
vec4_scale(M[2], a[2], z);
|
||||
vec4_dup(M[3], a[3]);
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_mul(mat4x4 M, mat4x4 const a, mat4x4 const b)
|
||||
{
|
||||
mat4x4 temp;
|
||||
int k, r, c;
|
||||
for(c=0; c<4; ++c) for(r=0; r<4; ++r) {
|
||||
temp[c][r] = 0.f;
|
||||
for(k=0; k<4; ++k)
|
||||
temp[c][r] += a[k][r] * b[c][k];
|
||||
}
|
||||
mat4x4_dup(M, temp);
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_mul_vec4(vec4 r, mat4x4 const M, vec4 const v)
|
||||
{
|
||||
int i, j;
|
||||
for(j=0; j<4; ++j) {
|
||||
r[j] = 0.f;
|
||||
for(i=0; i<4; ++i)
|
||||
r[j] += M[i][j] * v[i];
|
||||
}
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_translate(mat4x4 T, float x, float y, float z)
|
||||
{
|
||||
mat4x4_identity(T);
|
||||
T[3][0] = x;
|
||||
T[3][1] = y;
|
||||
T[3][2] = z;
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_translate_in_place(mat4x4 M, float x, float y, float z)
|
||||
{
|
||||
vec4 t = {x, y, z, 0};
|
||||
vec4 r;
|
||||
int i;
|
||||
for (i = 0; i < 4; ++i) {
|
||||
mat4x4_row(r, M, i);
|
||||
M[3][i] += vec4_mul_inner(r, t);
|
||||
}
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_from_vec3_mul_outer(mat4x4 M, vec3 const a, vec3 const b)
|
||||
{
|
||||
int i, j;
|
||||
for(i=0; i<4; ++i) for(j=0; j<4; ++j)
|
||||
M[i][j] = i<3 && j<3 ? a[i] * b[j] : 0.f;
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_rotate(mat4x4 R, mat4x4 const M, float x, float y, float z, float angle)
|
||||
{
|
||||
float s = sinf(angle);
|
||||
float c = cosf(angle);
|
||||
vec3 u = {x, y, z};
|
||||
|
||||
if(vec3_len(u) > 1e-4) {
|
||||
vec3_norm(u, u);
|
||||
mat4x4 T;
|
||||
mat4x4_from_vec3_mul_outer(T, u, u);
|
||||
|
||||
mat4x4 S = {
|
||||
{ 0, u[2], -u[1], 0},
|
||||
{-u[2], 0, u[0], 0},
|
||||
{ u[1], -u[0], 0, 0},
|
||||
{ 0, 0, 0, 0}
|
||||
};
|
||||
mat4x4_scale(S, S, s);
|
||||
|
||||
mat4x4 C;
|
||||
mat4x4_identity(C);
|
||||
mat4x4_sub(C, C, T);
|
||||
|
||||
mat4x4_scale(C, C, c);
|
||||
|
||||
mat4x4_add(T, T, C);
|
||||
mat4x4_add(T, T, S);
|
||||
|
||||
T[3][3] = 1.f;
|
||||
mat4x4_mul(R, M, T);
|
||||
} else {
|
||||
mat4x4_dup(R, M);
|
||||
}
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_rotate_X(mat4x4 Q, mat4x4 const M, float angle)
|
||||
{
|
||||
float s = sinf(angle);
|
||||
float c = cosf(angle);
|
||||
mat4x4 R = {
|
||||
{1.f, 0.f, 0.f, 0.f},
|
||||
{0.f, c, s, 0.f},
|
||||
{0.f, -s, c, 0.f},
|
||||
{0.f, 0.f, 0.f, 1.f}
|
||||
};
|
||||
mat4x4_mul(Q, M, R);
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_rotate_Y(mat4x4 Q, mat4x4 const M, float angle)
|
||||
{
|
||||
float s = sinf(angle);
|
||||
float c = cosf(angle);
|
||||
mat4x4 R = {
|
||||
{ c, 0.f, -s, 0.f},
|
||||
{ 0.f, 1.f, 0.f, 0.f},
|
||||
{ s, 0.f, c, 0.f},
|
||||
{ 0.f, 0.f, 0.f, 1.f}
|
||||
};
|
||||
mat4x4_mul(Q, M, R);
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_rotate_Z(mat4x4 Q, mat4x4 const M, float angle)
|
||||
{
|
||||
float s = sinf(angle);
|
||||
float c = cosf(angle);
|
||||
mat4x4 R = {
|
||||
{ c, s, 0.f, 0.f},
|
||||
{ -s, c, 0.f, 0.f},
|
||||
{ 0.f, 0.f, 1.f, 0.f},
|
||||
{ 0.f, 0.f, 0.f, 1.f}
|
||||
};
|
||||
mat4x4_mul(Q, M, R);
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_invert(mat4x4 T, mat4x4 const M)
|
||||
{
|
||||
float s[6];
|
||||
float c[6];
|
||||
s[0] = M[0][0]*M[1][1] - M[1][0]*M[0][1];
|
||||
s[1] = M[0][0]*M[1][2] - M[1][0]*M[0][2];
|
||||
s[2] = M[0][0]*M[1][3] - M[1][0]*M[0][3];
|
||||
s[3] = M[0][1]*M[1][2] - M[1][1]*M[0][2];
|
||||
s[4] = M[0][1]*M[1][3] - M[1][1]*M[0][3];
|
||||
s[5] = M[0][2]*M[1][3] - M[1][2]*M[0][3];
|
||||
|
||||
c[0] = M[2][0]*M[3][1] - M[3][0]*M[2][1];
|
||||
c[1] = M[2][0]*M[3][2] - M[3][0]*M[2][2];
|
||||
c[2] = M[2][0]*M[3][3] - M[3][0]*M[2][3];
|
||||
c[3] = M[2][1]*M[3][2] - M[3][1]*M[2][2];
|
||||
c[4] = M[2][1]*M[3][3] - M[3][1]*M[2][3];
|
||||
c[5] = M[2][2]*M[3][3] - M[3][2]*M[2][3];
|
||||
|
||||
/* Assumes it is invertible */
|
||||
float idet = 1.0f/( s[0]*c[5]-s[1]*c[4]+s[2]*c[3]+s[3]*c[2]-s[4]*c[1]+s[5]*c[0] );
|
||||
|
||||
T[0][0] = ( M[1][1] * c[5] - M[1][2] * c[4] + M[1][3] * c[3]) * idet;
|
||||
T[0][1] = (-M[0][1] * c[5] + M[0][2] * c[4] - M[0][3] * c[3]) * idet;
|
||||
T[0][2] = ( M[3][1] * s[5] - M[3][2] * s[4] + M[3][3] * s[3]) * idet;
|
||||
T[0][3] = (-M[2][1] * s[5] + M[2][2] * s[4] - M[2][3] * s[3]) * idet;
|
||||
|
||||
T[1][0] = (-M[1][0] * c[5] + M[1][2] * c[2] - M[1][3] * c[1]) * idet;
|
||||
T[1][1] = ( M[0][0] * c[5] - M[0][2] * c[2] + M[0][3] * c[1]) * idet;
|
||||
T[1][2] = (-M[3][0] * s[5] + M[3][2] * s[2] - M[3][3] * s[1]) * idet;
|
||||
T[1][3] = ( M[2][0] * s[5] - M[2][2] * s[2] + M[2][3] * s[1]) * idet;
|
||||
|
||||
T[2][0] = ( M[1][0] * c[4] - M[1][1] * c[2] + M[1][3] * c[0]) * idet;
|
||||
T[2][1] = (-M[0][0] * c[4] + M[0][1] * c[2] - M[0][3] * c[0]) * idet;
|
||||
T[2][2] = ( M[3][0] * s[4] - M[3][1] * s[2] + M[3][3] * s[0]) * idet;
|
||||
T[2][3] = (-M[2][0] * s[4] + M[2][1] * s[2] - M[2][3] * s[0]) * idet;
|
||||
|
||||
T[3][0] = (-M[1][0] * c[3] + M[1][1] * c[1] - M[1][2] * c[0]) * idet;
|
||||
T[3][1] = ( M[0][0] * c[3] - M[0][1] * c[1] + M[0][2] * c[0]) * idet;
|
||||
T[3][2] = (-M[3][0] * s[3] + M[3][1] * s[1] - M[3][2] * s[0]) * idet;
|
||||
T[3][3] = ( M[2][0] * s[3] - M[2][1] * s[1] + M[2][2] * s[0]) * idet;
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_orthonormalize(mat4x4 R, mat4x4 const M)
|
||||
{
|
||||
mat4x4_dup(R, M);
|
||||
float s = 1.f;
|
||||
vec3 h;
|
||||
|
||||
vec3_norm(R[2], R[2]);
|
||||
|
||||
s = vec3_mul_inner(R[1], R[2]);
|
||||
vec3_scale(h, R[2], s);
|
||||
vec3_sub(R[1], R[1], h);
|
||||
vec3_norm(R[1], R[1]);
|
||||
|
||||
s = vec3_mul_inner(R[0], R[2]);
|
||||
vec3_scale(h, R[2], s);
|
||||
vec3_sub(R[0], R[0], h);
|
||||
|
||||
s = vec3_mul_inner(R[0], R[1]);
|
||||
vec3_scale(h, R[1], s);
|
||||
vec3_sub(R[0], R[0], h);
|
||||
vec3_norm(R[0], R[0]);
|
||||
}
|
||||
|
||||
LINMATH_H_FUNC void mat4x4_frustum(mat4x4 M, float l, float r, float b, float t, float n, float f)
|
||||
{
|
||||
M[0][0] = 2.f*n/(r-l);
|
||||
M[0][1] = M[0][2] = M[0][3] = 0.f;
|
||||
|
||||
M[1][1] = 2.f*n/(t-b);
|
||||
M[1][0] = M[1][2] = M[1][3] = 0.f;
|
||||
|
||||
M[2][0] = (r+l)/(r-l);
|
||||
M[2][1] = (t+b)/(t-b);
|
||||
M[2][2] = -(f+n)/(f-n);
|
||||
M[2][3] = -1.f;
|
||||
|
||||
M[3][2] = -2.f*(f*n)/(f-n);
|
||||
M[3][0] = M[3][1] = M[3][3] = 0.f;
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_ortho(mat4x4 M, float l, float r, float b, float t, float n, float f)
|
||||
{
|
||||
M[0][0] = 2.f/(r-l);
|
||||
M[0][1] = M[0][2] = M[0][3] = 0.f;
|
||||
|
||||
M[1][1] = 2.f/(t-b);
|
||||
M[1][0] = M[1][2] = M[1][3] = 0.f;
|
||||
|
||||
M[2][2] = -2.f/(f-n);
|
||||
M[2][0] = M[2][1] = M[2][3] = 0.f;
|
||||
|
||||
M[3][0] = -(r+l)/(r-l);
|
||||
M[3][1] = -(t+b)/(t-b);
|
||||
M[3][2] = -(f+n)/(f-n);
|
||||
M[3][3] = 1.f;
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_perspective(mat4x4 m, float y_fov, float aspect, float n, float f)
|
||||
{
|
||||
/* NOTE: Degrees are an unhandy unit to work with.
|
||||
* linmath.h uses radians for everything! */
|
||||
float const a = 1.f / tanf(y_fov / 2.f);
|
||||
|
||||
m[0][0] = a / aspect;
|
||||
m[0][1] = 0.f;
|
||||
m[0][2] = 0.f;
|
||||
m[0][3] = 0.f;
|
||||
|
||||
m[1][0] = 0.f;
|
||||
m[1][1] = a;
|
||||
m[1][2] = 0.f;
|
||||
m[1][3] = 0.f;
|
||||
|
||||
m[2][0] = 0.f;
|
||||
m[2][1] = 0.f;
|
||||
m[2][2] = -((f + n) / (f - n));
|
||||
m[2][3] = -1.f;
|
||||
|
||||
m[3][0] = 0.f;
|
||||
m[3][1] = 0.f;
|
||||
m[3][2] = -((2.f * f * n) / (f - n));
|
||||
m[3][3] = 0.f;
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_look_at(mat4x4 m, vec3 const eye, vec3 const center, vec3 const up)
|
||||
{
|
||||
/* Adapted from Android's OpenGL Matrix.java. */
|
||||
/* See the OpenGL GLUT documentation for gluLookAt for a description */
|
||||
/* of the algorithm. We implement it in a straightforward way: */
|
||||
|
||||
/* TODO: The negation of of can be spared by swapping the order of
|
||||
* operands in the following cross products in the right way. */
|
||||
vec3 f;
|
||||
vec3_sub(f, center, eye);
|
||||
vec3_norm(f, f);
|
||||
|
||||
vec3 s;
|
||||
vec3_mul_cross(s, f, up);
|
||||
vec3_norm(s, s);
|
||||
|
||||
vec3 t;
|
||||
vec3_mul_cross(t, s, f);
|
||||
|
||||
m[0][0] = s[0];
|
||||
m[0][1] = t[0];
|
||||
m[0][2] = -f[0];
|
||||
m[0][3] = 0.f;
|
||||
|
||||
m[1][0] = s[1];
|
||||
m[1][1] = t[1];
|
||||
m[1][2] = -f[1];
|
||||
m[1][3] = 0.f;
|
||||
|
||||
m[2][0] = s[2];
|
||||
m[2][1] = t[2];
|
||||
m[2][2] = -f[2];
|
||||
m[2][3] = 0.f;
|
||||
|
||||
m[3][0] = 0.f;
|
||||
m[3][1] = 0.f;
|
||||
m[3][2] = 0.f;
|
||||
m[3][3] = 1.f;
|
||||
|
||||
mat4x4_translate_in_place(m, -eye[0], -eye[1], -eye[2]);
|
||||
}
|
||||
|
||||
typedef float quat[4];
|
||||
#define quat_add vec4_add
|
||||
#define quat_sub vec4_sub
|
||||
#define quat_norm vec4_norm
|
||||
#define quat_scale vec4_scale
|
||||
#define quat_mul_inner vec4_mul_inner
|
||||
|
||||
LINMATH_H_FUNC void quat_identity(quat q)
|
||||
{
|
||||
q[0] = q[1] = q[2] = 0.f;
|
||||
q[3] = 1.f;
|
||||
}
|
||||
LINMATH_H_FUNC void quat_mul(quat r, quat const p, quat const q)
|
||||
{
|
||||
vec3 w;
|
||||
vec3_mul_cross(r, p, q);
|
||||
vec3_scale(w, p, q[3]);
|
||||
vec3_add(r, r, w);
|
||||
vec3_scale(w, q, p[3]);
|
||||
vec3_add(r, r, w);
|
||||
r[3] = p[3]*q[3] - vec3_mul_inner(p, q);
|
||||
}
|
||||
LINMATH_H_FUNC void quat_conj(quat r, quat const q)
|
||||
{
|
||||
int i;
|
||||
for(i=0; i<3; ++i)
|
||||
r[i] = -q[i];
|
||||
r[3] = q[3];
|
||||
}
|
||||
LINMATH_H_FUNC void quat_rotate(quat r, float angle, vec3 const axis) {
|
||||
vec3 axis_norm;
|
||||
vec3_norm(axis_norm, axis);
|
||||
float s = sinf(angle / 2);
|
||||
float c = cosf(angle / 2);
|
||||
vec3_scale(r, axis_norm, s);
|
||||
r[3] = c;
|
||||
}
|
||||
LINMATH_H_FUNC void quat_mul_vec3(vec3 r, quat const q, vec3 const v)
|
||||
{
|
||||
/*
|
||||
* Method by Fabian 'ryg' Giessen (of Farbrausch)
|
||||
t = 2 * cross(q.xyz, v)
|
||||
v' = v + q.w * t + cross(q.xyz, t)
|
||||
*/
|
||||
vec3 t;
|
||||
vec3 q_xyz = {q[0], q[1], q[2]};
|
||||
vec3 u = {q[0], q[1], q[2]};
|
||||
|
||||
vec3_mul_cross(t, q_xyz, v);
|
||||
vec3_scale(t, t, 2);
|
||||
|
||||
vec3_mul_cross(u, q_xyz, t);
|
||||
vec3_scale(t, t, q[3]);
|
||||
|
||||
vec3_add(r, v, t);
|
||||
vec3_add(r, r, u);
|
||||
}
|
||||
LINMATH_H_FUNC void mat4x4_from_quat(mat4x4 M, quat const q)
|
||||
{
|
||||
float a = q[3];
|
||||
float b = q[0];
|
||||
float c = q[1];
|
||||
float d = q[2];
|
||||
float a2 = a*a;
|
||||
float b2 = b*b;
|
||||
float c2 = c*c;
|
||||
float d2 = d*d;
|
||||
|
||||
M[0][0] = a2 + b2 - c2 - d2;
|
||||
M[0][1] = 2.f*(b*c + a*d);
|
||||
M[0][2] = 2.f*(b*d - a*c);
|
||||
M[0][3] = 0.f;
|
||||
|
||||
M[1][0] = 2*(b*c - a*d);
|
||||
M[1][1] = a2 - b2 + c2 - d2;
|
||||
M[1][2] = 2.f*(c*d + a*b);
|
||||
M[1][3] = 0.f;
|
||||
|
||||
M[2][0] = 2.f*(b*d + a*c);
|
||||
M[2][1] = 2.f*(c*d - a*b);
|
||||
M[2][2] = a2 - b2 - c2 + d2;
|
||||
M[2][3] = 0.f;
|
||||
|
||||
M[3][0] = M[3][1] = M[3][2] = 0.f;
|
||||
M[3][3] = 1.f;
|
||||
}
|
||||
|
||||
LINMATH_H_FUNC void mat4x4o_mul_quat(mat4x4 R, mat4x4 const M, quat const q)
|
||||
{
|
||||
/* XXX: The way this is written only works for orthogonal matrices. */
|
||||
/* TODO: Take care of non-orthogonal case. */
|
||||
quat_mul_vec3(R[0], q, M[0]);
|
||||
quat_mul_vec3(R[1], q, M[1]);
|
||||
quat_mul_vec3(R[2], q, M[2]);
|
||||
|
||||
R[3][0] = R[3][1] = R[3][2] = 0.f;
|
||||
R[0][3] = M[0][3];
|
||||
R[1][3] = M[1][3];
|
||||
R[2][3] = M[2][3];
|
||||
R[3][3] = M[3][3]; // typically 1.0, but here we make it general
|
||||
}
|
||||
LINMATH_H_FUNC void quat_from_mat4x4(quat q, mat4x4 const M)
|
||||
{
|
||||
float r=0.f;
|
||||
int i;
|
||||
|
||||
int perm[] = { 0, 1, 2, 0, 1 };
|
||||
int *p = perm;
|
||||
|
||||
for(i = 0; i<3; i++) {
|
||||
float m = M[i][i];
|
||||
if( m < r )
|
||||
continue;
|
||||
m = r;
|
||||
p = &perm[i];
|
||||
}
|
||||
|
||||
r = sqrtf(1.f + M[p[0]][p[0]] - M[p[1]][p[1]] - M[p[2]][p[2]] );
|
||||
|
||||
if(r < 1e-6) {
|
||||
q[0] = 1.f;
|
||||
q[1] = q[2] = q[3] = 0.f;
|
||||
return;
|
||||
}
|
||||
|
||||
q[0] = r/2.f;
|
||||
q[1] = (M[p[0]][p[1]] - M[p[1]][p[0]])/(2.f*r);
|
||||
q[2] = (M[p[2]][p[0]] - M[p[0]][p[2]])/(2.f*r);
|
||||
q[3] = (M[p[2]][p[1]] - M[p[1]][p[2]])/(2.f*r);
|
||||
}
|
||||
|
||||
LINMATH_H_FUNC void mat4x4_arcball(mat4x4 R, mat4x4 const M, vec2 const _a, vec2 const _b, float s)
|
||||
{
|
||||
vec2 a; memcpy(a, _a, sizeof(a));
|
||||
vec2 b; memcpy(b, _b, sizeof(b));
|
||||
|
||||
float z_a = 0.f;
|
||||
float z_b = 0.f;
|
||||
|
||||
if(vec2_len(a) < 1.f) {
|
||||
z_a = sqrtf(1.f - vec2_mul_inner(a, a));
|
||||
} else {
|
||||
vec2_norm(a, a);
|
||||
}
|
||||
|
||||
if(vec2_len(b) < 1.f) {
|
||||
z_b = sqrtf(1.f - vec2_mul_inner(b, b));
|
||||
} else {
|
||||
vec2_norm(b, b);
|
||||
}
|
||||
|
||||
vec3 a_ = {a[0], a[1], z_a};
|
||||
vec3 b_ = {b[0], b[1], z_b};
|
||||
|
||||
vec3 c_;
|
||||
vec3_mul_cross(c_, a_, b_);
|
||||
|
||||
float const angle = acos(vec3_mul_inner(a_, b_)) * s;
|
||||
mat4x4_rotate(R, M, c_[0], c_[1], c_[2], angle);
|
||||
}
|
||||
#endif
|
117
deps/mingw/_mingw_dxhelper.h
vendored
Normal file
117
deps/mingw/_mingw_dxhelper.h
vendored
Normal file
@ -0,0 +1,117 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the mingw-w64 runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER within this package.
|
||||
*/
|
||||
|
||||
#if defined(_MSC_VER) && !defined(_MSC_EXTENSIONS)
|
||||
#define NONAMELESSUNION 1
|
||||
#endif
|
||||
#if defined(NONAMELESSSTRUCT) && \
|
||||
!defined(NONAMELESSUNION)
|
||||
#define NONAMELESSUNION 1
|
||||
#endif
|
||||
#if defined(NONAMELESSUNION) && \
|
||||
!defined(NONAMELESSSTRUCT)
|
||||
#define NONAMELESSSTRUCT 1
|
||||
#endif
|
||||
#if !defined(__GNU_EXTENSION)
|
||||
#if defined(__GNUC__) || defined(__GNUG__)
|
||||
#define __GNU_EXTENSION __extension__
|
||||
#else
|
||||
#define __GNU_EXTENSION
|
||||
#endif
|
||||
#endif /* __extension__ */
|
||||
|
||||
#ifndef __ANONYMOUS_DEFINED
|
||||
#define __ANONYMOUS_DEFINED
|
||||
#if defined(__GNUC__) || defined(__GNUG__)
|
||||
#define _ANONYMOUS_UNION __extension__
|
||||
#define _ANONYMOUS_STRUCT __extension__
|
||||
#else
|
||||
#define _ANONYMOUS_UNION
|
||||
#define _ANONYMOUS_STRUCT
|
||||
#endif
|
||||
#ifndef NONAMELESSUNION
|
||||
#define _UNION_NAME(x)
|
||||
#define _STRUCT_NAME(x)
|
||||
#else /* NONAMELESSUNION */
|
||||
#define _UNION_NAME(x) x
|
||||
#define _STRUCT_NAME(x) x
|
||||
#endif
|
||||
#endif /* __ANONYMOUS_DEFINED */
|
||||
|
||||
#ifndef DUMMYUNIONNAME
|
||||
# ifdef NONAMELESSUNION
|
||||
# define DUMMYUNIONNAME u
|
||||
# define DUMMYUNIONNAME1 u1 /* Wine uses this variant */
|
||||
# define DUMMYUNIONNAME2 u2
|
||||
# define DUMMYUNIONNAME3 u3
|
||||
# define DUMMYUNIONNAME4 u4
|
||||
# define DUMMYUNIONNAME5 u5
|
||||
# define DUMMYUNIONNAME6 u6
|
||||
# define DUMMYUNIONNAME7 u7
|
||||
# define DUMMYUNIONNAME8 u8
|
||||
# define DUMMYUNIONNAME9 u9
|
||||
# else /* NONAMELESSUNION */
|
||||
# define DUMMYUNIONNAME
|
||||
# define DUMMYUNIONNAME1 /* Wine uses this variant */
|
||||
# define DUMMYUNIONNAME2
|
||||
# define DUMMYUNIONNAME3
|
||||
# define DUMMYUNIONNAME4
|
||||
# define DUMMYUNIONNAME5
|
||||
# define DUMMYUNIONNAME6
|
||||
# define DUMMYUNIONNAME7
|
||||
# define DUMMYUNIONNAME8
|
||||
# define DUMMYUNIONNAME9
|
||||
# endif
|
||||
#endif /* DUMMYUNIONNAME */
|
||||
|
||||
#if !defined(DUMMYUNIONNAME1) /* MinGW does not define this one */
|
||||
# ifdef NONAMELESSUNION
|
||||
# define DUMMYUNIONNAME1 u1 /* Wine uses this variant */
|
||||
# else
|
||||
# define DUMMYUNIONNAME1 /* Wine uses this variant */
|
||||
# endif
|
||||
#endif /* DUMMYUNIONNAME1 */
|
||||
|
||||
#ifndef DUMMYSTRUCTNAME
|
||||
# ifdef NONAMELESSUNION
|
||||
# define DUMMYSTRUCTNAME s
|
||||
# define DUMMYSTRUCTNAME1 s1 /* Wine uses this variant */
|
||||
# define DUMMYSTRUCTNAME2 s2
|
||||
# define DUMMYSTRUCTNAME3 s3
|
||||
# define DUMMYSTRUCTNAME4 s4
|
||||
# define DUMMYSTRUCTNAME5 s5
|
||||
# else
|
||||
# define DUMMYSTRUCTNAME
|
||||
# define DUMMYSTRUCTNAME1 /* Wine uses this variant */
|
||||
# define DUMMYSTRUCTNAME2
|
||||
# define DUMMYSTRUCTNAME3
|
||||
# define DUMMYSTRUCTNAME4
|
||||
# define DUMMYSTRUCTNAME5
|
||||
# endif
|
||||
#endif /* DUMMYSTRUCTNAME */
|
||||
|
||||
/* These are for compatibility with the Wine source tree */
|
||||
|
||||
#ifndef WINELIB_NAME_AW
|
||||
# ifdef __MINGW_NAME_AW
|
||||
# define WINELIB_NAME_AW __MINGW_NAME_AW
|
||||
# else
|
||||
# ifdef UNICODE
|
||||
# define WINELIB_NAME_AW(func) func##W
|
||||
# else
|
||||
# define WINELIB_NAME_AW(func) func##A
|
||||
# endif
|
||||
# endif
|
||||
#endif /* WINELIB_NAME_AW */
|
||||
|
||||
#ifndef DECL_WINELIB_TYPE_AW
|
||||
# ifdef __MINGW_TYPEDEF_AW
|
||||
# define DECL_WINELIB_TYPE_AW __MINGW_TYPEDEF_AW
|
||||
# else
|
||||
# define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
|
||||
# endif
|
||||
#endif /* DECL_WINELIB_TYPE_AW */
|
||||
|
2467
deps/mingw/dinput.h
vendored
Normal file
2467
deps/mingw/dinput.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
239
deps/mingw/xinput.h
vendored
Normal file
239
deps/mingw/xinput.h
vendored
Normal file
@ -0,0 +1,239 @@
|
||||
/*
|
||||
* The Wine project - Xinput Joystick Library
|
||||
* Copyright 2008 Andrew Fenn
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef __WINE_XINPUT_H
|
||||
#define __WINE_XINPUT_H
|
||||
|
||||
#include <windef.h>
|
||||
|
||||
/*
|
||||
* Bitmasks for the joysticks buttons, determines what has
|
||||
* been pressed on the joystick, these need to be mapped
|
||||
* to whatever device you're using instead of an xbox 360
|
||||
* joystick
|
||||
*/
|
||||
|
||||
#define XINPUT_GAMEPAD_DPAD_UP 0x0001
|
||||
#define XINPUT_GAMEPAD_DPAD_DOWN 0x0002
|
||||
#define XINPUT_GAMEPAD_DPAD_LEFT 0x0004
|
||||
#define XINPUT_GAMEPAD_DPAD_RIGHT 0x0008
|
||||
#define XINPUT_GAMEPAD_START 0x0010
|
||||
#define XINPUT_GAMEPAD_BACK 0x0020
|
||||
#define XINPUT_GAMEPAD_LEFT_THUMB 0x0040
|
||||
#define XINPUT_GAMEPAD_RIGHT_THUMB 0x0080
|
||||
#define XINPUT_GAMEPAD_LEFT_SHOULDER 0x0100
|
||||
#define XINPUT_GAMEPAD_RIGHT_SHOULDER 0x0200
|
||||
#define XINPUT_GAMEPAD_A 0x1000
|
||||
#define XINPUT_GAMEPAD_B 0x2000
|
||||
#define XINPUT_GAMEPAD_X 0x4000
|
||||
#define XINPUT_GAMEPAD_Y 0x8000
|
||||
|
||||
/*
|
||||
* Defines the flags used to determine if the user is pushing
|
||||
* down on a button, not holding a button, etc
|
||||
*/
|
||||
|
||||
#define XINPUT_KEYSTROKE_KEYDOWN 0x0001
|
||||
#define XINPUT_KEYSTROKE_KEYUP 0x0002
|
||||
#define XINPUT_KEYSTROKE_REPEAT 0x0004
|
||||
|
||||
/*
|
||||
* Defines the codes which are returned by XInputGetKeystroke
|
||||
*/
|
||||
|
||||
#define VK_PAD_A 0x5800
|
||||
#define VK_PAD_B 0x5801
|
||||
#define VK_PAD_X 0x5802
|
||||
#define VK_PAD_Y 0x5803
|
||||
#define VK_PAD_RSHOULDER 0x5804
|
||||
#define VK_PAD_LSHOULDER 0x5805
|
||||
#define VK_PAD_LTRIGGER 0x5806
|
||||
#define VK_PAD_RTRIGGER 0x5807
|
||||
#define VK_PAD_DPAD_UP 0x5810
|
||||
#define VK_PAD_DPAD_DOWN 0x5811
|
||||
#define VK_PAD_DPAD_LEFT 0x5812
|
||||
#define VK_PAD_DPAD_RIGHT 0x5813
|
||||
#define VK_PAD_START 0x5814
|
||||
#define VK_PAD_BACK 0x5815
|
||||
#define VK_PAD_LTHUMB_PRESS 0x5816
|
||||
#define VK_PAD_RTHUMB_PRESS 0x5817
|
||||
#define VK_PAD_LTHUMB_UP 0x5820
|
||||
#define VK_PAD_LTHUMB_DOWN 0x5821
|
||||
#define VK_PAD_LTHUMB_RIGHT 0x5822
|
||||
#define VK_PAD_LTHUMB_LEFT 0x5823
|
||||
#define VK_PAD_LTHUMB_UPLEFT 0x5824
|
||||
#define VK_PAD_LTHUMB_UPRIGHT 0x5825
|
||||
#define VK_PAD_LTHUMB_DOWNRIGHT 0x5826
|
||||
#define VK_PAD_LTHUMB_DOWNLEFT 0x5827
|
||||
#define VK_PAD_RTHUMB_UP 0x5830
|
||||
#define VK_PAD_RTHUMB_DOWN 0x5831
|
||||
#define VK_PAD_RTHUMB_RIGHT 0x5832
|
||||
#define VK_PAD_RTHUMB_LEFT 0x5833
|
||||
#define VK_PAD_RTHUMB_UPLEFT 0x5834
|
||||
#define VK_PAD_RTHUMB_UPRIGHT 0x5835
|
||||
#define VK_PAD_RTHUMB_DOWNRIGHT 0x5836
|
||||
#define VK_PAD_RTHUMB_DOWNLEFT 0x5837
|
||||
|
||||
/*
|
||||
* Deadzones are for analogue joystick controls on the joypad
|
||||
* which determine when input should be assumed to be in the
|
||||
* middle of the pad. This is a threshold to stop a joypad
|
||||
* controlling the game when the player isn't touching the
|
||||
* controls.
|
||||
*/
|
||||
|
||||
#define XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE 7849
|
||||
#define XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE 8689
|
||||
#define XINPUT_GAMEPAD_TRIGGER_THRESHOLD 30
|
||||
|
||||
|
||||
/*
|
||||
* Defines what type of abilities the type of joystick has
|
||||
* DEVTYPE_GAMEPAD is available for all joysticks, however
|
||||
* there may be more specific identifiers for other joysticks
|
||||
* which are being used.
|
||||
*/
|
||||
|
||||
#define XINPUT_DEVTYPE_GAMEPAD 0x01
|
||||
#define XINPUT_DEVSUBTYPE_GAMEPAD 0x01
|
||||
#define XINPUT_DEVSUBTYPE_WHEEL 0x02
|
||||
#define XINPUT_DEVSUBTYPE_ARCADE_STICK 0x03
|
||||
#define XINPUT_DEVSUBTYPE_FLIGHT_SICK 0x04
|
||||
#define XINPUT_DEVSUBTYPE_DANCE_PAD 0x05
|
||||
#define XINPUT_DEVSUBTYPE_GUITAR 0x06
|
||||
#define XINPUT_DEVSUBTYPE_DRUM_KIT 0x08
|
||||
|
||||
/*
|
||||
* These are used with the XInputGetCapabilities function to
|
||||
* determine the abilities to the joystick which has been
|
||||
* plugged in.
|
||||
*/
|
||||
|
||||
#define XINPUT_CAPS_VOICE_SUPPORTED 0x0004
|
||||
#define XINPUT_FLAG_GAMEPAD 0x00000001
|
||||
|
||||
/*
|
||||
* Defines the status of the battery if one is used in the
|
||||
* attached joystick. The first two define if the joystick
|
||||
* supports a battery. Disconnected means that the joystick
|
||||
* isn't connected. Wired shows that the joystick is a wired
|
||||
* joystick.
|
||||
*/
|
||||
|
||||
#define BATTERY_DEVTYPE_GAMEPAD 0x00
|
||||
#define BATTERY_DEVTYPE_HEADSET 0x01
|
||||
#define BATTERY_TYPE_DISCONNECTED 0x00
|
||||
#define BATTERY_TYPE_WIRED 0x01
|
||||
#define BATTERY_TYPE_ALKALINE 0x02
|
||||
#define BATTERY_TYPE_NIMH 0x03
|
||||
#define BATTERY_TYPE_UNKNOWN 0xFF
|
||||
#define BATTERY_LEVEL_EMPTY 0x00
|
||||
#define BATTERY_LEVEL_LOW 0x01
|
||||
#define BATTERY_LEVEL_MEDIUM 0x02
|
||||
#define BATTERY_LEVEL_FULL 0x03
|
||||
|
||||
/*
|
||||
* How many joysticks can be used with this library. Games that
|
||||
* use the xinput library will not go over this number.
|
||||
*/
|
||||
|
||||
#define XUSER_MAX_COUNT 4
|
||||
#define XUSER_INDEX_ANY 0x000000FF
|
||||
|
||||
/*
|
||||
* Defines the structure of an xbox 360 joystick.
|
||||
*/
|
||||
|
||||
typedef struct _XINPUT_GAMEPAD {
|
||||
WORD wButtons;
|
||||
BYTE bLeftTrigger;
|
||||
BYTE bRightTrigger;
|
||||
SHORT sThumbLX;
|
||||
SHORT sThumbLY;
|
||||
SHORT sThumbRX;
|
||||
SHORT sThumbRY;
|
||||
} XINPUT_GAMEPAD, *PXINPUT_GAMEPAD;
|
||||
|
||||
typedef struct _XINPUT_STATE {
|
||||
DWORD dwPacketNumber;
|
||||
XINPUT_GAMEPAD Gamepad;
|
||||
} XINPUT_STATE, *PXINPUT_STATE;
|
||||
|
||||
/*
|
||||
* Defines the structure of how much vibration is set on both the
|
||||
* right and left motors in a joystick. If you're not using a 360
|
||||
* joystick you will have to map these to your device.
|
||||
*/
|
||||
|
||||
typedef struct _XINPUT_VIBRATION {
|
||||
WORD wLeftMotorSpeed;
|
||||
WORD wRightMotorSpeed;
|
||||
} XINPUT_VIBRATION, *PXINPUT_VIBRATION;
|
||||
|
||||
/*
|
||||
* Defines the structure for what kind of abilities the joystick has
|
||||
* such abilities are things such as if the joystick has the ability
|
||||
* to send and receive audio, if the joystick is in fact a driving
|
||||
* wheel or perhaps if the joystick is some kind of dance pad or
|
||||
* guitar.
|
||||
*/
|
||||
|
||||
typedef struct _XINPUT_CAPABILITIES {
|
||||
BYTE Type;
|
||||
BYTE SubType;
|
||||
WORD Flags;
|
||||
XINPUT_GAMEPAD Gamepad;
|
||||
XINPUT_VIBRATION Vibration;
|
||||
} XINPUT_CAPABILITIES, *PXINPUT_CAPABILITIES;
|
||||
|
||||
/*
|
||||
* Defines the structure for a joystick input event which is
|
||||
* retrieved using the function XInputGetKeystroke
|
||||
*/
|
||||
typedef struct _XINPUT_KEYSTROKE {
|
||||
WORD VirtualKey;
|
||||
WCHAR Unicode;
|
||||
WORD Flags;
|
||||
BYTE UserIndex;
|
||||
BYTE HidCode;
|
||||
} XINPUT_KEYSTROKE, *PXINPUT_KEYSTROKE;
|
||||
|
||||
typedef struct _XINPUT_BATTERY_INFORMATION
|
||||
{
|
||||
BYTE BatteryType;
|
||||
BYTE BatteryLevel;
|
||||
} XINPUT_BATTERY_INFORMATION, *PXINPUT_BATTERY_INFORMATION;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void WINAPI XInputEnable(WINBOOL);
|
||||
DWORD WINAPI XInputSetState(DWORD, XINPUT_VIBRATION*);
|
||||
DWORD WINAPI XInputGetState(DWORD, XINPUT_STATE*);
|
||||
DWORD WINAPI XInputGetKeystroke(DWORD, DWORD, PXINPUT_KEYSTROKE);
|
||||
DWORD WINAPI XInputGetCapabilities(DWORD, DWORD, XINPUT_CAPABILITIES*);
|
||||
DWORD WINAPI XInputGetDSoundAudioDeviceGuids(DWORD, GUID*, GUID*);
|
||||
DWORD WINAPI XInputGetBatteryInformation(DWORD, BYTE, XINPUT_BATTERY_INFORMATION*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __WINE_XINPUT_H */
|
25778
deps/nuklear.h
vendored
Normal file
25778
deps/nuklear.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
381
deps/nuklear_glfw_gl2.h
vendored
Normal file
381
deps/nuklear_glfw_gl2.h
vendored
Normal file
@ -0,0 +1,381 @@
|
||||
/*
|
||||
* Nuklear - v1.32.0 - public domain
|
||||
* no warrenty implied; use at your own risk.
|
||||
* authored from 2015-2017 by Micha Mettke
|
||||
*/
|
||||
/*
|
||||
* ==============================================================
|
||||
*
|
||||
* API
|
||||
*
|
||||
* ===============================================================
|
||||
*/
|
||||
#ifndef NK_GLFW_GL2_H_
|
||||
#define NK_GLFW_GL2_H_
|
||||
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
enum nk_glfw_init_state{
|
||||
NK_GLFW3_DEFAULT = 0,
|
||||
NK_GLFW3_INSTALL_CALLBACKS
|
||||
};
|
||||
NK_API struct nk_context* nk_glfw3_init(GLFWwindow *win, enum nk_glfw_init_state);
|
||||
NK_API void nk_glfw3_font_stash_begin(struct nk_font_atlas **atlas);
|
||||
NK_API void nk_glfw3_font_stash_end(void);
|
||||
|
||||
NK_API void nk_glfw3_new_frame(void);
|
||||
NK_API void nk_glfw3_render(enum nk_anti_aliasing);
|
||||
NK_API void nk_glfw3_shutdown(void);
|
||||
|
||||
NK_API void nk_glfw3_char_callback(GLFWwindow *win, unsigned int codepoint);
|
||||
NK_API void nk_gflw3_scroll_callback(GLFWwindow *win, double xoff, double yoff);
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ==============================================================
|
||||
*
|
||||
* IMPLEMENTATION
|
||||
*
|
||||
* ===============================================================
|
||||
*/
|
||||
#ifdef NK_GLFW_GL2_IMPLEMENTATION
|
||||
|
||||
#ifndef NK_GLFW_TEXT_MAX
|
||||
#define NK_GLFW_TEXT_MAX 256
|
||||
#endif
|
||||
#ifndef NK_GLFW_DOUBLE_CLICK_LO
|
||||
#define NK_GLFW_DOUBLE_CLICK_LO 0.02
|
||||
#endif
|
||||
#ifndef NK_GLFW_DOUBLE_CLICK_HI
|
||||
#define NK_GLFW_DOUBLE_CLICK_HI 0.2
|
||||
#endif
|
||||
|
||||
struct nk_glfw_device {
|
||||
struct nk_buffer cmds;
|
||||
struct nk_draw_null_texture null;
|
||||
GLuint font_tex;
|
||||
};
|
||||
|
||||
struct nk_glfw_vertex {
|
||||
float position[2];
|
||||
float uv[2];
|
||||
nk_byte col[4];
|
||||
};
|
||||
|
||||
static struct nk_glfw {
|
||||
GLFWwindow *win;
|
||||
int width, height;
|
||||
int display_width, display_height;
|
||||
struct nk_glfw_device ogl;
|
||||
struct nk_context ctx;
|
||||
struct nk_font_atlas atlas;
|
||||
struct nk_vec2 fb_scale;
|
||||
unsigned int text[NK_GLFW_TEXT_MAX];
|
||||
int text_len;
|
||||
struct nk_vec2 scroll;
|
||||
double last_button_click;
|
||||
int is_double_click_down;
|
||||
struct nk_vec2 double_click_pos;
|
||||
} glfw;
|
||||
|
||||
NK_INTERN void
|
||||
nk_glfw3_device_upload_atlas(const void *image, int width, int height)
|
||||
{
|
||||
struct nk_glfw_device *dev = &glfw.ogl;
|
||||
glGenTextures(1, &dev->font_tex);
|
||||
glBindTexture(GL_TEXTURE_2D, dev->font_tex);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)width, (GLsizei)height, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, image);
|
||||
}
|
||||
|
||||
NK_API void
|
||||
nk_glfw3_render(enum nk_anti_aliasing AA)
|
||||
{
|
||||
/* setup global state */
|
||||
struct nk_glfw_device *dev = &glfw.ogl;
|
||||
glPushAttrib(GL_ENABLE_BIT|GL_COLOR_BUFFER_BIT|GL_TRANSFORM_BIT);
|
||||
glDisable(GL_CULL_FACE);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
glEnable(GL_BLEND);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
/* setup viewport/project */
|
||||
glViewport(0,0,(GLsizei)glfw.display_width,(GLsizei)glfw.display_height);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glOrtho(0.0f, glfw.width, glfw.height, 0.0f, -1.0f, 1.0f);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glEnableClientState(GL_COLOR_ARRAY);
|
||||
{
|
||||
GLsizei vs = sizeof(struct nk_glfw_vertex);
|
||||
size_t vp = offsetof(struct nk_glfw_vertex, position);
|
||||
size_t vt = offsetof(struct nk_glfw_vertex, uv);
|
||||
size_t vc = offsetof(struct nk_glfw_vertex, col);
|
||||
|
||||
/* convert from command queue into draw list and draw to screen */
|
||||
const struct nk_draw_command *cmd;
|
||||
const nk_draw_index *offset = NULL;
|
||||
struct nk_buffer vbuf, ebuf;
|
||||
|
||||
/* fill convert configuration */
|
||||
struct nk_convert_config config;
|
||||
static const struct nk_draw_vertex_layout_element vertex_layout[] = {
|
||||
{NK_VERTEX_POSITION, NK_FORMAT_FLOAT, NK_OFFSETOF(struct nk_glfw_vertex, position)},
|
||||
{NK_VERTEX_TEXCOORD, NK_FORMAT_FLOAT, NK_OFFSETOF(struct nk_glfw_vertex, uv)},
|
||||
{NK_VERTEX_COLOR, NK_FORMAT_R8G8B8A8, NK_OFFSETOF(struct nk_glfw_vertex, col)},
|
||||
{NK_VERTEX_LAYOUT_END}
|
||||
};
|
||||
NK_MEMSET(&config, 0, sizeof(config));
|
||||
config.vertex_layout = vertex_layout;
|
||||
config.vertex_size = sizeof(struct nk_glfw_vertex);
|
||||
config.vertex_alignment = NK_ALIGNOF(struct nk_glfw_vertex);
|
||||
config.null = dev->null;
|
||||
config.circle_segment_count = 22;
|
||||
config.curve_segment_count = 22;
|
||||
config.arc_segment_count = 22;
|
||||
config.global_alpha = 1.0f;
|
||||
config.shape_AA = AA;
|
||||
config.line_AA = AA;
|
||||
|
||||
/* convert shapes into vertexes */
|
||||
nk_buffer_init_default(&vbuf);
|
||||
nk_buffer_init_default(&ebuf);
|
||||
nk_convert(&glfw.ctx, &dev->cmds, &vbuf, &ebuf, &config);
|
||||
|
||||
/* setup vertex buffer pointer */
|
||||
{const void *vertices = nk_buffer_memory_const(&vbuf);
|
||||
glVertexPointer(2, GL_FLOAT, vs, (const void*)((const nk_byte*)vertices + vp));
|
||||
glTexCoordPointer(2, GL_FLOAT, vs, (const void*)((const nk_byte*)vertices + vt));
|
||||
glColorPointer(4, GL_UNSIGNED_BYTE, vs, (const void*)((const nk_byte*)vertices + vc));}
|
||||
|
||||
/* iterate over and execute each draw command */
|
||||
offset = (const nk_draw_index*)nk_buffer_memory_const(&ebuf);
|
||||
nk_draw_foreach(cmd, &glfw.ctx, &dev->cmds)
|
||||
{
|
||||
if (!cmd->elem_count) continue;
|
||||
glBindTexture(GL_TEXTURE_2D, (GLuint)cmd->texture.id);
|
||||
glScissor(
|
||||
(GLint)(cmd->clip_rect.x * glfw.fb_scale.x),
|
||||
(GLint)((glfw.height - (GLint)(cmd->clip_rect.y + cmd->clip_rect.h)) * glfw.fb_scale.y),
|
||||
(GLint)(cmd->clip_rect.w * glfw.fb_scale.x),
|
||||
(GLint)(cmd->clip_rect.h * glfw.fb_scale.y));
|
||||
glDrawElements(GL_TRIANGLES, (GLsizei)cmd->elem_count, GL_UNSIGNED_SHORT, offset);
|
||||
offset += cmd->elem_count;
|
||||
}
|
||||
nk_clear(&glfw.ctx);
|
||||
nk_buffer_free(&vbuf);
|
||||
nk_buffer_free(&ebuf);
|
||||
}
|
||||
|
||||
/* default OpenGL state */
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glDisableClientState(GL_COLOR_ARRAY);
|
||||
|
||||
glDisable(GL_CULL_FACE);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
glDisable(GL_BLEND);
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPopMatrix();
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPopMatrix();
|
||||
glPopAttrib();
|
||||
}
|
||||
|
||||
NK_API void
|
||||
nk_glfw3_char_callback(GLFWwindow *win, unsigned int codepoint)
|
||||
{
|
||||
(void)win;
|
||||
if (glfw.text_len < NK_GLFW_TEXT_MAX)
|
||||
glfw.text[glfw.text_len++] = codepoint;
|
||||
}
|
||||
|
||||
NK_API void
|
||||
nk_gflw3_scroll_callback(GLFWwindow *win, double xoff, double yoff)
|
||||
{
|
||||
(void)win; (void)xoff;
|
||||
glfw.scroll.x += (float)xoff;
|
||||
glfw.scroll.y += (float)yoff;
|
||||
}
|
||||
|
||||
NK_API void
|
||||
nk_glfw3_mouse_button_callback(GLFWwindow* window, int button, int action, int mods)
|
||||
{
|
||||
double x, y;
|
||||
if (button != GLFW_MOUSE_BUTTON_LEFT) return;
|
||||
glfwGetCursorPos(window, &x, &y);
|
||||
if (action == GLFW_PRESS) {
|
||||
double dt = glfwGetTime() - glfw.last_button_click;
|
||||
if (dt > NK_GLFW_DOUBLE_CLICK_LO && dt < NK_GLFW_DOUBLE_CLICK_HI) {
|
||||
glfw.is_double_click_down = nk_true;
|
||||
glfw.double_click_pos = nk_vec2((float)x, (float)y);
|
||||
}
|
||||
glfw.last_button_click = glfwGetTime();
|
||||
} else glfw.is_double_click_down = nk_false;
|
||||
}
|
||||
|
||||
NK_INTERN void
|
||||
nk_glfw3_clipboard_paste(nk_handle usr, struct nk_text_edit *edit)
|
||||
{
|
||||
const char *text = glfwGetClipboardString(glfw.win);
|
||||
if (text) nk_textedit_paste(edit, text, nk_strlen(text));
|
||||
(void)usr;
|
||||
}
|
||||
|
||||
NK_INTERN void
|
||||
nk_glfw3_clipboard_copy(nk_handle usr, const char *text, int len)
|
||||
{
|
||||
char *str = 0;
|
||||
(void)usr;
|
||||
if (!len) return;
|
||||
str = (char*)malloc((size_t)len+1);
|
||||
if (!str) return;
|
||||
NK_MEMCPY(str, text, (size_t)len);
|
||||
str[len] = '\0';
|
||||
glfwSetClipboardString(glfw.win, str);
|
||||
free(str);
|
||||
}
|
||||
|
||||
NK_API struct nk_context*
|
||||
nk_glfw3_init(GLFWwindow *win, enum nk_glfw_init_state init_state)
|
||||
{
|
||||
glfw.win = win;
|
||||
if (init_state == NK_GLFW3_INSTALL_CALLBACKS) {
|
||||
glfwSetScrollCallback(win, nk_gflw3_scroll_callback);
|
||||
glfwSetCharCallback(win, nk_glfw3_char_callback);
|
||||
glfwSetMouseButtonCallback(win, nk_glfw3_mouse_button_callback);
|
||||
}
|
||||
nk_init_default(&glfw.ctx, 0);
|
||||
glfw.ctx.clip.copy = nk_glfw3_clipboard_copy;
|
||||
glfw.ctx.clip.paste = nk_glfw3_clipboard_paste;
|
||||
glfw.ctx.clip.userdata = nk_handle_ptr(0);
|
||||
nk_buffer_init_default(&glfw.ogl.cmds);
|
||||
|
||||
glfw.is_double_click_down = nk_false;
|
||||
glfw.double_click_pos = nk_vec2(0, 0);
|
||||
|
||||
return &glfw.ctx;
|
||||
}
|
||||
|
||||
NK_API void
|
||||
nk_glfw3_font_stash_begin(struct nk_font_atlas **atlas)
|
||||
{
|
||||
nk_font_atlas_init_default(&glfw.atlas);
|
||||
nk_font_atlas_begin(&glfw.atlas);
|
||||
*atlas = &glfw.atlas;
|
||||
}
|
||||
|
||||
NK_API void
|
||||
nk_glfw3_font_stash_end(void)
|
||||
{
|
||||
const void *image; int w, h;
|
||||
image = nk_font_atlas_bake(&glfw.atlas, &w, &h, NK_FONT_ATLAS_RGBA32);
|
||||
nk_glfw3_device_upload_atlas(image, w, h);
|
||||
nk_font_atlas_end(&glfw.atlas, nk_handle_id((int)glfw.ogl.font_tex), &glfw.ogl.null);
|
||||
if (glfw.atlas.default_font)
|
||||
nk_style_set_font(&glfw.ctx, &glfw.atlas.default_font->handle);
|
||||
}
|
||||
|
||||
NK_API void
|
||||
nk_glfw3_new_frame(void)
|
||||
{
|
||||
int i;
|
||||
double x, y;
|
||||
struct nk_context *ctx = &glfw.ctx;
|
||||
struct GLFWwindow *win = glfw.win;
|
||||
|
||||
glfwGetWindowSize(win, &glfw.width, &glfw.height);
|
||||
glfwGetFramebufferSize(win, &glfw.display_width, &glfw.display_height);
|
||||
glfw.fb_scale.x = (float)glfw.display_width/(float)glfw.width;
|
||||
glfw.fb_scale.y = (float)glfw.display_height/(float)glfw.height;
|
||||
|
||||
nk_input_begin(ctx);
|
||||
for (i = 0; i < glfw.text_len; ++i)
|
||||
nk_input_unicode(ctx, glfw.text[i]);
|
||||
|
||||
/* optional grabbing behavior */
|
||||
if (ctx->input.mouse.grab)
|
||||
glfwSetInputMode(glfw.win, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
|
||||
else if (ctx->input.mouse.ungrab)
|
||||
glfwSetInputMode(glfw.win, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
|
||||
|
||||
nk_input_key(ctx, NK_KEY_DEL, glfwGetKey(win, GLFW_KEY_DELETE) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_ENTER, glfwGetKey(win, GLFW_KEY_ENTER) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_TAB, glfwGetKey(win, GLFW_KEY_TAB) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_BACKSPACE, glfwGetKey(win, GLFW_KEY_BACKSPACE) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_UP, glfwGetKey(win, GLFW_KEY_UP) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_DOWN, glfwGetKey(win, GLFW_KEY_DOWN) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_TEXT_START, glfwGetKey(win, GLFW_KEY_HOME) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_TEXT_END, glfwGetKey(win, GLFW_KEY_END) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_SCROLL_START, glfwGetKey(win, GLFW_KEY_HOME) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_SCROLL_END, glfwGetKey(win, GLFW_KEY_END) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_SCROLL_DOWN, glfwGetKey(win, GLFW_KEY_PAGE_DOWN) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_SCROLL_UP, glfwGetKey(win, GLFW_KEY_PAGE_UP) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_SHIFT, glfwGetKey(win, GLFW_KEY_LEFT_SHIFT) == GLFW_PRESS||
|
||||
glfwGetKey(win, GLFW_KEY_RIGHT_SHIFT) == GLFW_PRESS);
|
||||
|
||||
if (glfwGetKey(win, GLFW_KEY_LEFT_CONTROL) == GLFW_PRESS ||
|
||||
glfwGetKey(win, GLFW_KEY_RIGHT_CONTROL) == GLFW_PRESS) {
|
||||
nk_input_key(ctx, NK_KEY_COPY, glfwGetKey(win, GLFW_KEY_C) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_PASTE, glfwGetKey(win, GLFW_KEY_V) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_CUT, glfwGetKey(win, GLFW_KEY_X) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_TEXT_UNDO, glfwGetKey(win, GLFW_KEY_Z) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_TEXT_REDO, glfwGetKey(win, GLFW_KEY_R) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_TEXT_WORD_LEFT, glfwGetKey(win, GLFW_KEY_LEFT) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_TEXT_WORD_RIGHT, glfwGetKey(win, GLFW_KEY_RIGHT) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_TEXT_LINE_START, glfwGetKey(win, GLFW_KEY_B) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_TEXT_LINE_END, glfwGetKey(win, GLFW_KEY_E) == GLFW_PRESS);
|
||||
} else {
|
||||
nk_input_key(ctx, NK_KEY_LEFT, glfwGetKey(win, GLFW_KEY_LEFT) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_RIGHT, glfwGetKey(win, GLFW_KEY_RIGHT) == GLFW_PRESS);
|
||||
nk_input_key(ctx, NK_KEY_COPY, 0);
|
||||
nk_input_key(ctx, NK_KEY_PASTE, 0);
|
||||
nk_input_key(ctx, NK_KEY_CUT, 0);
|
||||
nk_input_key(ctx, NK_KEY_SHIFT, 0);
|
||||
}
|
||||
|
||||
glfwGetCursorPos(win, &x, &y);
|
||||
nk_input_motion(ctx, (int)x, (int)y);
|
||||
if (ctx->input.mouse.grabbed) {
|
||||
glfwSetCursorPos(glfw.win, (double)ctx->input.mouse.prev.x, (double)ctx->input.mouse.prev.y);
|
||||
ctx->input.mouse.pos.x = ctx->input.mouse.prev.x;
|
||||
ctx->input.mouse.pos.y = ctx->input.mouse.prev.y;
|
||||
}
|
||||
|
||||
nk_input_button(ctx, NK_BUTTON_LEFT, (int)x, (int)y, glfwGetMouseButton(win, GLFW_MOUSE_BUTTON_LEFT) == GLFW_PRESS);
|
||||
nk_input_button(ctx, NK_BUTTON_MIDDLE, (int)x, (int)y, glfwGetMouseButton(win, GLFW_MOUSE_BUTTON_MIDDLE) == GLFW_PRESS);
|
||||
nk_input_button(ctx, NK_BUTTON_RIGHT, (int)x, (int)y, glfwGetMouseButton(win, GLFW_MOUSE_BUTTON_RIGHT) == GLFW_PRESS);
|
||||
nk_input_button(ctx, NK_BUTTON_DOUBLE, (int)glfw.double_click_pos.x, (int)glfw.double_click_pos.y, glfw.is_double_click_down);
|
||||
nk_input_scroll(ctx, glfw.scroll);
|
||||
nk_input_end(&glfw.ctx);
|
||||
glfw.text_len = 0;
|
||||
glfw.scroll = nk_vec2(0,0);
|
||||
}
|
||||
|
||||
NK_API
|
||||
void nk_glfw3_shutdown(void)
|
||||
{
|
||||
struct nk_glfw_device *dev = &glfw.ogl;
|
||||
nk_font_atlas_clear(&glfw.atlas);
|
||||
nk_free(&glfw.ctx);
|
||||
glDeleteTextures(1, &dev->font_tex);
|
||||
nk_buffer_free(&dev->cmds);
|
||||
NK_MEMSET(&glfw, 0, sizeof(glfw));
|
||||
}
|
||||
|
||||
#endif
|
1724
deps/stb_image_write.h
vendored
Normal file
1724
deps/stb_image_write.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9
deps/tinycthread.c
vendored
9
deps/tinycthread.c
vendored
@ -21,9 +21,10 @@ freely, subject to the following restrictions:
|
||||
distribution.
|
||||
*/
|
||||
|
||||
/* 2013-01-06 Camilla Berglund <elmindreda@elmindreda.org>
|
||||
*
|
||||
/* 2013-01-06 Camilla Löwy <elmindreda@glfw.org>
|
||||
*
|
||||
* Added casts from time_t to DWORD to avoid warnings on VC++.
|
||||
* Fixed time retrieval on POSIX systems.
|
||||
*/
|
||||
|
||||
#include "tinycthread.h"
|
||||
@ -294,7 +295,7 @@ int cnd_timedwait(cnd_t *cond, mtx_t *mtx, const struct timespec *ts)
|
||||
{
|
||||
#if defined(_TTHREAD_WIN32_)
|
||||
struct timespec now;
|
||||
if (clock_gettime(TIME_UTC, &now) == 0)
|
||||
if (clock_gettime(CLOCK_REALTIME, &now) == 0)
|
||||
{
|
||||
DWORD delta = (DWORD) ((ts->tv_sec - now.tv_sec) * 1000 +
|
||||
(ts->tv_nsec - now.tv_nsec + 500000) / 1000000);
|
||||
@ -471,7 +472,7 @@ int thrd_sleep(const struct timespec *time_point, struct timespec *remaining)
|
||||
#endif
|
||||
|
||||
/* Get the current time */
|
||||
if (clock_gettime(TIME_UTC, &now) != 0)
|
||||
if (clock_gettime(CLOCK_REALTIME, &now) != 0)
|
||||
return -2; // FIXME: Some specific error code?
|
||||
|
||||
#if defined(_TTHREAD_WIN32_)
|
||||
|
5
deps/tinycthread.h
vendored
5
deps/tinycthread.h
vendored
@ -78,6 +78,7 @@ freely, subject to the following restrictions:
|
||||
|
||||
/* Platform specific includes */
|
||||
#if defined(_TTHREAD_POSIX_)
|
||||
#include <sys/time.h>
|
||||
#include <pthread.h>
|
||||
#elif defined(_TTHREAD_WIN32_)
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@ -122,7 +123,9 @@ typedef int _tthread_clockid_t;
|
||||
/* Emulate clock_gettime */
|
||||
int _tthread_clock_gettime(clockid_t clk_id, struct timespec *ts);
|
||||
#define clock_gettime _tthread_clock_gettime
|
||||
#define CLOCK_REALTIME 0
|
||||
#ifndef CLOCK_REALTIME
|
||||
#define CLOCK_REALTIME 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
102
deps/wayland/fractional-scale-v1.xml
vendored
Normal file
102
deps/wayland/fractional-scale-v1.xml
vendored
Normal file
@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="fractional_scale_v1">
|
||||
<copyright>
|
||||
Copyright © 2022 Kenny Levinsen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<description summary="Protocol for requesting fractional surface scales">
|
||||
This protocol allows a compositor to suggest for surfaces to render at
|
||||
fractional scales.
|
||||
|
||||
A client can submit scaled content by utilizing wp_viewport. This is done by
|
||||
creating a wp_viewport object for the surface and setting the destination
|
||||
rectangle to the surface size before the scale factor is applied.
|
||||
|
||||
The buffer size is calculated by multiplying the surface size by the
|
||||
intended scale.
|
||||
|
||||
The wl_surface buffer scale should remain set to 1.
|
||||
|
||||
If a surface has a surface-local size of 100 px by 50 px and wishes to
|
||||
submit buffers with a scale of 1.5, then a buffer of 150px by 75 px should
|
||||
be used and the wp_viewport destination rectangle should be 100 px by 50 px.
|
||||
|
||||
For toplevel surfaces, the size is rounded halfway away from zero. The
|
||||
rounding algorithm for subsurface position and size is not defined.
|
||||
</description>
|
||||
|
||||
<interface name="wp_fractional_scale_manager_v1" version="1">
|
||||
<description summary="fractional surface scale information">
|
||||
A global interface for requesting surfaces to use fractional scales.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="unbind the fractional surface scale interface">
|
||||
Informs the server that the client will not be using this protocol
|
||||
object anymore. This does not affect any other objects,
|
||||
wp_fractional_scale_v1 objects included.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<enum name="error">
|
||||
<entry name="fractional_scale_exists" value="0"
|
||||
summary="the surface already has a fractional_scale object associated"/>
|
||||
</enum>
|
||||
|
||||
<request name="get_fractional_scale">
|
||||
<description summary="extend surface interface for scale information">
|
||||
Create an add-on object for the the wl_surface to let the compositor
|
||||
request fractional scales. If the given wl_surface already has a
|
||||
wp_fractional_scale_v1 object associated, the fractional_scale_exists
|
||||
protocol error is raised.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="wp_fractional_scale_v1"
|
||||
summary="the new surface scale info interface id"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"
|
||||
summary="the surface"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="wp_fractional_scale_v1" version="1">
|
||||
<description summary="fractional scale interface to a wl_surface">
|
||||
An additional interface to a wl_surface object which allows the compositor
|
||||
to inform the client of the preferred scale.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="remove surface scale information for surface">
|
||||
Destroy the fractional scale object. When this object is destroyed,
|
||||
preferred_scale events will no longer be sent.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<event name="preferred_scale">
|
||||
<description summary="notify of new preferred scale">
|
||||
Notification of a new preferred scale for this surface that the
|
||||
compositor suggests that the client should use.
|
||||
|
||||
The sent scale is the numerator of a fraction with a denominator of 120.
|
||||
</description>
|
||||
<arg name="scale" type="uint" summary="the new preferred scale"/>
|
||||
</event>
|
||||
</interface>
|
||||
</protocol>
|
83
deps/wayland/idle-inhibit-unstable-v1.xml
vendored
Normal file
83
deps/wayland/idle-inhibit-unstable-v1.xml
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="idle_inhibit_unstable_v1">
|
||||
|
||||
<copyright>
|
||||
Copyright © 2015 Samsung Electronics Co., Ltd
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<interface name="zwp_idle_inhibit_manager_v1" version="1">
|
||||
<description summary="control behavior when display idles">
|
||||
This interface permits inhibiting the idle behavior such as screen
|
||||
blanking, locking, and screensaving. The client binds the idle manager
|
||||
globally, then creates idle-inhibitor objects for each surface.
|
||||
|
||||
Warning! The protocol described in this file is experimental and
|
||||
backward incompatible changes may be made. Backward compatible changes
|
||||
may be added together with the corresponding interface version bump.
|
||||
Backward incompatible changes are done by bumping the version number in
|
||||
the protocol and interface names and resetting the interface version.
|
||||
Once the protocol is to be declared stable, the 'z' prefix and the
|
||||
version number in the protocol and interface names are removed and the
|
||||
interface version number is reset.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the idle inhibitor object">
|
||||
Destroy the inhibit manager.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="create_inhibitor">
|
||||
<description summary="create a new inhibitor object">
|
||||
Create a new inhibitor object associated with the given surface.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="zwp_idle_inhibitor_v1"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"
|
||||
summary="the surface that inhibits the idle behavior"/>
|
||||
</request>
|
||||
|
||||
</interface>
|
||||
|
||||
<interface name="zwp_idle_inhibitor_v1" version="1">
|
||||
<description summary="context object for inhibiting idle behavior">
|
||||
An idle inhibitor prevents the output that the associated surface is
|
||||
visible on from being set to a state where it is not visually usable due
|
||||
to lack of user interaction (e.g. blanked, dimmed, locked, set to power
|
||||
save, etc.) Any screensaver processes are also blocked from displaying.
|
||||
|
||||
If the surface is destroyed, unmapped, becomes occluded, loses
|
||||
visibility, or otherwise becomes not visually relevant for the user, the
|
||||
idle inhibitor will not be honored by the compositor; if the surface
|
||||
subsequently regains visibility the inhibitor takes effect once again.
|
||||
Likewise, the inhibitor isn't honored if the system was already idled at
|
||||
the time the inhibitor was established, although if the system later
|
||||
de-idles and re-idles the inhibitor will take effect.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the idle inhibitor object">
|
||||
Remove the inhibitor effect from the associated wl_surface.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
</interface>
|
||||
</protocol>
|
339
deps/wayland/pointer-constraints-unstable-v1.xml
vendored
Normal file
339
deps/wayland/pointer-constraints-unstable-v1.xml
vendored
Normal file
@ -0,0 +1,339 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="pointer_constraints_unstable_v1">
|
||||
|
||||
<copyright>
|
||||
Copyright © 2014 Jonas Ådahl
|
||||
Copyright © 2015 Red Hat Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<description summary="protocol for constraining pointer motions">
|
||||
This protocol specifies a set of interfaces used for adding constraints to
|
||||
the motion of a pointer. Possible constraints include confining pointer
|
||||
motions to a given region, or locking it to its current position.
|
||||
|
||||
In order to constrain the pointer, a client must first bind the global
|
||||
interface "wp_pointer_constraints" which, if a compositor supports pointer
|
||||
constraints, is exposed by the registry. Using the bound global object, the
|
||||
client uses the request that corresponds to the type of constraint it wants
|
||||
to make. See wp_pointer_constraints for more details.
|
||||
|
||||
Warning! The protocol described in this file is experimental and backward
|
||||
incompatible changes may be made. Backward compatible changes may be added
|
||||
together with the corresponding interface version bump. Backward
|
||||
incompatible changes are done by bumping the version number in the protocol
|
||||
and interface names and resetting the interface version. Once the protocol
|
||||
is to be declared stable, the 'z' prefix and the version number in the
|
||||
protocol and interface names are removed and the interface version number is
|
||||
reset.
|
||||
</description>
|
||||
|
||||
<interface name="zwp_pointer_constraints_v1" version="1">
|
||||
<description summary="constrain the movement of a pointer">
|
||||
The global interface exposing pointer constraining functionality. It
|
||||
exposes two requests: lock_pointer for locking the pointer to its
|
||||
position, and confine_pointer for locking the pointer to a region.
|
||||
|
||||
The lock_pointer and confine_pointer requests create the objects
|
||||
wp_locked_pointer and wp_confined_pointer respectively, and the client can
|
||||
use these objects to interact with the lock.
|
||||
|
||||
For any surface, only one lock or confinement may be active across all
|
||||
wl_pointer objects of the same seat. If a lock or confinement is requested
|
||||
when another lock or confinement is active or requested on the same surface
|
||||
and with any of the wl_pointer objects of the same seat, an
|
||||
'already_constrained' error will be raised.
|
||||
</description>
|
||||
|
||||
<enum name="error">
|
||||
<description summary="wp_pointer_constraints error values">
|
||||
These errors can be emitted in response to wp_pointer_constraints
|
||||
requests.
|
||||
</description>
|
||||
<entry name="already_constrained" value="1"
|
||||
summary="pointer constraint already requested on that surface"/>
|
||||
</enum>
|
||||
|
||||
<enum name="lifetime">
|
||||
<description summary="constraint lifetime">
|
||||
These values represent different lifetime semantics. They are passed
|
||||
as arguments to the factory requests to specify how the constraint
|
||||
lifetimes should be managed.
|
||||
</description>
|
||||
<entry name="oneshot" value="1">
|
||||
<description summary="the pointer constraint is defunct once deactivated">
|
||||
A oneshot pointer constraint will never reactivate once it has been
|
||||
deactivated. See the corresponding deactivation event
|
||||
(wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for
|
||||
details.
|
||||
</description>
|
||||
</entry>
|
||||
<entry name="persistent" value="2">
|
||||
<description summary="the pointer constraint may reactivate">
|
||||
A persistent pointer constraint may again reactivate once it has
|
||||
been deactivated. See the corresponding deactivation event
|
||||
(wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for
|
||||
details.
|
||||
</description>
|
||||
</entry>
|
||||
</enum>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the pointer constraints manager object">
|
||||
Used by the client to notify the server that it will no longer use this
|
||||
pointer constraints object.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="lock_pointer">
|
||||
<description summary="lock pointer to a position">
|
||||
The lock_pointer request lets the client request to disable movements of
|
||||
the virtual pointer (i.e. the cursor), effectively locking the pointer
|
||||
to a position. This request may not take effect immediately; in the
|
||||
future, when the compositor deems implementation-specific constraints
|
||||
are satisfied, the pointer lock will be activated and the compositor
|
||||
sends a locked event.
|
||||
|
||||
The protocol provides no guarantee that the constraints are ever
|
||||
satisfied, and does not require the compositor to send an error if the
|
||||
constraints cannot ever be satisfied. It is thus possible to request a
|
||||
lock that will never activate.
|
||||
|
||||
There may not be another pointer constraint of any kind requested or
|
||||
active on the surface for any of the wl_pointer objects of the seat of
|
||||
the passed pointer when requesting a lock. If there is, an error will be
|
||||
raised. See general pointer lock documentation for more details.
|
||||
|
||||
The intersection of the region passed with this request and the input
|
||||
region of the surface is used to determine where the pointer must be
|
||||
in order for the lock to activate. It is up to the compositor whether to
|
||||
warp the pointer or require some kind of user interaction for the lock
|
||||
to activate. If the region is null the surface input region is used.
|
||||
|
||||
A surface may receive pointer focus without the lock being activated.
|
||||
|
||||
The request creates a new object wp_locked_pointer which is used to
|
||||
interact with the lock as well as receive updates about its state. See
|
||||
the the description of wp_locked_pointer for further information.
|
||||
|
||||
Note that while a pointer is locked, the wl_pointer objects of the
|
||||
corresponding seat will not emit any wl_pointer.motion events, but
|
||||
relative motion events will still be emitted via wp_relative_pointer
|
||||
objects of the same seat. wl_pointer.axis and wl_pointer.button events
|
||||
are unaffected.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="zwp_locked_pointer_v1"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"
|
||||
summary="surface to lock pointer to"/>
|
||||
<arg name="pointer" type="object" interface="wl_pointer"
|
||||
summary="the pointer that should be locked"/>
|
||||
<arg name="region" type="object" interface="wl_region" allow-null="true"
|
||||
summary="region of surface"/>
|
||||
<arg name="lifetime" type="uint" enum="lifetime" summary="lock lifetime"/>
|
||||
</request>
|
||||
|
||||
<request name="confine_pointer">
|
||||
<description summary="confine pointer to a region">
|
||||
The confine_pointer request lets the client request to confine the
|
||||
pointer cursor to a given region. This request may not take effect
|
||||
immediately; in the future, when the compositor deems implementation-
|
||||
specific constraints are satisfied, the pointer confinement will be
|
||||
activated and the compositor sends a confined event.
|
||||
|
||||
The intersection of the region passed with this request and the input
|
||||
region of the surface is used to determine where the pointer must be
|
||||
in order for the confinement to activate. It is up to the compositor
|
||||
whether to warp the pointer or require some kind of user interaction for
|
||||
the confinement to activate. If the region is null the surface input
|
||||
region is used.
|
||||
|
||||
The request will create a new object wp_confined_pointer which is used
|
||||
to interact with the confinement as well as receive updates about its
|
||||
state. See the the description of wp_confined_pointer for further
|
||||
information.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="zwp_confined_pointer_v1"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"
|
||||
summary="surface to lock pointer to"/>
|
||||
<arg name="pointer" type="object" interface="wl_pointer"
|
||||
summary="the pointer that should be confined"/>
|
||||
<arg name="region" type="object" interface="wl_region" allow-null="true"
|
||||
summary="region of surface"/>
|
||||
<arg name="lifetime" type="uint" enum="lifetime" summary="confinement lifetime"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="zwp_locked_pointer_v1" version="1">
|
||||
<description summary="receive relative pointer motion events">
|
||||
The wp_locked_pointer interface represents a locked pointer state.
|
||||
|
||||
While the lock of this object is active, the wl_pointer objects of the
|
||||
associated seat will not emit any wl_pointer.motion events.
|
||||
|
||||
This object will send the event 'locked' when the lock is activated.
|
||||
Whenever the lock is activated, it is guaranteed that the locked surface
|
||||
will already have received pointer focus and that the pointer will be
|
||||
within the region passed to the request creating this object.
|
||||
|
||||
To unlock the pointer, send the destroy request. This will also destroy
|
||||
the wp_locked_pointer object.
|
||||
|
||||
If the compositor decides to unlock the pointer the unlocked event is
|
||||
sent. See wp_locked_pointer.unlock for details.
|
||||
|
||||
When unlocking, the compositor may warp the cursor position to the set
|
||||
cursor position hint. If it does, it will not result in any relative
|
||||
motion events emitted via wp_relative_pointer.
|
||||
|
||||
If the surface the lock was requested on is destroyed and the lock is not
|
||||
yet activated, the wp_locked_pointer object is now defunct and must be
|
||||
destroyed.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the locked pointer object">
|
||||
Destroy the locked pointer object. If applicable, the compositor will
|
||||
unlock the pointer.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="set_cursor_position_hint">
|
||||
<description summary="set the pointer cursor position hint">
|
||||
Set the cursor position hint relative to the top left corner of the
|
||||
surface.
|
||||
|
||||
If the client is drawing its own cursor, it should update the position
|
||||
hint to the position of its own cursor. A compositor may use this
|
||||
information to warp the pointer upon unlock in order to avoid pointer
|
||||
jumps.
|
||||
|
||||
The cursor position hint is double buffered. The new hint will only take
|
||||
effect when the associated surface gets it pending state applied. See
|
||||
wl_surface.commit for details.
|
||||
</description>
|
||||
<arg name="surface_x" type="fixed"
|
||||
summary="surface-local x coordinate"/>
|
||||
<arg name="surface_y" type="fixed"
|
||||
summary="surface-local y coordinate"/>
|
||||
</request>
|
||||
|
||||
<request name="set_region">
|
||||
<description summary="set a new lock region">
|
||||
Set a new region used to lock the pointer.
|
||||
|
||||
The new lock region is double-buffered. The new lock region will
|
||||
only take effect when the associated surface gets its pending state
|
||||
applied. See wl_surface.commit for details.
|
||||
|
||||
For details about the lock region, see wp_locked_pointer.
|
||||
</description>
|
||||
<arg name="region" type="object" interface="wl_region" allow-null="true"
|
||||
summary="region of surface"/>
|
||||
</request>
|
||||
|
||||
<event name="locked">
|
||||
<description summary="lock activation event">
|
||||
Notification that the pointer lock of the seat's pointer is activated.
|
||||
</description>
|
||||
</event>
|
||||
|
||||
<event name="unlocked">
|
||||
<description summary="lock deactivation event">
|
||||
Notification that the pointer lock of the seat's pointer is no longer
|
||||
active. If this is a oneshot pointer lock (see
|
||||
wp_pointer_constraints.lifetime) this object is now defunct and should
|
||||
be destroyed. If this is a persistent pointer lock (see
|
||||
wp_pointer_constraints.lifetime) this pointer lock may again
|
||||
reactivate in the future.
|
||||
</description>
|
||||
</event>
|
||||
</interface>
|
||||
|
||||
<interface name="zwp_confined_pointer_v1" version="1">
|
||||
<description summary="confined pointer object">
|
||||
The wp_confined_pointer interface represents a confined pointer state.
|
||||
|
||||
This object will send the event 'confined' when the confinement is
|
||||
activated. Whenever the confinement is activated, it is guaranteed that
|
||||
the surface the pointer is confined to will already have received pointer
|
||||
focus and that the pointer will be within the region passed to the request
|
||||
creating this object. It is up to the compositor to decide whether this
|
||||
requires some user interaction and if the pointer will warp to within the
|
||||
passed region if outside.
|
||||
|
||||
To unconfine the pointer, send the destroy request. This will also destroy
|
||||
the wp_confined_pointer object.
|
||||
|
||||
If the compositor decides to unconfine the pointer the unconfined event is
|
||||
sent. The wp_confined_pointer object is at this point defunct and should
|
||||
be destroyed.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the confined pointer object">
|
||||
Destroy the confined pointer object. If applicable, the compositor will
|
||||
unconfine the pointer.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="set_region">
|
||||
<description summary="set a new confine region">
|
||||
Set a new region used to confine the pointer.
|
||||
|
||||
The new confine region is double-buffered. The new confine region will
|
||||
only take effect when the associated surface gets its pending state
|
||||
applied. See wl_surface.commit for details.
|
||||
|
||||
If the confinement is active when the new confinement region is applied
|
||||
and the pointer ends up outside of newly applied region, the pointer may
|
||||
warped to a position within the new confinement region. If warped, a
|
||||
wl_pointer.motion event will be emitted, but no
|
||||
wp_relative_pointer.relative_motion event.
|
||||
|
||||
The compositor may also, instead of using the new region, unconfine the
|
||||
pointer.
|
||||
|
||||
For details about the confine region, see wp_confined_pointer.
|
||||
</description>
|
||||
<arg name="region" type="object" interface="wl_region" allow-null="true"
|
||||
summary="region of surface"/>
|
||||
</request>
|
||||
|
||||
<event name="confined">
|
||||
<description summary="pointer confined">
|
||||
Notification that the pointer confinement of the seat's pointer is
|
||||
activated.
|
||||
</description>
|
||||
</event>
|
||||
|
||||
<event name="unconfined">
|
||||
<description summary="pointer unconfined">
|
||||
Notification that the pointer confinement of the seat's pointer is no
|
||||
longer active. If this is a oneshot pointer confinement (see
|
||||
wp_pointer_constraints.lifetime) this object is now defunct and should
|
||||
be destroyed. If this is a persistent pointer confinement (see
|
||||
wp_pointer_constraints.lifetime) this pointer confinement may again
|
||||
reactivate in the future.
|
||||
</description>
|
||||
</event>
|
||||
</interface>
|
||||
|
||||
</protocol>
|
136
deps/wayland/relative-pointer-unstable-v1.xml
vendored
Normal file
136
deps/wayland/relative-pointer-unstable-v1.xml
vendored
Normal file
@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="relative_pointer_unstable_v1">
|
||||
|
||||
<copyright>
|
||||
Copyright © 2014 Jonas Ådahl
|
||||
Copyright © 2015 Red Hat Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<description summary="protocol for relative pointer motion events">
|
||||
This protocol specifies a set of interfaces used for making clients able to
|
||||
receive relative pointer events not obstructed by barriers (such as the
|
||||
monitor edge or other pointer barriers).
|
||||
|
||||
To start receiving relative pointer events, a client must first bind the
|
||||
global interface "wp_relative_pointer_manager" which, if a compositor
|
||||
supports relative pointer motion events, is exposed by the registry. After
|
||||
having created the relative pointer manager proxy object, the client uses
|
||||
it to create the actual relative pointer object using the
|
||||
"get_relative_pointer" request given a wl_pointer. The relative pointer
|
||||
motion events will then, when applicable, be transmitted via the proxy of
|
||||
the newly created relative pointer object. See the documentation of the
|
||||
relative pointer interface for more details.
|
||||
|
||||
Warning! The protocol described in this file is experimental and backward
|
||||
incompatible changes may be made. Backward compatible changes may be added
|
||||
together with the corresponding interface version bump. Backward
|
||||
incompatible changes are done by bumping the version number in the protocol
|
||||
and interface names and resetting the interface version. Once the protocol
|
||||
is to be declared stable, the 'z' prefix and the version number in the
|
||||
protocol and interface names are removed and the interface version number is
|
||||
reset.
|
||||
</description>
|
||||
|
||||
<interface name="zwp_relative_pointer_manager_v1" version="1">
|
||||
<description summary="get relative pointer objects">
|
||||
A global interface used for getting the relative pointer object for a
|
||||
given pointer.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the relative pointer manager object">
|
||||
Used by the client to notify the server that it will no longer use this
|
||||
relative pointer manager object.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="get_relative_pointer">
|
||||
<description summary="get a relative pointer object">
|
||||
Create a relative pointer interface given a wl_pointer object. See the
|
||||
wp_relative_pointer interface for more details.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="zwp_relative_pointer_v1"/>
|
||||
<arg name="pointer" type="object" interface="wl_pointer"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="zwp_relative_pointer_v1" version="1">
|
||||
<description summary="relative pointer object">
|
||||
A wp_relative_pointer object is an extension to the wl_pointer interface
|
||||
used for emitting relative pointer events. It shares the same focus as
|
||||
wl_pointer objects of the same seat and will only emit events when it has
|
||||
focus.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="release the relative pointer object"/>
|
||||
</request>
|
||||
|
||||
<event name="relative_motion">
|
||||
<description summary="relative pointer motion">
|
||||
Relative x/y pointer motion from the pointer of the seat associated with
|
||||
this object.
|
||||
|
||||
A relative motion is in the same dimension as regular wl_pointer motion
|
||||
events, except they do not represent an absolute position. For example,
|
||||
moving a pointer from (x, y) to (x', y') would have the equivalent
|
||||
relative motion (x' - x, y' - y). If a pointer motion caused the
|
||||
absolute pointer position to be clipped by for example the edge of the
|
||||
monitor, the relative motion is unaffected by the clipping and will
|
||||
represent the unclipped motion.
|
||||
|
||||
This event also contains non-accelerated motion deltas. The
|
||||
non-accelerated delta is, when applicable, the regular pointer motion
|
||||
delta as it was before having applied motion acceleration and other
|
||||
transformations such as normalization.
|
||||
|
||||
Note that the non-accelerated delta does not represent 'raw' events as
|
||||
they were read from some device. Pointer motion acceleration is device-
|
||||
and configuration-specific and non-accelerated deltas and accelerated
|
||||
deltas may have the same value on some devices.
|
||||
|
||||
Relative motions are not coupled to wl_pointer.motion events, and can be
|
||||
sent in combination with such events, but also independently. There may
|
||||
also be scenarios where wl_pointer.motion is sent, but there is no
|
||||
relative motion. The order of an absolute and relative motion event
|
||||
originating from the same physical motion is not guaranteed.
|
||||
|
||||
If the client needs button events or focus state, it can receive them
|
||||
from a wl_pointer object of the same seat that the wp_relative_pointer
|
||||
object is associated with.
|
||||
</description>
|
||||
<arg name="utime_hi" type="uint"
|
||||
summary="high 32 bits of a 64 bit timestamp with microsecond granularity"/>
|
||||
<arg name="utime_lo" type="uint"
|
||||
summary="low 32 bits of a 64 bit timestamp with microsecond granularity"/>
|
||||
<arg name="dx" type="fixed"
|
||||
summary="the x component of the motion vector"/>
|
||||
<arg name="dy" type="fixed"
|
||||
summary="the y component of the motion vector"/>
|
||||
<arg name="dx_unaccel" type="fixed"
|
||||
summary="the x component of the unaccelerated motion vector"/>
|
||||
<arg name="dy_unaccel" type="fixed"
|
||||
summary="the y component of the unaccelerated motion vector"/>
|
||||
</event>
|
||||
</interface>
|
||||
|
||||
</protocol>
|
180
deps/wayland/viewporter.xml
vendored
Normal file
180
deps/wayland/viewporter.xml
vendored
Normal file
@ -0,0 +1,180 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="viewporter">
|
||||
|
||||
<copyright>
|
||||
Copyright © 2013-2016 Collabora, Ltd.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<interface name="wp_viewporter" version="1">
|
||||
<description summary="surface cropping and scaling">
|
||||
The global interface exposing surface cropping and scaling
|
||||
capabilities is used to instantiate an interface extension for a
|
||||
wl_surface object. This extended interface will then allow
|
||||
cropping and scaling the surface contents, effectively
|
||||
disconnecting the direct relationship between the buffer and the
|
||||
surface size.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="unbind from the cropping and scaling interface">
|
||||
Informs the server that the client will not be using this
|
||||
protocol object anymore. This does not affect any other objects,
|
||||
wp_viewport objects included.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<enum name="error">
|
||||
<entry name="viewport_exists" value="0"
|
||||
summary="the surface already has a viewport object associated"/>
|
||||
</enum>
|
||||
|
||||
<request name="get_viewport">
|
||||
<description summary="extend surface interface for crop and scale">
|
||||
Instantiate an interface extension for the given wl_surface to
|
||||
crop and scale its content. If the given wl_surface already has
|
||||
a wp_viewport object associated, the viewport_exists
|
||||
protocol error is raised.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="wp_viewport"
|
||||
summary="the new viewport interface id"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"
|
||||
summary="the surface"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="wp_viewport" version="1">
|
||||
<description summary="crop and scale interface to a wl_surface">
|
||||
An additional interface to a wl_surface object, which allows the
|
||||
client to specify the cropping and scaling of the surface
|
||||
contents.
|
||||
|
||||
This interface works with two concepts: the source rectangle (src_x,
|
||||
src_y, src_width, src_height), and the destination size (dst_width,
|
||||
dst_height). The contents of the source rectangle are scaled to the
|
||||
destination size, and content outside the source rectangle is ignored.
|
||||
This state is double-buffered, and is applied on the next
|
||||
wl_surface.commit.
|
||||
|
||||
The two parts of crop and scale state are independent: the source
|
||||
rectangle, and the destination size. Initially both are unset, that
|
||||
is, no scaling is applied. The whole of the current wl_buffer is
|
||||
used as the source, and the surface size is as defined in
|
||||
wl_surface.attach.
|
||||
|
||||
If the destination size is set, it causes the surface size to become
|
||||
dst_width, dst_height. The source (rectangle) is scaled to exactly
|
||||
this size. This overrides whatever the attached wl_buffer size is,
|
||||
unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface
|
||||
has no content and therefore no size. Otherwise, the size is always
|
||||
at least 1x1 in surface local coordinates.
|
||||
|
||||
If the source rectangle is set, it defines what area of the wl_buffer is
|
||||
taken as the source. If the source rectangle is set and the destination
|
||||
size is not set, then src_width and src_height must be integers, and the
|
||||
surface size becomes the source rectangle size. This results in cropping
|
||||
without scaling. If src_width or src_height are not integers and
|
||||
destination size is not set, the bad_size protocol error is raised when
|
||||
the surface state is applied.
|
||||
|
||||
The coordinate transformations from buffer pixel coordinates up to
|
||||
the surface-local coordinates happen in the following order:
|
||||
1. buffer_transform (wl_surface.set_buffer_transform)
|
||||
2. buffer_scale (wl_surface.set_buffer_scale)
|
||||
3. crop and scale (wp_viewport.set*)
|
||||
This means, that the source rectangle coordinates of crop and scale
|
||||
are given in the coordinates after the buffer transform and scale,
|
||||
i.e. in the coordinates that would be the surface-local coordinates
|
||||
if the crop and scale was not applied.
|
||||
|
||||
If src_x or src_y are negative, the bad_value protocol error is raised.
|
||||
Otherwise, if the source rectangle is partially or completely outside of
|
||||
the non-NULL wl_buffer, then the out_of_buffer protocol error is raised
|
||||
when the surface state is applied. A NULL wl_buffer does not raise the
|
||||
out_of_buffer error.
|
||||
|
||||
If the wl_surface associated with the wp_viewport is destroyed,
|
||||
all wp_viewport requests except 'destroy' raise the protocol error
|
||||
no_surface.
|
||||
|
||||
If the wp_viewport object is destroyed, the crop and scale
|
||||
state is removed from the wl_surface. The change will be applied
|
||||
on the next wl_surface.commit.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="remove scaling and cropping from the surface">
|
||||
The associated wl_surface's crop and scale state is removed.
|
||||
The change is applied on the next wl_surface.commit.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<enum name="error">
|
||||
<entry name="bad_value" value="0"
|
||||
summary="negative or zero values in width or height"/>
|
||||
<entry name="bad_size" value="1"
|
||||
summary="destination size is not integer"/>
|
||||
<entry name="out_of_buffer" value="2"
|
||||
summary="source rectangle extends outside of the content area"/>
|
||||
<entry name="no_surface" value="3"
|
||||
summary="the wl_surface was destroyed"/>
|
||||
</enum>
|
||||
|
||||
<request name="set_source">
|
||||
<description summary="set the source rectangle for cropping">
|
||||
Set the source rectangle of the associated wl_surface. See
|
||||
wp_viewport for the description, and relation to the wl_buffer
|
||||
size.
|
||||
|
||||
If all of x, y, width and height are -1.0, the source rectangle is
|
||||
unset instead. Any other set of values where width or height are zero
|
||||
or negative, or x or y are negative, raise the bad_value protocol
|
||||
error.
|
||||
|
||||
The crop and scale state is double-buffered state, and will be
|
||||
applied on the next wl_surface.commit.
|
||||
</description>
|
||||
<arg name="x" type="fixed" summary="source rectangle x"/>
|
||||
<arg name="y" type="fixed" summary="source rectangle y"/>
|
||||
<arg name="width" type="fixed" summary="source rectangle width"/>
|
||||
<arg name="height" type="fixed" summary="source rectangle height"/>
|
||||
</request>
|
||||
|
||||
<request name="set_destination">
|
||||
<description summary="set the surface size for scaling">
|
||||
Set the destination size of the associated wl_surface. See
|
||||
wp_viewport for the description, and relation to the wl_buffer
|
||||
size.
|
||||
|
||||
If width is -1 and height is -1, the destination size is unset
|
||||
instead. Any other pair of values for width and height that
|
||||
contains zero or negative values raises the bad_value protocol
|
||||
error.
|
||||
|
||||
The crop and scale state is double-buffered state, and will be
|
||||
applied on the next wl_surface.commit.
|
||||
</description>
|
||||
<arg name="width" type="int" summary="surface width"/>
|
||||
<arg name="height" type="int" summary="surface height"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
</protocol>
|
3151
deps/wayland/wayland.xml
vendored
Normal file
3151
deps/wayland/wayland.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
200
deps/wayland/xdg-activation-v1.xml
vendored
Normal file
200
deps/wayland/xdg-activation-v1.xml
vendored
Normal file
@ -0,0 +1,200 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="xdg_activation_v1">
|
||||
|
||||
<copyright>
|
||||
Copyright © 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
|
||||
Copyright © 2020 Carlos Garnacho <carlosg@gnome.org>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<description summary="Protocol for requesting activation of surfaces">
|
||||
The way for a client to pass focus to another toplevel is as follows.
|
||||
|
||||
The client that intends to activate another toplevel uses the
|
||||
xdg_activation_v1.get_activation_token request to get an activation token.
|
||||
This token is then forwarded to the client, which is supposed to activate
|
||||
one of its surfaces, through a separate band of communication.
|
||||
|
||||
One established way of doing this is through the XDG_ACTIVATION_TOKEN
|
||||
environment variable of a newly launched child process. The child process
|
||||
should unset the environment variable again right after reading it out in
|
||||
order to avoid propagating it to other child processes.
|
||||
|
||||
Another established way exists for Applications implementing the D-Bus
|
||||
interface org.freedesktop.Application, which should get their token under
|
||||
activation-token on their platform_data.
|
||||
|
||||
In general activation tokens may be transferred across clients through
|
||||
means not described in this protocol.
|
||||
|
||||
The client to be activated will then pass the token
|
||||
it received to the xdg_activation_v1.activate request. The compositor can
|
||||
then use this token to decide how to react to the activation request.
|
||||
|
||||
The token the activating client gets may be ineffective either already at
|
||||
the time it receives it, for example if it was not focused, for focus
|
||||
stealing prevention. The activating client will have no way to discover
|
||||
the validity of the token, and may still forward it to the to be activated
|
||||
client.
|
||||
|
||||
The created activation token may optionally get information attached to it
|
||||
that can be used by the compositor to identify the application that we
|
||||
intend to activate. This can for example be used to display a visual hint
|
||||
about what application is being started.
|
||||
|
||||
Warning! The protocol described in this file is currently in the testing
|
||||
phase. Backward compatible changes may be added together with the
|
||||
corresponding interface version bump. Backward incompatible changes can
|
||||
only be done by creating a new major version of the extension.
|
||||
</description>
|
||||
|
||||
<interface name="xdg_activation_v1" version="1">
|
||||
<description summary="interface for activating surfaces">
|
||||
A global interface used for informing the compositor about applications
|
||||
being activated or started, or for applications to request to be
|
||||
activated.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the xdg_activation object">
|
||||
Notify the compositor that the xdg_activation object will no longer be
|
||||
used.
|
||||
|
||||
The child objects created via this interface are unaffected and should
|
||||
be destroyed separately.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="get_activation_token">
|
||||
<description summary="requests a token">
|
||||
Creates an xdg_activation_token_v1 object that will provide
|
||||
the initiating client with a unique token for this activation. This
|
||||
token should be offered to the clients to be activated.
|
||||
</description>
|
||||
|
||||
<arg name="id" type="new_id" interface="xdg_activation_token_v1"/>
|
||||
</request>
|
||||
|
||||
<request name="activate">
|
||||
<description summary="notify new interaction being available">
|
||||
Requests surface activation. It's up to the compositor to display
|
||||
this information as desired, for example by placing the surface above
|
||||
the rest.
|
||||
|
||||
The compositor may know who requested this by checking the activation
|
||||
token and might decide not to follow through with the activation if it's
|
||||
considered unwanted.
|
||||
|
||||
Compositors can ignore unknown activation tokens when an invalid
|
||||
token is passed.
|
||||
</description>
|
||||
<arg name="token" type="string" summary="the activation token of the initiating client"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"
|
||||
summary="the wl_surface to activate"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="xdg_activation_token_v1" version="1">
|
||||
<description summary="an exported activation handle">
|
||||
An object for setting up a token and receiving a token handle that can
|
||||
be passed as an activation token to another client.
|
||||
|
||||
The object is created using the xdg_activation_v1.get_activation_token
|
||||
request. This object should then be populated with the app_id, surface
|
||||
and serial information and committed. The compositor shall then issue a
|
||||
done event with the token. In case the request's parameters are invalid,
|
||||
the compositor will provide an invalid token.
|
||||
</description>
|
||||
|
||||
<enum name="error">
|
||||
<entry name="already_used" value="0"
|
||||
summary="The token has already been used previously"/>
|
||||
</enum>
|
||||
|
||||
<request name="set_serial">
|
||||
<description summary="specifies the seat and serial of the activating event">
|
||||
Provides information about the seat and serial event that requested the
|
||||
token.
|
||||
|
||||
The serial can come from an input or focus event. For instance, if a
|
||||
click triggers the launch of a third-party client, the launcher client
|
||||
should send a set_serial request with the serial and seat from the
|
||||
wl_pointer.button event.
|
||||
|
||||
Some compositors might refuse to activate toplevels when the token
|
||||
doesn't have a valid and recent enough event serial.
|
||||
|
||||
Must be sent before commit. This information is optional.
|
||||
</description>
|
||||
<arg name="serial" type="uint"
|
||||
summary="the serial of the event that triggered the activation"/>
|
||||
<arg name="seat" type="object" interface="wl_seat"
|
||||
summary="the wl_seat of the event"/>
|
||||
</request>
|
||||
|
||||
<request name="set_app_id">
|
||||
<description summary="specifies the application being activated">
|
||||
The requesting client can specify an app_id to associate the token
|
||||
being created with it.
|
||||
|
||||
Must be sent before commit. This information is optional.
|
||||
</description>
|
||||
<arg name="app_id" type="string"
|
||||
summary="the application id of the client being activated."/>
|
||||
</request>
|
||||
|
||||
<request name="set_surface">
|
||||
<description summary="specifies the surface requesting activation">
|
||||
This request sets the surface requesting the activation. Note, this is
|
||||
different from the surface that will be activated.
|
||||
|
||||
Some compositors might refuse to activate toplevels when the token
|
||||
doesn't have a requesting surface.
|
||||
|
||||
Must be sent before commit. This information is optional.
|
||||
</description>
|
||||
<arg name="surface" type="object" interface="wl_surface"
|
||||
summary="the requesting surface"/>
|
||||
</request>
|
||||
|
||||
<request name="commit">
|
||||
<description summary="issues the token request">
|
||||
Requests an activation token based on the different parameters that
|
||||
have been offered through set_serial, set_surface and set_app_id.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<event name="done">
|
||||
<description summary="the exported activation token">
|
||||
The 'done' event contains the unique token of this activation request
|
||||
and notifies that the provider is done.
|
||||
</description>
|
||||
<arg name="token" type="string" summary="the exported activation token"/>
|
||||
</event>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the xdg_activation_token_v1 object">
|
||||
Notify the compositor that the xdg_activation_token_v1 object will no
|
||||
longer be used. The received token stays valid.
|
||||
</description>
|
||||
</request>
|
||||
</interface>
|
||||
</protocol>
|
156
deps/wayland/xdg-decoration-unstable-v1.xml
vendored
Normal file
156
deps/wayland/xdg-decoration-unstable-v1.xml
vendored
Normal file
@ -0,0 +1,156 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="xdg_decoration_unstable_v1">
|
||||
<copyright>
|
||||
Copyright © 2018 Simon Ser
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next
|
||||
paragraph) shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<interface name="zxdg_decoration_manager_v1" version="1">
|
||||
<description summary="window decoration manager">
|
||||
This interface allows a compositor to announce support for server-side
|
||||
decorations.
|
||||
|
||||
A window decoration is a set of window controls as deemed appropriate by
|
||||
the party managing them, such as user interface components used to move,
|
||||
resize and change a window's state.
|
||||
|
||||
A client can use this protocol to request being decorated by a supporting
|
||||
compositor.
|
||||
|
||||
If compositor and client do not negotiate the use of a server-side
|
||||
decoration using this protocol, clients continue to self-decorate as they
|
||||
see fit.
|
||||
|
||||
Warning! The protocol described in this file is experimental and
|
||||
backward incompatible changes may be made. Backward compatible changes
|
||||
may be added together with the corresponding interface version bump.
|
||||
Backward incompatible changes are done by bumping the version number in
|
||||
the protocol and interface names and resetting the interface version.
|
||||
Once the protocol is to be declared stable, the 'z' prefix and the
|
||||
version number in the protocol and interface names are removed and the
|
||||
interface version number is reset.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the decoration manager object">
|
||||
Destroy the decoration manager. This doesn't destroy objects created
|
||||
with the manager.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="get_toplevel_decoration">
|
||||
<description summary="create a new toplevel decoration object">
|
||||
Create a new decoration object associated with the given toplevel.
|
||||
|
||||
Creating an xdg_toplevel_decoration from an xdg_toplevel which has a
|
||||
buffer attached or committed is a client error, and any attempts by a
|
||||
client to attach or manipulate a buffer prior to the first
|
||||
xdg_toplevel_decoration.configure event must also be treated as
|
||||
errors.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="zxdg_toplevel_decoration_v1"/>
|
||||
<arg name="toplevel" type="object" interface="xdg_toplevel"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="zxdg_toplevel_decoration_v1" version="1">
|
||||
<description summary="decoration object for a toplevel surface">
|
||||
The decoration object allows the compositor to toggle server-side window
|
||||
decorations for a toplevel surface. The client can request to switch to
|
||||
another mode.
|
||||
|
||||
The xdg_toplevel_decoration object must be destroyed before its
|
||||
xdg_toplevel.
|
||||
</description>
|
||||
|
||||
<enum name="error">
|
||||
<entry name="unconfigured_buffer" value="0"
|
||||
summary="xdg_toplevel has a buffer attached before configure"/>
|
||||
<entry name="already_constructed" value="1"
|
||||
summary="xdg_toplevel already has a decoration object"/>
|
||||
<entry name="orphaned" value="2"
|
||||
summary="xdg_toplevel destroyed before the decoration object"/>
|
||||
</enum>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the decoration object">
|
||||
Switch back to a mode without any server-side decorations at the next
|
||||
commit.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<enum name="mode">
|
||||
<description summary="window decoration modes">
|
||||
These values describe window decoration modes.
|
||||
</description>
|
||||
<entry name="client_side" value="1"
|
||||
summary="no server-side window decoration"/>
|
||||
<entry name="server_side" value="2"
|
||||
summary="server-side window decoration"/>
|
||||
</enum>
|
||||
|
||||
<request name="set_mode">
|
||||
<description summary="set the decoration mode">
|
||||
Set the toplevel surface decoration mode. This informs the compositor
|
||||
that the client prefers the provided decoration mode.
|
||||
|
||||
After requesting a decoration mode, the compositor will respond by
|
||||
emitting an xdg_surface.configure event. The client should then update
|
||||
its content, drawing it without decorations if the received mode is
|
||||
server-side decorations. The client must also acknowledge the configure
|
||||
when committing the new content (see xdg_surface.ack_configure).
|
||||
|
||||
The compositor can decide not to use the client's mode and enforce a
|
||||
different mode instead.
|
||||
|
||||
Clients whose decoration mode depend on the xdg_toplevel state may send
|
||||
a set_mode request in response to an xdg_surface.configure event and wait
|
||||
for the next xdg_surface.configure event to prevent unwanted state.
|
||||
Such clients are responsible for preventing configure loops and must
|
||||
make sure not to send multiple successive set_mode requests with the
|
||||
same decoration mode.
|
||||
</description>
|
||||
<arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>
|
||||
</request>
|
||||
|
||||
<request name="unset_mode">
|
||||
<description summary="unset the decoration mode">
|
||||
Unset the toplevel surface decoration mode. This informs the compositor
|
||||
that the client doesn't prefer a particular decoration mode.
|
||||
|
||||
This request has the same semantics as set_mode.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<event name="configure">
|
||||
<description summary="suggest a surface change">
|
||||
The configure event asks the client to change its decoration mode. The
|
||||
configured state should not be applied immediately. Clients must send an
|
||||
ack_configure in response to this event. See xdg_surface.configure and
|
||||
xdg_surface.ack_configure for details.
|
||||
|
||||
A configure event can be sent at any time. The specified mode must be
|
||||
obeyed by the client.
|
||||
</description>
|
||||
<arg name="mode" type="uint" enum="mode" summary="the decoration mode"/>
|
||||
</event>
|
||||
</interface>
|
||||
</protocol>
|
1370
deps/wayland/xdg-shell.xml
vendored
Normal file
1370
deps/wayland/xdg-shell.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,57 @@
|
||||
|
||||
add_custom_target(docs ALL ${DOXYGEN_EXECUTABLE}
|
||||
WORKING_DIRECTORY ${GLFW_BINARY_DIR}/docs
|
||||
COMMENT "Generating HTML documentation" VERBATIM)
|
||||
# NOTE: The order of this list determines the order of items in the Guides
|
||||
# (i.e. Pages) list in the generated documentation
|
||||
set(source_files
|
||||
main.md
|
||||
news.md
|
||||
quick.md
|
||||
moving.md
|
||||
compile.md
|
||||
build.md
|
||||
intro.md
|
||||
context.md
|
||||
monitor.md
|
||||
window.md
|
||||
input.md
|
||||
vulkan.md
|
||||
compat.md
|
||||
internal.md)
|
||||
|
||||
set(extra_files DoxygenLayout.xml header.html footer.html extra.css spaces.svg)
|
||||
|
||||
set(header_paths
|
||||
"${GLFW_SOURCE_DIR}/include/GLFW/glfw3.h"
|
||||
"${GLFW_SOURCE_DIR}/include/GLFW/glfw3native.h")
|
||||
|
||||
# Format the source list into a Doxyfile INPUT value that Doxygen can parse
|
||||
foreach(path IN LISTS header_paths)
|
||||
string(APPEND GLFW_DOXYGEN_INPUT " \\\n\"${path}\"")
|
||||
endforeach()
|
||||
foreach(file IN LISTS source_files)
|
||||
string(APPEND GLFW_DOXYGEN_INPUT " \\\n\"${CMAKE_CURRENT_SOURCE_DIR}/${file}\"")
|
||||
endforeach()
|
||||
|
||||
set(DOXYGEN_SKIP_DOT TRUE)
|
||||
find_package(Doxygen)
|
||||
|
||||
if (NOT DOXYGEN_FOUND OR DOXYGEN_VERSION VERSION_LESS "1.9.8")
|
||||
message(STATUS "Documentation generation requires Doxygen 1.9.8 or later")
|
||||
else()
|
||||
configure_file(Doxyfile.in Doxyfile @ONLY)
|
||||
add_custom_command(OUTPUT "html/index.html"
|
||||
COMMAND "${DOXYGEN_EXECUTABLE}"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
|
||||
MAIN_DEPENDENCY Doxyfile
|
||||
DEPENDS ${header_paths} ${source_files} ${extra_files}
|
||||
COMMENT "Generating HTML documentation"
|
||||
VERBATIM)
|
||||
|
||||
add_custom_target(docs ALL SOURCES "html/index.html")
|
||||
set_target_properties(docs PROPERTIES FOLDER "GLFW3")
|
||||
|
||||
if (GLFW_INSTALL)
|
||||
install(DIRECTORY "${GLFW_BINARY_DIR}/docs/html"
|
||||
DESTINATION "${CMAKE_INSTALL_DOCDIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
390
docs/CONTRIBUTING.md
Normal file
390
docs/CONTRIBUTING.md
Normal file
@ -0,0 +1,390 @@
|
||||
# Contribution Guide
|
||||
|
||||
## Contents
|
||||
|
||||
- [Asking a question](#asking-a-question)
|
||||
- [Reporting a bug](#reporting-a-bug)
|
||||
- [Reporting a compile or link bug](#reporting-a-compile-or-link-bug)
|
||||
- [Reporting a segfault or other crash bug](#reporting-a-segfault-or-other-crash-bug)
|
||||
- [Reporting a context creation bug](#reporting-a-context-creation-bug)
|
||||
- [Reporting a monitor or video mode bug](#reporting-a-monitor-or-video-mode-bug)
|
||||
- [Reporting a window, input or event bug](#reporting-a-window-input-or-event-bug)
|
||||
- [Reporting some other library bug](#reporting-some-other-library-bug)
|
||||
- [Reporting a documentation bug](#reporting-a-documentation-bug)
|
||||
- [Reporting a website bug](#reporting-a-website-bug)
|
||||
- [Requesting a feature](#requesting-a-feature)
|
||||
- [Contributing a bug fix](#contributing-a-bug-fix)
|
||||
- [Contributing a feature](#contributing-a-feature)
|
||||
|
||||
|
||||
## Asking a question
|
||||
|
||||
Questions about how to use GLFW should be asked either in the [support
|
||||
section](https://discourse.glfw.org/c/support) of the forum, under the [Stack
|
||||
Overflow tag](https://stackoverflow.com/questions/tagged/glfw) or [Game
|
||||
Development tag](https://gamedev.stackexchange.com/questions/tagged/glfw) on
|
||||
Stack Exchange.
|
||||
|
||||
Questions about the design or implementation of GLFW or about future plans
|
||||
should be asked in the [dev section](https://discourse.glfw.org/c/dev) of the
|
||||
forum. Please don't open a GitHub issue to discuss design questions without
|
||||
first checking with a maintainer.
|
||||
|
||||
|
||||
## Reporting a bug
|
||||
|
||||
If GLFW is behaving unexpectedly at run-time, start by setting an [error
|
||||
callback](https://www.glfw.org/docs/latest/intro_guide.html#error_handling).
|
||||
GLFW will often tell you the cause of an error via this callback. If it
|
||||
doesn't, that might be a separate bug.
|
||||
|
||||
If GLFW is crashing or triggering asserts, make sure that all your object
|
||||
handles and other pointers are valid.
|
||||
|
||||
For bugs where it makes sense, a short, self contained example is absolutely
|
||||
invaluable. Just put it inline in the body text. Note that if the bug is
|
||||
reproducible with one of the test programs that come with GLFW, just mention
|
||||
that instead.
|
||||
|
||||
__Don't worry about adding too much information__. Unimportant information can
|
||||
be abbreviated or removed later, but missing information can stall bug fixing,
|
||||
especially when your schedule doesn't align with that of the maintainer.
|
||||
|
||||
__Please provide text as text, not as images__. This includes code, error
|
||||
messages and any other text. Text in images cannot be found by other users
|
||||
searching for the same problem and may have to be re-typed by maintainers when
|
||||
debugging.
|
||||
|
||||
You don't need to manually indent your code or other text to quote it with
|
||||
GitHub Markdown; just surround it with triple backticks:
|
||||
|
||||
```
|
||||
Some quoted text.
|
||||
```
|
||||
|
||||
You can also add syntax highlighting by appending the common file extension:
|
||||
|
||||
```c
|
||||
int five(void)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
```
|
||||
|
||||
There are issue labels for both platforms and GPU manufacturers, so there is no
|
||||
need to mention these in the subject line. If you do, it will be removed when
|
||||
the issue is labeled.
|
||||
|
||||
If your bug is already reported, please add any new information you have, or if
|
||||
it already has everything, give it a :+1:.
|
||||
|
||||
|
||||
### Reporting a compile or link bug
|
||||
|
||||
__Note:__ GLFW needs many system APIs to do its job, which on some platforms
|
||||
means linking to many system libraries. If you are using GLFW as a static
|
||||
library, that means your application needs to link to these in addition to GLFW.
|
||||
|
||||
__Note:__ Check the [Compiling
|
||||
GLFW](https://www.glfw.org/docs/latest/compile.html) guide and or [Building
|
||||
applications](https://www.glfw.org/docs/latest/build.html) guide for before
|
||||
opening an issue of this kind. Most issues are caused by a missing package or
|
||||
linker flag.
|
||||
|
||||
Always include the __operating system name and version__ (e.g. `Windows
|
||||
7 64-bit` or `Ubuntu 15.10`) and the __compiler name and version__ (e.g. `Visual
|
||||
C++ 2015 Update 2`). If you are using an official release of GLFW,
|
||||
include the __GLFW release version__ (e.g. `3.1.2`), otherwise include the
|
||||
__GLFW commit ID__ (e.g. `3795d78b14ef06008889cc422a1fb8d642597751`) from Git.
|
||||
|
||||
Please also include the __complete build log__ from your compiler and linker,
|
||||
even if it's long. It can always be shortened later, if necessary.
|
||||
|
||||
|
||||
#### Quick template
|
||||
|
||||
```
|
||||
OS and version:
|
||||
Compiler version:
|
||||
Release or commit:
|
||||
Build log:
|
||||
```
|
||||
|
||||
|
||||
### Reporting a segfault or other crash bug
|
||||
|
||||
Always include the __operating system name and version__ (e.g. `Windows
|
||||
7 64-bit` or `Ubuntu 15.10`). If you are using an official release of GLFW,
|
||||
include the __GLFW release version__ (e.g. `3.1.2`), otherwise include the
|
||||
__GLFW commit ID__ (e.g. `3795d78b14ef06008889cc422a1fb8d642597751`) from Git.
|
||||
|
||||
Please also include any __error messages__ provided to your application via the
|
||||
[error
|
||||
callback](https://www.glfw.org/docs/latest/intro_guide.html#error_handling) and
|
||||
the __full call stack__ of the crash, or if the crash does not occur in debug
|
||||
mode, mention that instead.
|
||||
|
||||
|
||||
#### Quick template
|
||||
|
||||
```
|
||||
OS and version:
|
||||
Release or commit:
|
||||
Error messages:
|
||||
Call stack:
|
||||
```
|
||||
|
||||
|
||||
### Reporting a context creation bug
|
||||
|
||||
__Note:__ Windows ships with graphics drivers that do not support OpenGL. If
|
||||
GLFW says that your machine lacks support for OpenGL, it very likely does.
|
||||
Install drivers from the computer manufacturer or graphics card manufacturer
|
||||
([Nvidia](https://www.geforce.com/drivers),
|
||||
[AMD](https://www.amd.com/en/support),
|
||||
[Intel](https://www-ssl.intel.com/content/www/us/en/support/detect.html)) to
|
||||
fix this.
|
||||
|
||||
__Note:__ AMD only supports OpenGL ES on Windows via EGL. See the
|
||||
[GLFW\_CONTEXT\_CREATION\_API](https://www.glfw.org/docs/latest/window_guide.html#window_hints_ctx)
|
||||
hint for how to select EGL.
|
||||
|
||||
Please verify that context creation also fails with the `glfwinfo` tool before
|
||||
reporting it as a bug. This tool is included in the GLFW source tree as
|
||||
`tests/glfwinfo.c` and is built along with the library. It has switches for all
|
||||
GLFW context and framebuffer hints. Run `glfwinfo -h` for a complete list.
|
||||
|
||||
Always include the __operating system name and version__ (e.g. `Windows
|
||||
7 64-bit` or `Ubuntu 15.10`). If you are using an official release of GLFW,
|
||||
include the __GLFW release version__ (e.g. `3.1.2`), otherwise include the
|
||||
__GLFW commit ID__ (e.g. `3795d78b14ef06008889cc422a1fb8d642597751`) from Git.
|
||||
|
||||
If you are running your program in a virtual machine, please mention this and
|
||||
include the __VM name and version__ (e.g. `VirtualBox 5.1`).
|
||||
|
||||
Please also include the __GLFW version string__ (`3.2.0 X11 EGL clock_gettime
|
||||
/dev/js`), as described
|
||||
[here](https://www.glfw.org/docs/latest/intro.html#intro_version_string), the
|
||||
__GPU model and driver version__ (e.g. `GeForce GTX660 with 352.79`), and the
|
||||
__output of `glfwinfo`__ (with switches matching any hints you set in your
|
||||
code) when reporting this kind of bug. If this tool doesn't run on the machine,
|
||||
mention that instead.
|
||||
|
||||
|
||||
#### Quick template
|
||||
|
||||
```
|
||||
OS and version:
|
||||
GPU and driver:
|
||||
Release or commit:
|
||||
Version string:
|
||||
glfwinfo output:
|
||||
```
|
||||
|
||||
|
||||
### Reporting a monitor or video mode bug
|
||||
|
||||
__Note:__ On headless systems on some platforms, no monitors are reported. This
|
||||
causes glfwGetPrimaryMonitor to return `NULL`, which not all applications are
|
||||
prepared for.
|
||||
|
||||
__Note:__ Some third-party tools report more video modes than are approved of
|
||||
by the OS. For safety and compatibility, GLFW only reports video modes the OS
|
||||
wants programs to use. This is not a bug.
|
||||
|
||||
The `monitors` tool is included in the GLFW source tree as `tests/monitors.c`
|
||||
and is built along with the library. It lists all information GLFW provides
|
||||
about monitors it detects.
|
||||
|
||||
Always include the __operating system name and version__ (e.g. `Windows
|
||||
7 64-bit` or `Ubuntu 15.10`). If you are using an official release of GLFW,
|
||||
include the __GLFW release version__ (e.g. `3.1.2`), otherwise include the
|
||||
__GLFW commit ID__ (e.g. `3795d78b14ef06008889cc422a1fb8d642597751`) from Git.
|
||||
|
||||
If you are running your program in a virtual machine, please mention this and
|
||||
include the __VM name and version__ (e.g. `VirtualBox 5.1`).
|
||||
|
||||
Please also include any __error messages__ provided to your application via the
|
||||
[error
|
||||
callback](https://www.glfw.org/docs/latest/intro_guide.html#error_handling) and
|
||||
the __output of `monitors`__ when reporting this kind of bug. If this tool
|
||||
doesn't run on the machine, mention this instead.
|
||||
|
||||
|
||||
#### Quick template
|
||||
|
||||
```
|
||||
OS and version:
|
||||
Release or commit:
|
||||
Error messages:
|
||||
monitors output:
|
||||
```
|
||||
|
||||
|
||||
### Reporting a window, input or event bug
|
||||
|
||||
__Note:__ The exact ordering of related window events will sometimes differ.
|
||||
|
||||
__Note:__ Window moving and resizing (by the user) will block the main thread on
|
||||
some platforms. This is not a bug. Set a [refresh
|
||||
callback](https://www.glfw.org/docs/latest/window.html#window_refresh) if you
|
||||
want to keep the window contents updated during a move or size operation.
|
||||
|
||||
The `events` tool is included in the GLFW source tree as `tests/events.c` and is
|
||||
built along with the library. It prints all information provided to every
|
||||
callback supported by GLFW as events occur. Each event is listed with the time
|
||||
and a unique number to make discussions about event logs easier. The tool has
|
||||
command-line options for creating multiple windows and full screen windows.
|
||||
|
||||
Always include the __operating system name and version__ (e.g. `Windows
|
||||
7 64-bit` or `Ubuntu 15.10`). If you are using an official release of GLFW,
|
||||
include the __GLFW release version__ (e.g. `3.1.2`), otherwise include the
|
||||
__GLFW commit ID__ (e.g. `3795d78b14ef06008889cc422a1fb8d642597751`) from Git.
|
||||
|
||||
If you are running your program in a virtual machine, please mention this and
|
||||
include the __VM name and version__ (e.g. `VirtualBox 5.1`).
|
||||
|
||||
Please also include any __error messages__ provided to your application via the
|
||||
[error
|
||||
callback](https://www.glfw.org/docs/latest/intro_guide.html#error_handling) and
|
||||
if relevant, the __output of `events`__ when reporting this kind of bug. If
|
||||
this tool doesn't run on the machine, mention this instead.
|
||||
|
||||
__X11:__ If possible, please include what desktop environment (e.g. GNOME,
|
||||
Unity, KDE) and/or window manager (e.g. Openbox, dwm, Window Maker) you are
|
||||
running. If the bug is related to keyboard input, please include any input
|
||||
method (e.g. ibus, SCIM) you are using.
|
||||
|
||||
|
||||
#### Quick template
|
||||
|
||||
```
|
||||
OS and version:
|
||||
Release or commit:
|
||||
Error messages:
|
||||
events output:
|
||||
```
|
||||
|
||||
|
||||
### Reporting some other library bug
|
||||
|
||||
Always include the __operating system name and version__ (e.g. `Windows
|
||||
7 64-bit` or `Ubuntu 15.10`). If you are using an official release of GLFW,
|
||||
include the __GLFW release version__ (e.g. `3.1.2`), otherwise include the
|
||||
__GLFW commit ID__ (e.g. `3795d78b14ef06008889cc422a1fb8d642597751`) from Git.
|
||||
|
||||
Please also include any __error messages__ provided to your application via the
|
||||
[error
|
||||
callback](https://www.glfw.org/docs/latest/intro_guide.html#error_handling), if
|
||||
relevant.
|
||||
|
||||
|
||||
#### Quick template
|
||||
|
||||
```
|
||||
OS and version:
|
||||
Release or commit:
|
||||
Error messages:
|
||||
```
|
||||
|
||||
|
||||
### Reporting a documentation bug
|
||||
|
||||
If you found a bug in the documentation, including this file, then it's fine to
|
||||
just link to that web page or mention that source file. You don't need to match
|
||||
the source to the output or vice versa.
|
||||
|
||||
|
||||
### Reporting a website bug
|
||||
|
||||
If the bug is in the documentation (anything under `/docs/`) then please see the
|
||||
section above. Bugs in the rest of the site are reported to the [website
|
||||
source repository](https://github.com/glfw/website/issues).
|
||||
|
||||
|
||||
## Requesting a feature
|
||||
|
||||
Please explain why you need the feature and how you intend to use it. If you
|
||||
have a specific API design in mind, please add that as well. If you have or are
|
||||
planning to write code for the feature, see the section below.
|
||||
|
||||
If there already is a request for the feature you need, add your specific use
|
||||
case unless it is already mentioned. If it is, give it a :+1:.
|
||||
|
||||
|
||||
## Contributing a bug fix
|
||||
|
||||
__Note:__ You must have all necessary [intellectual
|
||||
property rights](https://en.wikipedia.org/wiki/Intellectual_property) to any
|
||||
code you contribute. If you did not write the code yourself, you must explain
|
||||
where it came from and under what license you received it. Even code using the
|
||||
same license as GLFW may not be copied without attribution.
|
||||
|
||||
__There is no preferred patch size__. A one character fix is just as welcome as
|
||||
a thousand line one, if that is the appropriate size for the fix.
|
||||
|
||||
In addition to the code, a complete bug fix includes:
|
||||
|
||||
- Change log entry in `README.md`, describing the incorrect behavior
|
||||
- Credits entries in `CONTRIBUTORS.md` for all authors of the bug fix
|
||||
|
||||
Bug fixes will not be rejected because they don't include all the above parts,
|
||||
but please keep in mind that maintainer time is finite and that there are many
|
||||
other bugs and features to work on.
|
||||
|
||||
If the patch fixes a bug introduced after the last release, it should not get
|
||||
a change log entry.
|
||||
|
||||
If you haven't already, read the excellent article [How to Write a Git Commit
|
||||
Message](https://chris.beams.io/posts/git-commit/).
|
||||
|
||||
|
||||
## Contributing a feature
|
||||
|
||||
__Note:__ You must have all necessary rights to any code you contribute. If you
|
||||
did not write the code yourself, you must explain where it came from and under
|
||||
what license. Even code using the same license as GLFW may not be copied
|
||||
without attribution.
|
||||
|
||||
__Note:__ If you haven't already implemented the feature, check first if there
|
||||
already is an open issue for it and if it's already being developed in an
|
||||
[experimental branch](https://github.com/glfw/glfw/branches/all).
|
||||
|
||||
__There is no preferred patch size__. A one-character change is just as welcome
|
||||
as one adding a thousand lines, if that is the appropriate size for the
|
||||
feature.
|
||||
|
||||
In addition to the code, a complete feature includes:
|
||||
|
||||
- Change log entry in `README.md`, listing all new symbols
|
||||
- News page entry in `docs/news.md`, briefly describing the feature
|
||||
- Guide documentation, with minimal examples, in the relevant guide in the `docs` folder
|
||||
- Reference documentation, with all applicable tags
|
||||
- Cross-references and mentions in appropriate places
|
||||
- Credits entries in `CONTRIBUTORS.md` for all authors of the feature
|
||||
|
||||
If the feature requires platform-specific code, at minimum stubs must be added
|
||||
for the new platform function to all supported and experimental platforms.
|
||||
|
||||
If it adds a new callback, support for it must be added to `tests/event.c`.
|
||||
|
||||
If it adds a new monitor property, support for it must be added to
|
||||
`tests/monitor.c`.
|
||||
|
||||
If it adds a new OpenGL, OpenGL ES or Vulkan option or extension, support
|
||||
for it must be added to `tests/glfwinfo.c` and the behavior of the library when
|
||||
the extension is missing documented in `docs/compat.md`.
|
||||
|
||||
If you haven't already, read the excellent article [How to Write a Git Commit
|
||||
Message](https://chris.beams.io/posts/git-commit/).
|
||||
|
||||
Features will not be rejected because they don't include all the above parts,
|
||||
but please keep in mind that maintainer time is finite and that there are many
|
||||
other features and bugs to work on.
|
||||
|
||||
Please also keep in mind that any part of the public API that has been included
|
||||
in a release cannot be changed until the next _major_ version. Features can be
|
||||
added and existing parts can sometimes be overloaded (in the general sense of
|
||||
doing more things, not in the C++ sense), but code written to the API of one
|
||||
minor release should both compile and run on subsequent minor releases.
|
||||
|
2888
docs/Doxyfile.in
2888
docs/Doxyfile.in
File diff suppressed because it is too large
Load Diff
@ -1,115 +1,21 @@
|
||||
<doxygenlayout version="1.0">
|
||||
<!-- Generated by doxygen 1.8.3.1 -->
|
||||
<!-- Generated by doxygen 1.8.14 -->
|
||||
<!-- Navigation index tabs for HTML output -->
|
||||
<navindex>
|
||||
<tab type="mainpage" visible="yes" title="Introduction"/>
|
||||
<tab type="user" url="quick_guide.html" title="Tutorial"/>
|
||||
<tab type="pages" visible="yes" title="Guides" intro=""/>
|
||||
<tab type="modules" visible="yes" title="Reference" intro=""/>
|
||||
<tab type="namespaces" visible="yes" title="">
|
||||
<tab type="namespacelist" visible="yes" title="" intro=""/>
|
||||
<tab type="namespacemembers" visible="yes" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="classes" visible="no" title="">
|
||||
<tab type="classlist" visible="yes" title="" intro=""/>
|
||||
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
|
||||
<tab type="hierarchy" visible="yes" title="" intro=""/>
|
||||
<tab type="classmembers" visible="yes" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="files" visible="yes" title="Header Files">
|
||||
<tab type="filelist" visible="yes" title="" intro=""/>
|
||||
<tab type="globals" visible="yes" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="examples" visible="yes" title="" intro=""/>
|
||||
<tab type="topics" visible="yes" title="Reference" intro=""/>
|
||||
<tab type="filelist" visible="yes" title="Files"/>
|
||||
</navindex>
|
||||
|
||||
<!-- Layout definition for a class page -->
|
||||
<class>
|
||||
<briefdescription visible="yes"/>
|
||||
<includes visible="$SHOW_INCLUDE_FILES"/>
|
||||
<inheritancegraph visible="$CLASS_GRAPH"/>
|
||||
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
|
||||
<memberdecl>
|
||||
<nestedclasses visible="yes" title=""/>
|
||||
<publictypes title=""/>
|
||||
<publicslots title=""/>
|
||||
<signals title=""/>
|
||||
<publicmethods title=""/>
|
||||
<publicstaticmethods title=""/>
|
||||
<publicattributes title=""/>
|
||||
<publicstaticattributes title=""/>
|
||||
<protectedtypes title=""/>
|
||||
<protectedslots title=""/>
|
||||
<protectedmethods title=""/>
|
||||
<protectedstaticmethods title=""/>
|
||||
<protectedattributes title=""/>
|
||||
<protectedstaticattributes title=""/>
|
||||
<packagetypes title=""/>
|
||||
<packagemethods title=""/>
|
||||
<packagestaticmethods title=""/>
|
||||
<packageattributes title=""/>
|
||||
<packagestaticattributes title=""/>
|
||||
<properties title=""/>
|
||||
<events title=""/>
|
||||
<privatetypes title=""/>
|
||||
<privateslots title=""/>
|
||||
<privatemethods title=""/>
|
||||
<privatestaticmethods title=""/>
|
||||
<privateattributes title=""/>
|
||||
<privatestaticattributes title=""/>
|
||||
<friends title=""/>
|
||||
<related title="" subtitle=""/>
|
||||
<membergroups visible="yes"/>
|
||||
</memberdecl>
|
||||
<detaileddescription title=""/>
|
||||
<memberdef>
|
||||
<inlineclasses title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<constructors title=""/>
|
||||
<functions title=""/>
|
||||
<related title=""/>
|
||||
<variables title=""/>
|
||||
<properties title=""/>
|
||||
<events title=""/>
|
||||
</memberdef>
|
||||
<allmemberslink visible="yes"/>
|
||||
<usedfiles visible="$SHOW_USED_FILES"/>
|
||||
<authorsection visible="yes"/>
|
||||
</class>
|
||||
|
||||
<!-- Layout definition for a namespace page -->
|
||||
<namespace>
|
||||
<briefdescription visible="yes"/>
|
||||
<memberdecl>
|
||||
<nestednamespaces visible="yes" title=""/>
|
||||
<classes visible="yes" title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
<membergroups visible="yes"/>
|
||||
</memberdecl>
|
||||
<detaileddescription title=""/>
|
||||
<memberdef>
|
||||
<inlineclasses title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
</memberdef>
|
||||
<authorsection visible="yes"/>
|
||||
</namespace>
|
||||
|
||||
<!-- Layout definition for a file page -->
|
||||
<file>
|
||||
<briefdescription visible="yes"/>
|
||||
<detaileddescription title="Description"/>
|
||||
<includes visible="$SHOW_INCLUDE_FILES"/>
|
||||
<includegraph visible="$INCLUDE_GRAPH"/>
|
||||
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
|
||||
<sourcelink visible="yes"/>
|
||||
<memberdecl>
|
||||
<classes visible="yes" title=""/>
|
||||
<namespaces visible="yes" title=""/>
|
||||
<constantgroups visible="yes" title=""/>
|
||||
<defines title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
@ -117,9 +23,7 @@
|
||||
<variables title=""/>
|
||||
<membergroups visible="yes"/>
|
||||
</memberdecl>
|
||||
<detaileddescription title=""/>
|
||||
<memberdef>
|
||||
<inlineclasses title=""/>
|
||||
<defines title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
@ -131,46 +35,26 @@
|
||||
|
||||
<!-- Layout definition for a group page -->
|
||||
<group>
|
||||
<briefdescription visible="yes"/>
|
||||
<detaileddescription title="Description"/>
|
||||
<groupgraph visible="$GROUP_GRAPHS"/>
|
||||
<memberdecl>
|
||||
<nestedgroups visible="yes" title=""/>
|
||||
<dirs visible="yes" title=""/>
|
||||
<files visible="yes" title=""/>
|
||||
<namespaces visible="yes" title=""/>
|
||||
<classes visible="yes" title=""/>
|
||||
<defines title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<enumvalues title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
<signals title=""/>
|
||||
<publicslots title=""/>
|
||||
<protectedslots title=""/>
|
||||
<privateslots title=""/>
|
||||
<events title=""/>
|
||||
<properties title=""/>
|
||||
<friends title=""/>
|
||||
<membergroups visible="yes"/>
|
||||
</memberdecl>
|
||||
<memberdef>
|
||||
<pagedocs/>
|
||||
<inlineclasses title=""/>
|
||||
<defines title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<enumvalues title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
<signals title=""/>
|
||||
<publicslots title=""/>
|
||||
<protectedslots title=""/>
|
||||
<privateslots title=""/>
|
||||
<events title=""/>
|
||||
<properties title=""/>
|
||||
<friends title=""/>
|
||||
</memberdef>
|
||||
<authorsection visible="yes"/>
|
||||
</group>
|
||||
@ -178,7 +62,6 @@
|
||||
<!-- Layout definition for a directory page -->
|
||||
<directory>
|
||||
<briefdescription visible="yes"/>
|
||||
<directorygraph visible="yes"/>
|
||||
<memberdecl>
|
||||
<dirs visible="yes"/>
|
||||
<files visible="yes"/>
|
||||
|
13
docs/SUPPORT.md
Normal file
13
docs/SUPPORT.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Support resources
|
||||
|
||||
See the [latest documentation](https://www.glfw.org/docs/latest/) for tutorials,
|
||||
guides and the API reference.
|
||||
|
||||
If you have questions about using GLFW, we have a
|
||||
[forum](https://discourse.glfw.org/).
|
||||
|
||||
Bugs are reported to our [issue tracker](https://github.com/glfw/glfw/issues).
|
||||
Please check the [contribution
|
||||
guide](https://github.com/glfw/glfw/blob/master/docs/CONTRIBUTING.md) for
|
||||
information on what to include when reporting a bug.
|
||||
|
308
docs/build.dox
308
docs/build.dox
@ -1,308 +0,0 @@
|
||||
/*!
|
||||
|
||||
@page build Building applications
|
||||
|
||||
@tableofcontents
|
||||
|
||||
This is about compiling and linking applications that use GLFW. For information on
|
||||
how to write such applications, start with the [introductory tutorial](@ref quick).
|
||||
For information on how to compile the GLFW library itself, see the @ref compile
|
||||
guide.
|
||||
|
||||
This is not a tutorial on compilation or linking. It assumes basic
|
||||
understanding of how to compile and link a C program as well as how to use the
|
||||
specific compiler of your chosen development environment. The compilation
|
||||
and linking process should be explained in your C programming material and in
|
||||
the documentation for your development environment.
|
||||
|
||||
@section build_include Including the GLFW header file
|
||||
|
||||
In the source files of your application where you use OpenGL or GLFW, you should
|
||||
include the GLFW header file, i.e.:
|
||||
|
||||
@code
|
||||
#include <GLFW/glfw3.h>
|
||||
@endcode
|
||||
|
||||
The GLFW header declares the GLFW API and by default also includes the OpenGL
|
||||
header of your development environment, which in turn defines all the constants,
|
||||
types and function prototypes of the OpenGL API.
|
||||
|
||||
The GLFW header also defines everything necessary for your OpenGL header to
|
||||
function. For example, under Windows you are normally required to include
|
||||
`windows.h` before the OpenGL header, which would pollute your code namespace
|
||||
with the entire Win32 API.
|
||||
|
||||
Instead, the GLFW header takes care of this for you, not by including
|
||||
`windows.h`, but by duplicating only the very few necessary parts of it. It
|
||||
does this only when needed, so if `windows.h` _is_ included, the GLFW header
|
||||
does not try to redefine those symbols. The reverse is not true, i.e.
|
||||
`windows.h` cannot cope if any of its symbols have already been defined.
|
||||
|
||||
In other words:
|
||||
|
||||
- Do _not_ include the OpenGL headers yourself, as GLFW does this for you
|
||||
- Do _not_ include `windows.h` or other platform-specific headers unless you
|
||||
plan on using those APIs directly
|
||||
- If you _do_ need to include such headers, do it _before_ including
|
||||
the GLFW header and it will handle this
|
||||
|
||||
If you are using an OpenGL extension loading library such as
|
||||
[glad](https://github.com/Dav1dde/glad), the extension loader header should
|
||||
either be included _before_ the GLFW one, or the `GLFW_INCLUDE_NONE` macro
|
||||
(described below) should be defined.
|
||||
|
||||
|
||||
@subsection build_macros GLFW header option macros
|
||||
|
||||
These macros may be defined before the inclusion of the GLFW header and affect
|
||||
its behavior.
|
||||
|
||||
`GLFW_DLL` is required on Windows when using the GLFW DLL, to tell the compiler
|
||||
that the GLFW functions are defined in a DLL.
|
||||
|
||||
The following macros control which OpenGL or OpenGL ES API header is included.
|
||||
Only one of these may be defined at a time.
|
||||
|
||||
`GLFW_INCLUDE_GLCOREARB` makes the GLFW header include the modern
|
||||
`GL/glcorearb.h` header (`OpenGL/gl3.h` on OS X) instead of the regular OpenGL
|
||||
header.
|
||||
|
||||
`GLFW_INCLUDE_ES1` makes the GLFW header include the OpenGL ES 1.x `GLES/gl.h`
|
||||
header instead of the regular OpenGL header.
|
||||
|
||||
`GLFW_INCLUDE_ES2` makes the GLFW header include the OpenGL ES 2.0 `GLES2/gl2.h`
|
||||
header instead of the regular OpenGL header.
|
||||
|
||||
`GLFW_INCLUDE_ES3` makes the GLFW header include the OpenGL ES 3.0 `GLES3/gl3.h`
|
||||
header instead of the regular OpenGL header.
|
||||
|
||||
`GLFW_INCLUDE_ES31` makes the GLFW header include the OpenGL ES 3.1 `GLES3/gl31.h`
|
||||
header instead of the regular OpenGL header.
|
||||
|
||||
`GLFW_INCLUDE_NONE` makes the GLFW header not include any OpenGL or OpenGL ES API
|
||||
header. This is useful in combination with an extension loading library.
|
||||
|
||||
If none of the above inclusion macros are defined, the standard OpenGL `GL/gl.h`
|
||||
header (`OpenGL/gl.h` on OS X) is included.
|
||||
|
||||
The following macros control the inclusion of additional API headers. Any
|
||||
number of these may be defined simultaneously, and/or together with one of the
|
||||
above macros.
|
||||
|
||||
`GLFW_INCLUDE_GLEXT` makes the GLFW header include the appropriate extension
|
||||
header for the OpenGL or OpenGL ES header selected above after and in addition
|
||||
to that header.
|
||||
|
||||
`GLFW_INCLUDE_GLU` makes the header include the GLU header in addition to the
|
||||
header selected above. This should only be used with the standard OpenGL header
|
||||
and only for legacy code. GLU has been deprecated and should not be used in new
|
||||
code.
|
||||
|
||||
@note GLFW does not provide any of the API headers mentioned above. They must
|
||||
be provided by your development environment or your OpenGL or OpenGL ES SDK.
|
||||
|
||||
@note None of these macros may be defined during the compilation of GLFW itself.
|
||||
If your build includes GLFW and you define any these in your build files, make
|
||||
sure they are not applied to the GLFW sources.
|
||||
|
||||
|
||||
@section build_link Link with the right libraries
|
||||
|
||||
GLFW is essentially a wrapper of various platform-specific APIs and therefore
|
||||
needs to link against many different system libraries. If you are using GLFW as
|
||||
a shared library / dynamic library / DLL then it takes care of these links.
|
||||
However, if you are using GLFW as a static library then your executable will
|
||||
need to link against these libraries.
|
||||
|
||||
On Windows and OS X, the list of system libraries is static and can be
|
||||
hard-coded into your build environment. See the section for your development
|
||||
environment below. On Linux and other Unix-like operating systems, the list
|
||||
varies but can be retrieved in various ways as described below.
|
||||
|
||||
A good general introduction to linking is
|
||||
[Beginner's Guide to Linkers](http://www.lurklurk.org/linkers/linkers.html) by
|
||||
David Drysdale.
|
||||
|
||||
|
||||
@subsection build_link_win32 With MinGW or Visual C++ on Windows
|
||||
|
||||
The static version of the GLFW library is named `glfw3`. When using this
|
||||
version, it is also necessary to link with some libraries that GLFW uses.
|
||||
|
||||
When linking an application under Windows that uses the static version of GLFW,
|
||||
you must link with `opengl32`. On some versions of MinGW, you must also
|
||||
explicitly link with `gdi32`, while other versions of MinGW include it in the
|
||||
set of default libraries along with other dependencies like `user32` and
|
||||
`kernel32`. If you are using GLU, you must also link with `glu32`.
|
||||
|
||||
The link library for the GLFW DLL is named `glfw3dll`. When compiling an
|
||||
application that uses the DLL version of GLFW, you need to define the `GLFW_DLL`
|
||||
macro _before_ any inclusion of the GLFW header. This can be done either with
|
||||
a compiler switch or by defining it in your source code.
|
||||
|
||||
An application using the GLFW DLL does not need to link against any of its
|
||||
dependencies, but you still have to link against `opengl32` if your application
|
||||
uses OpenGL and `glu32` if it uses GLU.
|
||||
|
||||
|
||||
@subsection build_link_cmake_source With CMake and GLFW source
|
||||
|
||||
With just a few changes to your `CMakeLists.txt` you can have the GLFW source
|
||||
tree built along with your application.
|
||||
|
||||
Firstly, add the root directory of the GLFW source tree to your project. This
|
||||
will add the `glfw` target and the necessary cache variables to your project.
|
||||
|
||||
@code{.cmake}
|
||||
add_subdirectory(path/to/glfw)
|
||||
@endcode
|
||||
|
||||
To be able to include the GLFW header from your code, you need to tell the
|
||||
compiler where to find it.
|
||||
|
||||
@code{.cmake}
|
||||
include_directories(path/to/glfw/include)
|
||||
@endcode
|
||||
|
||||
Once GLFW has been added to the project, the `GLFW_LIBRARIES` cache variable
|
||||
contains all link-time dependencies of GLFW as it is currently configured. To
|
||||
link against GLFW, link against them and the `glfw` target.
|
||||
|
||||
@code{.cmake}
|
||||
target_link_libraries(myapp glfw ${GLFW_LIBRARIES})
|
||||
@endcode
|
||||
|
||||
Note that `GLFW_LIBRARIES` does not include GLU, as GLFW does not use it. If
|
||||
your application needs GLU, you can add it to the list of dependencies with the
|
||||
`OPENGL_glu_LIBRARY` cache variable, which is implicitly created when the GLFW
|
||||
CMake files look for OpenGL.
|
||||
|
||||
@code{.cmake}
|
||||
target_link_libraries(myapp glfw ${OPENGL_glu_LIBRARY} ${GLFW_LIBRARIES})
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection build_link_cmake_pkgconfig With CMake on Unix and installed GLFW binaries
|
||||
|
||||
CMake can import settings from pkg-config, which GLFW supports. When you
|
||||
installed GLFW, the pkg-config file `glfw3.pc` was installed along with it.
|
||||
|
||||
First you need to find the PkgConfig package. If this fails, you may need to
|
||||
install the pkg-config package for your distribution.
|
||||
|
||||
@code{.cmake}
|
||||
find_package(PkgConfig REQUIRED)
|
||||
@endcode
|
||||
|
||||
This creates the CMake commands to find pkg-config packages. Then you need to
|
||||
find the GLFW package.
|
||||
|
||||
@code{.cmake}
|
||||
pkg_search_module(GLFW REQUIRED glfw3)
|
||||
@endcode
|
||||
|
||||
This creates the CMake variables you need to use GLFW. To be able to include
|
||||
the GLFW header, you need to tell your compiler where it is.
|
||||
|
||||
@code{.cmake}
|
||||
include_directories(${GLFW_INCLUDE_DIRS})
|
||||
@endcode
|
||||
|
||||
You also need to link against the correct libraries. If you are using the
|
||||
shared library version of GLFW, use the `GLFW_LIBRARIES` variable.
|
||||
|
||||
@code{.cmake}
|
||||
target_link_libraries(simple ${GLFW_LIBRARIES})
|
||||
@endcode
|
||||
|
||||
If you are using the static library version of GLFW, use the
|
||||
`GLFW_STATIC_LIBRARIES` variable instead.
|
||||
|
||||
@code{.cmake}
|
||||
target_link_libraries(simple ${GLFW_STATIC_LIBRARIES})
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection build_link_pkgconfig With pkg-config on OS X or other Unix
|
||||
|
||||
GLFW supports [pkg-config](http://www.freedesktop.org/wiki/Software/pkg-config/),
|
||||
and the `glfw3.pc` pkf-config file is generated when the GLFW library is built
|
||||
and is installed along with it. A pkg-config file describes all necessary
|
||||
compile-time and link-time flags and dependencies needed to use a library. When
|
||||
they are updated or if they differ between systems, you will get the correct
|
||||
ones automatically.
|
||||
|
||||
A typical compile and link command-line when using the static version of the
|
||||
GLFW library may look like this:
|
||||
|
||||
@code{.sh}
|
||||
cc `pkg-config --cflags glfw3` -o myprog myprog.c `pkg-config --static --libs glfw3`
|
||||
@endcode
|
||||
|
||||
If you are using the shared version of the GLFW library, simply omit the
|
||||
`--static` flag.
|
||||
|
||||
@code{.sh}
|
||||
cc `pkg-config --cflags glfw3` -o myprog myprog.c `pkg-config --libs glfw3`
|
||||
@endcode
|
||||
|
||||
You can also use the `glfw3.pc` file without installing it first, by using the
|
||||
`PKG_CONFIG_PATH` environment variable.
|
||||
|
||||
@code{.sh}
|
||||
env PKG_CONFIG_PATH=path/to/glfw/src cc `pkg-config --cflags glfw3` -o myprog myprog.c `pkg-config --libs glfw3`
|
||||
@endcode
|
||||
|
||||
The dependencies do not include GLU, as GLFW does not need it. On OS X, GLU is
|
||||
built into the OpenGL framework, so if you need GLU you don't need to do
|
||||
anything extra. If you need GLU and are using Linux or BSD, you should add the
|
||||
`glu` pkg-config module.
|
||||
|
||||
@code{.sh}
|
||||
cc `pkg-config --cflags glfw3 glu` -o myprog myprog.c `pkg-config --libs glfw3 glu`
|
||||
@endcode
|
||||
|
||||
If you are using the static version of the GLFW library, make sure you don't link statically against GLU.
|
||||
|
||||
@code{.sh}
|
||||
cc `pkg-config --cflags glfw3 glu` -o myprog myprog.c `pkg-config --static --libs glfw3` `pkg-config --libs glu`
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection build_link_xcode With Xcode on OS X
|
||||
|
||||
If you are using the dynamic library version of GLFW, simply add it to the
|
||||
project dependencies.
|
||||
|
||||
If you are using the static library version of GLFW, add it and the Cocoa,
|
||||
OpenGL, IOKit and CoreVideo frameworks to the project as dependencies. They can
|
||||
all be found in `/System/Library/Frameworks`.
|
||||
|
||||
|
||||
@subsection build_link_osx With command-line on OS X
|
||||
|
||||
It is recommended that you use [pkg-config](@ref build_link_pkgconfig) when
|
||||
building from the command line on OS X. That way you will get any new
|
||||
dependencies added automatically. If you still wish to build manually, you need
|
||||
to add the required frameworks and libraries to your command-line yourself using
|
||||
the `-l` and `-framework` switches.
|
||||
|
||||
If you are using the dynamic GLFW library, which is named `libglfw.3.dylib`, do:
|
||||
|
||||
@code{.sh}
|
||||
cc -o myprog myprog.c -lglfw -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo
|
||||
@endcode
|
||||
|
||||
If you are using the static library, named `libglfw3.a`, substitute `-lglfw3`
|
||||
for `-lglfw`.
|
||||
|
||||
Note that you do not add the `.framework` extension to a framework when linking
|
||||
against it from the command-line.
|
||||
|
||||
The OpenGL framework contains both the OpenGL and GLU APIs, so there is nothing
|
||||
special to do when using GLU. Also note that even though your machine may have
|
||||
`libGL`-style OpenGL libraries, they are for use with the X Window System and
|
||||
will _not_ work with the OS X native version of GLFW.
|
||||
|
||||
*/
|
419
docs/build.md
Normal file
419
docs/build.md
Normal file
@ -0,0 +1,419 @@
|
||||
# Building applications {#build_guide}
|
||||
|
||||
[TOC]
|
||||
|
||||
This is about compiling and linking applications that use GLFW. For information on
|
||||
how to write such applications, start with the
|
||||
[introductory tutorial](@ref quick_guide). For information on how to compile
|
||||
the GLFW library itself, see @ref compile_guide.
|
||||
|
||||
This is not a tutorial on compilation or linking. It assumes basic
|
||||
understanding of how to compile and link a C program as well as how to use the
|
||||
specific compiler of your chosen development environment. The compilation
|
||||
and linking process should be explained in your C programming material and in
|
||||
the documentation for your development environment.
|
||||
|
||||
|
||||
## Including the GLFW header file {#build_include}
|
||||
|
||||
You should include the GLFW header in the source files where you use OpenGL or
|
||||
GLFW.
|
||||
|
||||
```c
|
||||
#include <GLFW/glfw3.h>
|
||||
```
|
||||
|
||||
This header defines all the constants and declares all the types and function
|
||||
prototypes of the GLFW API. By default, it also includes the OpenGL header from
|
||||
your development environment. See [option macros](@ref build_macros) below for
|
||||
how to select OpenGL ES headers and more.
|
||||
|
||||
The GLFW header also defines any platform-specific macros needed by your OpenGL
|
||||
header, so that it can be included without needing any window system headers.
|
||||
|
||||
It does this only when needed, so if window system headers are included, the
|
||||
GLFW header does not try to redefine those symbols. The reverse is not true,
|
||||
i.e. `windows.h` cannot cope if any Win32 symbols have already been defined.
|
||||
|
||||
In other words:
|
||||
|
||||
- Use the GLFW header to include OpenGL or OpenGL ES headers portably
|
||||
- Do not include window system headers unless you will use those APIs directly
|
||||
- If you do need such headers, include them before the GLFW header
|
||||
|
||||
If you are using an OpenGL extension loading library such as [glad][], the
|
||||
extension loader header should be included before the GLFW one. GLFW attempts
|
||||
to detect any OpenGL or OpenGL ES header or extension loader header included
|
||||
before it and will then disable the inclusion of the default OpenGL header.
|
||||
Most extension loaders also define macros that disable similar headers below it.
|
||||
|
||||
[glad]: https://github.com/Dav1dde/glad
|
||||
|
||||
```c
|
||||
#include <glad/gl.h>
|
||||
#include <GLFW/glfw3.h>
|
||||
```
|
||||
|
||||
Both of these mechanisms depend on the extension loader header defining a known
|
||||
macro. If yours doesn't or you don't know which one your users will pick, the
|
||||
@ref GLFW_INCLUDE_NONE macro will explicitly prevent the GLFW header from
|
||||
including the OpenGL header. This will also allow you to include the two
|
||||
headers in any order.
|
||||
|
||||
```c
|
||||
#define GLFW_INCLUDE_NONE
|
||||
#include <GLFW/glfw3.h>
|
||||
#include <glad/gl.h>
|
||||
```
|
||||
|
||||
|
||||
### GLFW header option macros {#build_macros}
|
||||
|
||||
These macros may be defined before the inclusion of the GLFW header and affect
|
||||
its behavior.
|
||||
|
||||
@anchor GLFW_DLL
|
||||
__GLFW_DLL__ is required on Windows when using the GLFW DLL, to tell the
|
||||
compiler that the GLFW functions are defined in a DLL.
|
||||
|
||||
The following macros control which OpenGL or OpenGL ES API header is included.
|
||||
Only one of these may be defined at a time.
|
||||
|
||||
@note GLFW does not provide any of the API headers mentioned below. They are
|
||||
provided by your development environment or your OpenGL, OpenGL ES or Vulkan
|
||||
SDK, and most of them can be downloaded from the [Khronos Registry][registry].
|
||||
|
||||
[registry]: https://www.khronos.org/registry/
|
||||
|
||||
@anchor GLFW_INCLUDE_GLCOREARB
|
||||
__GLFW_INCLUDE_GLCOREARB__ makes the GLFW header include the modern
|
||||
`GL/glcorearb.h` header (`OpenGL/gl3.h` on macOS) instead of the regular OpenGL
|
||||
header.
|
||||
|
||||
@anchor GLFW_INCLUDE_ES1
|
||||
__GLFW_INCLUDE_ES1__ makes the GLFW header include the OpenGL ES 1.x `GLES/gl.h`
|
||||
header instead of the regular OpenGL header.
|
||||
|
||||
@anchor GLFW_INCLUDE_ES2
|
||||
__GLFW_INCLUDE_ES2__ makes the GLFW header include the OpenGL ES 2.0
|
||||
`GLES2/gl2.h` header instead of the regular OpenGL header.
|
||||
|
||||
@anchor GLFW_INCLUDE_ES3
|
||||
__GLFW_INCLUDE_ES3__ makes the GLFW header include the OpenGL ES 3.0
|
||||
`GLES3/gl3.h` header instead of the regular OpenGL header.
|
||||
|
||||
@anchor GLFW_INCLUDE_ES31
|
||||
__GLFW_INCLUDE_ES31__ makes the GLFW header include the OpenGL ES 3.1
|
||||
`GLES3/gl31.h` header instead of the regular OpenGL header.
|
||||
|
||||
@anchor GLFW_INCLUDE_ES32
|
||||
__GLFW_INCLUDE_ES32__ makes the GLFW header include the OpenGL ES 3.2
|
||||
`GLES3/gl32.h` header instead of the regular OpenGL header.
|
||||
|
||||
@anchor GLFW_INCLUDE_NONE
|
||||
__GLFW_INCLUDE_NONE__ makes the GLFW header not include any OpenGL or OpenGL ES
|
||||
API header. This is useful in combination with an extension loading library.
|
||||
|
||||
If none of the above inclusion macros are defined, the standard OpenGL `GL/gl.h`
|
||||
header (`OpenGL/gl.h` on macOS) is included, unless GLFW detects the inclusion
|
||||
guards of any OpenGL, OpenGL ES or extension loader header it knows about.
|
||||
|
||||
The following macros control the inclusion of additional API headers. Any
|
||||
number of these may be defined simultaneously, and/or together with one of the
|
||||
above macros.
|
||||
|
||||
@anchor GLFW_INCLUDE_VULKAN
|
||||
__GLFW_INCLUDE_VULKAN__ makes the GLFW header include the Vulkan
|
||||
`vulkan/vulkan.h` header in addition to any selected OpenGL or OpenGL ES header.
|
||||
|
||||
@anchor GLFW_INCLUDE_GLEXT
|
||||
__GLFW_INCLUDE_GLEXT__ makes the GLFW header include the appropriate extension
|
||||
header for the OpenGL or OpenGL ES header selected above after and in addition
|
||||
to that header.
|
||||
|
||||
@anchor GLFW_INCLUDE_GLU
|
||||
__GLFW_INCLUDE_GLU__ makes the header include the GLU header in addition to the
|
||||
header selected above. This should only be used with the standard OpenGL header
|
||||
and only for compatibility with legacy code. GLU has been deprecated and should
|
||||
not be used in new code.
|
||||
|
||||
@note None of these macros may be defined during the compilation of GLFW itself.
|
||||
If your build includes GLFW and you define any these in your build files, make
|
||||
sure they are not applied to the GLFW sources.
|
||||
|
||||
|
||||
## Link with the right libraries {#build_link}
|
||||
|
||||
GLFW is essentially a wrapper of various platform-specific APIs and therefore
|
||||
needs to link against many different system libraries. If you are using GLFW as
|
||||
a shared library / dynamic library / DLL then it takes care of these links.
|
||||
However, if you are using GLFW as a static library then your executable will
|
||||
need to link against these libraries.
|
||||
|
||||
On Windows and macOS, the list of system libraries is static and can be
|
||||
hard-coded into your build environment. See the section for your development
|
||||
environment below. On Linux and other Unix-like operating systems, the list
|
||||
varies but can be retrieved in various ways as described below.
|
||||
|
||||
A good general introduction to linking is [Beginner's Guide to
|
||||
Linkers][linker_guide] by David Drysdale.
|
||||
|
||||
[linker_guide]: https://www.lurklurk.org/linkers/linkers.html
|
||||
|
||||
|
||||
### With Visual C++ and GLFW binaries {#build_link_win32}
|
||||
|
||||
If you are using a downloaded [binary
|
||||
archive](https://www.glfw.org/download.html), first make sure you have the
|
||||
archive matching the architecture you are building for (32-bit or 64-bit), or
|
||||
you will get link errors. Also make sure you are using the binaries for your
|
||||
version of Visual C++ or you may get other link errors.
|
||||
|
||||
There are two version of the static GLFW library in the binary archive, because
|
||||
it needs to use the same base run-time library variant as the rest of your
|
||||
executable.
|
||||
|
||||
One is named `glfw3.lib` and is for projects with the _Runtime Library_ project
|
||||
option set to _Multi-threaded DLL_ or _Multi-threaded Debug DLL_. The other is
|
||||
named `glfw3_mt.lib` and is for projects with _Runtime Library_ set to
|
||||
_Multi-threaded_ or _Multi-threaded Debug_. To use the static GLFW library you
|
||||
will need to add `path/to/glfw3.lib` or `path/to/glfw3_mt.lib` to the
|
||||
_Additional Dependencies_ project option.
|
||||
|
||||
If you compiled a GLFW static library yourself then there will only be one,
|
||||
named `glfw3.lib`, and you have to make sure the run-time library variant
|
||||
matches.
|
||||
|
||||
The DLL version of the GLFW library is named `glfw3.dll`, but you will be
|
||||
linking against the `glfw3dll.lib` link library. To use the DLL you will need
|
||||
to add `path/to/glfw3dll.lib` to the _Additional Dependencies_ project option.
|
||||
All of its dependencies are already listed there by default, but when building
|
||||
with the DLL version of GLFW, you also need to define the @ref GLFW_DLL. This
|
||||
can be done either in the _Preprocessor Definitions_ project option or by
|
||||
defining it in your source code before including the GLFW header.
|
||||
|
||||
```c
|
||||
#define GLFW_DLL
|
||||
#include <GLFW/glfw3.h>
|
||||
```
|
||||
|
||||
All link-time dependencies for GLFW are already listed in the _Additional
|
||||
Dependencies_ option by default.
|
||||
|
||||
|
||||
### With MinGW-w64 and GLFW binaries {#build_link_mingw}
|
||||
|
||||
This is intended for building a program from the command-line or by writing
|
||||
a makefile, on Windows with [MinGW-w64][] and GLFW binaries. These can be from
|
||||
a downloaded and extracted [binary archive](https://www.glfw.org/download.html)
|
||||
or by compiling GLFW yourself. The paths below assume a binary archive is used.
|
||||
|
||||
If you are using a downloaded binary archive, first make sure you have the
|
||||
archive matching the architecture you are building for (32-bit or 64-bit) or you
|
||||
will get link errors.
|
||||
|
||||
Note that the order of source files and libraries matter for GCC. Dependencies
|
||||
must be listed after the files that depend on them. Any source files that
|
||||
depend on GLFW must be listed before the GLFW library. GLFW in turn depends on
|
||||
`gdi32` and must be listed before it.
|
||||
|
||||
[MinGW-w64]: https://www.mingw-w64.org/
|
||||
|
||||
If you are using the static version of the GLFW library, which is named
|
||||
`libglfw3.a`, do:
|
||||
|
||||
```sh
|
||||
gcc -o myprog myprog.c -I path/to/glfw/include path/to/glfw/lib-mingw-w64/libglfw3.a -lgdi32
|
||||
```
|
||||
|
||||
If you are using the DLL version of the GLFW library, which is named
|
||||
`glfw3.dll`, you will need to use the `libglfw3dll.a` link library.
|
||||
|
||||
```sh
|
||||
gcc -o myprog myprog.c -I path/to/glfw/include path/to/glfw/lib-mingw-w64/libglfw3dll.a -lgdi32
|
||||
```
|
||||
|
||||
The resulting executable will need to find `glfw3.dll` to run, typically by
|
||||
keeping both files in the same directory.
|
||||
|
||||
When you are building with the DLL version of GLFW, you will also need to define
|
||||
the @ref GLFW_DLL macro. This can be done in your source files, as long as it
|
||||
done before including the GLFW header:
|
||||
|
||||
```c
|
||||
#define GLFW_DLL
|
||||
#include <GLFW/glfw3.h>
|
||||
```
|
||||
|
||||
It can also be done on the command-line:
|
||||
|
||||
```sh
|
||||
gcc -o myprog myprog.c -D GLFW_DLL -I path/to/glfw/include path/to/glfw/lib-mingw-w64/libglfw3dll.a -lgdi32
|
||||
```
|
||||
|
||||
|
||||
### With CMake and GLFW source {#build_link_cmake_source}
|
||||
|
||||
This section is about using CMake to compile and link GLFW along with your
|
||||
application. If you want to use an installed binary instead, see @ref
|
||||
build_link_cmake_package.
|
||||
|
||||
With a few changes to your `CMakeLists.txt` you can have the GLFW source tree
|
||||
built along with your application.
|
||||
|
||||
Add the root directory of the GLFW source tree to your project. This will add
|
||||
the `glfw` target to your project.
|
||||
|
||||
```cmake
|
||||
add_subdirectory(path/to/glfw)
|
||||
```
|
||||
|
||||
Once GLFW has been added, link your application against the `glfw` target.
|
||||
This adds the GLFW library and its link-time dependencies as it is currently
|
||||
configured, the include directory for the GLFW header and, when applicable, the
|
||||
@ref GLFW_DLL macro.
|
||||
|
||||
```cmake
|
||||
target_link_libraries(myapp glfw)
|
||||
```
|
||||
|
||||
Note that the `glfw` target does not depend on OpenGL, as GLFW loads any OpenGL,
|
||||
OpenGL ES or Vulkan libraries it needs at runtime. If your application calls
|
||||
OpenGL directly, instead of using a modern
|
||||
[extension loader library](@ref context_glext_auto), use the OpenGL CMake
|
||||
package.
|
||||
|
||||
```cmake
|
||||
find_package(OpenGL REQUIRED)
|
||||
```
|
||||
|
||||
If OpenGL is found, the `OpenGL::GL` target is added to your project, containing
|
||||
library and include directory paths. Link against this like any other library.
|
||||
|
||||
```cmake
|
||||
target_link_libraries(myapp OpenGL::GL)
|
||||
```
|
||||
|
||||
For a minimal example of a program and GLFW sources built with CMake, see the
|
||||
[GLFW CMake Starter][cmake_starter] on GitHub.
|
||||
|
||||
[cmake_starter]: https://github.com/juliettef/GLFW-CMake-starter
|
||||
|
||||
|
||||
### With CMake and installed GLFW binaries {#build_link_cmake_package}
|
||||
|
||||
This section is about using CMake to link GLFW after it has been built and
|
||||
installed. If you want to build it along with your application instead, see
|
||||
@ref build_link_cmake_source.
|
||||
|
||||
With a few changes to your `CMakeLists.txt` you can locate the package and
|
||||
target files generated when GLFW is installed.
|
||||
|
||||
```cmake
|
||||
find_package(glfw3 3.5 REQUIRED)
|
||||
```
|
||||
|
||||
Once GLFW has been added to the project, link against it with the `glfw` target.
|
||||
This adds the GLFW library and its link-time dependencies, the include directory
|
||||
for the GLFW header and, when applicable, the @ref GLFW_DLL macro.
|
||||
|
||||
```cmake
|
||||
target_link_libraries(myapp glfw)
|
||||
```
|
||||
|
||||
Note that the `glfw` target does not depend on OpenGL, as GLFW loads any OpenGL,
|
||||
OpenGL ES or Vulkan libraries it needs at runtime. If your application calls
|
||||
OpenGL directly, instead of using a modern
|
||||
[extension loader library](@ref context_glext_auto), use the OpenGL CMake
|
||||
package.
|
||||
|
||||
```cmake
|
||||
find_package(OpenGL REQUIRED)
|
||||
```
|
||||
|
||||
If OpenGL is found, the `OpenGL::GL` target is added to your project, containing
|
||||
library and include directory paths. Link against this like any other library.
|
||||
|
||||
```cmake
|
||||
target_link_libraries(myapp OpenGL::GL)
|
||||
```
|
||||
|
||||
|
||||
### With pkg-config and GLFW binaries on Unix {#build_link_pkgconfig}
|
||||
|
||||
This is intended for building a program from the command-line or by writing
|
||||
a makefile, on macOS or any Unix-like system like Linux, FreeBSD and Cygwin.
|
||||
|
||||
GLFW supports [pkg-config][], and the `glfw3.pc` pkg-config file is generated
|
||||
when the GLFW library is built and is installed along with it. A pkg-config
|
||||
file describes all necessary compile-time and link-time flags and dependencies
|
||||
needed to use a library. When they are updated or if they differ between
|
||||
systems, you will get the correct ones automatically.
|
||||
|
||||
[pkg-config]: https://www.freedesktop.org/wiki/Software/pkg-config/
|
||||
|
||||
A typical compile and link command-line when using the static version of the
|
||||
GLFW library may look like this:
|
||||
|
||||
```sh
|
||||
cc $(pkg-config --cflags glfw3) -o myprog myprog.c $(pkg-config --static --libs glfw3)
|
||||
```
|
||||
|
||||
If you are using the shared version of the GLFW library, omit the `--static`
|
||||
flag.
|
||||
|
||||
```sh
|
||||
cc $(pkg-config --cflags glfw3) -o myprog myprog.c $(pkg-config --libs glfw3)
|
||||
```
|
||||
|
||||
You can also use the `glfw3.pc` file without installing it first, by using the
|
||||
`PKG_CONFIG_PATH` environment variable.
|
||||
|
||||
```sh
|
||||
env PKG_CONFIG_PATH=path/to/glfw/src cc $(pkg-config --cflags glfw3) -o myprog myprog.c $(pkg-config --libs glfw3)
|
||||
```
|
||||
|
||||
The dependencies do not include OpenGL, as GLFW loads any OpenGL, OpenGL ES or
|
||||
Vulkan libraries it needs at runtime. If your application calls OpenGL
|
||||
directly, instead of using a modern
|
||||
[extension loader library](@ref context_glext_auto), you should add the `gl`
|
||||
pkg-config package.
|
||||
|
||||
```sh
|
||||
cc $(pkg-config --cflags glfw3 gl) -o myprog myprog.c $(pkg-config --libs glfw3 gl)
|
||||
```
|
||||
|
||||
|
||||
### With Xcode on macOS {#build_link_xcode}
|
||||
|
||||
If you are using the dynamic library version of GLFW, add it to the project
|
||||
dependencies.
|
||||
|
||||
If you are using the static library version of GLFW, add it and the Cocoa,
|
||||
OpenGL, IOKit and QuartzCore frameworks to the project as dependencies. They
|
||||
can all be found in `/System/Library/Frameworks`.
|
||||
|
||||
|
||||
### With command-line or makefile on macOS {#build_link_osx}
|
||||
|
||||
It is recommended that you use [pkg-config](@ref build_link_pkgconfig) when
|
||||
using installed GLFW binaries from the command line on macOS. That way you will
|
||||
get any new dependencies added automatically. If you still wish to build
|
||||
manually, you need to add the required frameworks and libraries to your
|
||||
command-line yourself using the `-l` and `-framework` switches.
|
||||
|
||||
If you are using the dynamic GLFW library, which is named `libglfw.3.dylib`, do:
|
||||
|
||||
```sh
|
||||
cc -o myprog myprog.c -lglfw -framework Cocoa -framework OpenGL -framework IOKit -framework QuartzCore
|
||||
```
|
||||
|
||||
If you are using the static library, named `libglfw3.a`, substitute `-lglfw3`
|
||||
for `-lglfw`.
|
||||
|
||||
Note that you do not add the `.framework` extension to a framework when linking
|
||||
against it from the command-line.
|
||||
|
||||
@note Your machine may have `libGL.*.dylib` style OpenGL library, but that is
|
||||
for the X Window System and will not work with the macOS native version of GLFW.
|
||||
|
179
docs/compat.dox
179
docs/compat.dox
@ -1,179 +0,0 @@
|
||||
/*!
|
||||
|
||||
@page compat Standards conformance
|
||||
|
||||
@tableofcontents
|
||||
|
||||
This guide describes the various API extensions used by this version of GLFW.
|
||||
It lists what are essentially implementation details, but which are nonetheless
|
||||
vital knowledge for developers intending to deploy their applications on a wide
|
||||
range of machines.
|
||||
|
||||
The information in this guide is not a part of GLFW API, but merely
|
||||
preconditions for some parts of the library to function on a given machine. Any
|
||||
part of this information may change in future versions of GLFW and that will not
|
||||
be considered a breaking API change.
|
||||
|
||||
|
||||
@section compat_x11 X11 extensions, protocols and IPC standards
|
||||
|
||||
As GLFW uses Xlib directly, without any intervening toolkit
|
||||
library, it has sole responsibility for interacting well with the many and
|
||||
varied window managers in use on Unix-like systems. In order for applications
|
||||
and window managers to work well together, a number of standards and
|
||||
conventions have been developed that regulate behavior outside the scope of the
|
||||
X11 API; most importantly the
|
||||
[Inter-Client Communication Conventions Manual](http://www.tronche.com/gui/x/icccm/)
|
||||
(ICCCM) and
|
||||
[Extended Window Manager Hints](http://standards.freedesktop.org/wm-spec/wm-spec-latest.html)
|
||||
(EWMH) standards.
|
||||
|
||||
GLFW uses the `_MOTIF_WM_HINTS` window property to support borderless windows.
|
||||
If the running window manager does not support this property, the
|
||||
`GLFW_DECORATED` hint will have no effect.
|
||||
|
||||
GLFW uses the ICCCM `WM_DELETE_WINDOW` protocol to intercept the user
|
||||
attempting to close the GLFW window. If the running window manager does not
|
||||
support this protocol, the close callback will never be called.
|
||||
|
||||
GLFW uses the EWMH `_NET_WM_PING` protocol, allowing the window manager notify
|
||||
the user when the application has stopped responding, i.e. when it has ceased to
|
||||
process events. If the running window manager does not support this protocol,
|
||||
the user will not be notified if the application locks up.
|
||||
|
||||
GLFW uses the EWMH `_NET_WM_STATE_FULLSCREEN` window state to tell the window
|
||||
manager to make the GLFW window full screen. If the running window manager does
|
||||
not support this state, full screen windows may not work properly. GLFW has
|
||||
a fallback code path in case this state is unavailable, but every window manager
|
||||
behaves slightly differently in this regard.
|
||||
|
||||
GLFW uses the EWMH `_NET_WM_BYPASS_COMPOSITOR` window property to tell a
|
||||
compositing window manager to un-redirect full screen GLFW windows. If the
|
||||
running window manager uses compositing but does not support this property then
|
||||
additional copying may be performed for each buffer swap of full screen windows.
|
||||
|
||||
GLFW uses the
|
||||
[clipboard manager protocol](http://www.freedesktop.org/wiki/ClipboardManager/)
|
||||
to push a clipboard string (i.e. selection) owned by a GLFW window about to be
|
||||
destroyed to the clipboard manager. If there is no running clipboard manager,
|
||||
the clipboard string will be unavailable once the window has been destroyed.
|
||||
|
||||
GLFW uses the
|
||||
[X drag-and-drop protocol](http://www.freedesktop.org/wiki/Specifications/XDND/)
|
||||
to provide file drop events. If the application originating the drag does not
|
||||
support this protocol, drag and drop will not work.
|
||||
|
||||
GLFW uses the XInput 2 extension to provide sub-pixel cursor motion events. If
|
||||
the running X server does not support this version of this extension, cursor
|
||||
motion will be snapped to the pixel grid.
|
||||
|
||||
GLFW uses the XRandR 1.3 extension to provide multi-monitor support. If the
|
||||
running X server does not support this version of this extension, multi-monitor
|
||||
support will not function and only a single, desktop-spanning monitor will be
|
||||
reported.
|
||||
|
||||
GLFW uses the XRandR 1.3 and Xf86vidmode extensions to provide gamma ramp
|
||||
support. If the running X server does not support either or both of these
|
||||
extensions, gamma ramp support will not function.
|
||||
|
||||
GLFW uses the Xkb extension and detectable auto-repeat to provide keyboard
|
||||
input. If the running X server does not support this extension, a non-Xkb
|
||||
fallback path is used.
|
||||
|
||||
|
||||
@section compat_glx GLX extensions
|
||||
|
||||
The GLX API is the default API used to create OpenGL contexts on Unix-like
|
||||
systems using the X Window System.
|
||||
|
||||
GLFW uses the GLX 1.3 `GLXFBConfig` functions to enumerate and select framebuffer pixel
|
||||
formats. If GLX 1.3 is not supported, @ref glfwInit will fail.
|
||||
|
||||
GLFW uses the `GLX_MESA_swap_control,` `GLX_EXT_swap_control` and
|
||||
`GLX_SGI_swap_control` extensions to provide vertical retrace synchronization
|
||||
(or _vsync_), in that order of preference. Where none of these extension are
|
||||
available, calling @ref glfwSwapInterval will have no effect.
|
||||
|
||||
GLFW uses the `GLX_ARB_multisample` extension to create contexts with
|
||||
multisampling anti-aliasing. Where this extension is unavailable, the
|
||||
`GLFW_SAMPLES` hint will have no effect.
|
||||
|
||||
GLFW uses the `GLX_ARB_create_context` extension when available, even when
|
||||
creating OpenGL contexts of version 2.1 and below. Where this extension is
|
||||
unavailable, the `GLFW_CONTEXT_VERSION_MAJOR` and `GLFW_CONTEXT_VERSION_MINOR`
|
||||
hints will only be partially supported, the `GLFW_OPENGL_DEBUG_CONTEXT` hint
|
||||
will have no effect, and setting the `GLFW_OPENGL_PROFILE` or
|
||||
`GLFW_OPENGL_FORWARD_COMPAT` hints to `GL_TRUE` will cause @ref
|
||||
glfwCreateWindow to fail.
|
||||
|
||||
GLFW uses the `GLX_ARB_create_context_profile` extension to provide support for
|
||||
context profiles. Where this extension is unavailable, setting the
|
||||
`GLFW_OPENGL_PROFILE` hint to anything but `GLFW_OPENGL_ANY_PROFILE`, or setting
|
||||
`GLFW_CLIENT_API` to anything but `GLFW_OPENGL_API` will cause @ref
|
||||
glfwCreateWindow to fail.
|
||||
|
||||
GLFW uses the `GLX_ARB_context_flush_control` extension to provide control over
|
||||
whether a context is flushed when it is released (made non-current). Where this
|
||||
extension is unavailable, the `GLFW_CONTEXT_RELEASE_BEHAVIOR` hint will have no
|
||||
effect and the context will always be flushed when released.
|
||||
|
||||
@section compat_wgl WGL extensions
|
||||
|
||||
The WGL API is used to create OpenGL contexts on Microsoft Windows and other
|
||||
implementations of the Win32 API, such as Wine.
|
||||
|
||||
GLFW uses either the `WGL_EXT_extension_string` or the
|
||||
`WGL_ARB_extension_string` extension to check for the presence of all other WGL
|
||||
extensions listed below. If both are available, the EXT one is preferred. If
|
||||
neither is available, no other extensions are used and many GLFW features
|
||||
related to context creation will have no effect or cause errors when used.
|
||||
|
||||
GLFW uses the `WGL_EXT_swap_control` extension to provide vertical retrace
|
||||
synchronization (or _vsync_). Where this extension is unavailable, calling @ref
|
||||
glfwSwapInterval will have no effect.
|
||||
|
||||
GLFW uses the `WGL_ARB_pixel_format` and `WGL_ARB_multisample` extensions to
|
||||
create contexts with multisampling anti-aliasing. Where these extensions are
|
||||
unavailable, the `GLFW_SAMPLES` hint will have no effect.
|
||||
|
||||
GLFW uses the `WGL_ARB_create_context` extension when available, even when
|
||||
creating OpenGL contexts of version 2.1 and below. Where this extension is
|
||||
unavailable, the `GLFW_CONTEXT_VERSION_MAJOR` and `GLFW_CONTEXT_VERSION_MINOR`
|
||||
hints will only be partially supported, the `GLFW_OPENGL_DEBUG_CONTEXT` hint
|
||||
will have no effect, and setting the `GLFW_OPENGL_PROFILE` or
|
||||
`GLFW_OPENGL_FORWARD_COMPAT` hints to `GL_TRUE` will cause @ref
|
||||
glfwCreateWindow to fail.
|
||||
|
||||
GLFW uses the `WGL_ARB_create_context_profile` extension to provide support for
|
||||
context profiles. Where this extension is unavailable, setting the
|
||||
`GLFW_OPENGL_PROFILE` hint to anything but `GLFW_OPENGL_ANY_PROFILE` will cause
|
||||
@ref glfwCreateWindow to fail.
|
||||
|
||||
GLFW uses the `WGL_ARB_context_flush_control` extension to provide control over
|
||||
whether a context is flushed when it is released (made non-current). Where this
|
||||
extension is unavailable, the `GLFW_CONTEXT_RELEASE_BEHAVIOR` hint will have no
|
||||
effect and the context will always be flushed when released.
|
||||
|
||||
@section compat_osx OpenGL 3.2 and later on OS X
|
||||
|
||||
Support for OpenGL 3.2 and above was introduced with OS X 10.7 and even then
|
||||
only forward-compatible, core profile contexts are supported. Support for
|
||||
OpenGL 4.1 was introduced with OS X 10.9, also limited to forward-compatible,
|
||||
core profile contexts. There is also still no mechanism for requesting debug
|
||||
contexts. Versions of Mac OS X earlier than 10.7 support at most OpenGL
|
||||
version 2.1.
|
||||
|
||||
Because of this, on OS X 10.7 and later, the `GLFW_CONTEXT_VERSION_MAJOR` and
|
||||
`GLFW_CONTEXT_VERSION_MINOR` hints will cause @ref glfwCreateWindow to fail if
|
||||
given version 3.0 or 3.1, the `GLFW_OPENGL_FORWARD_COMPAT` hint must be set to
|
||||
`GL_TRUE` and the `GLFW_OPENGL_PROFILE` hint must be set to
|
||||
`GLFW_OPENGL_CORE_PROFILE` when creating OpenGL 3.2 and later contexts and the
|
||||
`GLFW_OPENGL_DEBUG_CONTEXT` hint is ignored.
|
||||
|
||||
Also, on Mac OS X 10.6 and below, the `GLFW_CONTEXT_VERSION_MAJOR` and
|
||||
`GLFW_CONTEXT_VERSION_MINOR` hints will fail if given a version above 2.1,
|
||||
setting the `GLFW_OPENGL_PROFILE` or `GLFW_OPENGL_FORWARD_COMPAT` hints to
|
||||
a non-default value will cause @ref glfwCreateWindow to fail and the
|
||||
`GLFW_OPENGL_DEBUG_CONTEXT` hint is ignored.
|
||||
|
||||
*/
|
303
docs/compat.md
Normal file
303
docs/compat.md
Normal file
@ -0,0 +1,303 @@
|
||||
# Standards conformance {#compat_guide}
|
||||
|
||||
[TOC]
|
||||
|
||||
This guide describes the various API extensions used by this version of GLFW.
|
||||
It lists what are essentially implementation details, but which are nonetheless
|
||||
vital knowledge for developers intending to deploy their applications on a wide
|
||||
range of machines.
|
||||
|
||||
The information in this guide is not a part of GLFW API, but merely
|
||||
preconditions for some parts of the library to function on a given machine. Any
|
||||
part of this information may change in future versions of GLFW and that will not
|
||||
be considered a breaking API change.
|
||||
|
||||
|
||||
## X11 extensions, protocols and IPC standards {#compat_x11}
|
||||
|
||||
As GLFW uses Xlib directly, without any intervening toolkit library, it has sole
|
||||
responsibility for interacting well with the many and varied window managers in
|
||||
use on Unix-like systems. In order for applications and window managers to work
|
||||
well together, a number of standards and conventions have been developed that
|
||||
regulate behavior outside the scope of the X11 API; most importantly the
|
||||
[Inter-Client Communication Conventions Manual][ICCCM] (ICCCM) and [Extended
|
||||
Window Manager Hints][EWMH] (EWMH) standards.
|
||||
|
||||
[ICCCM]: https://www.tronche.com/gui/x/icccm/
|
||||
[EWMH]: https://standards.freedesktop.org/wm-spec/wm-spec-latest.html
|
||||
|
||||
GLFW uses the `_MOTIF_WM_HINTS` window property to support borderless windows.
|
||||
If the running window manager does not support this property, the
|
||||
`GLFW_DECORATED` hint will have no effect.
|
||||
|
||||
GLFW uses the ICCCM `WM_DELETE_WINDOW` protocol to intercept the user
|
||||
attempting to close the GLFW window. If the running window manager does not
|
||||
support this protocol, the close callback will never be called.
|
||||
|
||||
GLFW uses the EWMH `_NET_WM_PING` protocol, allowing the window manager notify
|
||||
the user when the application has stopped responding, i.e. when it has ceased to
|
||||
process events. If the running window manager does not support this protocol,
|
||||
the user will not be notified if the application locks up.
|
||||
|
||||
GLFW uses the EWMH `_NET_WM_STATE_FULLSCREEN` window state to tell the window
|
||||
manager to make the GLFW window full screen. If the running window manager does
|
||||
not support this state, full screen windows may not work properly. GLFW has
|
||||
a fallback code path in case this state is unavailable, but every window manager
|
||||
behaves slightly differently in this regard.
|
||||
|
||||
GLFW uses the EWMH `_NET_WM_BYPASS_COMPOSITOR` window property to tell a
|
||||
compositing window manager to un-redirect full screen GLFW windows. If the
|
||||
running window manager uses compositing but does not support this property then
|
||||
additional copying may be performed for each buffer swap of full screen windows.
|
||||
|
||||
GLFW uses the [clipboard manager protocol][ClipboardManager] to push a clipboard
|
||||
string (i.e. selection) owned by a GLFW window about to be destroyed to the
|
||||
clipboard manager. If there is no running clipboard manager, the clipboard
|
||||
string will be unavailable once the window has been destroyed.
|
||||
|
||||
[clipboardManager]: https://www.freedesktop.org/wiki/ClipboardManager/
|
||||
|
||||
GLFW uses the [X drag-and-drop protocol][XDND] to provide file drop events. If
|
||||
the application originating the drag does not support this protocol, drag and
|
||||
drop will not work.
|
||||
|
||||
[XDND]: https://www.freedesktop.org/wiki/Specifications/XDND/
|
||||
|
||||
GLFW uses the XRandR 1.3 extension to provide multi-monitor support. If the
|
||||
running X server does not support this version of this extension, multi-monitor
|
||||
support will not function and only a single, desktop-spanning monitor will be
|
||||
reported.
|
||||
|
||||
GLFW uses the XRandR 1.3 and Xf86vidmode extensions to provide gamma ramp
|
||||
support. If the running X server does not support either or both of these
|
||||
extensions, gamma ramp support will not function.
|
||||
|
||||
GLFW uses the Xkb extension and detectable auto-repeat to provide keyboard
|
||||
input. If the running X server does not support this extension, a non-Xkb
|
||||
fallback path is used.
|
||||
|
||||
GLFW uses the XInput2 extension to provide raw, non-accelerated mouse motion
|
||||
when the cursor is disabled. If the running X server does not support this
|
||||
extension, regular accelerated mouse motion will be used.
|
||||
|
||||
GLFW uses both the XRender extension and the compositing manager to support
|
||||
transparent window framebuffers. If the running X server does not support this
|
||||
extension or there is no running compositing manager, the
|
||||
`GLFW_TRANSPARENT_FRAMEBUFFER` framebuffer hint will have no effect.
|
||||
|
||||
GLFW uses both the Xcursor extension and the freedesktop cursor conventions to
|
||||
provide an expanded set of standard cursor shapes. If the running X server does
|
||||
not support this extension or the current cursor theme does not support the
|
||||
conventions, the `GLFW_RESIZE_NWSE_CURSOR`, `GLFW_RESIZE_NESW_CURSOR` and
|
||||
`GLFW_NOT_ALLOWED_CURSOR` shapes will not be available and other shapes may use
|
||||
legacy images.
|
||||
|
||||
|
||||
## Wayland protocols and IPC standards {#compat_wayland}
|
||||
|
||||
As GLFW uses libwayland directly, without any intervening toolkit library, it
|
||||
has sole responsibility for interacting well with every compositor in use on
|
||||
Unix-like systems. Most of the features are provided by the core protocol,
|
||||
while cursor support is provided by the libwayland-cursor helper library, EGL
|
||||
integration by libwayland-egl, and keyboard handling by
|
||||
[libxkbcommon](https://xkbcommon.org/). In addition, GLFW uses some additional
|
||||
Wayland protocols to implement certain features if the compositor supports them.
|
||||
|
||||
GLFW uses xkbcommon 0.5.0 to provide key and text input support. Earlier
|
||||
versions are not supported.
|
||||
|
||||
GLFW uses the [xdg-shell][] protocol to provide better window management. This
|
||||
protocol is mandatory for GLFW to display a window.
|
||||
|
||||
[xdg-shell]: https://wayland.app/protocols/xdg-shell
|
||||
|
||||
GLFW uses the [relative-pointer-unstable-v1][] protocol alongside the
|
||||
[pointer-constraints-unstable-v1][] protocol to implement disabled cursor. If
|
||||
the running compositor does not support both of these protocols, disabling the
|
||||
cursor will have no effect.
|
||||
|
||||
[relative-pointer-unstable-v1]: https://wayland.app/protocols/relative-pointer-unstable-v1
|
||||
[pointer-constraints-unstable-v1]: https://wayland.app/protocols/pointer-constraints-unstable-v1
|
||||
|
||||
GLFW uses the [idle-inhibit-unstable-v1][] protocol to prohibit the screensaver
|
||||
from starting. If the running compositor does not support this protocol, the
|
||||
screensaver may start even for full screen windows.
|
||||
|
||||
[idle-inhibit-unstable-v1]: https://wayland.app/protocols/idle-inhibit-unstable-v1
|
||||
|
||||
GLFW uses the [libdecor][] library for window decorations, where available.
|
||||
This in turn provides good quality client-side decorations (drawn by the
|
||||
application) on desktop systems that do not support server-side decorations
|
||||
(drawn by the window manager). On systems that do not provide either libdecor
|
||||
or xdg-decoration, very basic window decorations are provided. These do not
|
||||
include the window title or any caption buttons.
|
||||
|
||||
[libdecor]: https://gitlab.freedesktop.org/libdecor/libdecor
|
||||
|
||||
GLFW uses the [xdg-decoration-unstable-v1][] protocol to request decorations to
|
||||
be drawn around its windows. This protocol is part of wayland-protocols 1.15,
|
||||
and mandatory at build time. If the running compositor does not support this
|
||||
protocol, a very simple frame will be drawn by GLFW itself, using the
|
||||
[viewporter][] protocol alongside subsurfaces. If the running compositor does
|
||||
not support these protocols either, no decorations will be drawn around windows.
|
||||
|
||||
[xdg-decoration-unstable-v1]: https://wayland.app/protocols/xdg-decoration-unstable-v1
|
||||
[viewporter]: https://wayland.app/protocols/viewporter
|
||||
|
||||
GLFW uses the [xdg-activation-v1][] protocol to implement window focus and
|
||||
attention requests. If the running compositor does not support this protocol,
|
||||
window focus and attention requests do nothing.
|
||||
|
||||
[xdg-activation-v1]: https://wayland.app/protocols/xdg-activation-v1
|
||||
|
||||
GLFW uses the [fractional-scale-v1][] protocol to implement fine-grained
|
||||
framebuffer scaling. If the running compositor does not support this protocol,
|
||||
the @ref GLFW_SCALE_FRAMEBUFFER window hint will only be able to scale the
|
||||
framebuffer by integer scales. This will typically be the smallest integer not
|
||||
less than the actual scale.
|
||||
|
||||
[fractional-scale-v1]: https://wayland.app/protocols/fractional-scale-v1
|
||||
|
||||
|
||||
## GLX extensions {#compat_glx}
|
||||
|
||||
The GLX API is the default API used to create OpenGL contexts on Unix-like
|
||||
systems using the X Window System.
|
||||
|
||||
GLFW uses the GLX 1.3 `GLXFBConfig` functions to enumerate and select framebuffer pixel
|
||||
formats. If GLX 1.3 is not supported, @ref glfwInit will fail.
|
||||
|
||||
GLFW uses the `GLX_MESA_swap_control,` `GLX_EXT_swap_control` and
|
||||
`GLX_SGI_swap_control` extensions to provide vertical retrace synchronization
|
||||
(or _vsync_), in that order of preference. When none of these extensions are
|
||||
available, calling @ref glfwSwapInterval will have no effect.
|
||||
|
||||
GLFW uses the `GLX_ARB_multisample` extension to create contexts with
|
||||
multisampling anti-aliasing. Where this extension is unavailable, the
|
||||
`GLFW_SAMPLES` hint will have no effect.
|
||||
|
||||
GLFW uses the `GLX_ARB_create_context` extension when available, even when
|
||||
creating OpenGL contexts of version 2.1 and below. Where this extension is
|
||||
unavailable, the `GLFW_CONTEXT_VERSION_MAJOR` and `GLFW_CONTEXT_VERSION_MINOR`
|
||||
hints will only be partially supported, the `GLFW_CONTEXT_DEBUG` hint will have
|
||||
no effect, and setting the `GLFW_OPENGL_PROFILE` or `GLFW_OPENGL_FORWARD_COMPAT`
|
||||
hints to `GLFW_TRUE` will cause @ref glfwCreateWindow to fail.
|
||||
|
||||
GLFW uses the `GLX_ARB_create_context_profile` extension to provide support for
|
||||
context profiles. Where this extension is unavailable, setting the
|
||||
`GLFW_OPENGL_PROFILE` hint to anything but `GLFW_OPENGL_ANY_PROFILE`, or setting
|
||||
`GLFW_CLIENT_API` to anything but `GLFW_OPENGL_API` or `GLFW_NO_API` will cause
|
||||
@ref glfwCreateWindow to fail.
|
||||
|
||||
GLFW uses the `GLX_ARB_context_flush_control` extension to provide control over
|
||||
whether a context is flushed when it is released (made non-current). Where this
|
||||
extension is unavailable, the `GLFW_CONTEXT_RELEASE_BEHAVIOR` hint will have no
|
||||
effect and the context will always be flushed when released.
|
||||
|
||||
GLFW uses the `GLX_ARB_framebuffer_sRGB` and `GLX_EXT_framebuffer_sRGB`
|
||||
extensions to provide support for sRGB framebuffers. Where both of these
|
||||
extensions are unavailable, the `GLFW_SRGB_CAPABLE` hint will have no effect.
|
||||
|
||||
|
||||
## WGL extensions {#compat_wgl}
|
||||
|
||||
The WGL API is used to create OpenGL contexts on Microsoft Windows and other
|
||||
implementations of the Win32 API, such as Wine.
|
||||
|
||||
GLFW uses either the `WGL_EXT_extension_string` or the
|
||||
`WGL_ARB_extension_string` extension to check for the presence of all other WGL
|
||||
extensions listed below. If both are available, the EXT one is preferred. If
|
||||
neither is available, no other extensions are used and many GLFW features
|
||||
related to context creation will have no effect or cause errors when used.
|
||||
|
||||
GLFW uses the `WGL_EXT_swap_control` extension to provide vertical retrace
|
||||
synchronization (or _vsync_). Where this extension is unavailable, calling @ref
|
||||
glfwSwapInterval will have no effect.
|
||||
|
||||
GLFW uses the `WGL_ARB_pixel_format` and `WGL_ARB_multisample` extensions to
|
||||
create contexts with multisampling anti-aliasing. Where these extensions are
|
||||
unavailable, the `GLFW_SAMPLES` hint will have no effect.
|
||||
|
||||
GLFW uses the `WGL_ARB_create_context` extension when available, even when
|
||||
creating OpenGL contexts of version 2.1 and below. Where this extension is
|
||||
unavailable, the `GLFW_CONTEXT_VERSION_MAJOR` and `GLFW_CONTEXT_VERSION_MINOR`
|
||||
hints will only be partially supported, the `GLFW_CONTEXT_DEBUG` hint will have
|
||||
no effect, and setting the `GLFW_OPENGL_PROFILE` or `GLFW_OPENGL_FORWARD_COMPAT`
|
||||
hints to `GLFW_TRUE` will cause @ref glfwCreateWindow to fail.
|
||||
|
||||
GLFW uses the `WGL_ARB_create_context_profile` extension to provide support for
|
||||
context profiles. Where this extension is unavailable, setting the
|
||||
`GLFW_OPENGL_PROFILE` hint to anything but `GLFW_OPENGL_ANY_PROFILE` will cause
|
||||
@ref glfwCreateWindow to fail.
|
||||
|
||||
GLFW uses the `WGL_ARB_context_flush_control` extension to provide control over
|
||||
whether a context is flushed when it is released (made non-current). Where this
|
||||
extension is unavailable, the `GLFW_CONTEXT_RELEASE_BEHAVIOR` hint will have no
|
||||
effect and the context will always be flushed when released.
|
||||
|
||||
GLFW uses the `WGL_ARB_framebuffer_sRGB` and `WGL_EXT_framebuffer_sRGB`
|
||||
extensions to provide support for sRGB framebuffers. When both of these
|
||||
extensions are unavailable, the `GLFW_SRGB_CAPABLE` hint will have no effect.
|
||||
|
||||
|
||||
## OpenGL on macOS {#compat_osx}
|
||||
|
||||
macOS (as of version 14) still provides OpenGL but it has been deprecated by
|
||||
Apple. While the API is still available, it is poorly maintained and frequently
|
||||
develops new issues. On modern systems, OpenGL is implemented on top of Metal
|
||||
and is not fully thread-safe.
|
||||
|
||||
macOS does not support OpenGL stereo rendering. If the `GLFW_STEREO` hint is
|
||||
set to true, OpenGL context creation will always fail.
|
||||
|
||||
macOS only supports OpenGL core profile contexts that are forward-compatible,
|
||||
but the `GLFW_OPENGL_FORWARD_COMPAT` hint is ignored since GLFW 3.4. Even if
|
||||
this hint is set to false (the default), a forward-compatible context will be
|
||||
returned if available.
|
||||
|
||||
macOS does not support OpenGL debug contexts, no-error contexts or robustness.
|
||||
The `GLFW_CONTEXT_DEBUG`, `GLFW_CONTEXT_NO_ERROR` and `GLFW_CONTEXT_ROBUSTNESS`
|
||||
hints will be ignored and a context without these features will be returned.
|
||||
|
||||
macOS does not flush OpenGL contexts when they are made non-current. The
|
||||
`GLFW_CONTEXT_RELEASE_BEHAVIOR` hint is ignored and the release behavior will
|
||||
always be the equivalent of `GLFW_RELEASE_BEHAVIOR_NONE`. If you need a context
|
||||
to be flushed, call `glFlush` before making it non-current.
|
||||
|
||||
|
||||
## Vulkan loader and API {#compat_vulkan}
|
||||
|
||||
By default, GLFW uses the standard system-wide Vulkan loader to access the
|
||||
Vulkan API on all platforms except macOS. This is installed by both graphics
|
||||
drivers and Vulkan SDKs. If either the loader or at least one minimally
|
||||
functional ICD is missing, @ref glfwVulkanSupported will return `GLFW_FALSE` and
|
||||
all other Vulkan-related functions will fail with an @ref GLFW_API_UNAVAILABLE
|
||||
error.
|
||||
|
||||
|
||||
## Vulkan WSI extensions {#compat_wsi}
|
||||
|
||||
The Vulkan WSI extensions are used to create Vulkan surfaces for GLFW windows on
|
||||
all supported platforms.
|
||||
|
||||
GLFW uses the `VK_KHR_surface` and `VK_KHR_win32_surface` extensions to create
|
||||
surfaces on Microsoft Windows. If any of these extensions are not available,
|
||||
@ref glfwGetRequiredInstanceExtensions will return an empty list and window
|
||||
surface creation will fail.
|
||||
|
||||
GLFW uses the `VK_KHR_surface` and either the `VK_MVK_macos_surface` or
|
||||
`VK_EXT_metal_surface` extensions to create surfaces on macOS. If any of these
|
||||
extensions are not available, @ref glfwGetRequiredInstanceExtensions will
|
||||
return an empty list and window surface creation will fail.
|
||||
|
||||
GLFW uses the `VK_KHR_surface` and either the `VK_KHR_xlib_surface` or
|
||||
`VK_KHR_xcb_surface` extensions to create surfaces on X11. If `VK_KHR_surface`
|
||||
or both `VK_KHR_xlib_surface` and `VK_KHR_xcb_surface` are not available, @ref
|
||||
glfwGetRequiredInstanceExtensions will return an empty list and window surface
|
||||
creation will fail.
|
||||
|
||||
GLFW uses the `VK_KHR_surface` and `VK_KHR_wayland_surface` extensions to create
|
||||
surfaces on Wayland. If any of these extensions are not available, @ref
|
||||
glfwGetRequiredInstanceExtensions will return an empty list and window surface
|
||||
creation will fail.
|
||||
|
324
docs/compile.dox
324
docs/compile.dox
@ -1,324 +0,0 @@
|
||||
/*!
|
||||
|
||||
@page compile Compiling GLFW
|
||||
|
||||
@tableofcontents
|
||||
|
||||
This is about compiling the GLFW library itself. For information on how to
|
||||
build applications that use GLFW, see the @ref build guide.
|
||||
|
||||
|
||||
@section compile_cmake Using CMake
|
||||
|
||||
GLFW uses [CMake](http://www.cmake.org/) to generate project files or makefiles
|
||||
for a particular development environment. If you are on a Unix-like system such
|
||||
as Linux or FreeBSD or have a package system like Fink, MacPorts, Cygwin or
|
||||
Homebrew, you can simply install its CMake package. If not, you can download
|
||||
installers for Windows and OS X from the [CMake website](http://www.cmake.org/).
|
||||
|
||||
@note CMake only generates project files or makefiles. It does not compile the
|
||||
actual GLFW library. To compile GLFW, first generate these files and then use
|
||||
them in your chosen development environment to compile the actual GLFW library.
|
||||
|
||||
|
||||
@subsection compile_deps Dependencies
|
||||
|
||||
Once you have installed CMake, make sure that all other dependencies are
|
||||
available. On some platforms, GLFW needs a few additional packages to be
|
||||
installed. See the section for your chosen platform and development environment
|
||||
below.
|
||||
|
||||
|
||||
@subsubsection compile_deps_msvc Dependencies for Visual C++ on Windows
|
||||
|
||||
The Microsoft Platform SDK that is installed along with Visual C++ already
|
||||
contains all the necessary headers, link libraries and tools except for CMake.
|
||||
Move on to @ref compile_generate.
|
||||
|
||||
|
||||
@subsubsection compile_deps_mingw Dependencies for MinGW or MinGW-w64 on Windows
|
||||
|
||||
Both the MinGW and the MinGW-w64 packages already contain all the necessary
|
||||
headers, link libraries and tools except for CMake. Move on to @ref
|
||||
compile_generate.
|
||||
|
||||
|
||||
@subsubsection compile_deps_mingw_cross Dependencies for MinGW or MinGW-w64 cross-compilation
|
||||
|
||||
Both Cygwin and many Linux distributions have MinGW or MinGW-w64 packages. For
|
||||
example, Cygwin has the `mingw64-i686-gcc` and `mingw64-x86_64-gcc` packages
|
||||
for 32- and 64-bit version of MinGW-w64, while Debian GNU/Linux and derivatives
|
||||
like Ubuntu have the `mingw-w64` package for both.
|
||||
|
||||
GLFW has CMake toolchain files in the `CMake/` directory that allow for easy
|
||||
cross-compilation of Windows binaries. To use these files you need to add a
|
||||
special parameter when generating the project files or makefiles:
|
||||
|
||||
@code{.sh}
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=<toolchain-file> .
|
||||
@endcode
|
||||
|
||||
The exact toolchain file to use depends on the prefix used by the MinGW or
|
||||
MinGW-w64 binaries on your system. You can usually see this in the /usr
|
||||
directory. For example, both the Debian/Ubuntu and Cygwin MinGW-w64 packages
|
||||
have `/usr/x86_64-w64-mingw32` for the 64-bit compilers, so the correct
|
||||
invocation would be:
|
||||
|
||||
@code{.sh}
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=CMake/x86_64-w64-mingw32.cmake .
|
||||
@endcode
|
||||
|
||||
For more details see the article
|
||||
[CMake Cross Compiling](http://www.paraview.org/Wiki/CMake_Cross_Compiling) on
|
||||
the CMake wiki.
|
||||
|
||||
Once you have this set up, move on to @ref compile_generate.
|
||||
|
||||
|
||||
@subsubsection compile_deps_xcode Dependencies for Xcode on OS X
|
||||
|
||||
Xcode comes with all necessary tools except for CMake. The required headers
|
||||
and libraries are included in the core OS X frameworks. Xcode can be downloaded
|
||||
from the Mac App Store or from the ADC Member Center.
|
||||
|
||||
Once you have Xcode installed, move on to @ref compile_generate.
|
||||
|
||||
|
||||
@subsubsection compile_deps_x11 Dependencies for Linux and X11
|
||||
|
||||
To compile GLFW for X11, you need to have the X11 and OpenGL header packages
|
||||
installed, as well as the basic development tools like GCC and make. For
|
||||
example, on Ubuntu and other distributions based on Debian GNU/Linux, you need
|
||||
to install the `xorg-dev` and `libglu1-mesa-dev` packages. The former pulls in
|
||||
all X.org header packages and the latter pulls in the Mesa OpenGL and GLU
|
||||
packages. GLFW itself doesn't need or use GLU, but some of the examples do.
|
||||
Note that using header files and libraries from Mesa during compilation
|
||||
_will not_ tie your binaries to the Mesa implementation of OpenGL.
|
||||
|
||||
Once you have installed the necessary packages, move on to @ref
|
||||
compile_generate.
|
||||
|
||||
|
||||
@subsection compile_generate Generating build files with CMake
|
||||
|
||||
Once you have all necessary dependencies it is time to generate the project
|
||||
files or makefiles for your development environment. CMake needs to know two
|
||||
paths for this: the path to the _root_ directory of the GLFW source tree (i.e.
|
||||
_not_ the `src` subdirectory) and the target path for the generated files and
|
||||
compiled binaries. If these are the same, it is called an in-tree build,
|
||||
otherwise it is called an out-of-tree build.
|
||||
|
||||
One of several advantages of out-of-tree builds is that you can generate files
|
||||
and compile for different development environments using a single source tree.
|
||||
|
||||
@note This section is about generating the project files or makefiles necessary
|
||||
to compile the GLFW library, not about compiling the actual library.
|
||||
|
||||
|
||||
@subsubsection compile_generate_cli Generating files with the CMake command-line tool
|
||||
|
||||
To make an in-tree build, enter the _root_ directory of the GLFW source tree
|
||||
(i.e. _not_ the `src` subdirectory) and run CMake. The current directory is
|
||||
used as target path, while the path provided as an argument is used to find the
|
||||
source tree.
|
||||
|
||||
@code{.sh}
|
||||
cd <glfw-root-dir>
|
||||
cmake .
|
||||
@endcode
|
||||
|
||||
To make an out-of-tree build, make another directory, enter it and run CMake
|
||||
with the (relative or absolute) path to the root of the source tree as an
|
||||
argument.
|
||||
|
||||
@code{.sh}
|
||||
cd <glfw-root-dir>
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
@endcode
|
||||
|
||||
Once you have generated the project files or makefiles for your chosen
|
||||
development environment, move on to @ref compile_compile.
|
||||
|
||||
|
||||
@subsubsection compile_generate_gui Generating files with the CMake GUI
|
||||
|
||||
If you are using the GUI version, choose the root of the GLFW source tree as
|
||||
source location and the same directory or another, empty directory as the
|
||||
destination for binaries. Choose _Configure_, change any options you wish to,
|
||||
_Configure_ again to let the changes take effect and then _Generate_.
|
||||
|
||||
Once you have generated the project files or makefiles for your chosen
|
||||
development environment, move on to @ref compile_compile.
|
||||
|
||||
|
||||
@subsection compile_compile Compiling the library
|
||||
|
||||
You should now have all required dependencies and the project files or makefiles
|
||||
necessary to compile GLFW. Go ahead and compile the actual GLFW library with
|
||||
these files, as you would with any other project.
|
||||
|
||||
Once the GLFW library is compiled, you are ready to build your applications,
|
||||
linking it to the GLFW library. See the @ref build guide for more information.
|
||||
|
||||
|
||||
@subsection compile_options CMake options
|
||||
|
||||
The CMake files for GLFW provide a number of options, although not all are
|
||||
available on all supported platforms. Some of these are de facto standards
|
||||
among projects using CMake and so have no `GLFW_` prefix.
|
||||
|
||||
If you are using the GUI version of CMake, these are listed and can be changed
|
||||
from there. If you are using the command-line version, use the `ccmake` tool.
|
||||
Some package systems like Ubuntu and other distributions based on Debian
|
||||
GNU/Linux have this tool in a separate `cmake-curses-gui` package.
|
||||
|
||||
|
||||
@subsubsection compile_options_shared Shared CMake options
|
||||
|
||||
`BUILD_SHARED_LIBS` determines whether GLFW is built as a static
|
||||
library or as a DLL / shared library / dynamic library.
|
||||
|
||||
`LIB_SUFFIX` affects where the GLFW shared /dynamic library is installed. If it
|
||||
is empty, it is installed to `${CMAKE_INSTALL_PREFIX}/lib`. If it is set to
|
||||
`64`, it is installed to `${CMAKE_INSTALL_PREFIX}/lib64`.
|
||||
|
||||
`GLFW_CLIENT_LIBRARY` determines which client API library to use. If set to
|
||||
`opengl` the OpenGL library is used, if set to `glesv1` for the OpenGL ES 1.x
|
||||
library is used, or if set to `glesv2` the OpenGL ES 2.0 library is used. The
|
||||
selected library and its header files must be present on the system for this to
|
||||
work.
|
||||
|
||||
`GLFW_BUILD_EXAMPLES` determines whether the GLFW examples are built
|
||||
along with the library.
|
||||
|
||||
`GLFW_BUILD_TESTS` determines whether the GLFW test programs are
|
||||
built along with the library.
|
||||
|
||||
`GLFW_BUILD_DOCS` determines whether the GLFW documentation is built along with
|
||||
the library.
|
||||
|
||||
|
||||
@subsubsection compile_options_osx OS X specific CMake options
|
||||
|
||||
`GLFW_USE_CHDIR` determines whether `glfwInit` changes the current
|
||||
directory of bundled applications to the `Contents/Resources` directory.
|
||||
|
||||
`GLFW_USE_MENUBAR` determines whether the first call to
|
||||
`glfwCreateWindow` sets up a minimal menu bar.
|
||||
|
||||
`GLFW_USE_RETINA` determines whether windows will use the full resolution of
|
||||
Retina displays.
|
||||
|
||||
`GLFW_BUILD_UNIVERSAL` determines whether to build Universal Binaries.
|
||||
|
||||
|
||||
@subsubsection compile_options_win32 Windows specific CMake options
|
||||
|
||||
`USE_MSVC_RUNTIME_LIBRARY_DLL` determines whether to use the DLL version or the
|
||||
static library version of the Visual C++ runtime library. If set to `ON`, the
|
||||
DLL version of the Visual C++ library is used. It is recommended to set this to
|
||||
`ON`, as this keeps the executable smaller and benefits from security and bug
|
||||
fix updates of the Visual C++ runtime.
|
||||
|
||||
`GLFW_USE_DWM_SWAP_INTERVAL` determines whether the swap interval is set even
|
||||
when DWM compositing is enabled. If this is `ON`, the swap interval is set even
|
||||
if DWM is enabled. It is recommended to set this to `OFF`, as doing otherwise
|
||||
can lead to severe jitter.
|
||||
|
||||
`GLFW_USE_OPTIMUS_HPG` determines whether to export the `NvOptimusEnablement`
|
||||
symbol, which forces the use of the high-performance GPU on Nvidia Optimus
|
||||
systems. This symbol needs to be exported by the EXE to be detected by the
|
||||
driver, so the override will not work if GLFW is built as a DLL. See _Enabling
|
||||
High Performance Graphics Rendering on Optimus Systems_ for more details.
|
||||
|
||||
|
||||
@subsubsection compile_options_egl EGL specific CMake options
|
||||
|
||||
`GLFW_USE_EGL` determines whether to use EGL instead of the platform-specific
|
||||
context creation API. Note that EGL is not yet provided on all supported
|
||||
platforms.
|
||||
|
||||
|
||||
@section compile_manual Compiling GLFW manually
|
||||
|
||||
If you wish to compile GLFW without its CMake build environment then you will
|
||||
have to do at least some of the platform detection yourself. GLFW needs
|
||||
a number of configuration macros to be defined in order to know what it's being
|
||||
compiled for and has many optional, platform-specific ones for various features.
|
||||
|
||||
When building with CMake, the `glfw_config.h` configuration header is generated
|
||||
based on the current platform and CMake options. The GLFW CMake environment
|
||||
defines `_GLFW_USE_CONFIG_H`, which causes this header to be included by
|
||||
`internal.h`. Without this macro, GLFW will expect the necessary configuration
|
||||
macros to be defined on the command-line.
|
||||
|
||||
Three macros _must_ be defined when compiling GLFW: one selecting the window
|
||||
creation API, one selecting the context creation API and one client library.
|
||||
Exactly one of each kind must be defined for GLFW to compile and link.
|
||||
|
||||
The window creation API is used to create windows, handle input, monitors, gamma
|
||||
ramps and clipboard. The options are:
|
||||
|
||||
- `_GLFW_COCOA` to use the Cocoa frameworks
|
||||
- `_GLFW_WIN32` to use the Win32 API
|
||||
- `_GLFW_X11` to use the X Window System
|
||||
- `_GLFW_WAYLAND` to use the Wayland API (experimental and incomplete)
|
||||
- `_GLFW_MIR` to use the Mir API (experimental and incomplete)
|
||||
|
||||
The context creation API is used to enumerate pixel formats / framebuffer
|
||||
configurations and to create contexts. The options are:
|
||||
|
||||
- `_GLFW_NSGL` to use the Cocoa OpenGL framework
|
||||
- `_GLFW_WGL` to use the Win32 WGL API
|
||||
- `_GLFW_GLX` to use the X11 GLX API
|
||||
- `_GLFW_EGL` to use the EGL API
|
||||
|
||||
Wayland and Mir both require the EGL backend.
|
||||
|
||||
The client library is the one providing the OpenGL or OpenGL ES API, which is
|
||||
used by GLFW to probe the created context. This is not the same thing as the
|
||||
client API, as many desktop OpenGL client libraries now expose the OpenGL ES API
|
||||
through extensions. The options are:
|
||||
|
||||
- `_GLFW_USE_OPENGL` for the desktop OpenGL (opengl32.dll, libGL.so or
|
||||
OpenGL.framework)
|
||||
- `_GLFW_USE_GLESV1` for OpenGL ES 1.x (experimental)
|
||||
- `_GLFW_USE_GLESV2` for OpenGL ES 2.x (experimental)
|
||||
|
||||
Note that `_GLFW_USE_GLESV1` and `_GLFW_USE_GLESV2` may only be used with EGL,
|
||||
as the other context creation APIs do not interface with OpenGL ES client
|
||||
libraries.
|
||||
|
||||
If you are building GLFW as a shared library / dynamic library / DLL then you
|
||||
must also define `_GLFW_BUILD_DLL`. Otherwise, you may not define it.
|
||||
|
||||
If you are using the X11 window creation API then you _must_ also select an entry
|
||||
point retrieval mechanism.
|
||||
|
||||
- `_GLFW_HAS_GLXGETPROCADDRESS` to use `glXGetProcAddress` (recommended)
|
||||
- `_GLFW_HAS_GLXGETPROCADDRESSARB` to use `glXGetProcAddressARB` (legacy)
|
||||
- `_GLFW_HAS_GLXGETPROCADDRESSEXT` to use `glXGetProcAddressEXT` (legacy)
|
||||
- `_GLFW_HAS_DLOPEN` to do manual retrieval with `dlopen` (fallback)
|
||||
|
||||
In addition, support for the following X11 extensions can be enabled:
|
||||
|
||||
- `_GLFW_HAS_XINPUT` to use XInput2 for high-resolution cursor motion
|
||||
(recommended)
|
||||
|
||||
If you are using the Cocoa window creation API, the following options are
|
||||
available:
|
||||
|
||||
- `_GLFW_USE_CHDIR` to `chdir` to the `Resources` subdirectory of the
|
||||
application bundle during @ref glfwInit (recommended)
|
||||
- `_GLFW_USE_MENUBAR` to create and populate the menu bar when the first window
|
||||
is created (recommended)
|
||||
- `_GLFW_USE_RETINA` to have windows use the full resolution of Retina displays
|
||||
(recommended)
|
||||
|
||||
@note None of the @ref build_macros may be defined during the compilation of
|
||||
GLFW. If you define any of these in your build files, make sure they are not
|
||||
applied to the GLFW sources.
|
||||
|
||||
*/
|
371
docs/compile.md
Normal file
371
docs/compile.md
Normal file
@ -0,0 +1,371 @@
|
||||
# Compiling GLFW {#compile_guide}
|
||||
|
||||
[TOC]
|
||||
|
||||
This is about compiling the GLFW library itself. For information on how to
|
||||
build applications that use GLFW, see @ref build_guide.
|
||||
|
||||
GLFW uses some C99 features and does not support Visual Studio 2012 and earlier.
|
||||
|
||||
|
||||
## Using CMake {#compile_cmake}
|
||||
|
||||
GLFW behaves like most other libraries that use CMake so this guide mostly
|
||||
describes the standard configure, generate and compile sequence. If you are already
|
||||
familiar with this from other projects, you may want to focus on the @ref
|
||||
compile_deps and @ref compile_options sections for GLFW-specific information.
|
||||
|
||||
GLFW uses [CMake](https://cmake.org/) to generate project files or makefiles
|
||||
for your chosen development environment. To compile GLFW, first generate these
|
||||
files with CMake and then use them to compile the GLFW library.
|
||||
|
||||
If you are on Windows and macOS you can [download
|
||||
CMake](https://cmake.org/download/) from their site.
|
||||
|
||||
If you are on a Unix-like system such as Linux, FreeBSD or Cygwin or have
|
||||
a package system like Fink, MacPorts or Homebrew, you can install its CMake
|
||||
package.
|
||||
|
||||
CMake is a complex tool and this guide will only show a few of the possible ways
|
||||
to set up and compile GLFW. The CMake project has their own much more detailed
|
||||
[CMake user guide][cmake-guide] that includes everything in this guide not
|
||||
specific to GLFW. It may be a useful companion to this one.
|
||||
|
||||
[cmake-guide]: https://cmake.org/cmake/help/latest/guide/user-interaction/
|
||||
|
||||
|
||||
### Installing dependencies {#compile_deps}
|
||||
|
||||
The C/C++ development environments in Visual Studio, Xcode and MinGW come with
|
||||
all necessary dependencies for compiling GLFW, but on Unix-like systems like
|
||||
Linux and FreeBSD you will need a few extra packages.
|
||||
|
||||
|
||||
#### Dependencies for Wayland and X11 {#compile_deps_wayland}
|
||||
|
||||
By default, both the Wayland and X11 backends are enabled on Linux and other Unix-like
|
||||
systems (except macOS). To disable one or both of these, set the @ref GLFW_BUILD_WAYLAND
|
||||
or @ref GLFW_BUILD_X11 CMake options in the next step when generating build files.
|
||||
|
||||
To compile GLFW for both Wayland and X11, you need to have the X11, Wayland and xkbcommon
|
||||
development packages installed. On some systems a few other packages are also required.
|
||||
None of the development packages above are needed to build or run programs that use an
|
||||
already compiled GLFW library.
|
||||
|
||||
On Debian and derivatives like Ubuntu and Linux Mint you will need the `libwayland-dev`
|
||||
and `libxkbcommon-dev` packages to compile for Wayland and the `xorg-dev` meta-package to
|
||||
compile for X11. These will pull in all other dependencies.
|
||||
|
||||
```sh
|
||||
sudo apt install libwayland-dev libxkbcommon-dev xorg-dev
|
||||
```
|
||||
|
||||
On Fedora and derivatives like Red Hat you will need the `wayland-devel` and
|
||||
`libxkbcommon-devel` packages to compile for Wayland and the `libXcursor-devel`,
|
||||
`libXi-devel`, `libXinerama-devel` and `libXrandr-devel` packages to compile for X11.
|
||||
These will pull in all other dependencies.
|
||||
|
||||
```sh
|
||||
sudo dnf install wayland-devel libxkbcommon-devel libXcursor-devel libXi-devel libXinerama-devel libXrandr-devel
|
||||
```
|
||||
|
||||
On FreeBSD you will need the `wayland`, `libxkbcommon` and `evdev-proto` packages to
|
||||
compile for Wayland. The X11 headers are installed along the end-user X11 packages, so if
|
||||
you have an X server running you should have the headers as well. If not, install the
|
||||
`xorgproto` package to compile for X11.
|
||||
|
||||
```sh
|
||||
pkg install wayland libxkbcommon evdev-proto xorgproto
|
||||
```
|
||||
|
||||
On Cygwin Wayland is not supported but you will need the `libXcursor-devel`,
|
||||
`libXi-devel`, `libXinerama-devel`, `libXrandr-devel` and `libXrender-devel` packages to
|
||||
compile for X11. These can be found in the Libs section of the GUI installer and will
|
||||
pull in all other dependencies.
|
||||
|
||||
Once you have the required dependencies, move on to @ref compile_generate.
|
||||
|
||||
|
||||
### Generating build files with CMake {#compile_generate}
|
||||
|
||||
Once you have all necessary dependencies it is time to generate the project
|
||||
files or makefiles for your development environment. CMake needs two paths for
|
||||
this:
|
||||
|
||||
- the path to the root directory of the GLFW source tree (not its `src`
|
||||
subdirectory)
|
||||
- the path to the directory where the generated build files and compiled
|
||||
binaries will be placed
|
||||
|
||||
If these are the same, it is called an in-tree build, otherwise it is called an
|
||||
out-of-tree build.
|
||||
|
||||
Out-of-tree builds are recommended as they avoid cluttering up the source tree.
|
||||
They also allow you to have several build directories for different
|
||||
configurations all using the same source tree.
|
||||
|
||||
A common pattern when building a single configuration is to have a build
|
||||
directory named `build` in the root of the source tree.
|
||||
|
||||
|
||||
#### Generating with the CMake GUI {#compile_generate_gui}
|
||||
|
||||
Start the CMake GUI and set the paths to the source and build directories
|
||||
described above. Then press _Configure_ and _Generate_.
|
||||
|
||||
If you wish change any CMake variables in the list, press _Configure_ and then
|
||||
_Generate_ to have the new values take effect. The variable list will be
|
||||
populated after the first configure step.
|
||||
|
||||
By default, GLFW will use Wayland and X11 on Linux and other Unix-like systems other than
|
||||
macOS. To disable support for one or both of these, set the @ref GLFW_BUILD_WAYLAND
|
||||
and/or @ref GLFW_BUILD_X11 option in the GLFW section of the variable list, then apply the
|
||||
new value as described above.
|
||||
|
||||
Once you have generated the project files or makefiles for your chosen
|
||||
development environment, move on to @ref compile_compile.
|
||||
|
||||
|
||||
#### Generating with command-line CMake {#compile_generate_cli}
|
||||
|
||||
To make a build directory, pass the source and build directories to the `cmake`
|
||||
command. These can be relative or absolute paths. The build directory is
|
||||
created if it doesn't already exist.
|
||||
|
||||
```sh
|
||||
cmake -S path/to/glfw -B path/to/build
|
||||
```
|
||||
|
||||
It is common to name the build directory `build` and place it in the root of the
|
||||
source tree when only planning to build a single configuration.
|
||||
|
||||
```sh
|
||||
cd path/to/glfw
|
||||
cmake -S . -B build
|
||||
```
|
||||
|
||||
Without other flags these will generate Visual Studio project files on Windows
|
||||
and makefiles on other platforms. You can choose other targets using the `-G`
|
||||
flag.
|
||||
|
||||
```sh
|
||||
cmake -S path/to/glfw -B path/to/build -G Xcode
|
||||
```
|
||||
|
||||
By default, GLFW will use Wayland and X11 on Linux and other Unix-like systems other than
|
||||
macOS. To disable support for one or both of these, set the @ref GLFW_BUILD_WAYLAND
|
||||
and/or @ref GLFW_BUILD_X11 CMake option.
|
||||
|
||||
```sh
|
||||
cmake -S path/to/glfw -B path/to/build -D GLFW_BUILD_X11=0
|
||||
```
|
||||
|
||||
Once you have generated the project files or makefiles for your chosen
|
||||
development environment, move on to @ref compile_compile.
|
||||
|
||||
|
||||
### Compiling the library {#compile_compile}
|
||||
|
||||
You should now have all required dependencies and the project files or makefiles
|
||||
necessary to compile GLFW. Go ahead and compile the actual GLFW library with
|
||||
these files as you would with any other project.
|
||||
|
||||
With Visual Studio open `GLFW.sln` and use the Build menu. With Xcode open
|
||||
`GLFW.xcodeproj` and use the Project menu.
|
||||
|
||||
With Linux, macOS and other forms of Unix, run `make`.
|
||||
|
||||
```sh
|
||||
cd path/to/build
|
||||
make
|
||||
```
|
||||
|
||||
With MinGW, it is `mingw32-make`.
|
||||
|
||||
```sh
|
||||
cd path/to/build
|
||||
mingw32-make
|
||||
```
|
||||
|
||||
Any CMake build directory can also be built with the `cmake` command and the
|
||||
`--build` flag.
|
||||
|
||||
```sh
|
||||
cmake --build path/to/build
|
||||
```
|
||||
|
||||
This will run the platform specific build tool the directory was generated for.
|
||||
|
||||
Once the GLFW library is compiled you are ready to build your application,
|
||||
linking it to the GLFW library. See @ref build_guide for more information.
|
||||
|
||||
|
||||
## CMake options {#compile_options}
|
||||
|
||||
The CMake files for GLFW provide a number of options, although not all are
|
||||
available on all supported platforms. Some of these are de facto standards
|
||||
among projects using CMake and so have no `GLFW_` prefix.
|
||||
|
||||
If you are using the GUI version of CMake, these are listed and can be changed
|
||||
from there. If you are using the command-line version of CMake you can use the
|
||||
`ccmake` ncurses GUI to set options. Some package systems like Ubuntu and other
|
||||
distributions based on Debian GNU/Linux have this tool in a separate
|
||||
`cmake-curses-gui` package.
|
||||
|
||||
Finally, if you don't want to use any GUI, you can set options from the `cmake`
|
||||
command-line with the `-D` flag.
|
||||
|
||||
```sh
|
||||
cmake -S path/to/glfw -B path/to/build -D BUILD_SHARED_LIBS=ON
|
||||
```
|
||||
|
||||
|
||||
### Shared CMake options {#compile_options_shared}
|
||||
|
||||
@anchor BUILD_SHARED_LIBS
|
||||
__BUILD_SHARED_LIBS__ determines whether GLFW is built as a static library or as
|
||||
a DLL / shared library / dynamic library. This is disabled by default,
|
||||
producing a static GLFW library. This variable has no `GLFW_` prefix because it
|
||||
is defined by CMake. If you want to change the library only for GLFW when it is
|
||||
part of a larger project, see @ref GLFW_LIBRARY_TYPE.
|
||||
|
||||
@anchor GLFW_LIBRARY_TYPE
|
||||
__GLFW_LIBRARY_TYPE__ allows you to override @ref BUILD_SHARED_LIBS only for
|
||||
GLFW, without affecting other libraries in a larger project. When set, the
|
||||
value of this option must be a valid CMake library type. Set it to `STATIC` to
|
||||
build GLFW as a static library, `SHARED` to build it as a shared library
|
||||
/ dynamic library / DLL, or `OBJECT` to make GLFW a CMake object library.
|
||||
|
||||
@anchor GLFW_BUILD_EXAMPLES
|
||||
__GLFW_BUILD_EXAMPLES__ determines whether the GLFW examples are built
|
||||
along with the library. This is enabled by default unless GLFW is being built
|
||||
as a subproject of a larger CMake project.
|
||||
|
||||
@anchor GLFW_BUILD_TESTS
|
||||
__GLFW_BUILD_TESTS__ determines whether the GLFW test programs are
|
||||
built along with the library. This is enabled by default unless GLFW is being
|
||||
built as a subproject of a larger CMake project.
|
||||
|
||||
@anchor GLFW_BUILD_DOCS
|
||||
__GLFW_BUILD_DOCS__ determines whether the GLFW documentation is built along
|
||||
with the library. This is enabled by default if
|
||||
[Doxygen](https://www.doxygen.nl/) is found by CMake during configuration.
|
||||
|
||||
|
||||
### Win32 specific CMake options {#compile_options_win32}
|
||||
|
||||
@anchor GLFW_BUILD_WIN32
|
||||
__GLFW_BUILD_WIN32__ determines whether to include support for Win32 when compiling the
|
||||
library. This option is only available when compiling for Windows. This is enabled by
|
||||
default.
|
||||
|
||||
@anchor USE_MSVC_RUNTIME_LIBRARY_DLL
|
||||
__USE_MSVC_RUNTIME_LIBRARY_DLL__ determines whether to use the DLL version or the
|
||||
static library version of the Visual C++ runtime library. When enabled, the
|
||||
DLL version of the Visual C++ library is used. This is enabled by default.
|
||||
|
||||
It is recommended to set the standard CMake variable [CMAKE_MSVC_RUNTIME_LIBRARY][]
|
||||
instead of this GLFW-specific option.
|
||||
|
||||
[CMAKE_MSVC_RUNTIME_LIBRARY]: https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html
|
||||
|
||||
@anchor GLFW_USE_HYBRID_HPG
|
||||
__GLFW_USE_HYBRID_HPG__ determines whether to export the `NvOptimusEnablement` and
|
||||
`AmdPowerXpressRequestHighPerformance` symbols, which force the use of the
|
||||
high-performance GPU on Nvidia Optimus and AMD PowerXpress systems. These symbols
|
||||
need to be exported by the EXE to be detected by the driver, so the override
|
||||
will not work if GLFW is built as a DLL. This is disabled by default, letting
|
||||
the operating system and driver decide.
|
||||
|
||||
|
||||
### macOS specific CMake options {#compile_options_macos}
|
||||
|
||||
@anchor GLFW_BUILD_COCOA
|
||||
__GLFW_BUILD_COCOA__ determines whether to include support for Cocoa when compiling the
|
||||
library. This option is only available when compiling for macOS. This is enabled by
|
||||
default.
|
||||
|
||||
|
||||
### Unix-like system specific CMake options {#compile_options_unix}
|
||||
|
||||
@anchor GLFW_BUILD_WAYLAND
|
||||
__GLFW_BUILD_WAYLAND__ determines whether to include support for Wayland when compiling
|
||||
the library. This option is only available when compiling for Linux and other Unix-like
|
||||
systems other than macOS. This is enabled by default.
|
||||
|
||||
@anchor GLFW_BUILD_X11
|
||||
__GLFW_BUILD_X11__ determines whether to include support for X11 when compiling the
|
||||
library. This option is only available when compiling for Linux and other Unix-like
|
||||
systems other than macOS. This is enabled by default.
|
||||
|
||||
|
||||
## Cross-compilation with CMake and MinGW {#compile_mingw_cross}
|
||||
|
||||
Both Cygwin and many Linux distributions have MinGW or MinGW-w64 packages. For
|
||||
example, Cygwin has the `mingw64-i686-gcc` and `mingw64-x86_64-gcc` packages
|
||||
for 32- and 64-bit version of MinGW-w64, while Debian GNU/Linux and derivatives
|
||||
like Ubuntu have the `mingw-w64` package for both.
|
||||
|
||||
GLFW has CMake toolchain files in the `CMake` subdirectory that set up
|
||||
cross-compilation of Windows binaries. To use these files you set the
|
||||
`CMAKE_TOOLCHAIN_FILE` CMake variable with the `-D` flag add an option when
|
||||
configuring and generating the build files.
|
||||
|
||||
```sh
|
||||
cmake -S path/to/glfw -B path/to/build -D CMAKE_TOOLCHAIN_FILE=path/to/file
|
||||
```
|
||||
|
||||
The exact toolchain file to use depends on the prefix used by the MinGW or
|
||||
MinGW-w64 binaries on your system. You can usually see this in the /usr
|
||||
directory. For example, both the Ubuntu and Cygwin MinGW-w64 packages have
|
||||
`/usr/x86_64-w64-mingw32` for the 64-bit compilers, so the correct invocation
|
||||
would be:
|
||||
|
||||
```sh
|
||||
cmake -S path/to/glfw -B path/to/build -D CMAKE_TOOLCHAIN_FILE=CMake/x86_64-w64-mingw32.cmake
|
||||
```
|
||||
|
||||
The path to the toolchain file is relative to the path to the GLFW source tree
|
||||
passed to the `-S` flag, not to the current directory.
|
||||
|
||||
For more details see the [CMake toolchain guide][cmake-toolchains].
|
||||
|
||||
[cmake-toolchains]: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html
|
||||
|
||||
|
||||
## Compiling GLFW manually {#compile_manual}
|
||||
|
||||
If you wish to compile GLFW without its CMake build environment then you will have to do
|
||||
at least some platform-detection yourself. There are preprocessor macros for
|
||||
enabling support for the platforms (window systems) available. There are also optional,
|
||||
platform-specific macros for various features.
|
||||
|
||||
When building, GLFW will expect the necessary configuration macros to be defined
|
||||
on the command-line. The GLFW CMake files set these as private compile
|
||||
definitions on the GLFW target but if you compile the GLFW sources manually you
|
||||
will need to define them yourself.
|
||||
|
||||
The window system is used to create windows, handle input, monitors, gamma ramps and
|
||||
clipboard. The options are:
|
||||
|
||||
- @b _GLFW_COCOA to use the Cocoa frameworks
|
||||
- @b _GLFW_WIN32 to use the Win32 API
|
||||
- @b _GLFW_WAYLAND to use the Wayland protocol
|
||||
- @b _GLFW_X11 to use the X Window System
|
||||
|
||||
The @b _GLFW_WAYLAND and @b _GLFW_X11 macros may be combined and produces a library that
|
||||
attempts to detect the appropriate platform at initialization.
|
||||
|
||||
If you are building GLFW as a shared library / dynamic library / DLL then you
|
||||
must also define @b _GLFW_BUILD_DLL. Otherwise, you must not define it.
|
||||
|
||||
If you are using a custom name for the Vulkan, EGL, GLX, OSMesa, OpenGL, GLESv1
|
||||
or GLESv2 library, you can override the default names by defining those you need
|
||||
of @b _GLFW_VULKAN_LIBRARY, @b _GLFW_EGL_LIBRARY, @b _GLFW_GLX_LIBRARY, @b
|
||||
_GLFW_OSMESA_LIBRARY, @b _GLFW_OPENGL_LIBRARY, @b _GLFW_GLESV1_LIBRARY and @b
|
||||
_GLFW_GLESV2_LIBRARY. Otherwise, GLFW will use the built-in default names.
|
||||
|
||||
@note None of the @ref build_macros may be defined during the compilation of
|
||||
GLFW. If you define any of these in your build files, make sure they are not
|
||||
applied to the GLFW sources.
|
||||
|
@ -1,19 +1,19 @@
|
||||
/*!
|
||||
# Context guide {#context_guide}
|
||||
|
||||
@page context Context guide
|
||||
|
||||
@tableofcontents
|
||||
[TOC]
|
||||
|
||||
This guide introduces the OpenGL and OpenGL ES context related functions of
|
||||
GLFW. There are also guides for the other areas of the GLFW API.
|
||||
GLFW. For details on a specific function in this category, see the @ref
|
||||
context. There are also guides for the other areas of the GLFW API.
|
||||
|
||||
- @ref intro
|
||||
- @ref window
|
||||
- @ref monitor
|
||||
- @ref input
|
||||
- @ref intro_guide
|
||||
- @ref window_guide
|
||||
- @ref vulkan_guide
|
||||
- @ref monitor_guide
|
||||
- @ref input_guide
|
||||
|
||||
|
||||
@section context_object Context objects
|
||||
## Context objects {#context_object}
|
||||
|
||||
A window object encapsulates both a top-level window and an OpenGL or OpenGL ES
|
||||
context. It is created with @ref glfwCreateWindow and destroyed with @ref
|
||||
@ -26,77 +26,92 @@ as the context handle.
|
||||
To test the creation of various kinds of contexts and see their properties, run
|
||||
the `glfwinfo` test program.
|
||||
|
||||
@note Vulkan does not have a context and the Vulkan instance is created via the
|
||||
Vulkan API itself. If you will be using Vulkan to render to a window, disable
|
||||
context creation by setting the [GLFW_CLIENT_API](@ref GLFW_CLIENT_API_hint)
|
||||
hint to `GLFW_NO_API`. For more information, see the @ref vulkan_guide.
|
||||
|
||||
@subsection context_hints Context creation hints
|
||||
|
||||
### Context creation hints {#context_hints}
|
||||
|
||||
There are a number of hints, specified using @ref glfwWindowHint, related to
|
||||
what kind of context is created. See
|
||||
[context related hints](@ref window_hints_ctx) in the window guide.
|
||||
|
||||
|
||||
@subsection context_sharing Context object sharing
|
||||
### Context object sharing {#context_sharing}
|
||||
|
||||
When creating a window and its OpenGL or OpenGL ES context with @ref
|
||||
glfwCreateWindow, you can specify another window whose context the new one
|
||||
should share its objects (textures, vertex and element buffers, etc.) with.
|
||||
|
||||
@code
|
||||
```c
|
||||
GLFWwindow* second_window = glfwCreateWindow(640, 480, "Second Window", NULL, first_window);
|
||||
@endcode
|
||||
```
|
||||
|
||||
Object sharing is implemented by the operating system and graphics driver. On
|
||||
platforms where it is possible to choose which types of objects are shared, GLFW
|
||||
requests that all types are shared.
|
||||
|
||||
See the relevant chapter of the [OpenGL](https://www.opengl.org/registry/) or
|
||||
[OpenGL ES](http://www.khronos.org/opengles/) reference documents for more
|
||||
[OpenGL ES](https://www.khronos.org/opengles/) reference documents for more
|
||||
information. The name and number of this chapter unfortunately varies between
|
||||
versions and APIs, but has at times been named _Shared Objects and Multiple
|
||||
Contexts_.
|
||||
|
||||
GLFW comes with a simple object sharing test program called `sharing`.
|
||||
GLFW comes with a bare-bones object sharing example program called `sharing`.
|
||||
|
||||
|
||||
@subsection context_offscreen Offscreen contexts
|
||||
### Offscreen contexts {#context_offscreen}
|
||||
|
||||
GLFW doesn't support creating contexts without an associated window. However,
|
||||
contexts with hidden windows can be created with the
|
||||
[GLFW_VISIBLE](@ref window_hints_wnd) window hint.
|
||||
[GLFW_VISIBLE](@ref GLFW_VISIBLE_hint) window hint.
|
||||
|
||||
@code
|
||||
glfwWindowHint(GLFW_VISIBLE, GL_FALSE);
|
||||
```c
|
||||
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
|
||||
|
||||
GLFWwindow* offscreen_context = glfwCreateWindow(640, 480, "", NULL, NULL);
|
||||
@endcode
|
||||
```
|
||||
|
||||
The window never needs to be shown and its context can be used as a plain
|
||||
offscreen context. Depending on the window manager, the size of a hidden
|
||||
window's framebuffer may not be usable or modifiable, so framebuffer
|
||||
objects are recommended for rendering with such contexts.
|
||||
|
||||
__OS X:__ The first time a window is created the menu bar is populated with
|
||||
common commands like Hide, Quit and About. This is not desirable for example
|
||||
when writing a command-line only application. The menu bar setup can be
|
||||
disabled with a [compile-time option](@ref compile_options_osx).
|
||||
You should still [process events](@ref events) as long as you have at least one
|
||||
window, even if none of them are visible.
|
||||
|
||||
|
||||
@section context_current Current context
|
||||
### Windows without contexts {#context_less}
|
||||
|
||||
You can disable context creation by setting the
|
||||
[GLFW_CLIENT_API](@ref GLFW_CLIENT_API_hint) hint to `GLFW_NO_API`.
|
||||
|
||||
Windows without contexts should not be passed to @ref glfwMakeContextCurrent or
|
||||
@ref glfwSwapBuffers. Doing this generates a @ref GLFW_NO_WINDOW_CONTEXT error.
|
||||
|
||||
|
||||
## Current context {#context_current}
|
||||
|
||||
Before you can make OpenGL or OpenGL ES calls, you need to have a current
|
||||
context of the correct type. A context can only be current for a single thread
|
||||
at a time, and a thread can only have a single context current at a time.
|
||||
|
||||
When moving a context between threads, you must make it non-current on the old
|
||||
thread before making it current on the new one.
|
||||
|
||||
The context of a window is made current with @ref glfwMakeContextCurrent.
|
||||
|
||||
@code
|
||||
```c
|
||||
glfwMakeContextCurrent(window);
|
||||
@endcode
|
||||
```
|
||||
|
||||
The window of the current context is returned by @ref glfwGetCurrentContext.
|
||||
|
||||
@code
|
||||
```c
|
||||
GLFWwindow* window = glfwGetCurrentContext();
|
||||
@endcode
|
||||
```
|
||||
|
||||
The following GLFW functions require a context to be current. Calling any these
|
||||
functions without a current context will generate a @ref GLFW_NO_CURRENT_CONTEXT
|
||||
@ -107,15 +122,14 @@ error.
|
||||
- @ref glfwGetProcAddress
|
||||
|
||||
|
||||
@section context_swap Buffer swapping
|
||||
## Buffer swapping {#context_swap}
|
||||
|
||||
Buffer swapping is part of the window and framebuffer, not the context. See
|
||||
@ref buffer_swap.
|
||||
See @ref buffer_swap in the window guide.
|
||||
|
||||
|
||||
@section context_glext OpenGL and OpenGL ES extensions
|
||||
## OpenGL and OpenGL ES extensions {#context_glext}
|
||||
|
||||
One of the benefits of OpenGL and OpenGL ES are their extensibility.
|
||||
One of the benefits of OpenGL and OpenGL ES is their extensibility.
|
||||
Hardware vendors may include extensions in their implementations that extend the
|
||||
API before that functionality is included in a new version of the OpenGL or
|
||||
OpenGL ES specification, and some extensions are never included and remain
|
||||
@ -123,26 +137,26 @@ as extensions until they become obsolete.
|
||||
|
||||
An extension is defined by:
|
||||
|
||||
- An extension name (e.g. `GL_ARB_debug_output`)
|
||||
- New OpenGL tokens (e.g. `GL_DEBUG_SEVERITY_HIGH_ARB`)
|
||||
- New OpenGL functions (e.g. `glGetDebugMessageLogARB`)
|
||||
- An extension name (e.g. `GL_ARB_gl_spirv`)
|
||||
- New OpenGL tokens (e.g. `GL_SPIR_V_BINARY_ARB`)
|
||||
- New OpenGL functions (e.g. `glSpecializeShaderARB`)
|
||||
|
||||
Note the `ARB` affix, which stands for Architecture Review Board and is used
|
||||
for official extensions. The extension above was created by the ARB, but there
|
||||
are many different affixes, like `NV` for Nvidia and `AMD` for, well, AMD. Any
|
||||
group may also use the generic `EXT` affix. Lists of extensions, together with
|
||||
their specifications, can be found at the
|
||||
[OpenGL Registry](http://www.opengl.org/registry/) and
|
||||
[OpenGL Registry](https://www.opengl.org/registry/) and
|
||||
[OpenGL ES Registry](https://www.khronos.org/registry/gles/).
|
||||
|
||||
|
||||
@subsection context_glext_auto Loading extension with a loader library
|
||||
### Loading extension with a loader library {#context_glext_auto}
|
||||
|
||||
An extension loader library is the easiest and best way to access both OpenGL and
|
||||
OpenGL ES extensions and modern versions of the core OpenGL or OpenGL ES APIs.
|
||||
They will take care of all the details of declaring and loading everything you
|
||||
need. One such library is [glad](https://github.com/Dav1dde/glad) and there are
|
||||
several others.
|
||||
several others.
|
||||
|
||||
The following example will use glad but all extension loader libraries work
|
||||
similarly.
|
||||
@ -153,14 +167,15 @@ both GLFW and glad, but loaders for OpenGL ES, as well as loaders for specific
|
||||
API versions and extension sets can be generated. The generated files are
|
||||
written to the `output` directory.
|
||||
|
||||
@code{.sh}
|
||||
```sh
|
||||
python main.py --generator c --no-loader --out-path output
|
||||
@endcode
|
||||
```
|
||||
|
||||
The `--no-loader` option is added because GLFW already provides a function for
|
||||
loading OpenGL and OpenGL ES function pointers and glad can call this instead of
|
||||
having to implement its own. There are several other command-line options as
|
||||
well. See the glad documentation for details.
|
||||
loading OpenGL and OpenGL ES function pointers, one that automatically uses the
|
||||
selected context creation API, and glad can call this instead of having to
|
||||
implement its own. There are several other command-line options as well. See
|
||||
the glad documentation for details.
|
||||
|
||||
Add the generated `output/src/glad.c`, `output/include/glad/glad.h` and
|
||||
`output/include/KHR/khrplatform.h` files to your build. Then you need to
|
||||
@ -168,14 +183,14 @@ include the glad header file, which will replace the OpenGL header of your
|
||||
development environment. By including the glad header before the GLFW header,
|
||||
it suppresses the development environment's OpenGL or OpenGL ES header.
|
||||
|
||||
@code
|
||||
```c
|
||||
#include <glad/glad.h>
|
||||
#include <GLFW/glfw3.h>
|
||||
@endcode
|
||||
```
|
||||
|
||||
Finally you need to initialize glad once you have a suitable current context.
|
||||
Finally, you need to initialize glad once you have a suitable current context.
|
||||
|
||||
@code
|
||||
```c
|
||||
window = glfwCreateWindow(640, 480, "My Window", NULL, NULL);
|
||||
if (!window)
|
||||
{
|
||||
@ -185,11 +200,11 @@ if (!window)
|
||||
glfwMakeContextCurrent(window);
|
||||
|
||||
gladLoadGLLoader((GLADloadproc) glfwGetProcAddress);
|
||||
@endcode
|
||||
```
|
||||
|
||||
Once glad has been loaded, you have access to all OpenGL core and extension
|
||||
functions supported by both the context you created and the glad loader you
|
||||
generated and you are ready to start rendering.
|
||||
generated. After that, you are ready to start rendering.
|
||||
|
||||
You can specify a minimum required OpenGL or OpenGL ES version with
|
||||
[context hints](@ref window_hints_ctx). If your needs are more complex, you can
|
||||
@ -198,25 +213,25 @@ check the actual OpenGL or OpenGL ES version with
|
||||
a specific version is supported by the current context with the
|
||||
`GLAD_GL_VERSION_x_x` booleans.
|
||||
|
||||
@code
|
||||
```c
|
||||
if (GLAD_GL_VERSION_3_2)
|
||||
{
|
||||
// Call OpenGL 3.2+ specific code
|
||||
}
|
||||
@endcode
|
||||
```
|
||||
|
||||
To check whether a specific extension is supported, use the `GLAD_GL_xxx`
|
||||
booleans.
|
||||
|
||||
@code
|
||||
if (GLAD_GL_ARB_debug_output)
|
||||
```c
|
||||
if (GLAD_GL_ARB_gl_spirv)
|
||||
{
|
||||
// Use GL_ARB_debug_output
|
||||
// Use GL_ARB_gl_spirv
|
||||
}
|
||||
@endcode
|
||||
```
|
||||
|
||||
|
||||
@subsection context_glext_manual Loading extensions manually
|
||||
### Loading extensions manually {#context_glext_manual}
|
||||
|
||||
__Do not use this technique__ unless it is absolutely necessary. An
|
||||
[extension loader library](@ref context_glext_auto) will save you a ton of
|
||||
@ -231,11 +246,11 @@ This section will demonstrate manual loading of OpenGL extensions. The loading
|
||||
of OpenGL ES extensions is identical except for the name of the extension header.
|
||||
|
||||
|
||||
@subsubsection context_glext_header The glext.h header
|
||||
#### The glext.h header {#context_glext_header}
|
||||
|
||||
The `glext.h` extension header is a continually updated file that defines the
|
||||
interfaces for all OpenGL extensions. The latest version of this can always be
|
||||
found at the [OpenGL Registry](http://www.opengl.org/registry/). There are also
|
||||
found at the [OpenGL Registry](https://www.opengl.org/registry/). There are also
|
||||
extension headers for the various versions of OpenGL ES at the
|
||||
[OpenGL ES Registry](https://www.khronos.org/registry/gles/). It it strongly
|
||||
recommended that you use your own copy of the extension header, as the one
|
||||
@ -243,48 +258,48 @@ included in your development environment may be several years out of date and
|
||||
may not include the extensions you wish to use.
|
||||
|
||||
The header defines function pointer types for all functions of all extensions it
|
||||
supports. These have names like `PFNGLGETDEBUGMESSAGELOGARBPROC` (for
|
||||
`glGetDebugMessageLogARB`), i.e. the name is made uppercase and `PFN` (pointer
|
||||
supports. These have names like `PFNGLSPECIALIZESHADERARBPROC` (for
|
||||
`glSpecializeShaderARB`), i.e. the name is made uppercase and `PFN` (pointer
|
||||
to function) and `PROC` (procedure) are added to the ends.
|
||||
|
||||
To include the extension header, define [GLFW_INCLUDE_GLEXT](@ref build_macros)
|
||||
before including the GLFW header.
|
||||
To include the extension header, define @ref GLFW_INCLUDE_GLEXT before including
|
||||
the GLFW header.
|
||||
|
||||
@code
|
||||
```c
|
||||
#define GLFW_INCLUDE_GLEXT
|
||||
#include <GLFW/glfw3.h>
|
||||
@endcode
|
||||
```
|
||||
|
||||
|
||||
@subsubsection context_glext_string Checking for extensions
|
||||
#### Checking for extensions {#context_glext_string}
|
||||
|
||||
A given machine may not actually support the extension (it may have older
|
||||
drivers or a graphics card that lacks the necessary hardware features), so it
|
||||
is necessary to check at run-time whether the context supports the extension.
|
||||
This is done with @ref glfwExtensionSupported.
|
||||
|
||||
@code
|
||||
if (glfwExtensionSupported("GL_ARB_debug_output"))
|
||||
```c
|
||||
if (glfwExtensionSupported("GL_ARB_gl_spirv"))
|
||||
{
|
||||
// The extension is supported by the current context
|
||||
}
|
||||
@endcode
|
||||
```
|
||||
|
||||
The argument is a null terminated ASCII string with the extension name. If the
|
||||
extension is supported, @ref glfwExtensionSupported returns `GL_TRUE`, otherwise
|
||||
it returns `GL_FALSE`.
|
||||
extension is supported, @ref glfwExtensionSupported returns `GLFW_TRUE`,
|
||||
otherwise it returns `GLFW_FALSE`.
|
||||
|
||||
|
||||
@subsubsection context_glext_proc Fetching function pointers
|
||||
#### Fetching function pointers {#context_glext_proc}
|
||||
|
||||
Many extensions, though not all, require the use of new OpenGL functions.
|
||||
These functions often do not have entry points in the client API libraries of
|
||||
your operating system, making it necessary to fetch them at run time. You can
|
||||
retrieve pointers to these functions with @ref glfwGetProcAddress.
|
||||
|
||||
@code
|
||||
PFNGLGETDEBUGMESSAGELOGARBPROC pfnGetDebugMessageLog = glfwGetProcAddress("glGetDebugMessageLogARB");
|
||||
@endcode
|
||||
```c
|
||||
PFNGLSPECIALIZESHADERARBPROC pfnSpecializeShaderARB = glfwGetProcAddress("glSpecializeShaderARB");
|
||||
```
|
||||
|
||||
In general, you should avoid giving the function pointer variables the (exact)
|
||||
same name as the function, as this may confuse your linker. Instead, you can
|
||||
@ -293,37 +308,33 @@ use a different prefix, like above, or some other naming scheme.
|
||||
Now that all the pieces have been introduced, here is what they might look like
|
||||
when used together.
|
||||
|
||||
@code
|
||||
```c
|
||||
#define GLFW_INCLUDE_GLEXT
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
#define glGetDebugMessageLogARB pfnGetDebugMessageLog
|
||||
PFNGLGETDEBUGMESSAGELOGARBPROC pfnGetDebugMessageLog;
|
||||
#define glSpecializeShaderARB pfnSpecializeShaderARB
|
||||
PFNGLSPECIALIZESHADERARBPROC pfnSpecializeShaderARB;
|
||||
|
||||
// Flag indicating whether the extension is supported
|
||||
int has_ARB_debug_output = 0;
|
||||
int has_ARB_gl_spirv = 0;
|
||||
|
||||
void load_extensions(void)
|
||||
{
|
||||
if (glfwExtensionSupported("GL_ARB_debug_output"))
|
||||
if (glfwExtensionSupported("GL_ARB_gl_spirv"))
|
||||
{
|
||||
pfnGetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGARBPROC) glfwGetProcAddress("glGetDebugMessageLogARB");
|
||||
if (pfnGetDebugMessageLog)
|
||||
{
|
||||
// Both the extension name and the function pointer are present
|
||||
has_ARB_debug_output = 1;
|
||||
}
|
||||
pfnSpecializeShaderARB = (PFNGLSPECIALIZESHADERARBPROC)
|
||||
glfwGetProcAddress("glSpecializeShaderARB");
|
||||
has_ARB_gl_spirv = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void some_function(void)
|
||||
{
|
||||
if (has_ARB_debug_output)
|
||||
if (has_ARB_gl_spirv)
|
||||
{
|
||||
// Now the extension function can be called as usual
|
||||
glGetDebugMessageLogARB(...);
|
||||
glSpecializeShaderARB(...);
|
||||
}
|
||||
}
|
||||
@endcode
|
||||
```
|
||||
|
||||
*/
|
File diff suppressed because one or more lines are too long
7
docs/extra.css.map
Normal file
7
docs/extra.css.map
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"mappings": "AA8EA,2GAA4G,CAC3G,UAAU,CAAC,IAAI,CACf,WAAW,CAAC,IAAI,CAGjB,wBAAyB,CACxB,YAAY,CAAC,2CAAsD,CAGpE,4HAA6H,CAC5H,YAAY,CAAC,wCAAuD,CAGrE,wIAAyI,CACxI,YAAY,CAAC,wCAAuD,CAGrE,kBAAmB,CAClB,UAAU,CA9EgB,IAAa,CA+EvC,WAAW,CAAC,IAAI,CAGjB,sBAAuB,CACtB,KAAK,CAzFe,OAAa,CA0FjC,WAAW,CAAC,IAAI,CAGjB,4UAA6U,CAC5U,UAAU,CAAC,IAAI,CAGhB,kJAAmJ,CAClJ,MAAM,CAAC,IAAI,CAGZ,wHAAyH,CACxH,WAAW,CAAC,IAAI,CAGjB,qBAAsB,CACrB,UAAU,CAAC,IAAI,CAGhB,2LAA4L,CAC3L,OAAO,CAAC,CAAC,CAGV,wCAAyC,CACxC,OAAO,CAAC,IAAI,CAGb,iMAAkM,CACjM,UAAU,CApGW,OAA+B,CAuGrD,IAAK,CACJ,KAAK,CA1He,OAAa,CA6HlC,SAAU,CACN,SAAS,CAAE,IAAI,CACf,MAAM,CAAE,aAAa,CAGzB,qDAAsD,CACrD,KAAK,CApHU,OAAa,CAqH5B,aAAa,CAAC,IAAI,CAGnB,EAAG,CACF,WAAW,CAAC,KAAK,CACjB,SAAS,CAAC,IAAI,CAGf,EAAG,CACF,WAAW,CAAC,KAAK,CACjB,aAAa,CAAC,CAAC,CACf,SAAS,CAAC,IAAI,CAGf,EAAG,CACF,WAAW,CAAC,KAAK,CACjB,aAAa,CAAC,CAAC,CACf,SAAS,CAAC,IAAI,CAGf,WAAY,CACX,SAAS,CAAC,IAAI,CACd,UAAU,CAAC,IAAI,CACf,SAAS,CAAC,KAAK,CACf,OAAO,CAAC,MAAM,CACd,MAAM,CAAC,MAAM,CAEb,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,GAAG,CACnB,SAAS,CAAE,IAAI,CACf,eAAe,CAAE,UAAU,CAC3B,WAAW,CAAE,MAAM,CACnB,aAAa,CAAE,OAAO,CAGvB,SAAU,CACT,WAAW,CAAC,IAAI,CAChB,aAAa,CAAC,IAAI,CAClB,KAAK,CApKqB,IAAa,CAqKvC,SAAS,CAAC,KAAK,CACf,UAAU,CAAC,yDAAyD,CAGrE,WAAY,CACX,eAAe,CAAC,IAAI,CACpB,MAAM,CAAC,UAAU,CACjB,KAAK,CAAC,KAAK,CAGZ,wBAAyB,CACxB,KAAK,CAAC,IAAI,CAGX,mCAAoC,CACnC,WAAW,CAAC,IAAI,CAChB,WAAW,CAAC,GAAG,CACf,OAAO,CAAC,KAAK,CACb,KAAK,CAvLqB,IAAa,CA0LxC,WAAY,CACX,YAAY,CAAE,CAAC,CAGhB,6CAA8C,CAC7C,UAAU,CAAC,SAAS,CAGrB,kBAAmB,CAClB,KAAK,CAnMqB,IAAa,CAsMxC,cAAe,CACd,UAAU,CAAC,MAAM,CACjB,OAAO,CAAC,GAAG,CACX,UAAU,CAAC,GAAG,CAGf,IAAK,CACJ,UAAU,CA7MgB,IAAa,CAgNxC,SAAU,CACT,SAAS,CAAC,KAAK,CACf,MAAM,CAAC,MAAM,CACb,SAAS,CAAC,IAAI,CAGf,UAAW,CACV,SAAS,CAAC,KAAK,CACf,MAAM,CAAC,MAAM,CACb,SAAS,CAAC,IAAI,CAGf,SAAU,CACT,OAAO,CAAC,IAAI,CAGb,kBAAmB,CAClB,WAAW,CAAC,IAAI,CAChB,WAAW,CAAC,IAAI,CAGjB,UAAW,CACV,UAAU,CAAC,IAAI,CACf,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,GAAG,CACnB,SAAS,CAAE,IAAI,CACf,eAAe,CAAE,UAAU,CAC3B,WAAW,CAAE,MAAM,CACnB,aAAa,CAAE,OAAO,CAGvB,kBAAmB,CACf,aAAa,CAAE,IAAI,CAGvB,kEAAmE,CAClE,KAAK,CAxOgB,OAA+B,CA2OrD,+BAAgC,CAC/B,KAAK,CA9Pe,OAAa,CAiQlC,qCAAsC,CACrC,KAAK,CA9NoB,IAAsB,CAiOhD,wBAA2B,CAC1B,MAAM,CAAE,UAAU,CAGnB,SAAU,CACT,UAAU,CAAC,KAAK,CAGjB,uBAAwB,CACvB,SAAS,CAAC,KAAK,CACf,MAAM,CAAC,MAAM,CACb,OAAO,CAAC,MAAM,CACd,UAAU,CAAC,SAA8B,CAG1C,sDAAuD,CACtD,UAAU,CAAC,iDAAoF,CAC/F,UAAU,CAAC,mBAAuC,CAClD,WAAW,CAAC,kBAAgD,CAC5D,UAAU,CAAC,IAAI,CACf,KAAK,CAtPa,IAAe,CAyPlC,kBAAmB,CAClB,KAAK,CAzPoB,IAAsB,CA0P/C,OAAO,CAAC,IAAI,CACZ,aAAa,CAAC,GAAG,CACjB,gBAAgB,CAAC,OAAiC,CAGnD,OAAQ,CACP,KAAK,CAAC,KAAK,CACX,KAAK,CAAC,GAAG,CAGV,oCAAoC,CACnC,OAAQ,CACP,KAAK,CAAC,IAAI,CACV,KAAK,CAAC,OAAO,CACb,MAAM,CAAC,CAAC,EAIV,UAAW,CACV,SAAS,CAAC,MAAM,CAGjB,UAAW,CACV,YAAY,CAAC,KAAK,CAGnB,UAAW,CACV,SAAS,CAAC,GAAG,CACb,YAAY,CAAC,CAAC,CACd,eAAe,CAAC,IAAI,CAIjB,mCAAqB,CACjB,WAAW,CAAC,KAAK,CAIzB,mCAAoC,CACnC,UAAU,CAAC,oDAAgF,CAC3F,UAAU,CAAC,sBAAqC,CAChD,WAAW,CAAC,cAA8C,CAC1D,KAAK,CAzTU,OAAa,CA0T5B,MAAM,CAAC,iBAAgC,CACvC,aAAa,CAAC,GAAG,CAGlB,UAAW,CACV,KAAK,CAlSkB,OAAgC,CAqSxD,aAAc,CACb,MAAM,CAAC,cAA+B,CACtC,sBAAsB,CAAC,GAAG,CAC1B,uBAAuB,CAAC,GAAG,CAC3B,aAAa,CAAC,IAAI,CAGnB,aAAc,CACb,MAAM,CAAC,cAA+B,CACtC,0BAA0B,CAAC,GAAG,CAC9B,yBAAyB,CAAC,GAAG,CAC7B,UAAU,CAAC,IAAI,CAGhB,kCAAmC,CAClC,eAAe,CAAC,OAAO,CACvB,cAAc,CAAC,CAAC,CAChB,MAAM,CAAC,cAA+B,CACtC,aAAa,CAAC,GAAG,CAGlB,+HAAgI,CAC/H,KAAK,CAnUoB,IAAsB,CAoU/C,eAAe,CAAC,IAAI,CAGrB,aAAc,CACb,eAAe,CAAC,OAAO,CACvB,cAAc,CAAC,CAAC,CAChB,MAAM,CAAC,cAA+B,CACtC,aAAa,CAAC,GAAG,CAGlB,gBAAiB,CAChB,MAAM,CAAC,GAAG,CACV,UAAU,CAAC,gEAAiH,CAG7H,mCAAoC,CA3TnC,UAAU,CAAC,oDAAuE,CAClF,UAAU,CAAC,sBAAsC,CACjD,KAAK,CAAC,OAAwB,CAC9B,MAAM,CAAC,iBAAmD,CA4T3D,uBAAwB,CA/TvB,UAAU,CAAC,oDAAuE,CAClF,UAAU,CAAC,sBAAsC,CACjD,KAAK,CAAC,OAAwB,CAC9B,MAAM,CAAC,iBAAmD,CAgU3D,oBAAqB,CAnUpB,UAAU,CAAC,oDAAuE,CAClF,UAAU,CAAC,sBAAsC,CACjD,KAAK,CAAC,OAAwB,CAC9B,MAAM,CAAC,iBAAmD,CAoU3D,eAAgB,CAvUf,UAAU,CAAC,oDAAuE,CAClF,UAAU,CAAC,sBAAsC,CACjD,KAAK,CAAC,OAAwB,CAC9B,MAAM,CAAC,iBAAmD,CAwU3D,gGAAiG,CAChG,aAAa,CAAC,GAAG,CACjB,OAAO,CAAC,GAAG,CACX,WAAW,CAAC,cAAwB,CACpC,MAAM,CAAC,KAAK,CAGb,iRAAkR,CACjR,KAAK,CAAC,OAAO,CAGd,QAAS,CACR,WAAW,CAAC,OAAO,CAGpB,yBAA0B,CACzB,UAAU,CAAC,OAAa,CACxB,aAAa,CAAC,GAAG,CACjB,MAAM,CAAC,IAAI,CACX,OAAO,CAAC,GAAG,CACX,QAAQ,CAAC,IAAI,CACb,WAAW,CAAC,cAAuB,CACnC,MAAM,CAAC,KAAK,CAGb,8CAA+C,CAC9C,KAAK,CAjae,OAAa,CAoalC,8BAA+B,CAC9B,KAAK,CAAC,OAAiB,CAGxB,qBAAsB,CACrB,KAAK,CAAC,OAAgB,CAGvB,8CAA+C,CAC9C,KAAK,CAAC,OAA+B,CACrC,WAAW,CAAC,IAAI,CAGjB,kBAAmB,CAClB,KAAK,CAAC,OAAiB,CAGxB,IAAK,CACJ,OAAO,CAAC,IAAI,CACZ,aAAa,CAAC,GAAG",
|
||||
"sources": ["extra.scss"],
|
||||
"names": [],
|
||||
"file": "extra.css"
|
||||
}
|
370
docs/extra.less
370
docs/extra.less
@ -1,370 +0,0 @@
|
||||
// NOTE: Please use this file to perform modifications on default style sheets.
|
||||
//
|
||||
// You need to install a few Ruby gems to generate extra.css from this file:
|
||||
// gem install less therubyracer
|
||||
//
|
||||
// Run this command to regenerate extra.css after you're finished with changes:
|
||||
// lessc --compress extra.less > extra.css
|
||||
//
|
||||
// Alternatively you can use online services to regenerate extra.css.
|
||||
|
||||
|
||||
// Default text color for page contents
|
||||
@default-text-color: hsl(0,0%,30%);
|
||||
|
||||
// Page header, footer, table rows, inline codes and definition lists
|
||||
@header-footer-background-color: hsl(0,0%,95%);
|
||||
|
||||
// Page header, footer links and navigation bar background
|
||||
@header-footer-link-color: hsl(0,0%,40%);
|
||||
|
||||
// Doxygen navigation bar links
|
||||
@navbar-link-color: @header-footer-background-color;
|
||||
|
||||
// Page content background color
|
||||
@content-background-color: hsl(0,0%,100%);
|
||||
|
||||
// Bold, italic, h1, h2, ... and table of contents
|
||||
@heading-color: hsl(0,0%,10%);
|
||||
|
||||
// Function, enum and macro definition separator
|
||||
@def-separator-color: @header-footer-background-color;
|
||||
|
||||
// Base color hue
|
||||
@base-hue: 24;
|
||||
|
||||
// Default color used for links
|
||||
@default-link-color: hsl(@base-hue,100%,50%);
|
||||
|
||||
// Doxygen navigation bar active tab
|
||||
@tab-text-color: hsl(0,0%,100%);
|
||||
@tab-background-color1: @default-link-color;
|
||||
@tab-background-color2: lighten(spin(@tab-background-color1, 10), 10%);
|
||||
|
||||
// Table borders
|
||||
@default-border-color: @default-link-color;
|
||||
|
||||
// Table header
|
||||
@table-text-color: @tab-text-color;
|
||||
@table-background-color1: @tab-background-color1;
|
||||
@table-background-color2: @tab-background-color2;
|
||||
|
||||
// Table of contents, data structure index and prototypes
|
||||
@toc-background-color1: hsl(0,0%,90%);
|
||||
@toc-background-color2: lighten(@toc-background-color1, 5%);
|
||||
|
||||
// Function prototype parameters color
|
||||
@prototype-param-color: darken(@default-link-color, 25%);
|
||||
|
||||
// Message box color: note, pre, post and invariant
|
||||
@box-note-color: hsl(103,80%,85%);
|
||||
|
||||
// Message box color: warning and attention
|
||||
@box-warning-color: hsl(34,80%,85%);
|
||||
|
||||
// Message box color: deprecated and bug
|
||||
@box-bug-color: hsl(333,80%,85%);
|
||||
|
||||
// Message box color: todo and test
|
||||
@box-todo-color: hsl(200,80%,85%);
|
||||
|
||||
// Message box helper function
|
||||
.message-box(@base-color) {
|
||||
background:linear-gradient(to bottom,lighten(@base-color, 5%) 0%,@base-color 100%);
|
||||
box-shadow:inset 0 0 32px darken(@base-color, 5%);
|
||||
color:darken(@base-color, 67%);
|
||||
border:2px solid desaturate(darken(@base-color, 10%), 20%);
|
||||
}
|
||||
|
||||
|
||||
#navrow1,#navrow2,#navrow3,#navrow4,.tablist a,.tablist a:visited,.tablist a:hover,.tablist li,.tablist li.current a,.memdoc,dl.reflist dd,div.toc li,.ah,span.lineno,span.lineno a,span.lineno a:hover,.note code,.pre code,.post code,.invariant code,.warning code,.attention code,.deprecated code,.bug code,.todo code,.test code,.doxtable code {
|
||||
background:none;
|
||||
}
|
||||
|
||||
#titlearea,.footer,.contents,div.header,.memdoc,table.doxtable td,table.doxtable th,hr,.memSeparator {
|
||||
border:none;
|
||||
}
|
||||
|
||||
.tablist a,.tablist a:visited,.tablist a:hover,.tablist li,.tablist li.current a,.reflist dt a.el,.levels span,.directory .levels span {
|
||||
text-shadow:none;
|
||||
}
|
||||
|
||||
.memdoc,dl.reflist dd {
|
||||
box-shadow:none;
|
||||
}
|
||||
|
||||
div.headertitle,.note code,.pre code,.post code,.invariant code,.warning code,.attention code,.deprecated code,.bug code,.todo code,.test code,table.doxtable code {
|
||||
padding:0;
|
||||
}
|
||||
|
||||
#nav-path,.directory .levels,span.lineno {
|
||||
display:none;
|
||||
}
|
||||
|
||||
html,#titlearea,.footer,tr.even,.directory tr.even,.doxtable tr:nth-child(even),.mdescLeft,.mdescRight,.memItemLeft,.memItemRight,code {
|
||||
background:@header-footer-background-color;
|
||||
}
|
||||
|
||||
body {
|
||||
color:@default-text-color;
|
||||
}
|
||||
|
||||
h1,h2,h2.groupheader,h3,div.toc h3,h4,h5,h6,strong,em {
|
||||
color:@heading-color;
|
||||
border-bottom:none;
|
||||
}
|
||||
|
||||
h1 {
|
||||
padding-top:0.5em;
|
||||
font-size:180%;
|
||||
}
|
||||
|
||||
h2 {
|
||||
padding-top:0.5em;
|
||||
margin-bottom:0;
|
||||
font-size:140%;
|
||||
}
|
||||
|
||||
h3 {
|
||||
padding-top:0.5em;
|
||||
margin-bottom:0;
|
||||
font-size:110%;
|
||||
}
|
||||
|
||||
.glfwheader {
|
||||
font-size:16px;
|
||||
height:64px;
|
||||
max-width:920px;
|
||||
min-width:800px;
|
||||
padding:0 32px;
|
||||
margin:0 auto;
|
||||
}
|
||||
|
||||
#glfwhome {
|
||||
line-height:64px;
|
||||
padding-right:48px;
|
||||
color:@header-footer-link-color;
|
||||
font-size:2.5em;
|
||||
background:url("http://www.glfw.org/css/arrow.png") no-repeat right;
|
||||
}
|
||||
|
||||
.glfwnavbar {
|
||||
list-style-type:none;
|
||||
margin:0 auto;
|
||||
float:right;
|
||||
}
|
||||
|
||||
#glfwhome,.glfwnavbar li {
|
||||
float:left;
|
||||
}
|
||||
|
||||
.glfwnavbar a,.glfwnavbar a:visited {
|
||||
line-height:64px;
|
||||
margin-left:2em;
|
||||
display:block;
|
||||
color:@header-footer-link-color;
|
||||
}
|
||||
|
||||
#glfwhome,.glfwnavbar a,.glfwnavbar a:visited {
|
||||
transition:.35s ease;
|
||||
}
|
||||
|
||||
#titlearea,.footer {
|
||||
color:@header-footer-link-color;
|
||||
}
|
||||
|
||||
address.footer {
|
||||
text-align:center;
|
||||
padding:2em;
|
||||
margin-top:3em;
|
||||
}
|
||||
|
||||
#top {
|
||||
background:@header-footer-link-color;
|
||||
}
|
||||
|
||||
#navrow1,#navrow2,#navrow3,#navrow4 {
|
||||
max-width:920px;
|
||||
min-width:800px;
|
||||
margin:0 auto;
|
||||
font-size:13px;
|
||||
}
|
||||
|
||||
.tablist {
|
||||
height:36px;
|
||||
display:block;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
.tablist a,.tablist a:visited,.tablist a:hover,.tablist li,.tablist li.current a {
|
||||
color:@navbar-link-color;
|
||||
}
|
||||
|
||||
.tablist li.current a {
|
||||
background:linear-gradient(to bottom,@tab-background-color2 0%,@tab-background-color1 100%);
|
||||
box-shadow:inset 0 0 32px @tab-background-color1;
|
||||
text-shadow:0 -1px 1px darken(@tab-background-color1, 15%);
|
||||
color:@tab-text-color;
|
||||
}
|
||||
|
||||
.contents {
|
||||
min-height:590px;
|
||||
}
|
||||
|
||||
div.contents,div.header {
|
||||
max-width:920px;
|
||||
margin:0 auto;
|
||||
padding:0 32px;
|
||||
background:@content-background-color none;
|
||||
}
|
||||
|
||||
table.doxtable th,dl.reflist dt {
|
||||
background:linear-gradient(to bottom,@table-background-color2 0%,@table-background-color1 100%);
|
||||
box-shadow:inset 0 0 32px @table-background-color1;
|
||||
text-shadow:0 -1px 1px darken(@table-background-color1, 15%);
|
||||
color:@table-text-color;
|
||||
}
|
||||
|
||||
dl.reflist dt a.el {
|
||||
color:@default-link-color;
|
||||
padding:.2em;
|
||||
border-radius:4px;
|
||||
background-color:lighten(@default-link-color, 40%);
|
||||
}
|
||||
|
||||
div.toc {
|
||||
float:none;
|
||||
width:auto;
|
||||
}
|
||||
|
||||
div.toc h3 {
|
||||
font-size:1.17em;
|
||||
}
|
||||
|
||||
div.toc ul {
|
||||
padding-left:1.5em;
|
||||
}
|
||||
|
||||
div.toc li {
|
||||
font-size:1em;
|
||||
padding-left:0;
|
||||
list-style-type:disc;
|
||||
}
|
||||
|
||||
div.toc,.memproto,div.qindex,div.ah {
|
||||
background:linear-gradient(to bottom,@toc-background-color2 0%,@toc-background-color1 100%);
|
||||
box-shadow:inset 0 0 32px @toc-background-color1;
|
||||
text-shadow:0 1px 1px lighten(@toc-background-color2, 10%);
|
||||
color:@heading-color;
|
||||
border:2px solid @toc-background-color1;
|
||||
border-radius:4px;
|
||||
}
|
||||
|
||||
.paramname {
|
||||
color:@prototype-param-color;
|
||||
}
|
||||
|
||||
dl.reflist dt {
|
||||
border:2px solid @default-border-color;
|
||||
border-top-left-radius:4px;
|
||||
border-top-right-radius:4px;
|
||||
border-bottom:none;
|
||||
}
|
||||
|
||||
dl.reflist dd {
|
||||
border:2px solid @default-border-color;
|
||||
border-bottom-right-radius:4px;
|
||||
border-bottom-left-radius:4px;
|
||||
border-top:none;
|
||||
}
|
||||
|
||||
table.doxtable {
|
||||
border-collapse:inherit;
|
||||
border-spacing:0;
|
||||
border:2px solid @default-border-color;
|
||||
border-radius:4px;
|
||||
}
|
||||
|
||||
a,a:hover,a:visited,a:visited:hover,.contents a:visited,.el,a.el:visited,#glfwhome:hover,.tablist a:hover,span.lineno a:hover {
|
||||
color:@default-link-color;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
div.directory {
|
||||
border-collapse:inherit;
|
||||
border-spacing:0;
|
||||
border:2px solid @default-border-color;
|
||||
border-radius:4px;
|
||||
}
|
||||
|
||||
hr,.memSeparator {
|
||||
height:2px;
|
||||
background:linear-gradient(to right,@def-separator-color 0%,darken(@def-separator-color, 10%) 50%,@def-separator-color 100%);
|
||||
}
|
||||
|
||||
dl.note,dl.pre,dl.post,dl.invariant {
|
||||
.message-box(@box-note-color);
|
||||
}
|
||||
|
||||
dl.warning,dl.attention {
|
||||
.message-box(@box-warning-color);
|
||||
}
|
||||
|
||||
dl.deprecated,dl.bug {
|
||||
.message-box(@box-bug-color);
|
||||
}
|
||||
|
||||
dl.todo,dl.test {
|
||||
.message-box(@box-todo-color);
|
||||
}
|
||||
|
||||
dl.note,dl.pre,dl.post,dl.invariant,dl.warning,dl.attention,dl.deprecated,dl.bug,dl.todo,dl.test {
|
||||
border-radius:4px;
|
||||
padding:1em;
|
||||
text-shadow:0 1px 1px hsl(0,0%,100%);
|
||||
margin:1em 0;
|
||||
}
|
||||
|
||||
.note a,.pre a,.post a,.invariant a,.warning a,.attention a,.deprecated a,.bug a,.todo a,.test a,.note a:visited,.pre a:visited,.post a:visited,.invariant a:visited,.warning a:visited,.attention a:visited,.deprecated a:visited,.bug a:visited,.todo a:visited,.test a:visited {
|
||||
color:inherit;
|
||||
}
|
||||
|
||||
div.line {
|
||||
line-height:inherit;
|
||||
}
|
||||
|
||||
div.fragment,pre.fragment {
|
||||
background:hsl(0,0%,95%);
|
||||
border-radius:4px;
|
||||
border:none;
|
||||
padding:1em;
|
||||
overflow:auto;
|
||||
border-left:4px solid hsl(0,0%,80%);
|
||||
margin:1em 0;
|
||||
}
|
||||
|
||||
.lineno a,.lineno a:visited,.line,pre.fragment {
|
||||
color:@default-text-color;
|
||||
}
|
||||
|
||||
span.preprocessor,span.comment {
|
||||
color:hsl(193,100%,30%);
|
||||
}
|
||||
|
||||
a.code,a.code:visited {
|
||||
color:hsl(18,100%,45%);
|
||||
}
|
||||
|
||||
span.keyword,span.keywordtype,span.keywordflow {
|
||||
color:darken(@default-text-color, 5%);
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
span.stringliteral {
|
||||
color:hsl(261,100%,30%);
|
||||
}
|
||||
|
||||
code {
|
||||
padding:.1em;
|
||||
border-radius:4px;
|
||||
}
|
453
docs/extra.scss
Normal file
453
docs/extra.scss
Normal file
@ -0,0 +1,453 @@
|
||||
// NOTE: Please use this file to perform modifications on default style sheets.
|
||||
//
|
||||
// You need to install the official Sass CLI tool:
|
||||
// npm install -g sass
|
||||
//
|
||||
// Run this command to regenerate extra.css after you're finished with changes:
|
||||
// sass --style=compressed extra.scss extra.css
|
||||
//
|
||||
// Alternatively you can use online services to regenerate extra.css.
|
||||
|
||||
|
||||
// Default text color for page contents
|
||||
$default-text-color: hsl(0,0%,30%);
|
||||
|
||||
// Page header, footer, table rows, inline codes and definition lists
|
||||
$header-footer-background-color: hsl(0,0%,95%);
|
||||
|
||||
// Page header, footer links and navigation bar background
|
||||
$header-footer-link-color: hsl(0,0%,40%);
|
||||
|
||||
// Doxygen navigation bar links
|
||||
$navbar-link-color: $header-footer-background-color;
|
||||
|
||||
// Page content background color
|
||||
$content-background-color: hsl(0,0%,100%);
|
||||
|
||||
// Bold, italic, h1, h2, ... and table of contents
|
||||
$heading-color: hsl(0,0%,10%);
|
||||
|
||||
// Function, enum and macro definition separator
|
||||
$def-separator-color: $header-footer-background-color;
|
||||
|
||||
// Base color hue
|
||||
$base-hue: 24;
|
||||
|
||||
// Default color used for links
|
||||
$default-link-color: hsl($base-hue,100%,50%);
|
||||
|
||||
// Doxygen navigation bar active tab
|
||||
$tab-text-color: hsl(0,0%,100%);
|
||||
$tab-background-color1: $default-link-color;
|
||||
$tab-background-color2: lighten(adjust-hue($tab-background-color1, 10), 10%);
|
||||
|
||||
// Table borders
|
||||
$default-border-color: $default-link-color;
|
||||
|
||||
// Table header
|
||||
$table-text-color: $tab-text-color;
|
||||
$table-background-color1: $tab-background-color1;
|
||||
$table-background-color2: $tab-background-color2;
|
||||
|
||||
// Table of contents, data structure index and prototypes
|
||||
$toc-background-color1: hsl(0,0%,90%);
|
||||
$toc-background-color2: lighten($toc-background-color1, 5%);
|
||||
|
||||
// Function prototype parameters color
|
||||
$prototype-param-color: darken($default-link-color, 25%);
|
||||
|
||||
// Message box color: note, pre, post and invariant
|
||||
$box-note-color: hsl(103,80%,85%);
|
||||
|
||||
// Message box color: warning and attention
|
||||
$box-warning-color: hsl(34,80%,85%);
|
||||
|
||||
// Message box color: deprecated and bug
|
||||
$box-bug-color: hsl(333,80%,85%);
|
||||
|
||||
// Message box color: todo and test
|
||||
$box-todo-color: hsl(200,80%,85%);
|
||||
|
||||
// Message box helper function
|
||||
@mixin message-box($base-color){
|
||||
background:linear-gradient(to bottom,lighten($base-color, 5%) 0%,$base-color 100%);
|
||||
box-shadow:inset 0 0 32px darken($base-color, 5%);
|
||||
color:darken($base-color, 67%);
|
||||
border:2px solid desaturate(darken($base-color, 10%), 20%);
|
||||
}
|
||||
|
||||
.sm-dox,.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted,.sm-dox ul a:hover {
|
||||
background:none;
|
||||
text-shadow:none;
|
||||
}
|
||||
|
||||
.sm-dox a span.sub-arrow {
|
||||
border-color:$navbar-link-color transparent transparent transparent;
|
||||
}
|
||||
|
||||
.sm-dox a span.sub-arrow:active,.sm-dox a span.sub-arrow:focus,.sm-dox a span.sub-arrow:hover,.sm-dox a:hover span.sub-arrow {
|
||||
border-color:$default-link-color transparent transparent transparent;
|
||||
}
|
||||
|
||||
.sm-dox ul a span.sub-arrow:active,.sm-dox ul a span.sub-arrow:focus,.sm-dox ul a span.sub-arrow:hover,.sm-dox ul a:hover span.sub-arrow {
|
||||
border-color:transparent transparent transparent $default-link-color;
|
||||
}
|
||||
|
||||
.sm-dox ul a:hover {
|
||||
background:$header-footer-link-color;
|
||||
text-shadow:none;
|
||||
}
|
||||
|
||||
.sm-dox ul.sm-nowrap a {
|
||||
color:$default-text-color;
|
||||
text-shadow:none;
|
||||
}
|
||||
|
||||
#main-nav,#main-menu,#main-menu a,#main-menu a:visited,#main-menu a:hover,#main-menu li,.memdoc,dl.reflist dd,div.toc li,.ah,span.lineno,span.lineno a,span.lineno a:hover,.note code,.pre code,.post code,.invariant code,.warning code,.attention code,.deprecated code,.bug code,.todo code,.test code,.doxtable code,.markdownTable code {
|
||||
background:none;
|
||||
}
|
||||
|
||||
#titlearea,.footer,.contents,div.header,.memdoc,table.doxtable td,table.doxtable th,table.markdownTable td,table.markdownTable th,hr,.memSeparator {
|
||||
border:none;
|
||||
}
|
||||
|
||||
#main-menu a,#main-menu a:visited,#main-menu a:hover,#main-menu li,.reflist dt a.el,.levels span,.directory .levels span {
|
||||
text-shadow:none;
|
||||
}
|
||||
|
||||
.memdoc,dl.reflist dd {
|
||||
box-shadow:none;
|
||||
}
|
||||
|
||||
div.headertitle,.note code,.pre code,.post code,.invariant code,.warning code,.attention code,.deprecated code,.bug code,.todo code,.test code,table.doxtable code,table.markdownTable code {
|
||||
padding:0;
|
||||
}
|
||||
|
||||
#nav-path,.directory .levels,span.lineno {
|
||||
display:none;
|
||||
}
|
||||
|
||||
html,#titlearea,.footer,tr.even,.directory tr.even,.doxtable tr:nth-child(even),tr.markdownTableBody:nth-child(even),.mdescLeft,.mdescRight,.memItemLeft,.memItemRight,code,.markdownTableRowEven {
|
||||
background:$header-footer-background-color;
|
||||
}
|
||||
|
||||
body {
|
||||
color:$default-text-color;
|
||||
}
|
||||
|
||||
div.title {
|
||||
font-size: 170%;
|
||||
margin: 1em 0 0.5em 0;
|
||||
}
|
||||
|
||||
h1,h2,h2.groupheader,h3,div.toc h3,h4,h5,h6,strong,em {
|
||||
color:$heading-color;
|
||||
border-bottom:none;
|
||||
}
|
||||
|
||||
h1 {
|
||||
padding-top:0.5em;
|
||||
font-size:150%;
|
||||
}
|
||||
|
||||
h2 {
|
||||
padding-top:0.5em;
|
||||
margin-bottom:0;
|
||||
font-size:130%;
|
||||
}
|
||||
|
||||
h3 {
|
||||
padding-top:0.5em;
|
||||
margin-bottom:0;
|
||||
font-size:110%;
|
||||
}
|
||||
|
||||
.glfwheader {
|
||||
font-size:16px;
|
||||
min-height:64px;
|
||||
max-width:920px;
|
||||
padding:0 32px;
|
||||
margin:0 auto;
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
align-content: stretch;
|
||||
}
|
||||
|
||||
#glfwhome {
|
||||
line-height:64px;
|
||||
padding-right:48px;
|
||||
color:$header-footer-link-color;
|
||||
font-size:2.5em;
|
||||
background:url("https://www.glfw.org/css/arrow.png") no-repeat right;
|
||||
}
|
||||
|
||||
.glfwnavbar {
|
||||
list-style-type:none;
|
||||
margin:0 0 0 auto;
|
||||
float:right;
|
||||
}
|
||||
|
||||
#glfwhome,.glfwnavbar li {
|
||||
float:left;
|
||||
}
|
||||
|
||||
.glfwnavbar a,.glfwnavbar a:visited {
|
||||
line-height:64px;
|
||||
margin-left:2em;
|
||||
display:block;
|
||||
color:$header-footer-link-color;
|
||||
}
|
||||
|
||||
.glfwnavbar {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#glfwhome,.glfwnavbar a,.glfwnavbar a:visited {
|
||||
transition:.35s ease;
|
||||
}
|
||||
|
||||
#titlearea,.footer {
|
||||
color:$header-footer-link-color;
|
||||
}
|
||||
|
||||
address.footer {
|
||||
text-align:center;
|
||||
padding:2em;
|
||||
margin-top:3em;
|
||||
}
|
||||
|
||||
#top {
|
||||
background:$header-footer-link-color;
|
||||
}
|
||||
|
||||
#main-nav {
|
||||
max-width:960px;
|
||||
margin:0 auto;
|
||||
font-size:13px;
|
||||
}
|
||||
|
||||
#main-menu {
|
||||
max-width:920px;
|
||||
margin:0 auto;
|
||||
font-size:13px;
|
||||
}
|
||||
|
||||
.memtitle {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.memproto,.memname {
|
||||
font-weight:bold;
|
||||
text-shadow:none;
|
||||
}
|
||||
|
||||
#main-menu {
|
||||
min-height:36px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
align-content: stretch;
|
||||
}
|
||||
|
||||
#main-menu a:focus {
|
||||
outline-style: none;
|
||||
}
|
||||
|
||||
#main-menu a,#main-menu a:visited,#main-menu a:hover,#main-menu li {
|
||||
color:$navbar-link-color;
|
||||
}
|
||||
|
||||
#main-menu li ul.sm-nowrap li a {
|
||||
color:$default-text-color;
|
||||
}
|
||||
|
||||
#main-menu li ul.sm-nowrap li a:hover {
|
||||
color:$default-link-color;
|
||||
}
|
||||
|
||||
#main-menu > li:last-child {
|
||||
margin: 0 0 0 auto;
|
||||
}
|
||||
|
||||
.contents {
|
||||
min-height:590px;
|
||||
}
|
||||
|
||||
div.contents,div.header {
|
||||
max-width:920px;
|
||||
margin:0 auto;
|
||||
padding:0 32px;
|
||||
background:$content-background-color none;
|
||||
}
|
||||
|
||||
table.doxtable th,table.markdownTable th,dl.reflist dt {
|
||||
background:linear-gradient(to bottom,$table-background-color2 0%,$table-background-color1 100%);
|
||||
box-shadow:inset 0 0 32px $table-background-color1;
|
||||
text-shadow:0 -1px 1px darken($table-background-color1, 15%);
|
||||
text-align:left;
|
||||
color:$table-text-color;
|
||||
}
|
||||
|
||||
dl.reflist dt a.el {
|
||||
color:$default-link-color;
|
||||
padding:.2em;
|
||||
border-radius:4px;
|
||||
background-color:lighten($default-link-color, 40%);
|
||||
}
|
||||
|
||||
div.toc {
|
||||
float:right;
|
||||
width:35%;
|
||||
}
|
||||
|
||||
@media screen and (max-width:600px) {
|
||||
div.toc {
|
||||
float:none;
|
||||
width:inherit;
|
||||
margin:0;
|
||||
}
|
||||
}
|
||||
|
||||
div.toc h3 {
|
||||
font-size:1.17em;
|
||||
}
|
||||
|
||||
div.toc ul {
|
||||
padding-left:1.5em;
|
||||
}
|
||||
|
||||
div.toc li {
|
||||
font-size:1em;
|
||||
padding-left:0;
|
||||
list-style-type:disc;
|
||||
}
|
||||
|
||||
div.toc {
|
||||
li.level2, li.level3 {
|
||||
margin-left:0.5em;
|
||||
}
|
||||
}
|
||||
|
||||
div.toc,.memproto,div.qindex,div.ah {
|
||||
background:linear-gradient(to bottom,$toc-background-color2 0%,$toc-background-color1 100%);
|
||||
box-shadow:inset 0 0 32px $toc-background-color1;
|
||||
text-shadow:0 1px 1px lighten($toc-background-color2, 10%);
|
||||
color:$heading-color;
|
||||
border:2px solid $toc-background-color1;
|
||||
border-radius:4px;
|
||||
}
|
||||
|
||||
.paramname {
|
||||
color:$prototype-param-color;
|
||||
}
|
||||
|
||||
dl.reflist dt {
|
||||
border:2px solid $default-border-color;
|
||||
border-top-left-radius:4px;
|
||||
border-top-right-radius:4px;
|
||||
border-bottom:none;
|
||||
}
|
||||
|
||||
dl.reflist dd {
|
||||
border:2px solid $default-border-color;
|
||||
border-bottom-right-radius:4px;
|
||||
border-bottom-left-radius:4px;
|
||||
border-top:none;
|
||||
}
|
||||
|
||||
table.doxtable,table.markdownTable {
|
||||
border-collapse:inherit;
|
||||
border-spacing:0;
|
||||
border:2px solid $default-border-color;
|
||||
border-radius:4px;
|
||||
}
|
||||
|
||||
a,a:hover,a:visited,a:visited:hover,.contents a:visited,.el,a.el:visited,#glfwhome:hover,#main-menu a:hover,span.lineno a:hover {
|
||||
color:$default-link-color;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
div.directory {
|
||||
border-collapse:inherit;
|
||||
border-spacing:0;
|
||||
border:2px solid $default-border-color;
|
||||
border-radius:4px;
|
||||
}
|
||||
|
||||
hr,.memSeparator {
|
||||
height:2px;
|
||||
background:linear-gradient(to right,$def-separator-color 0%,darken($def-separator-color, 10%) 50%,$def-separator-color 100%);
|
||||
}
|
||||
|
||||
dl.note,dl.pre,dl.post,dl.invariant {
|
||||
@include message-box($box-note-color);
|
||||
}
|
||||
|
||||
dl.warning,dl.attention {
|
||||
@include message-box($box-warning-color);
|
||||
}
|
||||
|
||||
dl.deprecated,dl.bug {
|
||||
@include message-box($box-bug-color);
|
||||
}
|
||||
|
||||
dl.todo,dl.test {
|
||||
@include message-box($box-todo-color);
|
||||
}
|
||||
|
||||
dl.note,dl.pre,dl.post,dl.invariant,dl.warning,dl.attention,dl.deprecated,dl.bug,dl.todo,dl.test {
|
||||
border-radius:4px;
|
||||
padding:1em;
|
||||
text-shadow:0 1px 1px hsl(0,0%,100%);
|
||||
margin:1em 0;
|
||||
}
|
||||
|
||||
.note a,.pre a,.post a,.invariant a,.warning a,.attention a,.deprecated a,.bug a,.todo a,.test a,.note a:visited,.pre a:visited,.post a:visited,.invariant a:visited,.warning a:visited,.attention a:visited,.deprecated a:visited,.bug a:visited,.todo a:visited,.test a:visited {
|
||||
color:inherit;
|
||||
}
|
||||
|
||||
div.line {
|
||||
line-height:inherit;
|
||||
}
|
||||
|
||||
div.fragment,pre.fragment {
|
||||
background:hsl(0,0%,95%);
|
||||
border-radius:4px;
|
||||
border:none;
|
||||
padding:1em;
|
||||
overflow:auto;
|
||||
border-left:4px solid hsl(0,0%,80%);
|
||||
margin:1em 0;
|
||||
}
|
||||
|
||||
.lineno a,.lineno a:visited,.line,pre.fragment {
|
||||
color:$default-text-color;
|
||||
}
|
||||
|
||||
span.preprocessor,span.comment {
|
||||
color:hsl(193,100%,30%);
|
||||
}
|
||||
|
||||
a.code,a.code:visited {
|
||||
color:hsl(18,100%,45%);
|
||||
}
|
||||
|
||||
span.keyword,span.keywordtype,span.keywordflow {
|
||||
color:darken($default-text-color, 5%);
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
span.stringliteral {
|
||||
color:hsl(261,100%,30%);
|
||||
}
|
||||
|
||||
code {
|
||||
padding:.1em;
|
||||
border-radius:4px;
|
||||
}
|
@ -1,7 +1,8 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen $doxygenversion"/>
|
||||
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
|
||||
@ -21,12 +22,11 @@ $extrastylesheet
|
||||
<!--BEGIN TITLEAREA-->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="http://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="http://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="http://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="http://www.glfw.org/media.html">Media</a></li>
|
||||
<li><a href="http://www.glfw.org/community.html">Community</a></li>
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
588
docs/input.dox
588
docs/input.dox
@ -1,588 +0,0 @@
|
||||
/*!
|
||||
|
||||
@page input Input guide
|
||||
|
||||
@tableofcontents
|
||||
|
||||
This guide introduces the input related functions of GLFW. There are also
|
||||
guides for the other areas of GLFW.
|
||||
|
||||
- @ref intro
|
||||
- @ref window
|
||||
- @ref context
|
||||
- @ref monitor
|
||||
|
||||
GLFW provides many kinds of input. While some can only be polled, like time, or
|
||||
only received via callbacks, like scrolling, there are those that provide both
|
||||
callbacks and polling. Where a callback is provided, that is the recommended
|
||||
way to receive that kind of input. The more you can use callbacks the less time
|
||||
your users' machines will need to spend polling.
|
||||
|
||||
All input callbacks receive a window handle. By using the
|
||||
[window user pointer](@ref window_userptr), you can access non-global structures
|
||||
or objects from your callbacks.
|
||||
|
||||
To get a better feel for how the various events callbacks behave, run the
|
||||
`events` test program. It register every callback supported by GLFW and prints
|
||||
out all arguments provided for every event, along with time and sequence
|
||||
information.
|
||||
|
||||
|
||||
@section events Event processing
|
||||
|
||||
GLFW needs to communicate regularly with the window system both in order to
|
||||
receive events and to show that the application hasn't locked up. Event
|
||||
processing must be done regularly while you have visible windows and is normally
|
||||
done each frame after [buffer swapping](@ref buffer_swap).
|
||||
|
||||
There are two functions for processing pending events. @ref glfwPollEvents,
|
||||
processes only those events that have already been received and then returns
|
||||
immediately.
|
||||
|
||||
@code
|
||||
glfwPollEvents();
|
||||
@endcode
|
||||
|
||||
This is the best choice when rendering continually, like most games do.
|
||||
|
||||
If you only need to update the contents of the window when you receive new
|
||||
input, @ref glfwWaitEvents is a better choice.
|
||||
|
||||
@code
|
||||
glfwWaitEvents();
|
||||
@endcode
|
||||
|
||||
It puts the thread to sleep until at least one event has been received and then
|
||||
processes all received events. This saves a great deal of CPU cycles and is
|
||||
useful for, for example, editing tools. There must be at least one GLFW window
|
||||
for this function to sleep.
|
||||
|
||||
If the main thread is sleeping in @ref glfwWaitEvents, you can wake it from
|
||||
another thread by posting an empty event to the event queue with @ref
|
||||
glfwPostEmptyEvent.
|
||||
|
||||
@code
|
||||
glfwPostEmptyEvent();
|
||||
@endcode
|
||||
|
||||
Do not assume that callbacks will _only_ be called through either of the above
|
||||
functions. While it is necessary to process events in the event queue, some
|
||||
window systems will send some events directly to the application, which in turn
|
||||
causes callbacks to be called outside of regular event processing.
|
||||
|
||||
|
||||
@section input_keyboard Keyboard input
|
||||
|
||||
GLFW divides keyboard input into two categories; key events and character
|
||||
events. Key events relate to actual physical keyboard keys, whereas character
|
||||
events relate to the Unicode code points generated by pressing some of them.
|
||||
|
||||
Keys and characters do not map 1:1. A single key press may produce several
|
||||
characters, and a single character may require several keys to produce. This
|
||||
may not be the case on your machine, but your users are likely not all using the
|
||||
same keyboard layout, input method or even operating system as you.
|
||||
|
||||
|
||||
@subsection input_key Key input
|
||||
|
||||
If you wish to be notified when a physical key is pressed or released or when it
|
||||
repeats, set a key callback.
|
||||
|
||||
@code
|
||||
glfwSetKeyCallback(window, key_callback);
|
||||
@endcode
|
||||
|
||||
The callback function receives the [keyboard key](@ref keys), platform-specific
|
||||
scancode, key action and [modifier bits](@ref mods).
|
||||
|
||||
@code
|
||||
void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)
|
||||
{
|
||||
if (key == GLFW_KEY_E && action == GLFW_PRESS)
|
||||
activate_airship();
|
||||
}
|
||||
@endcode
|
||||
|
||||
The action is one of `GLFW_PRESS`, `GLFW_REPEAT` or `GLFW_RELEASE`. The key
|
||||
will be `GLFW_KEY_UNKNOWN` if GLFW lacks a key token for it. These keys still
|
||||
have unique, if platform-specific scancodes.
|
||||
|
||||
The scancode is unique for every key but is platform-specific, so a scancode
|
||||
will map to different keys on different platforms.
|
||||
|
||||
The key will be `GLFW_KEY_UNKNOWN` for special keys like _E-mail_ or _Play_ that
|
||||
don't have a key token. Those keys will still have unique, if platform-specific
|
||||
scancodes.
|
||||
|
||||
Key states for [named keys](@ref keys) are also saved in per-window state arrays
|
||||
that can be polled with @ref glfwGetKey.
|
||||
|
||||
@code
|
||||
int state = glfwGetKey(window, GLFW_KEY_E);
|
||||
if (state == GLFW_PRESS)
|
||||
activate_airship();
|
||||
@endcode
|
||||
|
||||
The returned state is one of `GLFW_PRESS` or `GLFW_RELEASE`.
|
||||
|
||||
This function only returns cached key event state. It does not poll the
|
||||
system for the current state of the key.
|
||||
|
||||
Whenever you poll state, you risk missing the state change you are looking for.
|
||||
If a pressed key is released again before you poll its state, you will have
|
||||
missed the key press. The recommended solution for this is to use a
|
||||
key callback, but there is also the `GLFW_STICKY_KEYS` input mode.
|
||||
|
||||
@code
|
||||
glfwSetInputMode(window, GLFW_STICKY_KEYS, 1);
|
||||
@endcode
|
||||
|
||||
When sticky keys mode is enabled, the pollable state of a key will remain
|
||||
`GLFW_PRESS` until the state of that key is polled with @ref glfwGetKey. Once
|
||||
it has been polled, if a key release event had been processed in the meantime,
|
||||
the state will reset to `GLFW_RELEASE`, otherwise it will remain `GLFW_PRESS`.
|
||||
|
||||
The `GLFW_KEY_LAST` constant holds the highest value of any
|
||||
[named key](@ref keys).
|
||||
|
||||
|
||||
@subsection input_char Text input
|
||||
|
||||
GLFW supports text input in the form of a stream of
|
||||
[Unicode code points](https://en.wikipedia.org/wiki/Unicode), as produced by the
|
||||
operating system text input system. Unlike key input, text input obeys keyboard
|
||||
layouts and modifier keys and supports composing characters using
|
||||
[dead keys](https://en.wikipedia.org/wiki/Dead_key). Once received, you can
|
||||
encode the code points into
|
||||
[UTF-8](https://en.wikipedia.org/wiki/UTF-8) or any other encoding you prefer.
|
||||
|
||||
Because an `unsigned int` is 32 bits long on all platforms supported by GLFW,
|
||||
you can treat the code point argument as native endian
|
||||
[UTF-32](https://en.wikipedia.org/wiki/UTF-32).
|
||||
|
||||
There are two callbacks for receiving Unicode code points. If you wish to
|
||||
offer regular text input, set a character callback.
|
||||
|
||||
@code
|
||||
glfwSetCharCallback(window, character_callback);
|
||||
@endcode
|
||||
|
||||
The callback function receives Unicode code points for key events that would
|
||||
have led to regular text input and generally behaves as a standard text field on
|
||||
that platform.
|
||||
|
||||
@code
|
||||
void character_callback(GLFWwindow* window, unsigned int codepoint)
|
||||
{
|
||||
}
|
||||
@endcode
|
||||
|
||||
If you wish to receive even those Unicode code points generated with modifier
|
||||
key combinations that a plain text field would ignore, or just want to know
|
||||
exactly what modifier keys were used, set a character with modifiers callback.
|
||||
|
||||
@code
|
||||
glfwSetCharModsCallback(window, charmods_callback);
|
||||
@endcode
|
||||
|
||||
The callback function receives Unicode code points and
|
||||
[modifier bits](@ref mods).
|
||||
|
||||
@code
|
||||
void charmods_callback(GLFWwindow* window, unsigned int codepoint, int mods)
|
||||
{
|
||||
}
|
||||
@endcode
|
||||
|
||||
|
||||
@section input_mouse Mouse input
|
||||
|
||||
Mouse input comes in many forms, including cursor motion, button presses and
|
||||
scrolling offsets. The cursor appearance can also be changed, either to
|
||||
a custom image or a standard cursor shape from the system theme.
|
||||
|
||||
|
||||
@subsection cursor_pos Cursor position
|
||||
|
||||
If you wish to be notified when the cursor moves over the window, set a cursor
|
||||
position callback.
|
||||
|
||||
@code
|
||||
glfwSetCursorPosCallback(window, cursor_pos_callback);
|
||||
@endcode
|
||||
|
||||
The callback functions receives the cursor position. On platforms that provide
|
||||
it, the full sub-pixel cursor position is passed on.
|
||||
|
||||
@code
|
||||
static void cursor_position_callback(GLFWwindow* window, double xpos, double ypos)
|
||||
{
|
||||
}
|
||||
@endcode
|
||||
|
||||
The cursor position is also saved per-window and can be polled with @ref
|
||||
glfwGetCursorPos.
|
||||
|
||||
@code
|
||||
double xpos, ypos;
|
||||
glfwGetCursorPos(window, &xpos, &ypos);
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection cursor_mode Cursor modes
|
||||
|
||||
The `GLFW_CURSOR` input mode provides several cursor modes for special forms of
|
||||
mouse motion input. By default, the cursor mode is `GLFW_CURSOR_NORMAL`,
|
||||
meaning the regular arrow cursor (or another cursor set with @ref glfwSetCursor)
|
||||
is used and cursor motion is not limited.
|
||||
|
||||
If you wish to implement mouse motion based camera controls or other input
|
||||
schemes that require unlimited mouse movement, set the cursor mode to
|
||||
`GLFW_CURSOR_DISABLED`.
|
||||
|
||||
@code
|
||||
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
|
||||
@endcode
|
||||
|
||||
This will hide the cursor and lock it to the specified window. GLFW will then
|
||||
take care of all the details of cursor re-centering and offset calculation and
|
||||
providing the application with a virtual cursor position. This virtual position
|
||||
is provided normally via both the cursor position callback and through polling.
|
||||
|
||||
@note You should not implement your own version of this functionality using
|
||||
other features of GLFW. It is not supported and will not work as robustly as
|
||||
`GLFW_CURSOR_DISABLED`.
|
||||
|
||||
If you just wish the cursor to become hidden when it is over a window, set
|
||||
the cursor mode to `GLFW_CURSOR_HIDDEN`.
|
||||
|
||||
@code
|
||||
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
|
||||
@endcode
|
||||
|
||||
This mode puts no limit on the motion of the cursor.
|
||||
|
||||
To exit out of either of these special modes, restore the `GLFW_CURSOR_NORMAL`
|
||||
cursor mode.
|
||||
|
||||
@code
|
||||
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection cursor_object Cursor objects
|
||||
|
||||
GLFW supports creating both custom and system theme cursor images, encapsulated
|
||||
as @ref GLFWcursor objects. They are created with @ref glfwCreateCursor or @ref
|
||||
glfwCreateStandardCursor and destroyed with @ref glfwDestroyCursor, or @ref
|
||||
glfwTerminate, if any remain.
|
||||
|
||||
|
||||
@subsubsection cursor_custom Custom cursor creation
|
||||
|
||||
A custom cursor is created with @ref glfwCreateCursor, which returns a handle to
|
||||
the created cursor object. For example, this creates a 16x16 white square
|
||||
cursor with the hot-spot in the upper-left corner:
|
||||
|
||||
@code
|
||||
unsigned char pixels[16 * 16 * 4];
|
||||
memset(pixels, 0xff, sizeof(pixels));
|
||||
|
||||
GLFWimage image;
|
||||
image.width = 16;
|
||||
image.height = 16;
|
||||
image.pixels = pixels;
|
||||
|
||||
GLFWcursor* cursor = glfwCreateCursor(&image, 0, 0);
|
||||
@endcode
|
||||
|
||||
If cursor creation fails, `NULL` will be returned, so it is necessary to check
|
||||
the return value.
|
||||
|
||||
The image data is 32-bit RGBA, i.e. eight bits per channel. The pixels are
|
||||
arranged canonically as sequential rows, starting from the top-left corner.
|
||||
|
||||
|
||||
@subsubsection cursor_standard Standard cursor creation
|
||||
|
||||
A cursor with a [standard shape](@ref shapes) from the current system cursor
|
||||
theme can be can be created with @ref glfwCreateStandardCursor.
|
||||
|
||||
@code
|
||||
GLFWcursor* cursor = glfwCreateStandardCursor(GLFW_HRESIZE_CURSOR);
|
||||
@endcode
|
||||
|
||||
These cursor objects behave in the exact same way as those created with @ref
|
||||
glfwCreateCursor except that the system cursor theme provides the actual image.
|
||||
|
||||
|
||||
@subsubsection cursor_destruction Cursor destruction
|
||||
|
||||
When a cursor is no longer needed, destroy it with @ref glfwDestroyCursor.
|
||||
|
||||
@code
|
||||
glfwDestroyCursor(cursor);
|
||||
@endcode
|
||||
|
||||
Cursor destruction always succeeds. All cursors remaining when @ref
|
||||
glfwTerminate is called are destroyed as well.
|
||||
|
||||
|
||||
@subsubsection cursor_set Cursor setting
|
||||
|
||||
A cursor can be set as current for a window with @ref glfwSetCursor.
|
||||
|
||||
@code
|
||||
glfwSetCursor(window, cursor);
|
||||
@endcode
|
||||
|
||||
Once set, the cursor image will be used as long as the system cursor is over the
|
||||
client area of the window and the [cursor mode](@ref cursor_mode) is set
|
||||
to `GLFW_CURSOR_NORMAL`.
|
||||
|
||||
A single cursor may be set for any number of windows.
|
||||
|
||||
To remove a cursor from a window, set the cursor of that window to `NULL`.
|
||||
|
||||
@code
|
||||
glfwSetCursor(window, NULL);
|
||||
@endcode
|
||||
|
||||
When a cursor is destroyed, it is removed from any window where it is set. This
|
||||
does not affect the cursor modes of those windows.
|
||||
|
||||
|
||||
@subsection cursor_enter Cursor enter/leave events
|
||||
|
||||
If you wish to be notified when the cursor enters or leaves the client area of
|
||||
a window, set a cursor enter/leave callback.
|
||||
|
||||
@code
|
||||
glfwSetCursorEnterCallback(window, cursor_enter_callback);
|
||||
@endcode
|
||||
|
||||
The callback function receives the new classification of the cursor.
|
||||
|
||||
@code
|
||||
void cursor_enter_callback(GLFWwindow* window, int entered)
|
||||
{
|
||||
if (entered)
|
||||
{
|
||||
// The cursor entered the client area of the window
|
||||
}
|
||||
else
|
||||
{
|
||||
// The cursor left the client area of the window
|
||||
}
|
||||
}
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection input_mouse_button Mouse button input
|
||||
|
||||
If you wish to be notified when a mouse button is pressed or released, set
|
||||
a mouse button callback.
|
||||
|
||||
@code
|
||||
glfwSetMouseButtonCallback(window, mouse_button_callback);
|
||||
@endcode
|
||||
|
||||
The callback function receives the [mouse button](@ref buttons), button action
|
||||
and [modifier bits](@ref mods).
|
||||
|
||||
@code
|
||||
void mouse_button_callback(GLFWwindow* window, int button, int action, int mods)
|
||||
{
|
||||
if (button == GLFW_MOUSE_BUTTON_RIGHT && action == GLFW_PRESS)
|
||||
popup_menu();
|
||||
}
|
||||
@endcode
|
||||
|
||||
The action is one of `GLFW_PRESS` or `GLFW_RELEASE`.
|
||||
|
||||
Mouse button states for [named buttons](@ref buttons) are also saved in
|
||||
per-window state arrays that can be polled with @ref glfwGetMouseButton.
|
||||
|
||||
@code
|
||||
int state = glfwGetMouseButton(window, GLFW_MOUSE_BUTTON_LEFT);
|
||||
if (state == GLFW_PRESS)
|
||||
upgrade_cow();
|
||||
@endcode
|
||||
|
||||
The returned state is one of `GLFW_PRESS` or `GLFW_RELEASE`.
|
||||
|
||||
This function only returns cached mouse button event state. It does not poll
|
||||
the system for the current state of the mouse button.
|
||||
|
||||
Whenever you poll state, you risk missing the state change you are looking for.
|
||||
If a pressed mouse button is released again before you poll its state, you will have
|
||||
missed the button press. The recommended solution for this is to use a
|
||||
mouse button callback, but there is also the `GLFW_STICKY_MOUSE_BUTTONS`
|
||||
input mode.
|
||||
|
||||
@code
|
||||
glfwSetInputMode(window, GLFW_STICKY_MOUSE_BUTTONS, 1);
|
||||
@endcode
|
||||
|
||||
When sticky mouse buttons mode is enabled, the pollable state of a mouse button
|
||||
will remain `GLFW_PRESS` until the state of that button is polled with @ref
|
||||
glfwGetMouseButton. Once it has been polled, if a mouse button release event
|
||||
had been processed in the meantime, the state will reset to `GLFW_RELEASE`,
|
||||
otherwise it will remain `GLFW_PRESS`.
|
||||
|
||||
The `GLFW_MOUSE_BUTTON_LAST` constant holds the highest value of any
|
||||
[named button](@ref buttons).
|
||||
|
||||
|
||||
@subsection scrolling Scroll input
|
||||
|
||||
If you wish to be notified when the user scrolls, whether with a mouse wheel or
|
||||
touchpad gesture, set a scroll callback.
|
||||
|
||||
@code
|
||||
glfwSetScrollCallback(window, scroll_callback);
|
||||
@endcode
|
||||
|
||||
The callback function receives two-dimensional scroll offsets.
|
||||
|
||||
@code
|
||||
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset)
|
||||
{
|
||||
}
|
||||
@endcode
|
||||
|
||||
A simple mouse wheel, being vertical, provides offsets along the Y-axis.
|
||||
|
||||
|
||||
@section joystick Joystick input
|
||||
|
||||
The joystick functions expose connected joysticks and controllers, with both
|
||||
referred to as joysticks. It supports up to sixteen joysticks, ranging from
|
||||
`GLFW_JOYSTICK_1`, `GLFW_JOYSTICK_2` up to `GLFW_JOYSTICK_LAST`. You can test
|
||||
whether a [joystick](@ref joysticks) is present with @ref glfwJoystickPresent.
|
||||
|
||||
@code
|
||||
int present = glfwJoystickPresent(GLFW_JOYSTICK_1);
|
||||
@endcode
|
||||
|
||||
When GLFW is initialized, detected joysticks are added to to the beginning of
|
||||
the array, starting with `GLFW_JOYSTICK_1`. Once a joystick is detected, it
|
||||
keeps its assigned index until it is disconnected, so as joysticks are connected
|
||||
and disconnected, they will become spread out.
|
||||
|
||||
Joystick state is updated as needed when a joystick function is called and does
|
||||
not require a window to be created or @ref glfwPollEvents or @ref glfwWaitEvents
|
||||
to be called.
|
||||
|
||||
|
||||
@subsection joystick_axis Joystick axis states
|
||||
|
||||
The positions of all axes of a joystick are returned by @ref
|
||||
glfwGetJoystickAxes. See the reference documentation for the lifetime of the
|
||||
returned array.
|
||||
|
||||
@code
|
||||
int count;
|
||||
const float* axes = glfwGetJoystickAxes(GLFW_JOYSTICK_1, &count);
|
||||
@endcode
|
||||
|
||||
Each element in the returned array is a value between -1.0 and 1.0.
|
||||
|
||||
|
||||
@subsection joystick_button Joystick button states
|
||||
|
||||
The states of all buttons of a joystick are returned by @ref
|
||||
glfwGetJoystickButtons. See the reference documentation for the lifetime of the
|
||||
returned array.
|
||||
|
||||
@code
|
||||
int count;
|
||||
const unsigned char* axes = glfwGetJoystickButtons(GLFW_JOYSTICK_1, &count);
|
||||
@endcode
|
||||
|
||||
Each element in the returned array is either `GLFW_PRESS` or `GLFW_RELEASE`.
|
||||
|
||||
|
||||
@subsection joystick_name Joystick name
|
||||
|
||||
The human-readable, UTF-8 encoded name of a joystick is returned by @ref
|
||||
glfwGetJoystickName. See the reference documentation for the lifetime of the
|
||||
returned string.
|
||||
|
||||
@code
|
||||
const char* name = glfwGetJoystickName(GLFW_JOYSTICK_1);
|
||||
@endcode
|
||||
|
||||
Joystick names are not guaranteed to be unique. Two joysticks of the same model
|
||||
and make may have the same name. Only the [joystick token](@ref joysticks) is
|
||||
guaranteed to be unique, and only until that joystick is disconnected.
|
||||
|
||||
|
||||
@section time Time input
|
||||
|
||||
GLFW provides high-resolution time input, in seconds, with @ref glfwGetTime.
|
||||
|
||||
@code
|
||||
double seconds = glfwGetTime();
|
||||
@endcode
|
||||
|
||||
It returns the number of seconds since the timer was started when the library
|
||||
was initialized with @ref glfwInit. The platform-specific time sources used
|
||||
usually have micro- or nanosecond resolution.
|
||||
|
||||
You can modify the reference time with @ref glfwSetTime.
|
||||
|
||||
@code
|
||||
glfwSetTime(4.0);
|
||||
@endcode
|
||||
|
||||
This sets the timer to the specified time, in seconds.
|
||||
|
||||
|
||||
@section clipboard Clipboard input and output
|
||||
|
||||
If the system clipboard contains a UTF-8 encoded string or if it can be
|
||||
converted to one, you can retrieve it with @ref glfwGetClipboardString. See the
|
||||
reference documentation for the lifetime of the returned string.
|
||||
|
||||
@code
|
||||
const char* clipboard = glfwGetClipboardString(window);
|
||||
@endcode
|
||||
|
||||
The contents of the system clipboard can be set to a UTF-8 encoded string with
|
||||
@ref glfwSetClipboardString.
|
||||
|
||||
@code
|
||||
glfwSetClipboardString(window, "A string with words in it");
|
||||
@endcode
|
||||
|
||||
The clipboard functions take a window handle argument because some window
|
||||
systems require a window to communicate with the system clipboard. Any valid
|
||||
window may be used.
|
||||
|
||||
|
||||
@section path_drop Path drop input
|
||||
|
||||
If you wish to receive the paths of files and/or directories dropped on
|
||||
a window, set a file drop callback.
|
||||
|
||||
@code
|
||||
glfwSetDropCallback(window, drop_callback);
|
||||
@endcode
|
||||
|
||||
The callback function receives an array of paths encoded as UTF-8.
|
||||
|
||||
@code
|
||||
void drop_callback(GLFWwindow* window, int count, const char** paths)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < count; i++)
|
||||
handle_dropped_file(paths[i]);
|
||||
}
|
||||
@endcode
|
||||
|
||||
The path array and its strings are only valid until the file drop callback
|
||||
returns, as they may have been generated specifically for that event. You need
|
||||
to make a deep copy of the array if you want to keep the paths.
|
||||
|
||||
*/
|
1000
docs/input.md
Normal file
1000
docs/input.md
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,14 +1,12 @@
|
||||
/*!
|
||||
# Internal structure {#internals_guide}
|
||||
|
||||
@page internals Internal structure
|
||||
|
||||
@tableofcontents
|
||||
[TOC]
|
||||
|
||||
There are several interfaces inside GLFW. Each interface has its own area of
|
||||
responsibility and its own naming conventions.
|
||||
|
||||
|
||||
@section internals_public Public interface
|
||||
## Public interface {#internals_public}
|
||||
|
||||
The most well-known is the public interface, described in the glfw3.h header
|
||||
file. This is implemented in source files shared by all platforms and these
|
||||
@ -19,11 +17,10 @@ The public interface uses the OpenGL naming conventions except with GLFW and
|
||||
glfw instead of GL and gl. For struct members, where OpenGL sets no precedent,
|
||||
it use headless camel case.
|
||||
|
||||
Examples: @ref glfwCreateWindow, @ref GLFWwindow, @ref GLFWvidmode.redBits,
|
||||
`GLFW_RED_BITS`
|
||||
Examples: `glfwCreateWindow`, `GLFWwindow`, `GLFW_RED_BITS`
|
||||
|
||||
|
||||
@section internals_native Native interface
|
||||
## Native interface {#internals_native}
|
||||
|
||||
The [native interface](@ref native) is a small set of publicly available
|
||||
but platform-specific functions, described in the glfw3native.h header file and
|
||||
@ -34,10 +31,10 @@ The function names of the native interface are similar to those of the public
|
||||
interface, but embeds the name of the interface that the returned handle is
|
||||
from.
|
||||
|
||||
Examples: @ref glfwGetX11Window, @ref glfwGetWGLContext
|
||||
Examples: `glfwGetX11Window`, `glfwGetWGLContext`
|
||||
|
||||
|
||||
@section internals_internal Internal interface
|
||||
## Internal interface {#internals_internal}
|
||||
|
||||
The internal interface consists of utility functions used by all other
|
||||
interfaces. It is shared code implemented in the same shared source files as
|
||||
@ -50,10 +47,10 @@ a `_GLFWlibrary` struct named `_glfw`.
|
||||
The internal interface uses the same style as the public interface, except all
|
||||
global names have a leading underscore.
|
||||
|
||||
Examples: @ref _glfwIsValidContextConfig, @ref _GLFWwindow, `_glfw.currentRamp`
|
||||
Examples: `_glfwIsValidContextConfig`, `_GLFWwindow`, `_glfw.monitorCount`
|
||||
|
||||
|
||||
@section internals_platform Platform interface
|
||||
## Platform interface {#internals_platform}
|
||||
|
||||
The platform interface implements all platform-specific operations as a service
|
||||
to the public interface. This includes event processing. The platform
|
||||
@ -62,12 +59,21 @@ application-provided callbacks. It is also prohibited from modifying the
|
||||
platform-independent part of the internal structs. Instead, it calls the event
|
||||
interface when events interesting to GLFW are received.
|
||||
|
||||
The platform interface mirrors those parts of the public interface that needs to
|
||||
perform platform-specific operations on some or all platforms. The are also
|
||||
named the same except that the glfw function prefix is replaced by
|
||||
_glfwPlatform.
|
||||
The platform interface mostly mirrors those parts of the public interface that needs to
|
||||
perform platform-specific operations on some or all platforms.
|
||||
|
||||
Examples: @ref _glfwPlatformCreateWindow
|
||||
The window system bits of the platform API is called through the `_GLFWplatform` struct of
|
||||
function pointers, to allow runtime selection of platform. This includes the window and
|
||||
context creation, input and event processing, monitor and Vulkan surface creation parts of
|
||||
GLFW. This is located in the global `_glfw` struct.
|
||||
|
||||
Examples: `_glfw.platform.createWindow`
|
||||
|
||||
The timer, threading and module loading bits of the platform API are plain functions with
|
||||
a `_glfwPlatform` prefix, as these things are independent of what window system is being
|
||||
used.
|
||||
|
||||
Examples: `_glfwPlatformGetTimerValue`
|
||||
|
||||
The platform interface also defines structs that contain platform-specific
|
||||
global and per-object state. Their names mirror those of the internal
|
||||
@ -79,10 +85,10 @@ These structs are incorporated as members into the internal interface structs
|
||||
using special macros that name them after the specific interface used. This
|
||||
prevents shared code from accidentally using these members.
|
||||
|
||||
Examples: `window.win32.handle`, `_glfw.x11.display`
|
||||
Examples: `window->win32.handle`, `_glfw.x11.display`
|
||||
|
||||
|
||||
@section internals_event Event interface
|
||||
## Event interface {#internals_event}
|
||||
|
||||
The event interface is implemented in the same shared source files as the public
|
||||
interface and is responsible for delivering the events it receives to the
|
||||
@ -91,26 +97,24 @@ application, either via callbacks, via window state changes or both.
|
||||
The function names of the event interface use a `_glfwInput` prefix and the
|
||||
ObjectEvent pattern.
|
||||
|
||||
Examples: @ref _glfwInputWindowFocus, @ref _glfwInputCursorMotion
|
||||
Examples: `_glfwInputWindowFocus`, `_glfwInputCursorPos`
|
||||
|
||||
|
||||
@section internals_static Static functions
|
||||
## Static functions {#internals_static}
|
||||
|
||||
Static functions may be used by any interface and have no prefixes or suffixes.
|
||||
These use headless camel case.
|
||||
|
||||
Examples: `clearScrollOffsets`
|
||||
Examples: `isValidElementForJoystick`
|
||||
|
||||
|
||||
@section internals_config Configuration macros
|
||||
## Configuration macros {#internals_config}
|
||||
|
||||
GLFW uses a number of configuration macros to select at compile time which
|
||||
interfaces and code paths to use. They are defined in the glfw_config.h header file,
|
||||
which is generated from the `glfw_config.h.in` file by CMake.
|
||||
interfaces and code paths to use. They are defined in the GLFW CMake target.
|
||||
|
||||
Configuration macros the same style as tokens in the public interface, except
|
||||
with a leading underscore.
|
||||
|
||||
Examples: `_GLFW_HAS_GLXGETPROCADDRESS`
|
||||
Examples: `_GLFW_WIN32`, `_GLFW_BUILD_DLL`
|
||||
|
||||
*/
|
351
docs/intro.dox
351
docs/intro.dox
@ -1,351 +0,0 @@
|
||||
/*!
|
||||
|
||||
@page intro Introduction to the API
|
||||
|
||||
@tableofcontents
|
||||
|
||||
This guide introduces the basic concepts of GLFW and describes initialization,
|
||||
error handling and API guarantees and limitations. For a broad but shallow
|
||||
tutorial, see @ref quick instead. There are also guides for the other areas of
|
||||
GLFW.
|
||||
|
||||
- @ref window
|
||||
- @ref context
|
||||
- @ref monitor
|
||||
- @ref input
|
||||
|
||||
|
||||
@section intro_init Initialization and termination
|
||||
|
||||
Before most GLFW functions may be called, the library must be initialized.
|
||||
This initialization checks what features are available on the machine,
|
||||
enumerates monitors and joysticks, initializes the timer and performs any
|
||||
required platform-specific initialization.
|
||||
|
||||
Only the following functions may be called before the library has been
|
||||
successfully initialized, and only from the main thread.
|
||||
|
||||
- @ref glfwGetVersion
|
||||
- @ref glfwGetVersionString
|
||||
- @ref glfwSetErrorCallback
|
||||
- @ref glfwInit
|
||||
- @ref glfwTerminate
|
||||
|
||||
Calling any other function before that time will cause a @ref
|
||||
GLFW_NOT_INITIALIZED error.
|
||||
|
||||
|
||||
@subsection intro_init_init Initializing GLFW
|
||||
|
||||
The library is initialized with @ref glfwInit, which returns `GL_FALSE` if an
|
||||
error occurred.
|
||||
|
||||
@code
|
||||
if (!glfwInit())
|
||||
{
|
||||
// Handle initialization failure
|
||||
}
|
||||
@endcode
|
||||
|
||||
If any part of initialization fails, all remaining bits are terminated as if
|
||||
@ref glfwTerminate was called. The library only needs to be initialized once
|
||||
and additional calls to an already initialized library will simply return
|
||||
`GL_TRUE` immediately.
|
||||
|
||||
Once the library has been successfully initialized, it should be terminated
|
||||
before the application exits.
|
||||
|
||||
|
||||
@subsection intro_init_terminate Terminating GLFW
|
||||
|
||||
Before your application exits, you should terminate the GLFW library if it has
|
||||
been initialized. This is done with @ref glfwTerminate.
|
||||
|
||||
@code
|
||||
glfwTerminate();
|
||||
@endcode
|
||||
|
||||
This will destroy any remaining window, monitor and cursor objects, restore any
|
||||
modified gamma ramps, re-enable the screensaver if it had been disabled and free
|
||||
any resources allocated by GLFW.
|
||||
|
||||
Once the library is terminated, it is as if it had never been initialized and
|
||||
you will need to initialize it again before being able to use GLFW. If the
|
||||
library was not initialized or had already been terminated, it return
|
||||
immediately.
|
||||
|
||||
|
||||
@section error_handling Error handling
|
||||
|
||||
Some GLFW functions have return values that indicate an error, but this is often
|
||||
not very helpful when trying to figure out _why_ the error occurred. Some
|
||||
functions also return otherwise valid values on error. Finally, far from all
|
||||
GLFW functions have return values.
|
||||
|
||||
This is where the error callback comes in. This callback is called whenever an
|
||||
error occurs. It is set with @ref glfwSetErrorCallback, a function that may be
|
||||
called regardless of whether GLFW is initialized.
|
||||
|
||||
@code
|
||||
glfwSetErrorCallback(error_callback);
|
||||
@endcode
|
||||
|
||||
The error callback receives a human-readable description of the error and (when
|
||||
possible) its cause. The description encoded as UTF-8. The callback is also
|
||||
provided with an [error code](@ref errors).
|
||||
|
||||
@code
|
||||
void error_callback(int error, const char* description)
|
||||
{
|
||||
puts(description);
|
||||
}
|
||||
@endcode
|
||||
|
||||
The error code indicates the general category of the error. Some error codes,
|
||||
such as @ref GLFW_NOT_INITIALIZED has only a single meaning, whereas others like
|
||||
@ref GLFW_PLATFORM_ERROR are used for many different errors.
|
||||
|
||||
The description string is only valid until the error callback returns, as it may
|
||||
have been generated specifically for that error. This lets GLFW provide much
|
||||
more specific error descriptions but means you must make a copy if you want to
|
||||
keep the description string.
|
||||
|
||||
@note Relying on erroneous behavior is not forward compatible. In other words,
|
||||
do not rely on a currently invalid call to generate a specific error, as that
|
||||
same call may in future versions generate a different error or become valid.
|
||||
|
||||
|
||||
@section coordinate_systems Coordinate systems
|
||||
|
||||
GLFW has two primary coordinate systems: the _virtual screen_ and the window
|
||||
_client area_ or _content area_. Both use the same unit: _virtual screen
|
||||
coordinates_, or just _screen coordinates_, which don't necessarily correspond
|
||||
to pixels.
|
||||
|
||||
<img src="spaces.svg" width="90%" />
|
||||
|
||||
Both the virtual screen and the client area coordinate systems have the X-axis
|
||||
pointing to the right and the Y-axis pointing down.
|
||||
|
||||
Window and monitor positions are specified as the position of the upper-left
|
||||
corners of their content areas relative to the virtual screen, while cursor
|
||||
positions are specified relative to a window's client area.
|
||||
|
||||
Because the origin of the window's client area coordinate system is also the
|
||||
point from which the window position is specified, you can translate client area
|
||||
coordinates to the virtual screen by adding the window position. The window
|
||||
frame, when present, extends out from the client area but does not affect the
|
||||
window position.
|
||||
|
||||
Almost all positions and sizes in GLFW are measured in screen coordinates
|
||||
relative to one of the two origins above. This includes cursor positions,
|
||||
window positions and sizes, window frame sizes, monitor positions and video mode
|
||||
resolutions.
|
||||
|
||||
Two exceptions are the [monitor physical size](@ref monitor_size), which is
|
||||
measured in millimetres, and [framebuffer size](@ref window_fbsize), which is
|
||||
measured in pixels.
|
||||
|
||||
Pixels and screen coordinates may map 1:1 on your machine, but they won't on
|
||||
every other machine, for example on a Mac with a Retina display. The ratio
|
||||
between screen coordinates and pixels may also change at run-time depending on
|
||||
which monitor the window is currently considered to be on.
|
||||
|
||||
|
||||
@section guarantees_limitations Guarantees and limitations
|
||||
|
||||
This section describes the conditions under which GLFW can be expected to
|
||||
function, barring bugs in the operating system or drivers. Use of GLFW outside
|
||||
of these limits may work on some platforms, or on some machines, or some of the
|
||||
time, or on some versions of GLFW, but it may break at any time and this will
|
||||
not be considered a bug.
|
||||
|
||||
|
||||
@subsection lifetime Pointer lifetimes
|
||||
|
||||
GLFW will never free any pointer you provide to it and you must never free any
|
||||
pointer it provides to you.
|
||||
|
||||
Many GLFW functions return pointers to dynamically allocated structures, strings
|
||||
or arrays, and some callbacks are provided with strings or arrays. These are
|
||||
always managed by GLFW and should never be freed by the application. The
|
||||
lifetime of these pointers is documented for each GLFW function and callback.
|
||||
If you need to keep this data, you must copy it before its lifetime expires.
|
||||
|
||||
Many GLFW functions accept pointers to structures or strings allocated by the
|
||||
application. These are never freed by GLFW and are always the responsibility of
|
||||
the application. If GLFW needs to keep the data in these structures or strings,
|
||||
it is copied before the function returns.
|
||||
|
||||
Pointer lifetimes are guaranteed not to be shortened in future minor or patch
|
||||
releases.
|
||||
|
||||
|
||||
@subsection reentrancy Reentrancy
|
||||
|
||||
GLFW event processing and object creation and destruction are not reentrant.
|
||||
This means that the following functions may not be called from any callback
|
||||
function:
|
||||
|
||||
- @ref glfwCreateWindow
|
||||
- @ref glfwDestroyWindow
|
||||
- @ref glfwCreateCursor
|
||||
- @ref glfwCreateStandardCursor
|
||||
- @ref glfwDestroyCursor
|
||||
- @ref glfwPollEvents
|
||||
- @ref glfwWaitEvents
|
||||
- @ref glfwTerminate
|
||||
|
||||
These functions may be made reentrant in future minor or patch releases, but
|
||||
functions not on this list will not be made non-reentrant.
|
||||
|
||||
|
||||
@subsection thread_safety Thread safety
|
||||
|
||||
Most GLFW functions may only be called from the main thread, but some may be
|
||||
called from any thread. However, no GLFW function may be called from any other
|
||||
thread until GLFW has been successfully initialized on the main thread,
|
||||
including functions that may called before initialization.
|
||||
|
||||
The reference documentation for every GLFW function states whether it is limited
|
||||
to the main thread.
|
||||
|
||||
The following categories of functions are and will remain limited to the main
|
||||
thread due to the limitations of one or several platforms:
|
||||
|
||||
- Initialization and termination
|
||||
- Event processing
|
||||
- Creation and destruction of window, context and cursor objects
|
||||
|
||||
Because event processing must be performed on the main thread, all callbacks
|
||||
except for the error callback will only be called on that thread. The error
|
||||
callback may be called on any thread, as any GLFW function may generate errors.
|
||||
|
||||
The posting of empty events may be done from any thread. The window user
|
||||
pointer and close flag may also be accessed and modified from any thread, but
|
||||
this is not synchronized by GLFW. The following window related functions may
|
||||
be called from any thread:
|
||||
|
||||
- @ref glfwPostEmptyEvent
|
||||
- @ref glfwGetWindowUserPointer
|
||||
- @ref glfwSetWindowUserPointer
|
||||
- @ref glfwWindowShouldClose
|
||||
- @ref glfwSetWindowShouldClose
|
||||
|
||||
Rendering may be done on any thread. The following context related functions
|
||||
may be called from any thread:
|
||||
|
||||
- @ref glfwMakeContextCurrent
|
||||
- @ref glfwGetCurrentContext
|
||||
- @ref glfwSwapBuffers
|
||||
- @ref glfwSwapInterval
|
||||
- @ref glfwExtensionSupported
|
||||
- @ref glfwGetProcAddress
|
||||
|
||||
The timer may be accessed from any thread, but this is not synchronized by GLFW.
|
||||
The following timer related functions may be called from any thread:
|
||||
|
||||
- @ref glfwGetTime
|
||||
|
||||
Library version information may be queried from any thread. The following
|
||||
version related functions may be called from any thread:
|
||||
|
||||
- @ref glfwGetVersion
|
||||
- @ref glfwGetVersionString
|
||||
|
||||
GLFW uses no synchronization objects internally except for thread-local storage
|
||||
to keep track of the current context for each thread. Synchronization is left
|
||||
to the application.
|
||||
|
||||
Functions that may currently be called from any thread will always remain so,
|
||||
but functions that are currently limited to the main may be updated to allow
|
||||
calls from any thread in future releases.
|
||||
|
||||
|
||||
@subsection compatibility Version compatibility
|
||||
|
||||
GLFW guarantees binary backward compatibility with earlier minor versions of the
|
||||
API. This means that you can drop in a newer version of the GLFW DLL / shared
|
||||
library / dynamic library and existing applications will continue to run.
|
||||
|
||||
Once a function or constant has been added, the signature of that function or
|
||||
value of that constant will remain unchanged until the next major version of
|
||||
GLFW. No compatibility of any kind is guaranteed between major versions.
|
||||
|
||||
Undocumented behavior, i.e. behavior that is not described in the documentation,
|
||||
may change at any time until it is documented.
|
||||
|
||||
If the reference documentation and the implementation differ, the reference
|
||||
documentation is correct and the implementation will be fixed in the next
|
||||
release.
|
||||
|
||||
|
||||
@subsection event_order Event order
|
||||
|
||||
The order of arrival of related events is not guaranteed to be consistent
|
||||
across platforms. The exception is synthetic key and mouse button release
|
||||
events, which are always delivered after the window defocus event.
|
||||
|
||||
|
||||
@section intro_version Version management
|
||||
|
||||
GLFW provides mechanisms for identifying what version of GLFW your application
|
||||
was compiled against as well as what version it is currently running against.
|
||||
If you are loading GLFW dynamically (not just linking dynamically), you can use
|
||||
this to verify that the library binary is compatible with your application.
|
||||
|
||||
|
||||
@subsection intro_version_compile Compile-time version
|
||||
|
||||
The compile-time version of GLFW is provided by the GLFW header with the
|
||||
`GLFW_VERSION_MAJOR`, `GLFW_VERSION_MINOR` and `GLFW_VERSION_REVISION` macros.
|
||||
|
||||
@code
|
||||
printf("Compiled against GLFW %i.%i.%i\n",
|
||||
GLFW_VERSION_MAJOR,
|
||||
GLFW_VERSION_MINOR,
|
||||
GLFW_VERSION_REVISION);
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection intro_version_runtime Run-time version
|
||||
|
||||
The run-time version can be retrieved with @ref glfwGetVersion, a function that
|
||||
may be called regardless of whether GLFW is initialized.
|
||||
|
||||
@code
|
||||
int major, minor, revision;
|
||||
glfwGetVersion(&major, &minor, &revision);
|
||||
|
||||
printf("Running against GLFW %i.%i.%i\n", major, minor, revision);
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection intro_version_string Version string
|
||||
|
||||
GLFW 3 also provides a compile-time generated version string that describes the
|
||||
version, platform, compiler and any platform-specific compile-time options.
|
||||
This is primarily intended for submitting bug reports, to allow developers to
|
||||
see which code paths are enabled in a binary.
|
||||
|
||||
The version string is returned by @ref glfwGetVersionString, a function that may
|
||||
be called regardless of whether GLFW is initialized.
|
||||
|
||||
__Do not use the version string__ to parse the GLFW library version. The @ref
|
||||
glfwGetVersion function already provides the version of the running library
|
||||
binary.
|
||||
|
||||
The format of the string is as follows:
|
||||
- The version of GLFW
|
||||
- The name of the window system API
|
||||
- The name of the context creation API
|
||||
- Any additional options or APIs
|
||||
|
||||
For example, when compiling GLFW 3.0 with MinGW using the Win32 and WGL
|
||||
back ends, the version string may look something like this:
|
||||
|
||||
@code
|
||||
3.0.0 Win32 WGL MinGW
|
||||
@endcode
|
||||
|
||||
*/
|
637
docs/intro.md
Normal file
637
docs/intro.md
Normal file
@ -0,0 +1,637 @@
|
||||
# Introduction to the API {#intro_guide}
|
||||
|
||||
[TOC]
|
||||
|
||||
This guide introduces the basic concepts of GLFW and describes initialization,
|
||||
error handling and API guarantees and limitations. For a broad but shallow
|
||||
tutorial, see @ref quick_guide instead. For details on a specific function in
|
||||
this category, see the @ref init.
|
||||
|
||||
There are also guides for the other areas of GLFW.
|
||||
|
||||
- @ref window_guide
|
||||
- @ref context_guide
|
||||
- @ref vulkan_guide
|
||||
- @ref monitor_guide
|
||||
- @ref input_guide
|
||||
|
||||
|
||||
## Initialization and termination {#intro_init}
|
||||
|
||||
Before most GLFW functions may be called, the library must be initialized.
|
||||
This initialization checks what features are available on the machine,
|
||||
enumerates monitors, initializes the timer and performs any required
|
||||
platform-specific initialization.
|
||||
|
||||
Only the following functions may be called before the library has been
|
||||
successfully initialized, and only from the main thread.
|
||||
|
||||
- @ref glfwGetVersion
|
||||
- @ref glfwGetVersionString
|
||||
- @ref glfwPlatformSupported
|
||||
- @ref glfwGetError
|
||||
- @ref glfwSetErrorCallback
|
||||
- @ref glfwInitHint
|
||||
- @ref glfwInitAllocator
|
||||
- @ref glfwInitVulkanLoader
|
||||
- @ref glfwInit
|
||||
- @ref glfwTerminate
|
||||
|
||||
Calling any other function before successful initialization will cause a @ref
|
||||
GLFW_NOT_INITIALIZED error.
|
||||
|
||||
|
||||
### Initializing GLFW {#intro_init_init}
|
||||
|
||||
The library is initialized with @ref glfwInit, which returns `GLFW_FALSE` if an
|
||||
error occurred.
|
||||
|
||||
```c
|
||||
if (!glfwInit())
|
||||
{
|
||||
// Handle initialization failure
|
||||
}
|
||||
```
|
||||
|
||||
If any part of initialization fails, any parts that succeeded are terminated as
|
||||
if @ref glfwTerminate had been called. The library only needs to be initialized
|
||||
once and additional calls to an already initialized library will return
|
||||
`GLFW_TRUE` immediately.
|
||||
|
||||
Once the library has been successfully initialized, it should be terminated
|
||||
before the application exits. Modern systems are very good at freeing resources
|
||||
allocated by programs that exit, but GLFW sometimes has to change global system
|
||||
settings and these might not be restored without termination.
|
||||
|
||||
@macos When the library is initialized the main menu and dock icon are created.
|
||||
These are not desirable for a command-line only program. The creation of the
|
||||
main menu and dock icon can be disabled with the @ref GLFW_COCOA_MENUBAR init
|
||||
hint.
|
||||
|
||||
|
||||
### Initialization hints {#init_hints}
|
||||
|
||||
Initialization hints are set before @ref glfwInit and affect how the library
|
||||
behaves until termination. Hints are set with @ref glfwInitHint.
|
||||
|
||||
```c
|
||||
glfwInitHint(GLFW_JOYSTICK_HAT_BUTTONS, GLFW_FALSE);
|
||||
```
|
||||
|
||||
The values you set hints to are never reset by GLFW, but they only take effect
|
||||
during initialization. Once GLFW has been initialized, any values you set will
|
||||
be ignored until the library is terminated and initialized again.
|
||||
|
||||
Some hints are platform specific. These may be set on any platform but they
|
||||
will only affect their specific platform. Other platforms will ignore them.
|
||||
Setting these hints requires no platform specific headers or functions.
|
||||
|
||||
|
||||
#### Shared init hints {#init_hints_shared}
|
||||
|
||||
@anchor GLFW_PLATFORM
|
||||
__GLFW_PLATFORM__ specifies the platform to use for windowing and input.
|
||||
Possible values are `GLFW_ANY_PLATFORM`, `GLFW_PLATFORM_WIN32`,
|
||||
`GLFW_PLATFORM_COCOA`, `GLFW_PLATFORM_WAYLAND`, `GLFW_PLATFORM_X11` and
|
||||
`GLFW_PLATFORM_NULL`. The default value is `GLFW_ANY_PLATFORM`, which will
|
||||
choose any platform the library includes support for except for the Null
|
||||
backend.
|
||||
|
||||
|
||||
@anchor GLFW_JOYSTICK_HAT_BUTTONS
|
||||
__GLFW_JOYSTICK_HAT_BUTTONS__ specifies whether to also expose joystick hats as
|
||||
buttons, for compatibility with earlier versions of GLFW that did not have @ref
|
||||
glfwGetJoystickHats. Possible values are `GLFW_TRUE` and `GLFW_FALSE`.
|
||||
|
||||
@anchor GLFW_ANGLE_PLATFORM_TYPE_hint
|
||||
__GLFW_ANGLE_PLATFORM_TYPE__ specifies the platform type (rendering backend) to
|
||||
request when using OpenGL ES and EGL via [ANGLE][]. If the requested platform
|
||||
type is unavailable, ANGLE will use its default. Possible values are one of
|
||||
`GLFW_ANGLE_PLATFORM_TYPE_NONE`, `GLFW_ANGLE_PLATFORM_TYPE_OPENGL`,
|
||||
`GLFW_ANGLE_PLATFORM_TYPE_OPENGLES`, `GLFW_ANGLE_PLATFORM_TYPE_D3D9`,
|
||||
`GLFW_ANGLE_PLATFORM_TYPE_D3D11`, `GLFW_ANGLE_PLATFORM_TYPE_VULKAN` and
|
||||
`GLFW_ANGLE_PLATFORM_TYPE_METAL`.
|
||||
|
||||
[ANGLE]: https://chromium.googlesource.com/angle/angle/
|
||||
|
||||
The ANGLE platform type is specified via the `EGL_ANGLE_platform_angle`
|
||||
extension. This extension is not used if this hint is
|
||||
`GLFW_ANGLE_PLATFORM_TYPE_NONE`, which is the default value.
|
||||
|
||||
|
||||
#### macOS specific init hints {#init_hints_osx}
|
||||
|
||||
@anchor GLFW_COCOA_CHDIR_RESOURCES_hint
|
||||
__GLFW_COCOA_CHDIR_RESOURCES__ specifies whether to set the current directory to
|
||||
the application to the `Contents/Resources` subdirectory of the application's
|
||||
bundle, if present. Possible values are `GLFW_TRUE` and `GLFW_FALSE`. This is
|
||||
ignored on other platforms.
|
||||
|
||||
@anchor GLFW_COCOA_MENUBAR_hint
|
||||
__GLFW_COCOA_MENUBAR__ specifies whether to create the menu bar and dock icon
|
||||
when GLFW is initialized. This applies whether the menu bar is created from
|
||||
a nib or manually by GLFW. Possible values are `GLFW_TRUE` and `GLFW_FALSE`.
|
||||
This is ignored on other platforms.
|
||||
|
||||
|
||||
#### Wayland specific init hints {#init_hints_wayland}
|
||||
|
||||
@anchor GLFW_WAYLAND_LIBDECOR_hint
|
||||
__GLFW_WAYLAND_LIBDECOR__ specifies whether to use [libdecor][] for window
|
||||
decorations where available. Possible values are `GLFW_WAYLAND_PREFER_LIBDECOR`
|
||||
and `GLFW_WAYLAND_DISABLE_LIBDECOR`. This is ignored on other platforms.
|
||||
|
||||
[libdecor]: https://gitlab.freedesktop.org/libdecor/libdecor
|
||||
|
||||
|
||||
#### X11 specific init hints {#init_hints_x11}
|
||||
|
||||
@anchor GLFW_X11_XCB_VULKAN_SURFACE_hint
|
||||
__GLFW_X11_XCB_VULKAN_SURFACE__ specifies whether to prefer the
|
||||
`VK_KHR_xcb_surface` extension for creating Vulkan surfaces, or whether to use
|
||||
the `VK_KHR_xlib_surface` extension. Possible values are `GLFW_TRUE` and
|
||||
`GLFW_FALSE`. This is ignored on other platforms.
|
||||
|
||||
|
||||
#### Supported and default values {#init_hints_values}
|
||||
|
||||
Initialization hint | Default value | Supported values
|
||||
-------------------------------- | ------------------------------- | ----------------
|
||||
@ref GLFW_PLATFORM | `GLFW_ANY_PLATFORM` | `GLFW_ANY_PLATFORM`, `GLFW_PLATFORM_WIN32`, `GLFW_PLATFORM_COCOA`, `GLFW_PLATFORM_WAYLAND`, `GLFW_PLATFORM_X11` or `GLFW_PLATFORM_NULL`
|
||||
@ref GLFW_JOYSTICK_HAT_BUTTONS | `GLFW_TRUE` | `GLFW_TRUE` or `GLFW_FALSE`
|
||||
@ref GLFW_ANGLE_PLATFORM_TYPE | `GLFW_ANGLE_PLATFORM_TYPE_NONE` | `GLFW_ANGLE_PLATFORM_TYPE_NONE`, `GLFW_ANGLE_PLATFORM_TYPE_OPENGL`, `GLFW_ANGLE_PLATFORM_TYPE_OPENGLES`, `GLFW_ANGLE_PLATFORM_TYPE_D3D9`, `GLFW_ANGLE_PLATFORM_TYPE_D3D11`, `GLFW_ANGLE_PLATFORM_TYPE_VULKAN` or `GLFW_ANGLE_PLATFORM_TYPE_METAL`
|
||||
@ref GLFW_COCOA_CHDIR_RESOURCES | `GLFW_TRUE` | `GLFW_TRUE` or `GLFW_FALSE`
|
||||
@ref GLFW_COCOA_MENUBAR | `GLFW_TRUE` | `GLFW_TRUE` or `GLFW_FALSE`
|
||||
@ref GLFW_WAYLAND_LIBDECOR | `GLFW_WAYLAND_PREFER_LIBDECOR` | `GLFW_WAYLAND_PREFER_LIBDECOR` or `GLFW_WAYLAND_DISABLE_LIBDECOR`
|
||||
@ref GLFW_X11_XCB_VULKAN_SURFACE | `GLFW_TRUE` | `GLFW_TRUE` or `GLFW_FALSE`
|
||||
|
||||
|
||||
### Runtime platform selection {#platform}
|
||||
|
||||
GLFW can be compiled for more than one platform (window system) at once. This lets
|
||||
a single library binary support both Wayland and X11 on Linux and other Unix-like systems.
|
||||
|
||||
You can control platform selection via the @ref GLFW_PLATFORM initialization hint. By
|
||||
default, this is set to @ref GLFW_ANY_PLATFORM, which will look for supported window
|
||||
systems in order of priority and select the first one it finds. It can also be set to any
|
||||
specific platform to have GLFW only look for that one.
|
||||
|
||||
```c
|
||||
glfwInitHint(GLFW_PLATFORM, GLFW_PLATFORM_X11);
|
||||
```
|
||||
|
||||
This mechanism also provides the Null platform, which is always supported but needs to be
|
||||
explicitly requested. This platform is effectively a stub, emulating a window system on
|
||||
a single 1080p monitor, but will not interact with any actual window system.
|
||||
|
||||
```c
|
||||
glfwInitHint(GLFW_PLATFORM, GLFW_PLATFORM_NULL);
|
||||
```
|
||||
|
||||
You can test whether a library binary was compiled with support for a specific platform
|
||||
with @ref glfwPlatformSupported.
|
||||
|
||||
```c
|
||||
if (glfwPlatformSupported(GLFW_PLATFORM_WAYLAND))
|
||||
glfwInitHint(GLFW_PLATFORM, GLFW_PLATFORM_WAYLAND);
|
||||
```
|
||||
|
||||
Once GLFW has been initialized, you can query which platform was selected with @ref
|
||||
glfwGetPlatform.
|
||||
|
||||
```c
|
||||
int platform = glfwGetPlatform();
|
||||
```
|
||||
|
||||
If you are using any [native access functions](@ref native), especially on Linux and other
|
||||
Unix-like systems, then you may need to check that you are calling the ones matching the
|
||||
selected platform.
|
||||
|
||||
|
||||
### Custom heap memory allocator {#init_allocator}
|
||||
|
||||
The heap memory allocator can be customized before initialization with @ref
|
||||
glfwInitAllocator.
|
||||
|
||||
```c
|
||||
GLFWallocator allocator;
|
||||
allocator.allocate = my_malloc;
|
||||
allocator.reallocate = my_realloc;
|
||||
allocator.deallocate = my_free;
|
||||
allocator.user = NULL;
|
||||
|
||||
glfwInitAllocator(&allocator);
|
||||
```
|
||||
|
||||
The allocator will be made active at the beginning of initialization and will be used by
|
||||
GLFW until the library has been fully terminated. Any allocator set after initialization
|
||||
will be picked up only at the next initialization.
|
||||
|
||||
The allocator will only be used for allocations that would have been made with
|
||||
the C standard library. Memory allocations that must be made with platform
|
||||
specific APIs will still use those.
|
||||
|
||||
The allocation function must have a signature matching @ref GLFWallocatefun. It receives
|
||||
the desired size, in bytes, and the user pointer passed to @ref glfwInitAllocator and
|
||||
returns the address to the allocated memory block.
|
||||
|
||||
```c
|
||||
void* my_malloc(size_t size, void* user)
|
||||
{
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
The documentation for @ref GLFWallocatefun also lists the requirements and limitations for
|
||||
an allocation function. If the active one does not meet all of these, GLFW may fail.
|
||||
|
||||
The reallocation function must have a function signature matching @ref GLFWreallocatefun.
|
||||
It receives the memory block to be reallocated, the new desired size, in bytes, and the user
|
||||
pointer passed to @ref glfwInitAllocator and returns the address to the resized memory
|
||||
block.
|
||||
|
||||
```c
|
||||
void* my_realloc(void* block, size_t size, void* user)
|
||||
{
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
The documentation for @ref GLFWreallocatefun also lists the requirements and limitations
|
||||
for a reallocation function. If the active one does not meet all of these, GLFW may fail.
|
||||
|
||||
The deallocation function must have a function signature matching @ref GLFWdeallocatefun.
|
||||
It receives the memory block to be deallocated and the user pointer passed to @ref
|
||||
glfwInitAllocator.
|
||||
|
||||
```c
|
||||
void my_free(void* block, void* user)
|
||||
{
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
The documentation for @ref GLFWdeallocatefun also lists the requirements and limitations
|
||||
for a deallocation function. If the active one does not meet all of these, GLFW may fail.
|
||||
|
||||
|
||||
### Terminating GLFW {#intro_init_terminate}
|
||||
|
||||
Before your application exits, you should terminate the GLFW library if it has
|
||||
been initialized. This is done with @ref glfwTerminate.
|
||||
|
||||
```c
|
||||
glfwTerminate();
|
||||
```
|
||||
|
||||
This will destroy any remaining window, monitor and cursor objects, restore any
|
||||
modified gamma ramps, re-enable the screensaver if it had been disabled and free
|
||||
any other resources allocated by GLFW.
|
||||
|
||||
Once the library is terminated, it is as if it had never been initialized, therefore
|
||||
you will need to initialize it again before being able to use GLFW. If the
|
||||
library was not initialized or had already been terminated, it returns
|
||||
immediately.
|
||||
|
||||
|
||||
## Error handling {#error_handling}
|
||||
|
||||
Some GLFW functions have return values that indicate an error, but this is often
|
||||
not very helpful when trying to figure out what happened or why it occurred.
|
||||
Other functions have no return value reserved for errors, so error notification
|
||||
needs a separate channel. Finally, far from all GLFW functions have return
|
||||
values.
|
||||
|
||||
The last [error code](@ref errors) for the calling thread can be queried at any
|
||||
time with @ref glfwGetError.
|
||||
|
||||
```c
|
||||
int code = glfwGetError(NULL);
|
||||
|
||||
if (code != GLFW_NO_ERROR)
|
||||
handle_error(code);
|
||||
```
|
||||
|
||||
If no error has occurred since the last call, @ref GLFW_NO_ERROR (zero) is
|
||||
returned. The error is cleared before the function returns.
|
||||
|
||||
The error code indicates the general category of the error. Some error codes,
|
||||
such as @ref GLFW_NOT_INITIALIZED has only a single meaning, whereas others like
|
||||
@ref GLFW_PLATFORM_ERROR are used for many different errors.
|
||||
|
||||
GLFW often has more information about an error than its general category. You
|
||||
can retrieve a UTF-8 encoded human-readable description along with the error
|
||||
code. If no error has occurred since the last call, the description is set to
|
||||
`NULL`.
|
||||
|
||||
```c
|
||||
const char* description;
|
||||
int code = glfwGetError(&description);
|
||||
|
||||
if (description)
|
||||
display_error_message(code, description);
|
||||
```
|
||||
|
||||
The retrieved description string is only valid until the next error occurs.
|
||||
This means you must make a copy of it if you want to keep it.
|
||||
|
||||
You can also set an error callback, which will be called each time an error
|
||||
occurs. It is set with @ref glfwSetErrorCallback.
|
||||
|
||||
```c
|
||||
glfwSetErrorCallback(error_callback);
|
||||
```
|
||||
|
||||
The error callback receives the same error code and human-readable description
|
||||
returned by @ref glfwGetError.
|
||||
|
||||
```c
|
||||
void error_callback(int code, const char* description)
|
||||
{
|
||||
display_error_message(code, description);
|
||||
}
|
||||
```
|
||||
|
||||
The error callback is called after the error is stored, so calling @ref
|
||||
glfwGetError from within the error callback returns the same values as the
|
||||
callback argument.
|
||||
|
||||
The description string passed to the callback is only valid until the error
|
||||
callback returns. This means you must make a copy of it if you want to keep it.
|
||||
|
||||
__Reported errors are never fatal.__ As long as GLFW was successfully
|
||||
initialized, it will remain initialized and in a safe state until terminated
|
||||
regardless of how many errors occur. If an error occurs during initialization
|
||||
that causes @ref glfwInit to fail, any part of the library that was initialized
|
||||
will be safely terminated.
|
||||
|
||||
Do not rely on a currently invalid call to generate a specific error, as in the
|
||||
future that same call may generate a different error or become valid.
|
||||
|
||||
|
||||
## Coordinate systems {#coordinate_systems}
|
||||
|
||||
GLFW has two primary coordinate systems: the _virtual screen_ and the window
|
||||
_content area_ or _content area_. Both use the same unit: _virtual screen
|
||||
coordinates_, or just _screen coordinates_, which don't necessarily correspond
|
||||
to pixels.
|
||||
|
||||
<img src="spaces.svg" width="90%" />
|
||||
|
||||
Both the virtual screen and the content area coordinate systems have the X-axis
|
||||
pointing to the right and the Y-axis pointing down.
|
||||
|
||||
Window and monitor positions are specified as the position of the upper-left
|
||||
corners of their content areas relative to the virtual screen, while cursor
|
||||
positions are specified relative to a window's content area.
|
||||
|
||||
Because the origin of the window's content area coordinate system is also the
|
||||
point from which the window position is specified, you can translate content
|
||||
area coordinates to the virtual screen by adding the window position. The
|
||||
window frame, when present, extends out from the content area but does not
|
||||
affect the window position.
|
||||
|
||||
Almost all positions and sizes in GLFW are measured in screen coordinates
|
||||
relative to one of the two origins above. This includes cursor positions,
|
||||
window positions and sizes, window frame sizes, monitor positions and video mode
|
||||
resolutions.
|
||||
|
||||
Two exceptions are the [monitor physical size](@ref monitor_size), which is
|
||||
measured in millimetres, and [framebuffer size](@ref window_fbsize), which is
|
||||
measured in pixels.
|
||||
|
||||
Pixels and screen coordinates may map 1:1 on your machine, but they won't on
|
||||
every other machine, for example on a Mac with a Retina display. The ratio
|
||||
between screen coordinates and pixels may also change at run-time depending on
|
||||
which monitor the window is currently considered to be on.
|
||||
|
||||
|
||||
## Guarantees and limitations {#guarantees_limitations}
|
||||
|
||||
This section describes the conditions under which GLFW can be expected to
|
||||
function, barring bugs in the operating system or drivers. Use of GLFW outside
|
||||
these limits may work on some platforms, or on some machines, or some of the
|
||||
time, or on some versions of GLFW, but it may break at any time and this will
|
||||
not be considered a bug.
|
||||
|
||||
|
||||
### Pointer lifetimes {#lifetime}
|
||||
|
||||
GLFW will never free any pointer you provide to it, and you must never free any
|
||||
pointer it provides to you.
|
||||
|
||||
Many GLFW functions return pointers to dynamically allocated structures, strings
|
||||
or arrays, and some callbacks are provided with strings or arrays. These are
|
||||
always managed by GLFW and should never be freed by the application. The
|
||||
lifetime of these pointers is documented for each GLFW function and callback.
|
||||
If you need to keep this data, you must copy it before its lifetime expires.
|
||||
|
||||
Many GLFW functions accept pointers to structures or strings allocated by the
|
||||
application. These are never freed by GLFW and are always the responsibility of
|
||||
the application. If GLFW needs to keep the data in these structures or strings,
|
||||
it is copied before the function returns.
|
||||
|
||||
Pointer lifetimes are guaranteed not to be shortened in future minor or patch
|
||||
releases.
|
||||
|
||||
|
||||
### Reentrancy {#reentrancy}
|
||||
|
||||
GLFW event processing and object destruction are not reentrant. This means that
|
||||
the following functions must not be called from any callback function:
|
||||
|
||||
- @ref glfwDestroyWindow
|
||||
- @ref glfwDestroyCursor
|
||||
- @ref glfwPollEvents
|
||||
- @ref glfwWaitEvents
|
||||
- @ref glfwWaitEventsTimeout
|
||||
- @ref glfwTerminate
|
||||
|
||||
These functions may be made reentrant in future minor or patch releases, but
|
||||
functions not on this list will not be made non-reentrant.
|
||||
|
||||
|
||||
### Thread safety {#thread_safety}
|
||||
|
||||
Most GLFW functions must only be called from the main thread (the thread that
|
||||
calls main), but some may be called from any thread once the library has been
|
||||
initialized. Before initialization the whole library is thread-unsafe.
|
||||
|
||||
The reference documentation for every GLFW function states whether it is limited
|
||||
to the main thread.
|
||||
|
||||
Initialization, termination, event processing and the creation and
|
||||
destruction of windows, cursors and OpenGL and OpenGL ES contexts are all
|
||||
restricted to the main thread due to limitations of one or several platforms.
|
||||
|
||||
Because event processing must be performed on the main thread, all callbacks
|
||||
except for the error callback will only be called on that thread. The error
|
||||
callback may be called on any thread, as any GLFW function may generate errors.
|
||||
|
||||
The error code and description may be queried from any thread.
|
||||
|
||||
- @ref glfwGetError
|
||||
|
||||
Empty events may be posted from any thread.
|
||||
|
||||
- @ref glfwPostEmptyEvent
|
||||
|
||||
The window user pointer and close flag may be read and written from any thread,
|
||||
but this is not synchronized by GLFW.
|
||||
|
||||
- @ref glfwGetWindowUserPointer
|
||||
- @ref glfwSetWindowUserPointer
|
||||
- @ref glfwWindowShouldClose
|
||||
- @ref glfwSetWindowShouldClose
|
||||
|
||||
These functions for working with OpenGL and OpenGL ES contexts may be called
|
||||
from any thread, but the window object is not synchronized by GLFW.
|
||||
|
||||
- @ref glfwMakeContextCurrent
|
||||
- @ref glfwGetCurrentContext
|
||||
- @ref glfwSwapBuffers
|
||||
- @ref glfwSwapInterval
|
||||
- @ref glfwExtensionSupported
|
||||
- @ref glfwGetProcAddress
|
||||
|
||||
The raw timer functions may be called from any thread.
|
||||
|
||||
- @ref glfwGetTimerFrequency
|
||||
- @ref glfwGetTimerValue
|
||||
|
||||
The regular timer may be used from any thread, but reading and writing the timer
|
||||
offset is not synchronized by GLFW.
|
||||
|
||||
- @ref glfwGetTime
|
||||
- @ref glfwSetTime
|
||||
|
||||
Library version information may be queried from any thread.
|
||||
|
||||
- @ref glfwGetVersion
|
||||
- @ref glfwGetVersionString
|
||||
|
||||
Platform information may be queried from any thread.
|
||||
|
||||
- @ref glfwPlatformSupported
|
||||
- @ref glfwGetPlatform
|
||||
|
||||
All Vulkan related functions may be called from any thread.
|
||||
|
||||
- @ref glfwVulkanSupported
|
||||
- @ref glfwGetRequiredInstanceExtensions
|
||||
- @ref glfwGetInstanceProcAddress
|
||||
- @ref glfwGetPhysicalDevicePresentationSupport
|
||||
- @ref glfwCreateWindowSurface
|
||||
|
||||
GLFW uses synchronization objects internally only to manage the per-thread
|
||||
context and error states. Additional synchronization is left to the
|
||||
application.
|
||||
|
||||
Functions that may currently be called from any thread will always remain so,
|
||||
but functions that are currently limited to the main thread may be updated to
|
||||
allow calls from any thread in future releases.
|
||||
|
||||
|
||||
### Version compatibility {#compatibility}
|
||||
|
||||
GLFW uses [Semantic Versioning](https://semver.org/). This guarantees source
|
||||
and binary backward compatibility with earlier minor versions of the API. This
|
||||
means that you can drop in a newer version of the library and existing programs
|
||||
will continue to compile and existing binaries will continue to run.
|
||||
|
||||
Once a function or constant has been added, the signature of that function or
|
||||
value of that constant will remain unchanged until the next major version of
|
||||
GLFW. No compatibility of any kind is guaranteed between major versions.
|
||||
|
||||
Undocumented behavior, i.e. behavior that is not described in the documentation,
|
||||
may change at any time until it is documented.
|
||||
|
||||
If the reference documentation and the implementation differ, the reference
|
||||
documentation will almost always take precedence and the implementation will be
|
||||
fixed in the next release. The reference documentation will also take
|
||||
precedence over anything stated in a guide.
|
||||
|
||||
|
||||
### Event order {#event_order}
|
||||
|
||||
The order of arrival of related events is not guaranteed to be consistent
|
||||
across platforms. The exception is synthetic key and mouse button release
|
||||
events, which are always delivered after the window defocus event.
|
||||
|
||||
|
||||
## Version management {#intro_version}
|
||||
|
||||
GLFW provides mechanisms for identifying what version of GLFW your application
|
||||
was compiled against as well as what version it is currently running against.
|
||||
If you are loading GLFW dynamically (not just linking dynamically), you can use
|
||||
this to verify that the library binary is compatible with your application.
|
||||
|
||||
|
||||
### Compile-time version {#intro_version_compile}
|
||||
|
||||
The compile-time version of GLFW is provided by the GLFW header with the
|
||||
`GLFW_VERSION_MAJOR`, `GLFW_VERSION_MINOR` and `GLFW_VERSION_REVISION` macros.
|
||||
|
||||
```c
|
||||
printf("Compiled against GLFW %i.%i.%i\n",
|
||||
GLFW_VERSION_MAJOR,
|
||||
GLFW_VERSION_MINOR,
|
||||
GLFW_VERSION_REVISION);
|
||||
```
|
||||
|
||||
|
||||
### Run-time version {#intro_version_runtime}
|
||||
|
||||
The run-time version can be retrieved with @ref glfwGetVersion, a function that
|
||||
may be called regardless of whether GLFW is initialized.
|
||||
|
||||
```c
|
||||
int major, minor, revision;
|
||||
glfwGetVersion(&major, &minor, &revision);
|
||||
|
||||
printf("Running against GLFW %i.%i.%i\n", major, minor, revision);
|
||||
```
|
||||
|
||||
|
||||
### Version string {#intro_version_string}
|
||||
|
||||
GLFW 3 also provides a compile-time generated version string that describes the
|
||||
version, platform, compiler and any platform-specific compile-time options.
|
||||
This is primarily intended for submitting bug reports, to allow developers to
|
||||
see which code paths are enabled in a binary.
|
||||
|
||||
The version string is returned by @ref glfwGetVersionString, a function that may
|
||||
be called regardless of whether GLFW is initialized.
|
||||
|
||||
__Do not use the version string__ to parse the GLFW library version. The @ref
|
||||
glfwGetVersion function already provides the version of the running library
|
||||
binary.
|
||||
|
||||
__Do not use the version string__ to parse what platforms are supported. The @ref
|
||||
glfwPlatformSupported function lets you query platform support.
|
||||
|
||||
__GLFW 3.4:__ The format of this string was changed to support the addition of
|
||||
[runtime platform selection](@ref platform).
|
||||
|
||||
The format of the string is as follows:
|
||||
- The version of GLFW
|
||||
- For each supported platform:
|
||||
- The name of the window system API
|
||||
- The name of the window system specific context creation API, if applicable
|
||||
- The names of the always supported context creation APIs EGL and OSMesa
|
||||
- Any additional compile-time options, APIs and (on Windows) what compiler was used
|
||||
|
||||
For example, compiling GLFW 3.5 with MinGW as a DLL for Windows, may result in a version string
|
||||
like this:
|
||||
|
||||
```c
|
||||
3.5.0 Win32 WGL Null EGL OSMesa MinGW DLL
|
||||
```
|
||||
|
||||
Compiling GLFW as a static library for Linux, with both Wayland and X11 enabled, may
|
||||
result in a version string like this:
|
||||
|
||||
```c
|
||||
3.5.0 Wayland X11 GLX Null EGL OSMesa monotonic
|
||||
```
|
||||
|
@ -1,47 +0,0 @@
|
||||
/*!
|
||||
|
||||
@mainpage notitle
|
||||
|
||||
@section main_intro Introduction
|
||||
|
||||
__GLFW__ is a free, Open Source, multi-platform library for creating windows
|
||||
with OpenGL or OpenGL ES contexts and receiving many kinds of input. It is easy
|
||||
to integrate into existing applications and does not lay claim to the main loop.
|
||||
|
||||
See @ref news_31 for release highlights or the
|
||||
[version history](http://www.glfw.org/changelog.html) for details.
|
||||
|
||||
@ref quick is a guide for those new to GLFW. It takes you through how to write
|
||||
a small but complete program. For people coming from GLFW 2, the @ref moving
|
||||
guide explains what has changed and how to update existing code to use the new
|
||||
API.
|
||||
|
||||
There are guides for each of the various areas of the API.
|
||||
|
||||
- @ref intro – initialization, error handling and high-level design
|
||||
- @ref window – creating and working with windows and framebuffers
|
||||
- @ref context – working with OpenGL and OpenGL ES contexts
|
||||
- @ref monitor – enumerating and working with monitors and video modes
|
||||
- @ref input – receiving events, polling and processing input
|
||||
|
||||
Once you have written a program, see the @ref compile and @ref build guides.
|
||||
|
||||
The [reference documentation](modules.html) provides more detailed information
|
||||
about specific functions.
|
||||
|
||||
There is a section on @ref guarantees_limitations for pointer lifetimes,
|
||||
reentrancy, thread safety, event order and backward and forward compatibility.
|
||||
|
||||
The @ref rift fills in the gaps for how to use LibOVR with GLFW.
|
||||
|
||||
The [FAQ](http://www.glfw.org/faq.html) answers many common questions about the
|
||||
design, implementation and use of GLFW.
|
||||
|
||||
Finally, the @ref compat guide explains what APIs, standards and protocols GLFW
|
||||
uses and what happens when they are not present on a given machine.
|
||||
|
||||
This documentation was generated with Doxygen. The sources for it are available
|
||||
in both the [source distribution](http://www.glfw.org/download.html) and
|
||||
[GitHub repository](https://github.com/glfw/glfw).
|
||||
|
||||
*/
|
38
docs/main.md
Normal file
38
docs/main.md
Normal file
@ -0,0 +1,38 @@
|
||||
# Introduction {#mainpage}
|
||||
|
||||
GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and
|
||||
Vulkan application development. It provides a simple, platform-independent API
|
||||
for creating windows, contexts and surfaces, reading input, handling events, etc.
|
||||
|
||||
@ref news list new features, caveats and deprecations.
|
||||
|
||||
@ref quick_guide is a guide for users new to GLFW. It takes you through how to
|
||||
write a small but complete program.
|
||||
|
||||
There are guides for each section of the API:
|
||||
|
||||
- @ref intro_guide – initialization, error handling and high-level design
|
||||
- @ref window_guide – creating and working with windows and framebuffers
|
||||
- @ref context_guide – working with OpenGL and OpenGL ES contexts
|
||||
- @ref vulkan_guide - working with Vulkan objects and extensions
|
||||
- @ref monitor_guide – enumerating and working with monitors and video modes
|
||||
- @ref input_guide – receiving events, polling and processing input
|
||||
|
||||
Once you have written a program, see @ref compile_guide and @ref build_guide.
|
||||
|
||||
The [reference documentation](modules.html) provides more detailed information
|
||||
about specific functions.
|
||||
|
||||
@ref moving_guide explains what has changed and how to update existing code to
|
||||
use the new API.
|
||||
|
||||
There is a section on @ref guarantees_limitations for pointer lifetimes,
|
||||
reentrancy, thread safety, event order and backward and forward compatibility.
|
||||
|
||||
Finally, @ref compat_guide explains what APIs, standards and protocols GLFW uses
|
||||
and what happens when they are not present on a given machine.
|
||||
|
||||
This documentation was generated with Doxygen. The sources for it are available
|
||||
in both the [source distribution](https://www.glfw.org/download.html) and
|
||||
[GitHub repository](https://github.com/glfw/glfw).
|
||||
|
@ -1,19 +1,19 @@
|
||||
/*!
|
||||
# Monitor guide {#monitor_guide}
|
||||
|
||||
@page monitor Monitor guide
|
||||
[TOC]
|
||||
|
||||
@tableofcontents
|
||||
|
||||
This guide introduces the monitor related functions of GLFW. There are also
|
||||
This guide introduces the monitor related functions of GLFW. For details on
|
||||
a specific function in this category, see the @ref monitor. There are also
|
||||
guides for the other areas of GLFW.
|
||||
|
||||
- @ref intro
|
||||
- @ref window
|
||||
- @ref context
|
||||
- @ref input
|
||||
- @ref intro_guide
|
||||
- @ref window_guide
|
||||
- @ref context_guide
|
||||
- @ref vulkan_guide
|
||||
- @ref input_guide
|
||||
|
||||
|
||||
@section monitor_object Monitor objects
|
||||
## Monitor objects {#monitor_object}
|
||||
|
||||
A monitor object represents a currently connected monitor and is represented as
|
||||
a pointer to the [opaque](https://en.wikipedia.org/wiki/Opaque_data_type) type
|
||||
@ -34,136 +34,182 @@ To see how GLFW views your monitor setup and its available video modes, run the
|
||||
`monitors` test program.
|
||||
|
||||
|
||||
@subsection monitor_monitors Retrieving monitors
|
||||
### Retrieving monitors {#monitor_monitors}
|
||||
|
||||
The primary monitor is returned by @ref glfwGetPrimaryMonitor. It is the user's
|
||||
preferred monitor and is usually the one with global UI elements like task bar
|
||||
or menu bar.
|
||||
|
||||
@code
|
||||
```c
|
||||
GLFWmonitor* primary = glfwGetPrimaryMonitor();
|
||||
@endcode
|
||||
```
|
||||
|
||||
You can retrieve all currently connected monitors with @ref glfwGetMonitors.
|
||||
See the reference documentation for the lifetime of the returned array.
|
||||
|
||||
@code
|
||||
```c
|
||||
int count;
|
||||
GLFWmonitor** monitors = glfwGetMonitors(&count);
|
||||
@endcode
|
||||
```
|
||||
|
||||
The primary monitor is always the first monitor in the returned array, but other
|
||||
monitors may be moved to a different index when a monitor is connected or
|
||||
disconnected.
|
||||
|
||||
|
||||
@subsection monitor_event Monitor configuration changes
|
||||
### Monitor configuration changes {#monitor_event}
|
||||
|
||||
If you wish to be notified when a monitor is connected or disconnected, set
|
||||
a monitor callback.
|
||||
|
||||
@code
|
||||
```c
|
||||
glfwSetMonitorCallback(monitor_callback);
|
||||
@endcode
|
||||
```
|
||||
|
||||
The callback function receives the handle for the monitor that has been
|
||||
connected or disconnected and a monitor action.
|
||||
connected or disconnected and the event that occurred.
|
||||
|
||||
@code
|
||||
```c
|
||||
void monitor_callback(GLFWmonitor* monitor, int event)
|
||||
{
|
||||
if (event == GLFW_CONNECTED)
|
||||
{
|
||||
// The monitor was connected
|
||||
}
|
||||
else if (event == GLFW_DISCONNECTED)
|
||||
{
|
||||
// The monitor was disconnected
|
||||
}
|
||||
}
|
||||
@endcode
|
||||
```
|
||||
|
||||
The action is one of `GLFW_CONNECTED` or `GLFW_DISCONNECTED`.
|
||||
If a monitor is disconnected, all windows that are full screen on it will be
|
||||
switched to windowed mode before the callback is called. Only @ref
|
||||
glfwGetMonitorName and @ref glfwGetMonitorUserPointer will return useful values
|
||||
for a disconnected monitor and only before the monitor callback returns.
|
||||
|
||||
|
||||
@section monitor_properties Monitor properties
|
||||
## Monitor properties {#monitor_properties}
|
||||
|
||||
Each monitor has a current video mode, a list of supported video modes,
|
||||
a virtual position, a human-readable name, an estimated physical size and
|
||||
a gamma ramp.
|
||||
a virtual position, a content scale, a human-readable name, a user pointer, an
|
||||
estimated physical size and a gamma ramp.
|
||||
|
||||
|
||||
@subsection monitor_modes Video modes
|
||||
### Video modes {#monitor_modes}
|
||||
|
||||
GLFW generally does a good job selecting a suitable video mode when you create
|
||||
a full screen window, but it is sometimes useful to know exactly which video
|
||||
modes are supported.
|
||||
a full screen window, change its video mode or make a windowed one full
|
||||
screen, but it is sometimes useful to know exactly which video modes are
|
||||
supported.
|
||||
|
||||
Video modes are represented as @ref GLFWvidmode structures. You can get an
|
||||
array of the video modes supported by a monitor with @ref glfwGetVideoModes.
|
||||
See the reference documentation for the lifetime of the returned array.
|
||||
|
||||
@code
|
||||
```c
|
||||
int count;
|
||||
GLFWvidmode* modes = glfwGetVideoModes(monitor, &count);
|
||||
@endcode
|
||||
```
|
||||
|
||||
To get the current video mode of a monitor call @ref glfwGetVideoMode. See the
|
||||
reference documentation for the lifetime of the returned pointer.
|
||||
|
||||
@code
|
||||
```c
|
||||
const GLFWvidmode* mode = glfwGetVideoMode(monitor);
|
||||
@endcode
|
||||
```
|
||||
|
||||
The resolution of a video mode is specified in
|
||||
[screen coordinates](@ref coordinate_systems), not pixels.
|
||||
|
||||
|
||||
@subsection monitor_size Physical size
|
||||
### Physical size {#monitor_size}
|
||||
|
||||
The physical size of a monitor in millimetres, or an estimation of it, can be
|
||||
retrieved with @ref glfwGetMonitorPhysicalSize. This has no relation to its
|
||||
current _resolution_, i.e. the width and height of its current
|
||||
[video mode](@ref monitor_modes).
|
||||
|
||||
@code
|
||||
int widthMM, heightMM;
|
||||
glfwGetMonitorPhysicalSize(monitor, &widthMM, &heightMM);
|
||||
@endcode
|
||||
```c
|
||||
int width_mm, height_mm;
|
||||
glfwGetMonitorPhysicalSize(monitor, &width_mm, &height_mm);
|
||||
```
|
||||
|
||||
This can, for example, be used together with the current video mode to calculate
|
||||
the DPI of a monitor.
|
||||
|
||||
@code
|
||||
const double dpi = mode->width / (widthMM / 25.4);
|
||||
@endcode
|
||||
While this can be used to calculate the raw DPI of a monitor, this is often not
|
||||
useful. Instead, use the [monitor content scale](@ref monitor_scale) and
|
||||
[window content scale](@ref window_scale) to scale your content.
|
||||
|
||||
|
||||
@subsection monitor_pos Virtual position
|
||||
### Content scale {#monitor_scale}
|
||||
|
||||
The content scale for a monitor can be retrieved with @ref
|
||||
glfwGetMonitorContentScale.
|
||||
|
||||
```c
|
||||
float xscale, yscale;
|
||||
glfwGetMonitorContentScale(monitor, &xscale, &yscale);
|
||||
```
|
||||
|
||||
For more information on what the content scale is and how to use it, see
|
||||
[window content scale](@ref window_scale).
|
||||
|
||||
|
||||
### Virtual position {#monitor_pos}
|
||||
|
||||
The position of the monitor on the virtual desktop, in
|
||||
[screen coordinates](@ref coordinate_systems), can be retrieved with @ref
|
||||
glfwGetMonitorPos.
|
||||
|
||||
@code
|
||||
```c
|
||||
int xpos, ypos;
|
||||
glfwGetMonitorPos(monitor, &xpos, &ypos);
|
||||
@endcode
|
||||
```
|
||||
|
||||
|
||||
@subsection monitor_name Human-readable name
|
||||
### Work area {#monitor_workarea}
|
||||
|
||||
The area of a monitor not occupied by global task bars or menu bars is the work
|
||||
area. This is specified in [screen coordinates](@ref coordinate_systems) and
|
||||
can be retrieved with @ref glfwGetMonitorWorkarea.
|
||||
|
||||
```c
|
||||
int xpos, ypos, width, height;
|
||||
glfwGetMonitorWorkarea(monitor, &xpos, &ypos, &width, &height);
|
||||
```
|
||||
|
||||
|
||||
### Human-readable name {#monitor_name}
|
||||
|
||||
The human-readable, UTF-8 encoded name of a monitor is returned by @ref
|
||||
glfwGetMonitorName. See the reference documentation for the lifetime of the
|
||||
returned string.
|
||||
|
||||
@code
|
||||
```c
|
||||
const char* name = glfwGetMonitorName(monitor);
|
||||
@endcode
|
||||
```
|
||||
|
||||
Monitor names are not guaranteed to be unique. Two monitors of the same model
|
||||
and make may have the same name. Only the monitor handle is guaranteed to be
|
||||
unique, and only until that monitor is disconnected.
|
||||
|
||||
|
||||
@subsection monitor_gamma Gamma ramp
|
||||
### User pointer {#monitor_userptr}
|
||||
|
||||
Each monitor has a user pointer that can be set with @ref
|
||||
glfwSetMonitorUserPointer and queried with @ref glfwGetMonitorUserPointer. This
|
||||
can be used for any purpose you need and will not be modified by GLFW. The
|
||||
value will be kept until the monitor is disconnected or until the library is
|
||||
terminated.
|
||||
|
||||
The initial value of the pointer is `NULL`.
|
||||
|
||||
|
||||
### Gamma ramp {#monitor_gamma}
|
||||
|
||||
The gamma ramp of a monitor can be set with @ref glfwSetGammaRamp, which accepts
|
||||
a monitor handle and a pointer to a @ref GLFWgammaramp structure.
|
||||
|
||||
@code
|
||||
```c
|
||||
GLFWgammaramp ramp;
|
||||
unsigned short red[256], green[256], blue[256];
|
||||
|
||||
@ -178,27 +224,34 @@ for (i = 0; i < ramp.size; i++)
|
||||
}
|
||||
|
||||
glfwSetGammaRamp(monitor, &ramp);
|
||||
@endcode
|
||||
```
|
||||
|
||||
The gamma ramp data is copied before the function returns, so there is no need
|
||||
to keep it around once the ramp has been set.
|
||||
|
||||
@note It is recommended to use gamma ramps of size 256, as that is the size
|
||||
supported by all graphics cards on all platforms.
|
||||
It is recommended that your gamma ramp have the same size as the current gamma
|
||||
ramp for that monitor.
|
||||
|
||||
The current gamma ramp for a monitor is returned by @ref glfwGetGammaRamp. See
|
||||
the reference documentation for the lifetime of the returned structure.
|
||||
|
||||
@code
|
||||
```c
|
||||
const GLFWgammaramp* ramp = glfwGetGammaRamp(monitor);
|
||||
@endcode
|
||||
```
|
||||
|
||||
If you wish to set a regular gamma ramp, you can have GLFW calculate it for you
|
||||
from the desired exponent with @ref glfwSetGamma, which in turn calls @ref
|
||||
glfwSetGammaRamp with the resulting ramp.
|
||||
|
||||
@code
|
||||
```c
|
||||
glfwSetGamma(monitor, 1.0);
|
||||
@endcode
|
||||
```
|
||||
|
||||
To experiment with gamma correction via the @ref glfwSetGamma function, run the
|
||||
`gamma` test program.
|
||||
|
||||
@note The software controlled gamma ramp is applied _in addition_ to the
|
||||
hardware gamma correction, which today is typically an approximation of sRGB
|
||||
gamma. This means that setting a perfectly linear ramp, or gamma 1.0, will
|
||||
produce the default (usually sRGB-like) behavior.
|
||||
|
||||
*/
|
@ -1,8 +1,6 @@
|
||||
/*!
|
||||
# Moving from GLFW 2 to 3 {#moving_guide}
|
||||
|
||||
@page moving Moving from GLFW 2 to 3
|
||||
|
||||
@tableofcontents
|
||||
[TOC]
|
||||
|
||||
This is a transition guide for moving from GLFW 2 to 3. It describes what has
|
||||
changed or been removed, but does _not_ include
|
||||
@ -11,58 +9,64 @@ base onto the new API. For example, the new multi-monitor functions are
|
||||
required to create full screen windows with GLFW 3.
|
||||
|
||||
|
||||
@section moving_removed Changed and removed features
|
||||
## Changed and removed features {#moving_removed}
|
||||
|
||||
@subsection moving_renamed_files Renamed library and header file
|
||||
### Renamed library and header file {#moving_renamed_files}
|
||||
|
||||
The GLFW 3 header is named @ref glfw3.h and moved to the `GLFW` directory, to
|
||||
avoid collisions with the headers of other major versions. Similarly, the GLFW
|
||||
3 library is named `glfw3,` except when it's installed as a shared library on
|
||||
Unix-like systems, where it uses the
|
||||
[soname](https://en.wikipedia.org/wiki/soname) `libglfw.so.3`.
|
||||
Unix-like systems, where it uses the [soname][] `libglfw.so.3`.
|
||||
|
||||
@par Old syntax
|
||||
@code
|
||||
[soname]: https://en.wikipedia.org/wiki/soname
|
||||
|
||||
__Old syntax__
|
||||
```c
|
||||
#include <GL/glfw.h>
|
||||
@endcode
|
||||
```
|
||||
|
||||
@par New syntax
|
||||
@code
|
||||
__New syntax__
|
||||
```c
|
||||
#include <GLFW/glfw3.h>
|
||||
@endcode
|
||||
```
|
||||
|
||||
|
||||
@subsection moving_threads Removal of threading functions
|
||||
### Removal of threading functions {#moving_threads}
|
||||
|
||||
The threading functions have been removed, including the per-thread sleep
|
||||
function. They were fairly primitive, under-used, poorly integrated and took
|
||||
time away from the focus of GLFW (i.e. context, input and window). There are
|
||||
better threading libraries available and native threading support is available
|
||||
in both [C++11](http://en.cppreference.com/w/cpp/thread) and
|
||||
[C11](http://en.cppreference.com/w/c/thread), both of which are gaining
|
||||
traction.
|
||||
in both [C++11][] and [C11][], both of which are gaining traction.
|
||||
|
||||
[C++11]: https://en.cppreference.com/w/cpp/thread
|
||||
[C11]: https://en.cppreference.com/w/c/thread
|
||||
|
||||
If you wish to use the C++11 or C11 facilities but your compiler doesn't yet
|
||||
support them, see the
|
||||
[TinyThread++](https://gitorious.org/tinythread/tinythreadpp) and
|
||||
[TinyCThread](https://github.com/tinycthread/tinycthread) projects created by
|
||||
support them, see the [TinyThread++][] and [TinyCThread][] projects created by
|
||||
the original author of GLFW. These libraries implement a usable subset of the
|
||||
threading APIs in C++11 and C11, and in fact some GLFW 3 test programs use
|
||||
TinyCThread.
|
||||
|
||||
[TinyThread++]: https://gitorious.org/tinythread/tinythreadpp
|
||||
[TinyCThread]: https://github.com/tinycthread/tinycthread
|
||||
|
||||
However, GLFW 3 has better support for _use from multiple threads_ than GLFW
|
||||
2 had. Contexts can be made current on any thread, although only a single
|
||||
thread at a time, and the documentation explicitly states which functions may be
|
||||
used from any thread and which may only be used from the main thread.
|
||||
used from any thread and which must only be used from the main thread.
|
||||
|
||||
@par Removed functions
|
||||
`glfwSleep`, `glfwCreateThread`, `glfwDestroyThread`, `glfwWaitThread`,
|
||||
`glfwGetThreadID`, `glfwCreateMutex`, `glfwDestroyMutex`, `glfwLockMutex`,
|
||||
`glfwUnlockMutex`, `glfwCreateCond`, `glfwDestroyCond`, `glfwWaitCond`,
|
||||
`glfwSignalCond`, `glfwBroadcastCond` and `glfwGetNumberOfProcessors`.
|
||||
__Removed functions__
|
||||
> `glfwSleep`, `glfwCreateThread`, `glfwDestroyThread`, `glfwWaitThread`,
|
||||
> `glfwGetThreadID`, `glfwCreateMutex`, `glfwDestroyMutex`, `glfwLockMutex`,
|
||||
> `glfwUnlockMutex`, `glfwCreateCond`, `glfwDestroyCond`, `glfwWaitCond`,
|
||||
> `glfwSignalCond`, `glfwBroadcastCond` and `glfwGetNumberOfProcessors`.
|
||||
|
||||
__Removed types__
|
||||
> `GLFWthreadfun`
|
||||
|
||||
|
||||
@subsection moving_image Removal of image and texture loading
|
||||
### Removal of image and texture loading {#moving_image}
|
||||
|
||||
The image and texture loading functions have been removed. They only supported
|
||||
the Targa image format, making them mostly useful for beginner level examples.
|
||||
@ -70,100 +74,103 @@ To become of sufficiently high quality to warrant keeping them in GLFW 3, they
|
||||
would need not only to support other formats, but also modern extensions to
|
||||
OpenGL texturing. This would either add a number of external
|
||||
dependencies (libjpeg, libpng, etc.), or force GLFW to ship with inline versions
|
||||
of these libraries.
|
||||
of these libraries.
|
||||
|
||||
As there already are libraries doing this, it is unnecessary both to duplicate
|
||||
the work and to tie the duplicate to GLFW. The resulting library would also be
|
||||
platform-independent, as both OpenGL and stdio are available wherever GLFW is.
|
||||
|
||||
@par Removed functions
|
||||
`glfwReadImage`, `glfwReadMemoryImage`, `glfwFreeImage`, `glfwLoadTexture2D`,
|
||||
`glfwLoadMemoryTexture2D` and `glfwLoadTextureImage2D`.
|
||||
__Removed functions__
|
||||
> `glfwReadImage`, `glfwReadMemoryImage`, `glfwFreeImage`, `glfwLoadTexture2D`,
|
||||
> `glfwLoadMemoryTexture2D` and `glfwLoadTextureImage2D`.
|
||||
|
||||
|
||||
@subsection moving_stdcall Removal of GLFWCALL macro
|
||||
### Removal of GLFWCALL macro {#moving_stdcall}
|
||||
|
||||
The `GLFWCALL` macro, which made callback functions use
|
||||
[__stdcall](http://msdn.microsoft.com/en-us/library/zxk0tw93.aspx) on Windows,
|
||||
has been removed. GLFW is written in C, not Pascal. Removing this macro means
|
||||
there's one less thing for application programmers to remember, i.e. the
|
||||
requirement to mark all callback functions with `GLFWCALL`. It also simplifies
|
||||
the creation of DLLs and DLL link libraries, as there's no need to explicitly
|
||||
disable `@n` entry point suffixes.
|
||||
The `GLFWCALL` macro, which made callback functions use [\_\_stdcall][stdcall]
|
||||
on Windows, has been removed. GLFW is written in C, not Pascal. Removing this
|
||||
macro means there's one less thing for application programmers to remember, i.e.
|
||||
the requirement to mark all callback functions with `GLFWCALL`. It also
|
||||
simplifies the creation of DLLs and DLL link libraries, as there's no need to
|
||||
explicitly disable `@n` entry point suffixes.
|
||||
|
||||
@par Old syntax
|
||||
@code
|
||||
[stdcall]: https://msdn.microsoft.com/en-us/library/zxk0tw93.aspx
|
||||
|
||||
__Old syntax__
|
||||
```c
|
||||
void GLFWCALL callback_function(...);
|
||||
@endcode
|
||||
```
|
||||
|
||||
@par New syntax
|
||||
@code
|
||||
__New syntax__
|
||||
```c
|
||||
void callback_function(...);
|
||||
@endcode
|
||||
```
|
||||
|
||||
|
||||
@subsection moving_window_handles Window handle parameters
|
||||
### Window handle parameters {#moving_window_handles}
|
||||
|
||||
Because GLFW 3 supports multiple windows, window handle parameters have been
|
||||
added to all window-related GLFW functions and callbacks. The handle of
|
||||
a newly created window is returned by @ref glfwCreateWindow (formerly
|
||||
`glfwOpenWindow`). Window handles are pointers to the
|
||||
[opaque](https://en.wikipedia.org/wiki/Opaque_data_type) type @ref GLFWwindow.
|
||||
[opaque][opaque-type] type @ref GLFWwindow.
|
||||
|
||||
@par Old syntax
|
||||
@code
|
||||
[opaque-type]: https://en.wikipedia.org/wiki/Opaque_data_type
|
||||
|
||||
__Old syntax__
|
||||
```c
|
||||
glfwSetWindowTitle("New Window Title");
|
||||
@endcode
|
||||
```
|
||||
|
||||
@par New syntax
|
||||
@code
|
||||
__New syntax__
|
||||
```c
|
||||
glfwSetWindowTitle(window, "New Window Title");
|
||||
@endcode
|
||||
```
|
||||
|
||||
|
||||
@subsection moving_monitor Explicit monitor selection
|
||||
### Explicit monitor selection {#moving_monitor}
|
||||
|
||||
GLFW 3 provides support for multiple monitors. To request a full screen mode window,
|
||||
instead of passing `GLFW_FULLSCREEN` you specify which monitor you wish the
|
||||
window to use. The @ref glfwGetPrimaryMonitor function returns the monitor that
|
||||
GLFW 2 would have selected, but there are many other
|
||||
[monitor functions](@ref monitor). Monitor handles are pointers to the
|
||||
[opaque](https://en.wikipedia.org/wiki/Opaque_data_type) type @ref GLFWmonitor.
|
||||
[monitor functions](@ref monitor_guide). Monitor handles are pointers to the
|
||||
[opaque][opaque-type] type @ref GLFWmonitor.
|
||||
|
||||
@par Old basic full screen
|
||||
@code
|
||||
__Old basic full screen__
|
||||
```c
|
||||
glfwOpenWindow(640, 480, 8, 8, 8, 0, 24, 0, GLFW_FULLSCREEN);
|
||||
@endcode
|
||||
```
|
||||
|
||||
@par New basic full screen
|
||||
@code
|
||||
__New basic full screen__
|
||||
```c
|
||||
window = glfwCreateWindow(640, 480, "My Window", glfwGetPrimaryMonitor(), NULL);
|
||||
@endcode
|
||||
```
|
||||
|
||||
@note The framebuffer bit depth parameters of `glfwOpenWindow` have been turned
|
||||
into [window hints](@ref window_hints), but as they have been given
|
||||
[sane defaults](@ref window_hints_values) you rarely need to set these hints.
|
||||
|
||||
|
||||
@subsection moving_autopoll Removal of automatic event polling
|
||||
### Removal of automatic event polling {#moving_autopoll}
|
||||
|
||||
GLFW 3 does not automatically poll for events in @ref glfwSwapBuffers, meaning
|
||||
you need to call @ref glfwPollEvents or @ref glfwWaitEvents yourself. Unlike
|
||||
buffer swap, which acts on a single window, the event processing functions act
|
||||
on all windows at once.
|
||||
|
||||
@par Old basic main loop
|
||||
@code
|
||||
__Old basic main loop__
|
||||
```c
|
||||
while (...)
|
||||
{
|
||||
// Process input
|
||||
// Render output
|
||||
glfwSwapBuffers();
|
||||
}
|
||||
@endcode
|
||||
```
|
||||
|
||||
@par New basic main loop
|
||||
@code
|
||||
__New basic main loop__
|
||||
```c
|
||||
while (...)
|
||||
{
|
||||
// Process input
|
||||
@ -171,10 +178,10 @@ while (...)
|
||||
glfwSwapBuffers(window);
|
||||
glfwPollEvents();
|
||||
}
|
||||
@endcode
|
||||
```
|
||||
|
||||
|
||||
@subsection moving_context Explicit context management
|
||||
### Explicit context management {#moving_context}
|
||||
|
||||
Each GLFW 3 window has its own OpenGL context and only you, the application
|
||||
programmer, can know which context should be current on which thread at any
|
||||
@ -184,7 +191,7 @@ This means that you need to call @ref glfwMakeContextCurrent after creating
|
||||
a window before you can call any OpenGL functions.
|
||||
|
||||
|
||||
@subsection moving_hidpi Separation of window and framebuffer sizes
|
||||
### Separation of window and framebuffer sizes {#moving_hidpi}
|
||||
|
||||
Window positions and sizes now use screen coordinates, which may not be the same
|
||||
as pixels on machines with high-DPI monitors. This is important as OpenGL uses
|
||||
@ -194,20 +201,20 @@ been added. You can retrieve the size of the framebuffer of a window with @ref
|
||||
glfwGetFramebufferSize function. A framebuffer size callback has also been
|
||||
added, which can be set with @ref glfwSetFramebufferSizeCallback.
|
||||
|
||||
@par Old basic viewport setup
|
||||
@code
|
||||
__Old basic viewport setup__
|
||||
```c
|
||||
glfwGetWindowSize(&width, &height);
|
||||
glViewport(0, 0, width, height);
|
||||
@endcode
|
||||
```
|
||||
|
||||
@par New basic viewport setup
|
||||
@code
|
||||
__New basic viewport setup__
|
||||
```c
|
||||
glfwGetFramebufferSize(window, &width, &height);
|
||||
glViewport(0, 0, width, height);
|
||||
@endcode
|
||||
```
|
||||
|
||||
|
||||
@subsection moving_window_close Window closing changes
|
||||
### Window closing changes {#moving_window_close}
|
||||
|
||||
The `GLFW_OPENED` window parameter has been removed. As long as the window has
|
||||
not been destroyed, whether through @ref glfwDestroyWindow or @ref
|
||||
@ -216,50 +223,50 @@ glfwTerminate, the window is "open".
|
||||
A user attempting to close a window is now just an event like any other. Unlike
|
||||
GLFW 2, windows and contexts created with GLFW 3 will never be destroyed unless
|
||||
you choose them to be. Each window now has a close flag that is set to
|
||||
`GL_TRUE` when the user attempts to close that window. By default, nothing else
|
||||
`GLFW_TRUE` when the user attempts to close that window. By default, nothing else
|
||||
happens and the window stays visible. It is then up to you to either destroy
|
||||
the window, take some other action or simply ignore the request.
|
||||
the window, take some other action or ignore the request.
|
||||
|
||||
You can query the close flag at any time with @ref glfwWindowShouldClose and set
|
||||
it at any time with @ref glfwSetWindowShouldClose.
|
||||
|
||||
@par Old basic main loop
|
||||
@code
|
||||
__Old basic main loop__
|
||||
```c
|
||||
while (glfwGetWindowParam(GLFW_OPENED))
|
||||
{
|
||||
...
|
||||
}
|
||||
@endcode
|
||||
```
|
||||
|
||||
@par New basic main loop
|
||||
@code
|
||||
__New basic main loop__
|
||||
```c
|
||||
while (!glfwWindowShouldClose(window))
|
||||
{
|
||||
...
|
||||
}
|
||||
@endcode
|
||||
```
|
||||
|
||||
The close callback no longer returns a value. Instead, it is called after the
|
||||
close flag has been set so it can override its value, if it chooses to, before
|
||||
close flag has been set, so it can optionally override its value, before
|
||||
event processing completes. You may however not call @ref glfwDestroyWindow
|
||||
from the close callback (or any other window related callback).
|
||||
|
||||
@par Old syntax
|
||||
@code
|
||||
__Old syntax__
|
||||
```c
|
||||
int GLFWCALL window_close_callback(void);
|
||||
@endcode
|
||||
```
|
||||
|
||||
@par New syntax
|
||||
@code
|
||||
__New syntax__
|
||||
```c
|
||||
void window_close_callback(GLFWwindow* window);
|
||||
@endcode
|
||||
```
|
||||
|
||||
@note GLFW never clears the close flag to `GL_FALSE`, meaning you can use it
|
||||
@note GLFW never clears the close flag to `GLFW_FALSE`, meaning you can use it
|
||||
for other reasons to close the window as well, for example the user choosing
|
||||
Quit from an in-game menu.
|
||||
|
||||
|
||||
@subsection moving_hints Persistent window hints
|
||||
### Persistent window hints {#moving_hints}
|
||||
|
||||
The `glfwOpenWindowHint` function has been renamed to @ref glfwWindowHint.
|
||||
|
||||
@ -268,7 +275,7 @@ instead retain their values until modified by @ref glfwWindowHint or @ref
|
||||
glfwDefaultWindowHints, or until the library is terminated and re-initialized.
|
||||
|
||||
|
||||
@subsection moving_video_modes Video mode enumeration
|
||||
### Video mode enumeration {#moving_video_modes}
|
||||
|
||||
Video mode enumeration is now per-monitor. The @ref glfwGetVideoModes function
|
||||
now returns all available modes for a specific monitor instead of requiring you
|
||||
@ -277,7 +284,7 @@ had poorly defined behavior, has been replaced by @ref glfwGetVideoMode, which
|
||||
returns the current mode of a monitor.
|
||||
|
||||
|
||||
@subsection moving_char_up Removal of character actions
|
||||
### Removal of character actions {#moving_char_up}
|
||||
|
||||
The action parameter of the [character callback](@ref GLFWcharfun) has been
|
||||
removed. This was an artefact of the origin of GLFW, i.e. being developed in
|
||||
@ -285,18 +292,18 @@ English by a Swede. However, many keyboard layouts require more than one key to
|
||||
produce characters with diacritical marks. Even the Swedish keyboard layout
|
||||
requires this for uncommon cases like ü.
|
||||
|
||||
@par Old syntax
|
||||
@code
|
||||
__Old syntax__
|
||||
```c
|
||||
void GLFWCALL character_callback(int character, int action);
|
||||
@endcode
|
||||
```
|
||||
|
||||
@par New syntax
|
||||
@code
|
||||
__New syntax__
|
||||
```c
|
||||
void character_callback(GLFWwindow* window, int character);
|
||||
@endcode
|
||||
```
|
||||
|
||||
|
||||
@subsection moving_cursorpos Cursor position changes
|
||||
### Cursor position changes {#moving_cursorpos}
|
||||
|
||||
The `glfwGetMousePos` function has been renamed to @ref glfwGetCursorPos,
|
||||
`glfwSetMousePos` to @ref glfwSetCursorPos and `glfwSetMousePosCallback` to @ref
|
||||
@ -312,7 +319,7 @@ glfwSetCursorPos (formerly `glfwSetMousePos`) when that window is active.
|
||||
Unless the window is active, the function fails silently.
|
||||
|
||||
|
||||
@subsection moving_wheel Wheel position replaced by scroll offsets
|
||||
### Wheel position replaced by scroll offsets {#moving_wheel}
|
||||
|
||||
The `glfwGetMouseWheel` function has been removed. Scrolling is the input of
|
||||
offsets and has no absolute position. The mouse wheel callback has been
|
||||
@ -320,21 +327,21 @@ replaced by a [scroll callback](@ref GLFWscrollfun) that receives
|
||||
two-dimensional floating point scroll offsets. This allows you to receive
|
||||
precise scroll data from for example modern touchpads.
|
||||
|
||||
@par Old syntax
|
||||
@code
|
||||
__Old syntax__
|
||||
```c
|
||||
void GLFWCALL mouse_wheel_callback(int position);
|
||||
@endcode
|
||||
```
|
||||
|
||||
@par New syntax
|
||||
@code
|
||||
__New syntax__
|
||||
```c
|
||||
void scroll_callback(GLFWwindow* window, double xoffset, double yoffset);
|
||||
@endcode
|
||||
```
|
||||
|
||||
@par Removed functions
|
||||
`glfwGetMouseWheel`
|
||||
__Removed functions__
|
||||
> `glfwGetMouseWheel`
|
||||
|
||||
|
||||
@subsection moving_repeat Key repeat action
|
||||
### Key repeat action {#moving_repeat}
|
||||
|
||||
The `GLFW_KEY_REPEAT` enable has been removed and key repeat is always enabled
|
||||
for both keys and characters. A new key action, `GLFW_REPEAT`, has been added
|
||||
@ -343,15 +350,15 @@ from a repeat. Note that @ref glfwGetKey still returns only `GLFW_PRESS` or
|
||||
`GLFW_RELEASE`.
|
||||
|
||||
|
||||
@subsection moving_keys Physical key input
|
||||
### Physical key input {#moving_keys}
|
||||
|
||||
GLFW 3 key tokens map to physical keys, unlike in GLFW 2 where they mapped to
|
||||
the values generated by the current keyboard layout. The tokens are named
|
||||
according to the values they would have using the standard US layout, but this
|
||||
according to the values they would have in the standard US layout, but this
|
||||
is only a convenience, as most programmers are assumed to know that layout.
|
||||
This means that (for example) `GLFW_KEY_LEFT_BRACKET` is always a single key and
|
||||
is the same key in the same place regardless of what keyboard layouts the users
|
||||
of your program has.
|
||||
of your program have.
|
||||
|
||||
The key input facility was never meant for text input, although using it that
|
||||
way worked slightly better in GLFW 2. If you were using it to input text, you
|
||||
@ -359,11 +366,11 @@ should be using the character callback instead, on both GLFW 2 and 3. This will
|
||||
give you the characters being input, as opposed to the keys being pressed.
|
||||
|
||||
GLFW 3 has key tokens for all keys on a standard 105 key keyboard, so instead of
|
||||
having to remember whether to check for `'a'` or `'A'`, you now check for
|
||||
`GLFW_KEY_A`.
|
||||
having to remember whether to check for `a` or `A`, you now check for
|
||||
@ref GLFW_KEY_A.
|
||||
|
||||
|
||||
@subsection moving_joystick Joystick function changes
|
||||
### Joystick function changes {#moving_joystick}
|
||||
|
||||
The `glfwGetJoystickPos` function has been renamed to @ref glfwGetJoystickAxes.
|
||||
|
||||
@ -373,18 +380,19 @@ function as well as axis and button counts returned by the @ref
|
||||
glfwGetJoystickAxes and @ref glfwGetJoystickButtons functions.
|
||||
|
||||
|
||||
@subsection moving_mbcs Win32 MBCS support
|
||||
### Win32 MBCS support {#moving_mbcs}
|
||||
|
||||
The Win32 port of GLFW 3 will not compile in
|
||||
[MBCS mode](http://msdn.microsoft.com/en-us/library/5z097dxa.aspx).
|
||||
However, because the use of the Unicode version of the Win32 API doesn't affect
|
||||
the process as a whole, but only those windows created using it, it's perfectly
|
||||
The Win32 port of GLFW 3 will not compile in [MBCS mode][MBCS]. However,
|
||||
because the use of the Unicode version of the Win32 API doesn't affect the
|
||||
process as a whole, but only those windows created using it, it's perfectly
|
||||
possible to call MBCS functions from other parts of the same application.
|
||||
Therefore, even if an application using GLFW has MBCS mode code, there's no need
|
||||
for GLFW itself to support it.
|
||||
|
||||
[MBCS]: https://msdn.microsoft.com/en-us/library/5z097dxa.aspx
|
||||
|
||||
@subsection moving_windows Support for versions of Windows older than XP
|
||||
|
||||
### Support for versions of Windows older than XP {#moving_windows}
|
||||
|
||||
All explicit support for version of Windows older than XP has been removed.
|
||||
There is no code that actively prevents GLFW 3 from running on these earlier
|
||||
@ -404,7 +412,7 @@ runtime checking for a number of functions that are present only on modern
|
||||
version of Windows.
|
||||
|
||||
|
||||
@subsection moving_syskeys Capture of system-wide hotkeys
|
||||
### Capture of system-wide hotkeys {#moving_syskeys}
|
||||
|
||||
The ability to disable and capture system-wide hotkeys like Alt+Tab has been
|
||||
removed. Modern applications, whether they're games, scientific visualisations
|
||||
@ -412,11 +420,11 @@ or something else, are nowadays expected to be good desktop citizens and allow
|
||||
these hotkeys to function even when running in full screen mode.
|
||||
|
||||
|
||||
@subsection moving_terminate Automatic termination
|
||||
### Automatic termination {#moving_terminate}
|
||||
|
||||
GLFW 3 does not register @ref glfwTerminate with `atexit` at initialization,
|
||||
because `exit` calls registered functions from the calling thread and while it
|
||||
is permitted to call `exit` from any thread, @ref glfwTerminate may only be
|
||||
is permitted to call `exit` from any thread, @ref glfwTerminate must only be
|
||||
called from the main thread.
|
||||
|
||||
To release all resources allocated by GLFW, you should call @ref glfwTerminate
|
||||
@ -425,30 +433,41 @@ destroys all windows not already destroyed with @ref glfwDestroyWindow,
|
||||
invalidating any window handles you may still have.
|
||||
|
||||
|
||||
@subsection moving_glu GLU header inclusion
|
||||
### GLU header inclusion {#moving_glu}
|
||||
|
||||
GLFW 3 does not by default include the GLU header and GLU itself has been
|
||||
deprecated by [Khronos](https://en.wikipedia.org/wiki/Khronos_Group). __New
|
||||
projects should avoid using GLU__, but if you need to compile legacy code that
|
||||
has been moved to GLFW 3, you can request that the GLFW header includes it by
|
||||
defining `GLFW_INCLUDE_GLU` before the inclusion of the GLFW header.
|
||||
deprecated by [Khronos][]. __New projects should not use GLU__, but if you need
|
||||
it for legacy code that has been moved to GLFW 3, you can request that the GLFW
|
||||
header includes it by defining @ref GLFW_INCLUDE_GLU before the inclusion of the
|
||||
GLFW header.
|
||||
|
||||
@par Old syntax
|
||||
@code
|
||||
[Khronos]: https://en.wikipedia.org/wiki/Khronos_Group
|
||||
|
||||
__Old syntax__
|
||||
```c
|
||||
#include <GL/glfw.h>
|
||||
@endcode
|
||||
```
|
||||
|
||||
@par New syntax
|
||||
@code
|
||||
__New syntax__
|
||||
```c
|
||||
#define GLFW_INCLUDE_GLU
|
||||
#include <GLFW/glfw3.h>
|
||||
@endcode
|
||||
```
|
||||
|
||||
There are many libraries that offer replacements for the functionality offered
|
||||
by GLU. For the matrix helper functions, see math libraries like [GLM][] (for
|
||||
C++), [linmath.h][] (for C) and others. For the tessellation functions, see for
|
||||
example [libtess2][].
|
||||
|
||||
[GLM]: https://github.com/g-truc/glm
|
||||
[linmath.h]: https://github.com/datenwolf/linmath.h
|
||||
[libtess2]: https://github.com/memononen/libtess2
|
||||
|
||||
|
||||
@section moving_tables Name change tables
|
||||
## Name change tables {#moving_tables}
|
||||
|
||||
|
||||
@subsection moving_renamed_functions Renamed functions
|
||||
### Renamed functions {#moving_renamed_functions}
|
||||
|
||||
| GLFW 2 | GLFW 3 | Notes |
|
||||
| --------------------------- | ----------------------------- | ----- |
|
||||
@ -467,7 +486,16 @@ defining `GLFW_INCLUDE_GLU` before the inclusion of the GLFW header.
|
||||
| `glfwGetDesktopMode` | @ref glfwGetVideoMode | Returns the current mode of a monitor |
|
||||
| `glfwGetJoystickParam` | @ref glfwJoystickPresent | The axis and button counts are provided by @ref glfwGetJoystickAxes and @ref glfwGetJoystickButtons |
|
||||
|
||||
@subsection moving_renamed_tokens Renamed tokens
|
||||
|
||||
### Renamed types {#moving_renamed_types}
|
||||
|
||||
| GLFW 2 | GLFW 3 | Notes |
|
||||
| ------------------- | --------------------- | |
|
||||
| `GLFWmousewheelfun` | @ref GLFWscrollfun | |
|
||||
| `GLFWmouseposfun` | @ref GLFWcursorposfun | |
|
||||
|
||||
|
||||
### Renamed tokens {#moving_renamed_tokens}
|
||||
|
||||
| GLFW 2 | GLFW 3 | Notes |
|
||||
| --------------------------- | ---------------------------- | ----- |
|
||||
@ -491,4 +519,3 @@ defining `GLFW_INCLUDE_GLU` before the inclusion of the GLFW header.
|
||||
| `GLFW_KEY_RALT` | `GLFW_KEY_RIGHT_ALT` | |
|
||||
| `GLFW_KEY_RSUPER` | `GLFW_KEY_RIGHT_SUPER` | |
|
||||
|
||||
*/
|
292
docs/news.dox
292
docs/news.dox
@ -1,292 +0,0 @@
|
||||
/*!
|
||||
|
||||
@page news New features
|
||||
|
||||
@section news_31 New features in 3.1
|
||||
|
||||
These are the release highlights. For a full list of changes see the
|
||||
[version history](http://www.glfw.org/changelog.html).
|
||||
|
||||
|
||||
@subsection news_31_cursor Custom mouse cursor images
|
||||
|
||||
GLFW now supports creating and setting both custom cursor images and standard
|
||||
cursor shapes. They are created with @ref glfwCreateCursor or @ref
|
||||
glfwCreateStandardCursor, set with @ref glfwSetCursor and destroyed with @ref
|
||||
glfwDestroyCursor.
|
||||
|
||||
@see @ref cursor_object
|
||||
|
||||
|
||||
@subsection news_31_drop Path drop event
|
||||
|
||||
GLFW now provides a callback for receiving the paths of files and directories
|
||||
dropped onto GLFW windows. The callback is set with @ref glfwSetDropCallback.
|
||||
|
||||
@see @ref path_drop
|
||||
|
||||
|
||||
@subsection news_31_emptyevent Main thread wake-up
|
||||
|
||||
GLFW now provides the @ref glfwPostEmptyEvent function for posting an empty
|
||||
event from another thread to the main thread event queue, causing @ref
|
||||
glfwWaitEvents to return.
|
||||
|
||||
@see @ref events
|
||||
|
||||
|
||||
@subsection news_31_framesize Window frame size query
|
||||
|
||||
GLFW now supports querying the size, on each side, of the frame around the
|
||||
client area of a window, with @ref glfwGetWindowFrameSize.
|
||||
|
||||
@see [Window size](@ref window_size)
|
||||
|
||||
|
||||
@subsection news_31_autoiconify Simultaneous multi-monitor rendering
|
||||
|
||||
GLFW now supports disabling auto-iconification of full screen windows with
|
||||
the [GLFW_AUTO_ICONIFY](@ref window_hints_wnd) window hint. This is intended
|
||||
for people building multi-monitor installations, where you need windows to stay
|
||||
in full screen despite losing input focus.
|
||||
|
||||
|
||||
@subsection news_31_floating Floating windows
|
||||
|
||||
GLFW now supports floating windows, also called topmost or always on top, for
|
||||
easier debugging with the [GLFW_FLOATING](@ref window_hints_wnd) window hint.
|
||||
|
||||
|
||||
@subsection news_31_focused Initially unfocused windows
|
||||
|
||||
GLFW now supports preventing a windowed mode window from gaining input focus on
|
||||
creation, with the [GLFW_FOCUSED](@ref window_hints_wnd) window hint.
|
||||
|
||||
|
||||
@subsection news_31_direct Direct access for window attributes and cursor position
|
||||
|
||||
GLFW now queries the window input focus, visibility and iconification attributes
|
||||
and the cursor position directly instead of returning cached data.
|
||||
|
||||
|
||||
@subsection news_31_libovr Better interoperability with Oculus Rift
|
||||
|
||||
GLFW now provides native access functions for the OS level handles corresponding
|
||||
to monitor objects, as well as a [brief guide](@ref rift). It is also regularly
|
||||
tested for compatibility with the latest version of LibOVR (0.4.4 on release).
|
||||
|
||||
|
||||
@subsection news_31_charmods Character with modifiers callback
|
||||
|
||||
GLFW now provides a callback for character events with modifier key bits. The
|
||||
callback is set with @ref glfwSetCharModsCallback. Unlike the regular character
|
||||
callback, this will report character events that will not result in a character
|
||||
being input, for example if the Control key is held down.
|
||||
|
||||
@see @ref input_char
|
||||
|
||||
|
||||
@subsection news_31_single Single buffered framebuffers
|
||||
|
||||
GLFW now supports the creation of single buffered windows, with the
|
||||
[GLFW_DOUBLEBUFFER](@ref window_hints_fb) window hint.
|
||||
|
||||
|
||||
@subsection news_31_glext Macro for including extension header
|
||||
|
||||
GLFW now includes the extension header appropriate for the chosen OpenGL or
|
||||
OpenGL ES header when [GLFW_INCLUDE_GLEXT](@ref build_macros) is defined. GLFW
|
||||
does not provide these headers. They must be provided by your development
|
||||
environment or your OpenGL or OpenGL ES SDK.
|
||||
|
||||
|
||||
@subsection news_31_release Context release behaviors
|
||||
|
||||
GLFW now supports controlling whether the pipeline is flushed when a context is
|
||||
made non-current, with the
|
||||
[GLFW_CONTEXT_RELEASE_BEHAVIOR](@ref window_hints_ctx) window hint, provided the
|
||||
machine supports the `GL_KHR_context_flush_control` extension.
|
||||
|
||||
|
||||
@subsection news_31_wayland (Experimental) Wayland support
|
||||
|
||||
GLFW now has an _experimental_ Wayland display protocol backend that can be
|
||||
selected on Linux with a CMake option.
|
||||
|
||||
|
||||
@subsection news_31_mir (Experimental) Mir support
|
||||
|
||||
GLFW now has an _experimental_ Mir display server backend that can be selected
|
||||
on Linux with a CMake option.
|
||||
|
||||
|
||||
@section news_30 New features in 3.0
|
||||
|
||||
These are the release highlights. For a full list of changes see the
|
||||
[version history](http://www.glfw.org/changelog.html).
|
||||
|
||||
|
||||
@subsection news_30_cmake CMake build system
|
||||
|
||||
GLFW now uses the CMake build system instead of the various makefiles and
|
||||
project files used by earlier versions. CMake is available for all platforms
|
||||
supported by GLFW, is present in most package systems and can generate
|
||||
makefiles and/or project files for most popular development environments.
|
||||
|
||||
For more information on how to use CMake, see the
|
||||
[CMake manual](http://cmake.org/cmake/help/documentation.html).
|
||||
|
||||
|
||||
@subsection news_30_multiwnd Multi-window support
|
||||
|
||||
GLFW now supports the creation of multiple windows, each with their own OpenGL
|
||||
or OpenGL ES context, and all window functions now take a window handle. Event
|
||||
callbacks are now per-window and are provided with the handle of the window that
|
||||
received the event. The @ref glfwMakeContextCurrent function has been added to
|
||||
select which context is current on a given thread.
|
||||
|
||||
|
||||
@subsection news_30_multimon Multi-monitor support
|
||||
|
||||
GLFW now explicitly supports multiple monitors. They can be enumerated with
|
||||
@ref glfwGetMonitors, queried with @ref glfwGetVideoModes, @ref
|
||||
glfwGetMonitorPos, @ref glfwGetMonitorName and @ref glfwGetMonitorPhysicalSize,
|
||||
and specified at window creation to make the newly created window full screen on
|
||||
that specific monitor.
|
||||
|
||||
|
||||
@subsection news_30_unicode Unicode support
|
||||
|
||||
All string arguments to GLFW functions and all strings returned by GLFW now use
|
||||
the UTF-8 encoding. This includes the window title, error string, clipboard
|
||||
text, monitor and joystick names as well as the extension function arguments (as
|
||||
ASCII is a subset of UTF-8).
|
||||
|
||||
|
||||
@subsection news_30_clipboard Clipboard text I/O
|
||||
|
||||
GLFW now supports reading and writing plain text to and from the system
|
||||
clipboard, with the @ref glfwGetClipboardString and @ref glfwSetClipboardString
|
||||
functions.
|
||||
|
||||
|
||||
@subsection news_30_gamma Gamma ramp support
|
||||
|
||||
GLFW now supports setting and reading back the gamma ramp of monitors, with the
|
||||
@ref glfwGetGammaRamp and @ref glfwSetGammaRamp functions. There is also @ref
|
||||
glfwSetGamma, which generates a ramp from a gamma value and then sets it.
|
||||
|
||||
|
||||
@subsection news_30_gles OpenGL ES support
|
||||
|
||||
GLFW now supports the creation of OpenGL ES contexts, by setting the
|
||||
`GLFW_CLIENT_API` window hint to `GLFW_OPENGL_ES_API`, where creation of such
|
||||
contexts are supported. Note that GLFW _does not implement_ OpenGL ES, so your
|
||||
driver must provide support in a way usable by GLFW. Modern Nvidia and Intel
|
||||
drivers support creation of OpenGL ES context using the GLX and WGL APIs, while
|
||||
AMD provides an EGL implementation instead.
|
||||
|
||||
|
||||
@subsection news_30_egl (Experimental) EGL support
|
||||
|
||||
GLFW now has an experimental EGL context creation back end that can be selected
|
||||
through CMake options.
|
||||
|
||||
|
||||
@subsection news_30_hidpi High-DPI support
|
||||
|
||||
GLFW now supports high-DPI monitors on both Windows and OS X, giving windows full
|
||||
resolution framebuffers where other UI elements are scaled up. To achieve this,
|
||||
@ref glfwGetFramebufferSize and @ref glfwSetFramebufferSizeCallback have been
|
||||
added. These work with pixels, while the rest of the GLFW API works with screen
|
||||
coordinates. This is important as OpenGL uses pixels, not screen coordinates.
|
||||
|
||||
|
||||
@subsection news_30_error Error callback
|
||||
|
||||
GLFW now has an error callback, which can provide your application with much
|
||||
more detailed diagnostics than was previously possible. The callback is passed
|
||||
an error code and a description string.
|
||||
|
||||
|
||||
@subsection news_30_wndptr Per-window user pointer
|
||||
|
||||
Each window now has a user-defined pointer, retrieved with @ref
|
||||
glfwGetWindowUserPointer and set with @ref glfwSetWindowUserPointer, to make it
|
||||
easier to integrate GLFW into C++ code.
|
||||
|
||||
|
||||
@subsection news_30_iconifyfun Window iconification callback
|
||||
|
||||
Each window now has a callback for iconification and restoration events,
|
||||
which is set with @ref glfwSetWindowIconifyCallback.
|
||||
|
||||
|
||||
@subsection news_30_wndposfun Window position callback
|
||||
|
||||
Each window now has a callback for position events, which is set with @ref
|
||||
glfwSetWindowPosCallback.
|
||||
|
||||
|
||||
@subsection news_30_wndpos Window position query
|
||||
|
||||
The position of a window can now be retrieved using @ref glfwGetWindowPos.
|
||||
|
||||
|
||||
@subsection news_30_focusfun Window focus callback
|
||||
|
||||
Each windows now has a callback for focus events, which is set with @ref
|
||||
glfwSetWindowFocusCallback.
|
||||
|
||||
|
||||
@subsection news_30_enterleave Cursor enter/leave callback
|
||||
|
||||
Each window now has a callback for when the mouse cursor enters or leaves its
|
||||
client area, which is set with @ref glfwSetCursorEnterCallback.
|
||||
|
||||
|
||||
@subsection news_30_wndtitle Initial window title
|
||||
|
||||
The title of a window is now specified at creation time, as one of the arguments
|
||||
to @ref glfwCreateWindow.
|
||||
|
||||
|
||||
@subsection news_30_hidden Hidden windows
|
||||
|
||||
Windows can now be hidden with @ref glfwHideWindow, shown using @ref
|
||||
glfwShowWindow and created initially hidden with the `GLFW_VISIBLE` window hint.
|
||||
This allows for off-screen rendering in a way compatible with most drivers, as
|
||||
well as moving a window to a specific position before showing it.
|
||||
|
||||
|
||||
@subsection news_30_undecorated Undecorated windows
|
||||
|
||||
Windowed mode windows can now be created without decorations, i.e. things like
|
||||
a frame, a title bar, with the `GLFW_DECORATED` window hint. This allows for
|
||||
the creation of things like splash screens.
|
||||
|
||||
|
||||
@subsection news_30_keymods Modifier key bit masks
|
||||
|
||||
[Modifier key bit mask](@ref mods) parameters have been added to the
|
||||
[mouse button](@ref GLFWmousebuttonfun) and [key](@ref GLFWkeyfun) callbacks.
|
||||
|
||||
|
||||
@subsection news_30_scancode Platform-specific scancodes
|
||||
|
||||
A scancode parameter has been added to the [key callback](@ref GLFWkeyfun). Keys
|
||||
that don't have a [key token](@ref keys) still get passed on with the key
|
||||
parameter set to `GLFW_KEY_UNKNOWN`. These scancodes will vary between machines
|
||||
and are intended to be used for key bindings.
|
||||
|
||||
|
||||
@subsection news_30_jsname Joystick names
|
||||
|
||||
The name of a joystick can now be retrieved using @ref glfwGetJoystickName.
|
||||
|
||||
|
||||
@subsection news_30_doxygen Doxygen documentation
|
||||
|
||||
You are reading it.
|
||||
|
||||
*/
|
40
docs/news.md
Normal file
40
docs/news.md
Normal file
@ -0,0 +1,40 @@
|
||||
# Release notes for version 3.5 {#news}
|
||||
|
||||
[TOC]
|
||||
|
||||
|
||||
## New features {#features}
|
||||
|
||||
### Unlimited mouse buttons {#unlimited_mouse_buttons}
|
||||
|
||||
GLFW now has an input mode which allows an unlimited number of mouse buttons to
|
||||
be reported by the mouse buttton callback, rather than just the associated
|
||||
[mouse button tokens](@ref buttons). This allows using mouse buttons with
|
||||
values over 8. For compatibility with older versions, the
|
||||
@ref GLFW_UNLIMITED_MOUSE_BUTTONS input mode needs to be set to make use of
|
||||
this.
|
||||
|
||||
## Caveats {#caveats}
|
||||
|
||||
## Deprecations {#deprecations}
|
||||
|
||||
## Removals {#removals}
|
||||
|
||||
## New symbols {#new_symbols}
|
||||
|
||||
### New functions {#new_functions}
|
||||
|
||||
### New types {#new_types}
|
||||
|
||||
### New constants {#new_constants}
|
||||
|
||||
- @ref GLFW_UNLIMITED_MOUSE_BUTTONS
|
||||
|
||||
## Release notes for earlier versions {#news_archive}
|
||||
|
||||
- [Release notes for 3.4](https://www.glfw.org/docs/3.4/news.html)
|
||||
- [Release notes for 3.3](https://www.glfw.org/docs/3.3/news.html)
|
||||
- [Release notes for 3.2](https://www.glfw.org/docs/3.2/news.html)
|
||||
- [Release notes for 3.1](https://www.glfw.org/docs/3.1/news.html)
|
||||
- [Release notes for 3.0](https://www.glfw.org/docs/3.0/news.html)
|
||||
|
@ -1,161 +1,185 @@
|
||||
/*!
|
||||
# Getting started {#quick_guide}
|
||||
|
||||
@page quick Getting started
|
||||
[TOC]
|
||||
|
||||
@tableofcontents
|
||||
|
||||
This guide takes you through writing a simple application using GLFW 3. The
|
||||
This guide takes you through writing a small application using GLFW 3. The
|
||||
application will create a window and OpenGL context, render a rotating triangle
|
||||
and exit when the user closes the window or presses Escape. This guide will
|
||||
and exit when the user closes the window or presses _Escape_. This guide will
|
||||
introduce a few of the most commonly used functions, but there are many more.
|
||||
|
||||
This guide assumes no experience with earlier versions of GLFW. If you
|
||||
have used GLFW 2 in the past, read the @ref moving guide, as some functions
|
||||
have used GLFW 2 in the past, read @ref moving_guide, as some functions
|
||||
behave differently in GLFW 3.
|
||||
|
||||
|
||||
@section quick_steps Step by step
|
||||
## Step by step {#quick_steps}
|
||||
|
||||
@subsection quick_include Including the GLFW header
|
||||
### Including the GLFW header {#quick_include}
|
||||
|
||||
In the source files of your application where you use OpenGL or GLFW, you need
|
||||
to include the GLFW 3 header file.
|
||||
In the source files of your application where you use GLFW, you need to include
|
||||
its header file.
|
||||
|
||||
@code
|
||||
```c
|
||||
#include <GLFW/glfw3.h>
|
||||
@endcode
|
||||
```
|
||||
|
||||
This defines all the constants, types and function prototypes of the GLFW API.
|
||||
It also includes the OpenGL header, and defines all the constants and types
|
||||
necessary for it to work on your platform.
|
||||
This header provides all the constants, types and function prototypes of the
|
||||
GLFW API.
|
||||
|
||||
For example, under Windows you are normally required to include `windows.h`
|
||||
before including `GL/gl.h`. This would make your source file tied to Windows
|
||||
and pollute your code's namespace with the whole Win32 API.
|
||||
By default it also includes the OpenGL header from your development environment.
|
||||
On some platforms this header only supports older versions of OpenGL. The most
|
||||
extreme case is Windows, where it typically only supports OpenGL 1.2.
|
||||
|
||||
Instead, the GLFW header takes care of this for you, not by including
|
||||
`windows.h`, but rather by itself duplicating only the necessary parts of it.
|
||||
It does this only where needed, so if `windows.h` _is_ included, the GLFW header
|
||||
does not try to redefine those symbols.
|
||||
Most programs will instead use an
|
||||
[extension loader library](@ref context_glext_auto) and include its header.
|
||||
This example uses files generated by [glad](https://gen.glad.sh/). The GLFW
|
||||
header can detect most such headers if they are included first and will then not
|
||||
include the one from your development environment.
|
||||
|
||||
In other words:
|
||||
|
||||
- Do _not_ include the OpenGL headers yourself, as GLFW does this for you
|
||||
- Do _not_ include `windows.h` or other platform-specific headers unless
|
||||
you plan on using those APIs directly
|
||||
- If you _do_ need to include such headers, do it _before_ including the
|
||||
GLFW one and it will detect this
|
||||
|
||||
Starting with version 3.0, the GLU header `glu.h` is no longer included by
|
||||
default. If you wish to include it, define `GLFW_INCLUDE_GLU` before the
|
||||
inclusion of the GLFW header.
|
||||
|
||||
@code
|
||||
#define GLFW_INCLUDE_GLU
|
||||
```c
|
||||
#include <glad/gl.h>
|
||||
#include <GLFW/glfw3.h>
|
||||
@endcode
|
||||
```
|
||||
|
||||
To make sure there will be no header conflicts, you can define @ref
|
||||
GLFW_INCLUDE_NONE before the GLFW header to explicitly disable inclusion of the
|
||||
development environment header. This also allows the two headers to be included
|
||||
in any order.
|
||||
|
||||
```c
|
||||
#define GLFW_INCLUDE_NONE
|
||||
#include <GLFW/glfw3.h>
|
||||
#include <glad/gl.h>
|
||||
```
|
||||
|
||||
|
||||
@subsection quick_init_term Initializing and terminating GLFW
|
||||
### Initializing and terminating GLFW {#quick_init_term}
|
||||
|
||||
Before you can use most GLFW functions, the library must be initialized. On
|
||||
successful initialization, `GL_TRUE` is returned. If an error occurred,
|
||||
`GL_FALSE` is returned.
|
||||
successful initialization, `GLFW_TRUE` is returned. If an error occurred,
|
||||
`GLFW_FALSE` is returned.
|
||||
|
||||
@code
|
||||
```c
|
||||
if (!glfwInit())
|
||||
exit(EXIT_FAILURE);
|
||||
@endcode
|
||||
{
|
||||
// Initialization failed
|
||||
}
|
||||
```
|
||||
|
||||
Note that `GLFW_TRUE` and `GLFW_FALSE` are and will always be one and zero.
|
||||
|
||||
When you are done using GLFW, typically just before the application exits, you
|
||||
need to terminate GLFW.
|
||||
|
||||
@code
|
||||
```c
|
||||
glfwTerminate();
|
||||
@endcode
|
||||
```
|
||||
|
||||
This destroys any remaining windows and releases any other resources allocated by
|
||||
GLFW. After this call, you must initialize GLFW again before using any GLFW
|
||||
functions that require it.
|
||||
|
||||
|
||||
@subsection quick_capture_error Setting an error callback
|
||||
### Setting an error callback {#quick_capture_error}
|
||||
|
||||
Most events are reported through callbacks, whether it's a key being pressed,
|
||||
a GLFW window being moved, or an error occurring. Callbacks are simply
|
||||
C functions (or C++ static methods) that are called by GLFW with arguments
|
||||
describing the event.
|
||||
a GLFW window being moved, or an error occurring. Callbacks are C functions (or
|
||||
C++ static methods) that are called by GLFW with arguments describing the event.
|
||||
|
||||
In case a GLFW function fails, an error is reported to the GLFW error callback.
|
||||
You can receive these reports with an error callback. This function must have
|
||||
the signature below. This simple error callback just prints the error
|
||||
description to `stderr`.
|
||||
the signature below but may do anything permitted in other callbacks.
|
||||
|
||||
@code
|
||||
```c
|
||||
void error_callback(int error, const char* description)
|
||||
{
|
||||
fputs(description, stderr);
|
||||
fprintf(stderr, "Error: %s\n", description);
|
||||
}
|
||||
@endcode
|
||||
```
|
||||
|
||||
Callback functions must be set, so GLFW knows to call them. The function to set
|
||||
the error callback is one of the few GLFW functions that may be called before
|
||||
initialization, which lets you be notified of errors both during and after
|
||||
initialization.
|
||||
|
||||
@code
|
||||
```c
|
||||
glfwSetErrorCallback(error_callback);
|
||||
@endcode
|
||||
```
|
||||
|
||||
|
||||
@subsection quick_create_window Creating a window and context
|
||||
### Creating a window and context {#quick_create_window}
|
||||
|
||||
The window and its OpenGL context are created with a single call, which returns
|
||||
a handle to the created combined window and context object. For example, this
|
||||
creates a 640 by 480 windowed mode window with an OpenGL context:
|
||||
The window and its OpenGL context are created with a single call to @ref
|
||||
glfwCreateWindow, which returns a handle to the created combined window and
|
||||
context object
|
||||
|
||||
@code
|
||||
```c
|
||||
GLFWwindow* window = glfwCreateWindow(640, 480, "My Title", NULL, NULL);
|
||||
@endcode
|
||||
|
||||
If window or context creation fails, `NULL` will be returned, so it is necessary
|
||||
to check the return value.
|
||||
|
||||
@code
|
||||
if (!window)
|
||||
{
|
||||
glfwTerminate();
|
||||
exit(EXIT_FAILURE);
|
||||
// Window or OpenGL context creation failed
|
||||
}
|
||||
@endcode
|
||||
```
|
||||
|
||||
The window handle is passed to all window related functions and is provided to
|
||||
along to all window related callbacks, so they can tell which window received
|
||||
the event.
|
||||
This creates a 640 by 480 windowed mode window with an OpenGL context. If
|
||||
window or OpenGL context creation fails, `NULL` will be returned. You should
|
||||
always check the return value. While window creation rarely fails, context
|
||||
creation depends on properly installed drivers and may fail even on machines
|
||||
with the necessary hardware.
|
||||
|
||||
When a window is no longer needed, destroy it.
|
||||
By default, the OpenGL context GLFW creates may have any version. You can
|
||||
require a minimum OpenGL version by setting the `GLFW_CONTEXT_VERSION_MAJOR` and
|
||||
`GLFW_CONTEXT_VERSION_MINOR` hints _before_ creation. If the required minimum
|
||||
version is not supported on the machine, context (and window) creation fails.
|
||||
|
||||
@code
|
||||
You can select the OpenGL profile by setting the `GLFW_OPENGL_PROFILE` hint.
|
||||
This program uses the core profile as that is the only profile macOS supports
|
||||
for OpenGL 3.x and 4.x.
|
||||
|
||||
```c
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
|
||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
GLFWwindow* window = glfwCreateWindow(640, 480, "My Title", NULL, NULL);
|
||||
if (!window)
|
||||
{
|
||||
// Window or context creation failed
|
||||
}
|
||||
```
|
||||
|
||||
When a window and context is no longer needed, destroy it.
|
||||
|
||||
```c
|
||||
glfwDestroyWindow(window);
|
||||
@endcode
|
||||
```
|
||||
|
||||
Once this function is called, no more events will be delivered for that window
|
||||
and its handle becomes invalid.
|
||||
|
||||
|
||||
@subsection quick_context_current Making the OpenGL context current
|
||||
### Making the OpenGL context current {#quick_context_current}
|
||||
|
||||
Before you can use the OpenGL API, you must have a current OpenGL context.
|
||||
|
||||
@code
|
||||
```c
|
||||
glfwMakeContextCurrent(window);
|
||||
@endcode
|
||||
```
|
||||
|
||||
The context will remain current until you make another context current or until
|
||||
the window owning the current context is destroyed.
|
||||
|
||||
If you are using an [extension loader library](@ref context_glext_auto) to
|
||||
access modern OpenGL then this is when to initialize it, as the loader needs
|
||||
a current context to load from. This example uses
|
||||
[glad](https://github.com/Dav1dde/glad), but the same rule applies to all such
|
||||
libraries.
|
||||
|
||||
@subsection quick_window_close Checking the window close flag
|
||||
```c
|
||||
gladLoadGL(glfwGetProcAddress);
|
||||
```
|
||||
|
||||
|
||||
### Checking the window close flag {#quick_window_close}
|
||||
|
||||
Each window has a flag indicating whether the window should be closed.
|
||||
|
||||
@ -165,12 +189,12 @@ Note that __the window isn't actually closed__, so you are expected to monitor
|
||||
this flag and either destroy the window or give some kind of feedback to the
|
||||
user.
|
||||
|
||||
@code
|
||||
```c
|
||||
while (!glfwWindowShouldClose(window))
|
||||
{
|
||||
// Keep running
|
||||
}
|
||||
@endcode
|
||||
```
|
||||
|
||||
You can be notified when the user is attempting to close the window by setting
|
||||
a close callback with @ref glfwSetWindowCloseCallback. The callback will be
|
||||
@ -178,62 +202,73 @@ called immediately after the close flag has been set.
|
||||
|
||||
You can also set it yourself with @ref glfwSetWindowShouldClose. This can be
|
||||
useful if you want to interpret other kinds of input as closing the window, like
|
||||
for example pressing the escape key.
|
||||
for example pressing the _Escape_ key.
|
||||
|
||||
|
||||
@subsection quick_key_input Receiving input events
|
||||
### Receiving input events {#quick_key_input}
|
||||
|
||||
Each window has a large number of callbacks that can be set to receive all the
|
||||
various kinds of events. To receive key press and release events, create a key
|
||||
callback function.
|
||||
|
||||
@code
|
||||
```c
|
||||
static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods)
|
||||
{
|
||||
if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)
|
||||
glfwSetWindowShouldClose(window, GL_TRUE);
|
||||
glfwSetWindowShouldClose(window, GLFW_TRUE);
|
||||
}
|
||||
@endcode
|
||||
```
|
||||
|
||||
The key callback, like other window related callbacks, are set per-window.
|
||||
|
||||
@code
|
||||
```c
|
||||
glfwSetKeyCallback(window, key_callback);
|
||||
@endcode
|
||||
```
|
||||
|
||||
In order for event callbacks to be called when events occur, you need to process
|
||||
events as described below.
|
||||
|
||||
|
||||
@subsection quick_render Rendering with OpenGL
|
||||
### Rendering with OpenGL {#quick_render}
|
||||
|
||||
Once you have a current OpenGL context, you can use OpenGL normally. In this
|
||||
tutorial, a multi-colored rotating triangle will be rendered. The framebuffer
|
||||
tutorial, a multicolored rotating triangle will be rendered. The framebuffer
|
||||
size needs to be retrieved for `glViewport`.
|
||||
|
||||
@code
|
||||
```c
|
||||
int width, height;
|
||||
glfwGetFramebufferSize(window, &width, &height);
|
||||
glViewport(0, 0, width, height);
|
||||
@endcode
|
||||
```
|
||||
|
||||
You can also set a framebuffer size callback using @ref
|
||||
glfwSetFramebufferSizeCallback and call `glViewport` from there.
|
||||
glfwSetFramebufferSizeCallback and be notified when the size changes.
|
||||
|
||||
The details of how to render with OpenGL is outside the scope of this tutorial,
|
||||
but there are many excellent resources for learning modern OpenGL. Here are
|
||||
a few of them:
|
||||
|
||||
- [Anton's OpenGL 4 Tutorials](https://antongerdelan.net/opengl/)
|
||||
- [Learn OpenGL](https://learnopengl.com/)
|
||||
- [Open.GL](https://open.gl/)
|
||||
|
||||
These all happen to use GLFW, but OpenGL itself works the same whatever API you
|
||||
use to create the window and context.
|
||||
|
||||
|
||||
@subsection quick_timer Reading the timer
|
||||
### Reading the timer {#quick_timer}
|
||||
|
||||
To create smooth animation, a time source is needed. GLFW provides a timer that
|
||||
returns the number of seconds since initialization. The time source used is the
|
||||
most accurate on each platform and generally has micro- or nanosecond
|
||||
resolution.
|
||||
|
||||
@code
|
||||
```c
|
||||
double time = glfwGetTime();
|
||||
@endcode
|
||||
```
|
||||
|
||||
|
||||
@subsection quick_swap_buffers Swapping buffers
|
||||
### Swapping buffers {#quick_swap_buffers}
|
||||
|
||||
GLFW windows by default use double buffering. That means that each window has
|
||||
two rendering buffers; a front buffer and a back buffer. The front buffer is
|
||||
@ -242,9 +277,9 @@ the one being displayed and the back buffer the one you render to.
|
||||
When the entire frame has been rendered, the buffers need to be swapped with one
|
||||
another, so the back buffer becomes the front buffer and vice versa.
|
||||
|
||||
@code
|
||||
```c
|
||||
glfwSwapBuffers(window);
|
||||
@endcode
|
||||
```
|
||||
|
||||
The swap interval indicates how many frames to wait until swapping the buffers,
|
||||
commonly known as _vsync_. By default, the swap interval is zero, meaning
|
||||
@ -259,15 +294,15 @@ For these reasons, applications will typically want to set the swap interval to
|
||||
one. It can be set to higher values, but this is usually not recommended,
|
||||
because of the input latency it leads to.
|
||||
|
||||
@code
|
||||
```c
|
||||
glfwSwapInterval(1);
|
||||
@endcode
|
||||
```
|
||||
|
||||
This function acts on the current context and will fail unless a context is
|
||||
current.
|
||||
|
||||
|
||||
@subsection quick_process_events Processing events
|
||||
### Processing events {#quick_process_events}
|
||||
|
||||
GLFW needs to communicate regularly with the window system both in order to
|
||||
receive events and to show that the application hasn't locked up. Event
|
||||
@ -276,11 +311,11 @@ done each frame after buffer swapping.
|
||||
|
||||
There are two methods for processing pending events; polling and waiting. This
|
||||
example will use event polling, which processes only those events that have
|
||||
already been received and then returns immediately.
|
||||
already been received and then returns immediately.
|
||||
|
||||
@code
|
||||
```c
|
||||
glfwPollEvents();
|
||||
@endcode
|
||||
```
|
||||
|
||||
This is the best choice when rendering continually, like most games do. If
|
||||
instead you only need to update your rendering once you have received new input,
|
||||
@ -290,39 +325,41 @@ all received events. This saves a great deal of CPU cycles and is useful for,
|
||||
for example, many kinds of editing tools.
|
||||
|
||||
|
||||
@section quick_example Putting it together
|
||||
## Putting it together {#quick_example}
|
||||
|
||||
Now that you know how to initialize GLFW, create a window and poll for
|
||||
keyboard input, it's possible to create a simple program.
|
||||
|
||||
@snippet simple.c code
|
||||
keyboard input, it's possible to create a small program.
|
||||
|
||||
This program creates a 640 by 480 windowed mode window and starts a loop that
|
||||
clears the screen, renders a triangle and processes events until the user either
|
||||
presses Escape or closes the window.
|
||||
presses _Escape_ or closes the window.
|
||||
|
||||
This program uses only a few of the many functions GLFW provides. There are
|
||||
@snippet triangle-opengl.c code
|
||||
|
||||
The program above can be found in the [source package][download] as
|
||||
`examples/triangle-opengl.c` and is compiled along with all other examples when
|
||||
you build GLFW. If you built GLFW from the source package then you already have
|
||||
this as `triangle-opengl.exe` on Windows, `triangle-opengl` on Linux or
|
||||
`triangle-opengl.app` on macOS.
|
||||
|
||||
[download]: https://www.glfw.org/download.html
|
||||
|
||||
This tutorial used only a few of the many functions GLFW provides. There are
|
||||
guides for each of the areas covered by GLFW. Each guide will introduce all the
|
||||
functions for that category.
|
||||
|
||||
- @ref intro
|
||||
- @ref window
|
||||
- @ref context
|
||||
- @ref monitor
|
||||
- @ref input
|
||||
- @ref intro_guide
|
||||
- @ref window_guide
|
||||
- @ref context_guide
|
||||
- @ref monitor_guide
|
||||
- @ref input_guide
|
||||
|
||||
You can access reference documentation for any GLFW function by clicking it and
|
||||
the reference for each function links to related functions and guide sections.
|
||||
|
||||
@section quick_build Compiling and linking the program
|
||||
|
||||
The complete program above can be found in the source distribution as
|
||||
`examples/simple.c` and is compiled along with all other examples when you
|
||||
build GLFW. That is, if you have compiled GLFW then you have already built this
|
||||
as `simple.exe` on Windows, `simple` on Linux or `simple.app` on OS X.
|
||||
|
||||
This tutorial ends here. Once you have written a program that uses GLFW, you
|
||||
The tutorial ends here. Once you have written a program that uses GLFW, you
|
||||
will need to compile and link it. How to do that depends on the development
|
||||
environment you are using and is best explained by the documentation for that
|
||||
environment. To learn about the details that are specific to GLFW, see
|
||||
@ref build.
|
||||
@ref build_guide.
|
||||
|
||||
*/
|
199
docs/rift.dox
199
docs/rift.dox
@ -1,199 +0,0 @@
|
||||
/*!
|
||||
|
||||
@page rift Oculus Rift guide
|
||||
|
||||
@tableofcontents
|
||||
|
||||
This guide is intended to fill in the gaps between the
|
||||
[Oculus PC SDK documentation](https://developer.oculus.com/documentation/) and
|
||||
the rest of the GLFW documentation and is not a replacement for either. It
|
||||
requires you to use [native access](@ref native) and assumes a certain level of
|
||||
proficiency with LibOVR, platform specific APIs and your chosen development
|
||||
environment.
|
||||
|
||||
While GLFW has no explicit support for LibOVR, it is tested with and tries to
|
||||
interoperate well with it.
|
||||
|
||||
@note Because of the speed of development of the Oculus SDK, this guide may
|
||||
become outdated before the next release. If this is a local copy of the
|
||||
documentation, you may want to check the GLFW website for updates. This
|
||||
revision of the guide is written against version 0.4.4 of the SDK.
|
||||
|
||||
|
||||
@section rift_include Including the LibOVR and GLFW header files
|
||||
|
||||
Both the OpenGL LibOVR header and the GLFW native header need macros telling
|
||||
them what OS you are building for. Because LibOVR only supports three major
|
||||
desktop platforms, this can be solved with canonical predefined macros.
|
||||
|
||||
@code
|
||||
#if defined(_WIN32)
|
||||
#define GLFW_EXPOSE_NATIVE_WIN32
|
||||
#define GLFW_EXPOSE_NATIVE_WGL
|
||||
#define OVR_OS_WIN32
|
||||
#elif defined(__APPLE__)
|
||||
#define GLFW_EXPOSE_NATIVE_COCOA
|
||||
#define GLFW_EXPOSE_NATIVE_NSGL
|
||||
#define OVR_OS_MAC
|
||||
#elif defined(__linux__)
|
||||
#define GLFW_EXPOSE_NATIVE_X11
|
||||
#define GLFW_EXPOSE_NATIVE_GLX
|
||||
#define OVR_OS_LINUX
|
||||
#endif
|
||||
|
||||
#include <GLFW/glfw3.h>
|
||||
#include <GLFW/glfw3native.h>
|
||||
|
||||
#include <OVR_CAPI_GL.h>
|
||||
@endcode
|
||||
|
||||
Both the GLFW and LibOVR headers by default attempt to include the standard
|
||||
OpenGL `GL/gl.h` header (`OpenGL/gl.h` on OS X). If you wish to use a different
|
||||
standard header or an [extension loading library](@ref context_glext_auto),
|
||||
include that header before these.
|
||||
|
||||
|
||||
@section rift_init Initializing LibOVR and GLFW
|
||||
|
||||
LibOVR needs to be initialized before GLFW. This means calling at least
|
||||
`ovr_Initialize`, `ovrHmd_Create` and `ovrHmd_ConfigureTracking` before @ref
|
||||
glfwInit. Similarly, LibOVR must be shut down after GLFW. This means calling
|
||||
`ovrHmd_Destroy` and `ovr_Shutdown` after @ref glfwTerminate.
|
||||
|
||||
|
||||
@section rift_direct Direct HMD mode
|
||||
|
||||
Direct HMD mode is the recommended display mode for new applications, but the
|
||||
Oculus Rift runtime currently (January 2015) only supports this mode on Windows.
|
||||
In direct mode the HMD is not detectable as a GLFW monitor.
|
||||
|
||||
|
||||
@subsection rift_direct_create Creating a window and context
|
||||
|
||||
If the HMD is in direct mode you can use either a full screen or a windowed mode
|
||||
window, but full screen is only recommended if there is a monitor that supports
|
||||
the resolution of the HMD. Due to limitations in LibOVR, the size of the client
|
||||
area of the window must equal the resolution of the HMD.
|
||||
|
||||
If the resolution of the HMD is much larger than the regular monitor, the window
|
||||
may be resized by the window manager on creation. One way to avoid this is to
|
||||
make it undecorated with the [GLFW_DECORATED](@ref window_hints_wnd) window
|
||||
hint.
|
||||
|
||||
|
||||
@subsection rift_direct_attach Attaching the window to the HMD
|
||||
|
||||
Once you have created the window and context, you need to attach the native
|
||||
handle of the GLFW window to the HMD.
|
||||
|
||||
@code
|
||||
ovrHmd_AttachToWindow(hmd, glfwGetWin32Window(window), NULL, NULL);
|
||||
@endcode
|
||||
|
||||
|
||||
@section rift_extend Extend Desktop mode
|
||||
|
||||
Extend desktop mode is a legacy display mode, but is still (January 2015) the
|
||||
only available mode on OS X and Linux, as well as on Windows machines that for
|
||||
technical reasons do not yet support direct HMD mode.
|
||||
|
||||
|
||||
@subsection rift_extend_detect Detecting a HMD with GLFW
|
||||
|
||||
If the HMD is in extend desktop mode you can deduce which GLFW monitor it
|
||||
corresponds to and create a full screen window on that monitor.
|
||||
|
||||
On Windows, the native display device name of a GLFW monitor corresponds to the
|
||||
display device name of the detected HMD as stored, in the `DisplayDeviceName`
|
||||
member of `ovrHmdDesc`.
|
||||
|
||||
On OS X, the native display ID of a GLFW monitor corresponds to the display ID
|
||||
of the detected HMD, as stored in the `DisplayId` member of `ovrHmdDesc`.
|
||||
|
||||
At the time of writing (January 2015), the Oculus SDK does not support detecting
|
||||
which monitor corresponds to the HMD in any sane fashion, but as long as the HMD
|
||||
is set up and rotated properly it can be found via the screen position and
|
||||
resolution provided by LibOVR. This method may instead find another monitor
|
||||
that is mirroring the HMD, but this only matters if you intend to change its
|
||||
video mode.
|
||||
|
||||
@code
|
||||
int i, count;
|
||||
GLFWmonitor** monitors = glfwGetMonitors(&count);
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
if (strcmp(glfwGetWin32Monitor(monitors[i]), hmd->DisplayDeviceName) == 0)
|
||||
return monitors[i];
|
||||
#elif defined(__APPLE__)
|
||||
if (glfwGetCocoaMonitor(monitors[i]) == hmd->DisplayId)
|
||||
return monitors[i];
|
||||
#elif defined(__linux__)
|
||||
int xpos, ypos;
|
||||
const GLFWvidmode* mode = glfwGetVideoMode(monitors[i]);
|
||||
glfwGetMonitorPos(monitors[i], &xpos, &ypos);
|
||||
|
||||
if (hmd->WindowsPos.x == xpos &&
|
||||
hmd->WindowsPos.y == ypos &&
|
||||
hmd->Resolution.w == mode->width &&
|
||||
hmd->Resolution.h == mode->height)
|
||||
{
|
||||
return monitors[i];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection rift_extend_create Creating a window and context
|
||||
|
||||
The window is created as a regular full screen window on the found monitor. It
|
||||
is usually a good idea to create a
|
||||
[windowed full screen](@ref window_windowed_full_screen) window, as the HMD will
|
||||
very likely already be set to the correct video mode. However, in extend
|
||||
desktop mode it behaves like a regular monitor and any supported video mode can
|
||||
be requested.
|
||||
|
||||
If other monitors are mirroring the HMD and you request a different video mode,
|
||||
all monitors in the mirroring set will get the new video mode.
|
||||
|
||||
|
||||
@section rift_render Rendering to the HMD
|
||||
|
||||
@subsection rift_render_sdk SDK distortion rendering
|
||||
|
||||
If you wish to use SDK distortion rendering you will need some information from
|
||||
GLFW to configure the renderer. Below are the parts of the `ovrGLConfig` union
|
||||
that need to be filled with from GLFW. Note that there are other fields that
|
||||
also need to be filled for `ovrHmd_ConfigureRendering` to succeed.
|
||||
|
||||
Before configuring SDK distortion rendering you should make your context
|
||||
current.
|
||||
|
||||
@code
|
||||
int width, height;
|
||||
union ovrGLConfig config;
|
||||
|
||||
glfwGetFramebufferSize(window, &width, &height);
|
||||
|
||||
config.OGL.Header.BackBufferSize.w = width;
|
||||
config.OGL.Header.BackBufferSize.h = height;
|
||||
#if defined(_WIN32)
|
||||
config.OGL.Window = glfwGetWin32Window(window);
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__linux__)
|
||||
config.OGL.Disp = glfwGetX11Display();
|
||||
#endif
|
||||
@endcode
|
||||
|
||||
When using SDK distortion rendering you should not swap the buffers yourself, as
|
||||
the HMD is updated by `ovrHmd_EndFrame`.
|
||||
|
||||
|
||||
@subsection rift_render_custom Client distortion rendering
|
||||
|
||||
With client distortion rendering you are in full control of the contents of the
|
||||
HMD and should render and swap the buffers normally.
|
||||
|
||||
*/
|
157
docs/spaces.svg
157
docs/spaces.svg
@ -13,7 +13,7 @@
|
||||
height="327.98221"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="spaces.svg">
|
||||
<defs
|
||||
id="defs4">
|
||||
@ -38,11 +38,11 @@
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="2.5611424"
|
||||
inkscape:cx="344.24359"
|
||||
inkscape:cy="163.9911"
|
||||
inkscape:zoom="1.8110012"
|
||||
inkscape:cx="320.68941"
|
||||
inkscape:cy="159.80509"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="svg2"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1021"
|
||||
@ -475,18 +475,18 @@
|
||||
inkscape:export-ydpi="109.89113" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
|
||||
x="21.213203"
|
||||
y="340.20465"
|
||||
id="text3803"
|
||||
sodipodi:linespacing="125%"
|
||||
inkscape:export-filename="/home/elmindreda/projects/glfw/glfw/docs/spaces.png"
|
||||
inkscape:export-xdpi="109.89113"
|
||||
inkscape:export-ydpi="109.89113"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3805"
|
||||
x="21.213203"
|
||||
y="340.20465" /></text>
|
||||
y="340.20465"
|
||||
style="font-size:12px;line-height:1.25;font-family:sans-serif"> </tspan></text>
|
||||
<g
|
||||
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
id="text3807">
|
||||
@ -647,74 +647,6 @@
|
||||
style="font-size:10px"
|
||||
id="path3239" />
|
||||
</g>
|
||||
<g
|
||||
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
id="text3826">
|
||||
<path
|
||||
d="m 172.22728,456.1171 0,1.04004 c -0.33204,-0.30924 -0.68686,-0.54036 -1.06445,-0.69336 -0.37436,-0.15299 -0.77312,-0.22949 -1.19629,-0.2295 -0.83334,10e-6 -1.47136,0.25554 -1.91407,0.76661 -0.44271,0.50781 -0.66406,1.24349 -0.66406,2.20703 0,0.96029 0.22135,1.69596 0.66406,2.20703 0.44271,0.50781 1.08073,0.76172 1.91407,0.76172 0.42317,0 0.82193,-0.0765 1.19629,-0.2295 0.37759,-0.15299 0.73241,-0.38411 1.06445,-0.69336 l 0,1.03028 c -0.34506,0.23437 -0.71127,0.41015 -1.09863,0.52734 -0.38412,0.11719 -0.79102,0.17578 -1.22071,0.17578 -1.10351,0 -1.97265,-0.33691 -2.60742,-1.01074 -0.63476,-0.67708 -0.95215,-1.59993 -0.95215,-2.76855 0,-1.17187 0.31739,-2.09472 0.95215,-2.76856 0.63477,-0.67707 1.50391,-1.01562 2.60742,-1.01562 0.4362,0 0.84635,0.0586 1.23047,0.17578 0.38737,0.11394 0.75032,0.28646 1.08887,0.51758"
|
||||
style="font-size:10px"
|
||||
id="path3108" />
|
||||
<path
|
||||
d="m 173.72142,455.24796 0.89844,0 0,7.59765 -0.89844,0 0,-7.59765"
|
||||
style="font-size:10px"
|
||||
id="path3110" />
|
||||
<path
|
||||
d="m 176.49486,457.37686 0.89844,0 0,5.46875 -0.89844,0 0,-5.46875 m 0,-2.1289 0.89844,0 0,1.13769 -0.89844,0 0,-1.13769"
|
||||
style="font-size:10px"
|
||||
id="path3112" />
|
||||
<path
|
||||
d="m 183.94603,459.88663 0,0.43945 -4.13086,0 c 0.0391,0.61849 0.22461,1.0905 0.55664,1.41602 0.33528,0.32226 0.80078,0.4834 1.39649,0.48339 0.34504,1e-5 0.6787,-0.0423 1.00097,-0.12695 0.32552,-0.0846 0.64778,-0.21159 0.9668,-0.38086 l 0,0.84961 c -0.32227,0.13672 -0.65268,0.24089 -0.99121,0.3125 -0.33855,0.0716 -0.68197,0.10742 -1.03028,0.10742 -0.87239,0 -1.56413,-0.2539 -2.07519,-0.76172 -0.50781,-0.50781 -0.76172,-1.19466 -0.76172,-2.06054 0,-0.89518 0.24088,-1.60482 0.72266,-2.12891 0.48502,-0.52734 1.13769,-0.79101 1.958,-0.79101 0.73568,0 1.31673,0.23763 1.74317,0.71289 0.42968,0.47201 0.64452,1.11491 0.64453,1.92871 m -0.89844,-0.26367 c -0.007,-0.49154 -0.14486,-0.88379 -0.41504,-1.17676 -0.26693,-0.29297 -0.62175,-0.43945 -1.06445,-0.43946 -0.5013,1e-5 -0.90332,0.14161 -1.20605,0.42481 -0.29949,0.28321 -0.47201,0.68197 -0.51758,1.19629 l 3.20312,-0.005"
|
||||
style="font-size:10px"
|
||||
id="path3114" />
|
||||
<path
|
||||
d="m 189.96654,459.54483 0,3.30078 -0.89844,0 0,-3.27148 c 0,-0.51758 -0.10092,-0.90495 -0.30273,-1.16211 -0.20183,-0.25716 -0.50457,-0.38574 -0.90821,-0.38574 -0.48503,0 -0.86751,0.15462 -1.14746,0.46386 -0.27995,0.30925 -0.41992,0.7308 -0.41992,1.26465 l 0,3.09082 -0.90332,0 0,-5.46875 0.90332,0 0,0.84961 c 0.21484,-0.32877 0.46712,-0.57454 0.75684,-0.7373 0.29296,-0.16276 0.62988,-0.24414 1.01074,-0.24414 0.62825,0 1.10351,0.19531 1.42578,0.58593 0.32226,0.38738 0.48339,0.95867 0.4834,1.71387"
|
||||
style="font-size:10px"
|
||||
id="path3116" />
|
||||
<path
|
||||
d="m 192.65697,455.82413 0,1.55273 1.85058,0 0,0.69824 -1.85058,0 0,2.96875 c 0,0.44597 0.0602,0.73243 0.18066,0.85938 0.1237,0.12695 0.37272,0.19043 0.74707,0.19043 l 0.92285,0 0,0.75195 -0.92285,0 c -0.69336,0 -1.17188,-0.12858 -1.43555,-0.38574 -0.26367,-0.26042 -0.3955,-0.73242 -0.3955,-1.41602 l 0,-2.96875 -0.65918,0 0,-0.69824 0.65918,0 0,-1.55273 0.90332,0"
|
||||
style="font-size:10px"
|
||||
id="path3118" />
|
||||
<path
|
||||
d="m 201.36302,460.09659 c -0.72591,0 -1.22884,0.083 -1.50879,0.24902 -0.27995,0.16602 -0.41992,0.44922 -0.41992,0.84961 0,0.31901 0.10417,0.57292 0.3125,0.76172 0.21159,0.18555 0.49805,0.27832 0.85938,0.27832 0.49804,0 0.8968,-0.17578 1.19628,-0.52734 0.30274,-0.35482 0.4541,-0.8252 0.45411,-1.41114 l 0,-0.20019 -0.89356,0 m 1.79199,-0.3711 0,3.12012 -0.89843,0 0,-0.83008 c -0.20509,0.33204 -0.46062,0.5778 -0.76661,0.73731 -0.30599,0.15625 -0.68034,0.23437 -1.12304,0.23437 -0.5599,0 -1.00586,-0.15625 -1.33789,-0.46875 -0.32878,-0.31575 -0.49317,-0.7373 -0.49317,-1.26465 0,-0.61523 0.20508,-1.07909 0.61524,-1.3916 0.41341,-0.31249 1.02864,-0.46874 1.8457,-0.46875 l 1.25977,0 0,-0.0879 c -1e-5,-0.4134 -0.13673,-0.73242 -0.41016,-0.95703 -0.27019,-0.22786 -0.65104,-0.34179 -1.14258,-0.3418 -0.3125,1e-5 -0.61686,0.0374 -0.91308,0.11231 -0.29623,0.0749 -0.58106,0.18718 -0.8545,0.33691 l 0,-0.83007 c 0.32878,-0.12695 0.64779,-0.22135 0.95704,-0.28321 0.30924,-0.0651 0.61034,-0.0976 0.90332,-0.0976 0.79101,0 1.38183,0.20508 1.77246,0.61523 0.39062,0.41016 0.58593,1.03191 0.58593,1.86523"
|
||||
style="font-size:10px"
|
||||
id="path3120" />
|
||||
<path
|
||||
d="m 208.17943,458.21671 c -0.10092,-0.0586 -0.21159,-0.10091 -0.33203,-0.12696 -0.11719,-0.0293 -0.2474,-0.0439 -0.39063,-0.0439 -0.50781,0 -0.89844,0.16602 -1.17187,0.49804 -0.27019,0.32878 -0.40528,0.80242 -0.40528,1.4209 l 0,2.88086 -0.90332,0 0,-5.46875 0.90332,0 0,0.84961 c 0.1888,-0.33203 0.43457,-0.57779 0.73731,-0.7373 0.30273,-0.16276 0.67057,-0.24414 1.10351,-0.24414 0.0618,0 0.13021,0.005 0.20508,0.0146 0.0749,0.007 0.15788,0.0179 0.24903,0.0342 l 0.005,0.92286"
|
||||
style="font-size:10px"
|
||||
id="path3122" />
|
||||
<path
|
||||
d="m 213.59447,459.88663 0,0.43945 -4.13086,0 c 0.0391,0.61849 0.22461,1.0905 0.55664,1.41602 0.33528,0.32226 0.80078,0.4834 1.39648,0.48339 0.34505,1e-5 0.67871,-0.0423 1.00098,-0.12695 0.32552,-0.0846 0.64778,-0.21159 0.9668,-0.38086 l 0,0.84961 c -0.32227,0.13672 -0.65268,0.24089 -0.99121,0.3125 -0.33855,0.0716 -0.68197,0.10742 -1.03028,0.10742 -0.8724,0 -1.56413,-0.2539 -2.07519,-0.76172 -0.50782,-0.50781 -0.76172,-1.19466 -0.76172,-2.06054 0,-0.89518 0.24088,-1.60482 0.72265,-2.12891 0.48503,-0.52734 1.1377,-0.79101 1.95801,-0.79101 0.73567,0 1.31673,0.23763 1.74317,0.71289 0.42968,0.47201 0.64452,1.11491 0.64453,1.92871 m -0.89844,-0.26367 c -0.007,-0.49154 -0.14486,-0.88379 -0.41504,-1.17676 -0.26693,-0.29297 -0.62175,-0.43945 -1.06445,-0.43946 -0.50131,1e-5 -0.90333,0.14161 -1.20606,0.42481 -0.29948,0.28321 -0.472,0.68197 -0.51758,1.19629 l 3.20313,-0.005"
|
||||
style="font-size:10px"
|
||||
id="path3124" />
|
||||
<path
|
||||
d="m 217.55443,460.09659 c -0.72592,0 -1.22885,0.083 -1.50879,0.24902 -0.27995,0.16602 -0.41992,0.44922 -0.41992,0.84961 0,0.31901 0.10416,0.57292 0.3125,0.76172 0.21158,0.18555 0.49804,0.27832 0.85937,0.27832 0.49805,0 0.89681,-0.17578 1.19629,-0.52734 0.30273,-0.35482 0.4541,-0.8252 0.4541,-1.41114 l 0,-0.20019 -0.89355,0 m 1.79199,-0.3711 0,3.12012 -0.89844,0 0,-0.83008 c -0.20508,0.33204 -0.46061,0.5778 -0.7666,0.73731 -0.30599,0.15625 -0.68034,0.23437 -1.12305,0.23437 -0.55989,0 -1.00586,-0.15625 -1.33789,-0.46875 -0.32877,-0.31575 -0.49316,-0.7373 -0.49316,-1.26465 0,-0.61523 0.20508,-1.07909 0.61523,-1.3916 0.41341,-0.31249 1.02865,-0.46874 1.84571,-0.46875 l 1.25976,0 0,-0.0879 c 0,-0.4134 -0.13672,-0.73242 -0.41015,-0.95703 -0.27019,-0.22786 -0.65105,-0.34179 -1.14258,-0.3418 -0.3125,1e-5 -0.61687,0.0374 -0.91309,0.11231 -0.29622,0.0749 -0.58105,0.18718 -0.85449,0.33691 l 0,-0.83007 c 0.32877,-0.12695 0.64779,-0.22135 0.95703,-0.28321 0.30924,-0.0651 0.61035,-0.0976 0.90332,-0.0976 0.79101,0 1.38183,0.20508 1.77246,0.61523 0.39062,0.41016 0.58594,1.03191 0.58594,1.86523"
|
||||
style="font-size:10px"
|
||||
id="path3126" />
|
||||
<path
|
||||
d="m 226.50462,458.00674 c -0.48177,1e-5 -0.86263,0.18881 -1.14257,0.56641 -0.27995,0.37435 -0.41993,0.88868 -0.41993,1.54297 0,0.6543 0.13835,1.17025 0.41504,1.54785 0.27995,0.37435 0.66243,0.56153 1.14746,0.56152 0.47852,1e-5 0.85775,-0.1888 1.1377,-0.5664 0.27994,-0.3776 0.41992,-0.89193 0.41992,-1.54297 0,-0.64778 -0.13998,-1.16048 -0.41992,-1.53809 -0.27995,-0.38085 -0.65918,-0.57128 -1.1377,-0.57129 m 0,-0.76171 c 0.78125,0 1.39486,0.25391 1.84082,0.76171 0.44596,0.50782 0.66894,1.21095 0.66895,2.10938 -1e-5,0.89518 -0.22299,1.59831 -0.66895,2.10937 -0.44596,0.50782 -1.05957,0.76172 -1.84082,0.76172 -0.7845,0 -1.39974,-0.2539 -1.8457,-0.76172 -0.44271,-0.51106 -0.66406,-1.21419 -0.66406,-2.10937 0,-0.89843 0.22135,-1.60156 0.66406,-2.10938 0.44596,-0.5078 1.0612,-0.76171 1.8457,-0.76171"
|
||||
style="font-size:10px"
|
||||
id="path3128" />
|
||||
<path
|
||||
d="m 233.66771,458.21671 c -0.10092,-0.0586 -0.21159,-0.10091 -0.33203,-0.12696 -0.11719,-0.0293 -0.2474,-0.0439 -0.39063,-0.0439 -0.50781,0 -0.89844,0.16602 -1.17187,0.49804 -0.27019,0.32878 -0.40528,0.80242 -0.40528,1.4209 l 0,2.88086 -0.90332,0 0,-5.46875 0.90332,0 0,0.84961 c 0.1888,-0.33203 0.43457,-0.57779 0.73731,-0.7373 0.30273,-0.16276 0.67057,-0.24414 1.10351,-0.24414 0.0618,0 0.13021,0.005 0.20508,0.0146 0.0749,0.007 0.15788,0.0179 0.24903,0.0342 l 0.005,0.92286"
|
||||
style="font-size:10px"
|
||||
id="path3130" />
|
||||
<path
|
||||
d="m 234.61986,457.37686 0.89844,0 0,5.46875 -0.89844,0 0,-5.46875 m 0,-2.1289 0.89844,0 0,1.13769 -0.89844,0 0,-1.13769"
|
||||
style="font-size:10px"
|
||||
id="path3132" />
|
||||
<path
|
||||
d="m 240.99193,460.04776 c -1e-5,-0.65104 -0.1351,-1.15559 -0.40528,-1.51367 -0.26693,-0.35807 -0.6429,-0.53711 -1.12793,-0.53711 -0.48177,0 -0.85774,0.17904 -1.12792,0.53711 -0.26693,0.35808 -0.4004,0.86263 -0.4004,1.51367 0,0.64779 0.13347,1.15072 0.4004,1.50879 0.27018,0.35807 0.64615,0.53711 1.12792,0.53711 0.48503,0 0.861,-0.17904 1.12793,-0.53711 0.27018,-0.35807 0.40527,-0.861 0.40528,-1.50879 m 0.89844,2.11914 c -1e-5,0.93099 -0.20672,1.62272 -0.62012,2.0752 -0.41342,0.45572 -1.04655,0.68359 -1.89942,0.68359 -0.31575,0 -0.6136,-0.0244 -0.89355,-0.0732 -0.27995,-0.0456 -0.55176,-0.11719 -0.81543,-0.21485 l 0,-0.87402 c 0.26367,0.14323 0.52409,0.24902 0.78125,0.31738 0.25716,0.0684 0.5192,0.10254 0.78613,0.10254 0.58919,0 1.03027,-0.15462 1.32324,-0.46386 0.29297,-0.306 0.43945,-0.76986 0.43946,-1.39161 l 0,-0.44433 c -0.18555,0.32226 -0.42318,0.56315 -0.71289,0.72265 -0.28972,0.15951 -0.6364,0.23926 -1.04004,0.23926 -0.67058,0 -1.21094,-0.25553 -1.6211,-0.7666 -0.41015,-0.51107 -0.61523,-1.18815 -0.61523,-2.03125 0,-0.84635 0.20508,-1.52506 0.61523,-2.03613 0.41016,-0.51107 0.95052,-0.7666 1.6211,-0.7666 0.40364,0 0.75032,0.0797 1.04004,0.23925 0.28971,0.15951 0.52734,0.4004 0.71289,0.72266 l 0,-0.83008 0.89844,0 0,4.79004"
|
||||
style="font-size:10px"
|
||||
id="path3134" />
|
||||
<path
|
||||
d="m 243.74095,457.37686 0.89844,0 0,5.46875 -0.89844,0 0,-5.46875 m 0,-2.1289 0.89844,0 0,1.13769 -0.89844,0 0,-1.13769"
|
||||
style="font-size:10px"
|
||||
id="path3136" />
|
||||
<path
|
||||
d="m 251.06029,459.54483 0,3.30078 -0.89844,0 0,-3.27148 c 0,-0.51758 -0.10092,-0.90495 -0.30273,-1.16211 -0.20183,-0.25716 -0.50457,-0.38574 -0.90821,-0.38574 -0.48503,0 -0.86751,0.15462 -1.14746,0.46386 -0.27995,0.30925 -0.41992,0.7308 -0.41992,1.26465 l 0,3.09082 -0.90332,0 0,-5.46875 0.90332,0 0,0.84961 c 0.21484,-0.32877 0.46712,-0.57454 0.75684,-0.7373 0.29296,-0.16276 0.62988,-0.24414 1.01074,-0.24414 0.62825,0 1.10351,0.19531 1.42578,0.58593 0.32226,0.38738 0.48339,0.95867 0.4834,1.71387"
|
||||
style="font-size:10px"
|
||||
id="path3138" />
|
||||
</g>
|
||||
<g
|
||||
style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
id="text3017">
|
||||
@ -868,5 +800,78 @@
|
||||
style="font-size:5px"
|
||||
id="path3161" />
|
||||
</g>
|
||||
<g
|
||||
aria-label="Content area origin"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
|
||||
id="text4089">
|
||||
<path
|
||||
d="m 172.21587,456.09125 v 1.04004 q -0.49805,-0.46387 -1.06446,-0.69336 -0.56152,-0.22949 -1.19629,-0.22949 -1.25,0 -1.91406,0.7666 -0.66406,0.76172 -0.66406,2.20703 0,1.44043 0.66406,2.20703 0.66406,0.76172 1.91406,0.76172 0.63477,0 1.19629,-0.22949 0.56641,-0.2295 1.06446,-0.69336 v 1.03027 q -0.51758,0.35156 -1.09864,0.52734 -0.57617,0.17578 -1.2207,0.17578 -1.65527,0 -2.60742,-1.01074 -0.95215,-1.01562 -0.95215,-2.76855 0,-1.75781 0.95215,-2.76856 0.95215,-1.01562 2.60742,-1.01562 0.6543,0 1.23047,0.17578 0.58105,0.1709 1.08887,0.51758 z"
|
||||
style="font-size:10px"
|
||||
id="path4091" />
|
||||
<path
|
||||
d="m 175.82915,457.9809 q -0.72266,0 -1.14258,0.5664 -0.41992,0.56153 -0.41992,1.54297 0,0.98145 0.41504,1.54785 0.41992,0.56153 1.14746,0.56153 0.71777,0 1.13769,-0.56641 0.41992,-0.56641 0.41992,-1.54297 0,-0.97168 -0.41992,-1.53808 -0.41992,-0.57129 -1.13769,-0.57129 z m 0,-0.76172 q 1.17187,0 1.84082,0.76172 0.66894,0.76171 0.66894,2.10937 0,1.34277 -0.66894,2.10938 -0.66895,0.76171 -1.84082,0.76171 -1.17676,0 -1.84571,-0.76171 -0.66406,-0.76661 -0.66406,-2.10938 0,-1.34766 0.66406,-2.10937 0.66895,-0.76172 1.84571,-0.76172 z"
|
||||
style="font-size:10px"
|
||||
id="path4093" />
|
||||
<path
|
||||
d="m 184.36919,459.51898 v 3.30078 h -0.89844 v -3.27148 q 0,-0.77637 -0.30274,-1.16211 -0.30273,-0.38574 -0.9082,-0.38574 -0.72754,0 -1.14746,0.46386 -0.41992,0.46387 -0.41992,1.26465 v 3.09082 h -0.90332 v -5.46875 h 0.90332 v 0.84961 q 0.32226,-0.49316 0.75683,-0.7373 0.43946,-0.24414 1.01075,-0.24414 0.94238,0 1.42578,0.58593 0.4834,0.58106 0.4834,1.71387 z"
|
||||
style="font-size:10px"
|
||||
id="path4095" />
|
||||
<path
|
||||
d="m 187.05962,455.79828 v 1.55273 h 1.85058 v 0.69825 h -1.85058 v 2.96875 q 0,0.66894 0.18066,0.85937 0.18555,0.19043 0.74707,0.19043 h 0.92285 v 0.75195 h -0.92285 q -1.04004,0 -1.43555,-0.38574 -0.3955,-0.39062 -0.3955,-1.41601 v -2.96875 h -0.65918 v -0.69825 h 0.65918 v -1.55273 z"
|
||||
style="font-size:10px"
|
||||
id="path4097" />
|
||||
<path
|
||||
d="m 194.77446,459.86078 v 0.43945 h -4.13086 q 0.0586,0.92774 0.55664,1.41602 0.50293,0.4834 1.39649,0.4834 0.51757,0 1.00097,-0.12696 0.48828,-0.12695 0.9668,-0.38086 v 0.84961 q -0.4834,0.20508 -0.99121,0.3125 -0.50781,0.10742 -1.03028,0.10742 -1.30859,0 -2.07519,-0.76171 -0.76172,-0.76172 -0.76172,-2.06055 0,-1.34277 0.72266,-2.12891 0.72754,-0.79101 1.958,-0.79101 1.10352,0 1.74317,0.71289 0.64453,0.70801 0.64453,1.92871 z m -0.89844,-0.26367 q -0.01,-0.73731 -0.41504,-1.17676 -0.40039,-0.43945 -1.06445,-0.43945 -0.75195,0 -1.20605,0.4248 -0.44922,0.42481 -0.51758,1.19629 z"
|
||||
style="font-size:10px"
|
||||
id="path4099" />
|
||||
<path
|
||||
d="m 200.79497,459.51898 v 3.30078 h -0.89844 v -3.27148 q 0,-0.77637 -0.30273,-1.16211 -0.30274,-0.38574 -0.90821,-0.38574 -0.72754,0 -1.14746,0.46386 -0.41992,0.46387 -0.41992,1.26465 v 3.09082 h -0.90332 v -5.46875 h 0.90332 v 0.84961 q 0.32227,-0.49316 0.75684,-0.7373 0.43945,-0.24414 1.01074,-0.24414 0.94238,0 1.42578,0.58593 0.4834,0.58106 0.4834,1.71387 z"
|
||||
style="font-size:10px"
|
||||
id="path4101" />
|
||||
<path
|
||||
d="m 203.4854,455.79828 v 1.55273 h 1.85058 v 0.69825 h -1.85058 v 2.96875 q 0,0.66894 0.18066,0.85937 0.18555,0.19043 0.74707,0.19043 h 0.92285 v 0.75195 h -0.92285 q -1.04004,0 -1.43555,-0.38574 -0.3955,-0.39062 -0.3955,-1.41601 v -2.96875 h -0.65918 v -0.69825 h 0.65918 v -1.55273 z"
|
||||
style="font-size:10px"
|
||||
id="path4103" />
|
||||
<path
|
||||
d="m 212.19145,460.07074 q -1.08887,0 -1.50879,0.24902 -0.41992,0.24903 -0.41992,0.84961 0,0.47852 0.3125,0.76172 0.31738,0.27832 0.85938,0.27832 0.74707,0 1.19629,-0.52734 0.4541,-0.53223 0.4541,-1.41113 v -0.2002 z m 1.79199,-0.37109 v 3.12011 h -0.89843 v -0.83007 q -0.30762,0.49804 -0.7666,0.7373 -0.45899,0.23437 -1.12305,0.23437 -0.83985,0 -1.33789,-0.46875 -0.49317,-0.47363 -0.49317,-1.26464 0,-0.92286 0.61524,-1.39161 0.62012,-0.46875 1.8457,-0.46875 h 1.25977 v -0.0879 q 0,-0.62011 -0.41016,-0.95703 -0.40527,-0.34179 -1.14258,-0.34179 -0.46875,0 -0.91308,0.1123 -0.44434,0.11231 -0.8545,0.33691 v -0.83007 q 0.49317,-0.19043 0.95704,-0.28321 0.46386,-0.0976 0.90332,-0.0976 1.18652,0 1.77246,0.61523 0.58593,0.61524 0.58593,1.86524 z"
|
||||
style="font-size:10px"
|
||||
id="path4105" />
|
||||
<path
|
||||
d="m 219.00786,458.19086 q -0.15137,-0.0879 -0.33203,-0.12696 -0.17578,-0.0439 -0.39063,-0.0439 -0.76172,0 -1.17187,0.49805 -0.40528,0.49316 -0.40528,1.42089 v 2.88086 h -0.90332 v -5.46875 h 0.90332 v 0.84961 q 0.28321,-0.49804 0.73731,-0.7373 0.4541,-0.24414 1.10351,-0.24414 0.0928,0 0.20508,0.0147 0.11231,0.01 0.24903,0.0342 z"
|
||||
style="font-size:10px"
|
||||
id="path4107" />
|
||||
<path
|
||||
d="m 224.4229,459.86078 v 0.43945 h -4.13086 q 0.0586,0.92774 0.55664,1.41602 0.50293,0.4834 1.39648,0.4834 0.51758,0 1.00098,-0.12696 0.48828,-0.12695 0.9668,-0.38086 v 0.84961 q -0.4834,0.20508 -0.99121,0.3125 -0.50782,0.10742 -1.03028,0.10742 -1.30859,0 -2.07519,-0.76171 -0.76172,-0.76172 -0.76172,-2.06055 0,-1.34277 0.72265,-2.12891 0.72754,-0.79101 1.95801,-0.79101 1.10352,0 1.74317,0.71289 0.64453,0.70801 0.64453,1.92871 z m -0.89844,-0.26367 q -0.01,-0.73731 -0.41504,-1.17676 -0.40039,-0.43945 -1.06445,-0.43945 -0.75196,0 -1.20606,0.4248 -0.44922,0.42481 -0.51758,1.19629 z"
|
||||
style="font-size:10px"
|
||||
id="path4109" />
|
||||
<path
|
||||
d="m 228.38286,460.07074 q -1.08887,0 -1.50879,0.24902 -0.41992,0.24903 -0.41992,0.84961 0,0.47852 0.3125,0.76172 0.31738,0.27832 0.85937,0.27832 0.74707,0 1.19629,-0.52734 0.4541,-0.53223 0.4541,-1.41113 v -0.2002 z m 1.79199,-0.37109 v 3.12011 h -0.89844 v -0.83007 q -0.30761,0.49804 -0.7666,0.7373 -0.45898,0.23437 -1.12305,0.23437 -0.83984,0 -1.33789,-0.46875 -0.49316,-0.47363 -0.49316,-1.26464 0,-0.92286 0.61523,-1.39161 0.62012,-0.46875 1.84571,-0.46875 h 1.25976 v -0.0879 q 0,-0.62011 -0.41015,-0.95703 -0.40528,-0.34179 -1.14258,-0.34179 -0.46875,0 -0.91309,0.1123 -0.44433,0.11231 -0.85449,0.33691 v -0.83007 q 0.49316,-0.19043 0.95703,-0.28321 0.46387,-0.0976 0.90332,-0.0976 1.18653,0 1.77246,0.61523 0.58594,0.61524 0.58594,1.86524 z"
|
||||
style="font-size:10px"
|
||||
id="path4111" />
|
||||
<path
|
||||
d="m 237.33305,457.9809 q -0.72265,0 -1.14257,0.5664 -0.41993,0.56153 -0.41993,1.54297 0,0.98145 0.41504,1.54785 0.41992,0.56153 1.14746,0.56153 0.71778,0 1.1377,-0.56641 0.41992,-0.56641 0.41992,-1.54297 0,-0.97168 -0.41992,-1.53808 -0.41992,-0.57129 -1.1377,-0.57129 z m 0,-0.76172 q 1.17188,0 1.84082,0.76172 0.66895,0.76171 0.66895,2.10937 0,1.34277 -0.66895,2.10938 -0.66894,0.76171 -1.84082,0.76171 -1.17675,0 -1.8457,-0.76171 -0.66406,-0.76661 -0.66406,-2.10938 0,-1.34766 0.66406,-2.10937 0.66895,-0.76172 1.8457,-0.76172 z"
|
||||
style="font-size:10px"
|
||||
id="path4113" />
|
||||
<path
|
||||
d="m 244.49614,458.19086 q -0.15137,-0.0879 -0.33203,-0.12696 -0.17578,-0.0439 -0.39063,-0.0439 -0.76172,0 -1.17187,0.49805 -0.40528,0.49316 -0.40528,1.42089 v 2.88086 h -0.90332 v -5.46875 h 0.90332 v 0.84961 q 0.28321,-0.49804 0.73731,-0.7373 0.4541,-0.24414 1.10352,-0.24414 0.0928,0 0.20507,0.0147 0.11231,0.01 0.24903,0.0342 z"
|
||||
style="font-size:10px"
|
||||
id="path4115" />
|
||||
<path
|
||||
d="m 245.44829,457.35101 h 0.89844 v 5.46875 h -0.89844 z m 0,-2.1289 h 0.89844 v 1.13769 h -0.89844 z"
|
||||
style="font-size:10px"
|
||||
id="path4117" />
|
||||
<path
|
||||
d="m 251.82036,460.02191 q 0,-0.97656 -0.40528,-1.51367 -0.40039,-0.53711 -1.12792,-0.53711 -0.72266,0 -1.12793,0.53711 -0.4004,0.53711 -0.4004,1.51367 0,0.97168 0.4004,1.50879 0.40527,0.53711 1.12793,0.53711 0.72753,0 1.12792,-0.53711 0.40528,-0.53711 0.40528,-1.50879 z m 0.89844,2.11914 q 0,1.39649 -0.62012,2.0752 -0.62012,0.68359 -1.89942,0.68359 -0.47363,0 -0.89355,-0.0732 -0.41992,-0.0684 -0.81543,-0.21484 v -0.87403 q 0.39551,0.21485 0.78125,0.31738 0.38574,0.10254 0.78613,0.10254 0.88379,0 1.32325,-0.46386 0.43945,-0.45899 0.43945,-1.3916 v -0.44434 q -0.27832,0.4834 -0.71289,0.72266 -0.43457,0.23925 -1.04004,0.23925 -1.00586,0 -1.6211,-0.7666 -0.61523,-0.7666 -0.61523,-2.03125 0,-1.26953 0.61523,-2.03613 0.61524,-0.7666 1.6211,-0.7666 0.60547,0 1.04004,0.23926 0.43457,0.23925 0.71289,0.72265 v -0.83008 h 0.89844 z"
|
||||
style="font-size:10px"
|
||||
id="path4119" />
|
||||
<path
|
||||
d="m 254.56938,457.35101 h 0.89844 v 5.46875 h -0.89844 z m 0,-2.1289 h 0.89844 v 1.13769 h -0.89844 z"
|
||||
style="font-size:10px"
|
||||
id="path4121" />
|
||||
<path
|
||||
d="m 261.88872,459.51898 v 3.30078 h -0.89844 v -3.27148 q 0,-0.77637 -0.30273,-1.16211 -0.30274,-0.38574 -0.90821,-0.38574 -0.72754,0 -1.14746,0.46386 -0.41992,0.46387 -0.41992,1.26465 v 3.09082 h -0.90332 v -5.46875 h 0.90332 v 0.84961 q 0.32227,-0.49316 0.75684,-0.7373 0.43945,-0.24414 1.01074,-0.24414 0.94238,0 1.42578,0.58593 0.4834,0.58106 0.4834,1.71387 z"
|
||||
style="font-size:10px"
|
||||
id="path4123" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 108 KiB |
250
docs/vulkan.md
Normal file
250
docs/vulkan.md
Normal file
@ -0,0 +1,250 @@
|
||||
# Vulkan guide {#vulkan_guide}
|
||||
|
||||
[TOC]
|
||||
|
||||
This guide is intended to fill the gaps between the official [Vulkan
|
||||
resources](https://www.khronos.org/vulkan/) and the rest of the GLFW
|
||||
documentation and is not a replacement for either. It assumes some familiarity
|
||||
with Vulkan concepts like loaders, devices, queues and surfaces and leaves it to
|
||||
the Vulkan documentation to explain the details of Vulkan functions.
|
||||
|
||||
To develop for Vulkan you should download the [LunarG Vulkan
|
||||
SDK](https://vulkan.lunarg.com/) for your platform. Apart from headers and link
|
||||
libraries, they also provide the validation layers necessary for development.
|
||||
|
||||
The [Vulkan Tutorial](https://vulkan-tutorial.com/) has more information on how
|
||||
to use GLFW and Vulkan. The [Khronos Vulkan
|
||||
Samples](https://github.com/KhronosGroup/Vulkan-Samples) also use GLFW, although
|
||||
with a small framework in between.
|
||||
|
||||
For details on a specific Vulkan support function, see the @ref vulkan. There
|
||||
are also guides for the other areas of the GLFW API.
|
||||
|
||||
- @ref intro_guide
|
||||
- @ref window_guide
|
||||
- @ref context_guide
|
||||
- @ref monitor_guide
|
||||
- @ref input_guide
|
||||
|
||||
|
||||
## Finding the Vulkan loader {#vulkan_loader}
|
||||
|
||||
GLFW itself does not ever need to be linked against the Vulkan loader.
|
||||
|
||||
By default, GLFW will load the Vulkan loader dynamically at runtime via its standard name:
|
||||
`vulkan-1.dll` on Windows, `libvulkan.so.1` on Linux and other Unix-like systems and
|
||||
`libvulkan.1.dylib` on macOS.
|
||||
|
||||
@macos GLFW will also look up and search the `Frameworks` subdirectory of your
|
||||
application bundle.
|
||||
|
||||
If your code is using a Vulkan loader with a different name or in a non-standard location
|
||||
you will need to direct GLFW to it. Pass your version of `vkGetInstanceProcAddr` to @ref
|
||||
glfwInitVulkanLoader before initializing GLFW and it will use that function for all Vulkan
|
||||
entry point retrieval. This prevents GLFW from dynamically loading the Vulkan loader.
|
||||
|
||||
```c
|
||||
glfwInitVulkanLoader(vkGetInstanceProcAddr);
|
||||
```
|
||||
|
||||
@macos To make your application be redistributable you will need to set up the application
|
||||
bundle according to the LunarG SDK documentation. This is explained in more detail in the
|
||||
[SDK documentation for macOS](https://vulkan.lunarg.com/doc/sdk/latest/mac/getting_started.html).
|
||||
|
||||
|
||||
## Including the Vulkan header file {#vulkan_include}
|
||||
|
||||
To have GLFW include the Vulkan header, define @ref GLFW_INCLUDE_VULKAN before including
|
||||
the GLFW header.
|
||||
|
||||
```c
|
||||
#define GLFW_INCLUDE_VULKAN
|
||||
#include <GLFW/glfw3.h>
|
||||
```
|
||||
|
||||
If you instead want to include the Vulkan header from a custom location or use
|
||||
your own custom Vulkan header then do this before the GLFW header.
|
||||
|
||||
```c
|
||||
#include <path/to/vulkan.h>
|
||||
#include <GLFW/glfw3.h>
|
||||
```
|
||||
|
||||
Unless a Vulkan header is included, either by the GLFW header or above it, the following
|
||||
GLFW functions will not be declared, as depend on Vulkan types.
|
||||
|
||||
- @ref glfwInitVulkanLoader
|
||||
- @ref glfwGetInstanceProcAddress
|
||||
- @ref glfwGetPhysicalDevicePresentationSupport
|
||||
- @ref glfwCreateWindowSurface
|
||||
|
||||
The `VK_USE_PLATFORM_*_KHR` macros do not need to be defined for the Vulkan part
|
||||
of GLFW to work. Define them only if you are using these extensions directly.
|
||||
|
||||
|
||||
## Querying for Vulkan support {#vulkan_support}
|
||||
|
||||
If you are linking directly against the Vulkan loader then you can skip this
|
||||
section. The canonical desktop loader library exports all Vulkan core and
|
||||
Khronos extension functions, allowing them to be called directly.
|
||||
|
||||
If you are loading the Vulkan loader dynamically instead of linking directly
|
||||
against it, you can check for the availability of a loader and ICD with @ref
|
||||
glfwVulkanSupported.
|
||||
|
||||
```c
|
||||
if (glfwVulkanSupported())
|
||||
{
|
||||
// Vulkan is available, at least for compute
|
||||
}
|
||||
```
|
||||
|
||||
This function returns `GLFW_TRUE` if the Vulkan loader and any minimally
|
||||
functional ICD was found.
|
||||
|
||||
If one or both were not found, calling any other Vulkan related GLFW function
|
||||
will generate a @ref GLFW_API_UNAVAILABLE error.
|
||||
|
||||
|
||||
### Querying Vulkan function pointers {#vulkan_proc}
|
||||
|
||||
To load any Vulkan core or extension function from the found loader, call @ref
|
||||
glfwGetInstanceProcAddress. To load functions needed for instance creation,
|
||||
pass `NULL` as the instance.
|
||||
|
||||
```c
|
||||
PFN_vkCreateInstance pfnCreateInstance = (PFN_vkCreateInstance)
|
||||
glfwGetInstanceProcAddress(NULL, "vkCreateInstance");
|
||||
```
|
||||
|
||||
Once you have created an instance, you can load from it all other Vulkan core
|
||||
functions and functions from any instance extensions you enabled.
|
||||
|
||||
```c
|
||||
PFN_vkCreateDevice pfnCreateDevice = (PFN_vkCreateDevice)
|
||||
glfwGetInstanceProcAddress(instance, "vkCreateDevice");
|
||||
```
|
||||
|
||||
This function in turn calls `vkGetInstanceProcAddr`. If that fails, the
|
||||
function falls back to a platform-specific query of the Vulkan loader (i.e.
|
||||
`dlsym` or `GetProcAddress`). If that also fails, the function returns `NULL`.
|
||||
For more information about `vkGetInstanceProcAddr`, see the Vulkan
|
||||
documentation.
|
||||
|
||||
Vulkan also provides `vkGetDeviceProcAddr` for loading device-specific versions
|
||||
of Vulkan function. This function can be retrieved from an instance with @ref
|
||||
glfwGetInstanceProcAddress.
|
||||
|
||||
```c
|
||||
PFN_vkGetDeviceProcAddr pfnGetDeviceProcAddr = (PFN_vkGetDeviceProcAddr)
|
||||
glfwGetInstanceProcAddress(instance, "vkGetDeviceProcAddr");
|
||||
```
|
||||
|
||||
Device-specific functions may execute a little faster, due to not having to
|
||||
dispatch internally based on the device passed to them. For more information
|
||||
about `vkGetDeviceProcAddr`, see the Vulkan documentation.
|
||||
|
||||
|
||||
## Querying required Vulkan extensions {#vulkan_ext}
|
||||
|
||||
To do anything useful with Vulkan you need to create an instance. If you want
|
||||
to use Vulkan to render to a window, you must enable the instance extensions
|
||||
GLFW requires to create Vulkan surfaces.
|
||||
|
||||
To query the instance extensions required, call @ref
|
||||
glfwGetRequiredInstanceExtensions.
|
||||
|
||||
```c
|
||||
uint32_t count;
|
||||
const char** extensions = glfwGetRequiredInstanceExtensions(&count);
|
||||
```
|
||||
|
||||
These extensions must all be enabled when creating instances that are going to
|
||||
be passed to @ref glfwGetPhysicalDevicePresentationSupport and @ref
|
||||
glfwCreateWindowSurface. The set of extensions will vary depending on platform
|
||||
and may also vary depending on graphics drivers and other factors.
|
||||
|
||||
If it fails it will return `NULL` and GLFW will not be able to create Vulkan
|
||||
window surfaces. You can still use Vulkan for off-screen rendering and compute
|
||||
work.
|
||||
|
||||
If successful the returned array will always include `VK_KHR_surface`, so if
|
||||
you don't require any additional extensions you can pass this list directly to
|
||||
the `VkInstanceCreateInfo` struct.
|
||||
|
||||
```c
|
||||
VkInstanceCreateInfo ici;
|
||||
|
||||
memset(&ici, 0, sizeof(ici));
|
||||
ici.enabledExtensionCount = count;
|
||||
ici.ppEnabledExtensionNames = extensions;
|
||||
...
|
||||
```
|
||||
|
||||
Additional extensions may be required by future versions of GLFW. You should
|
||||
check whether any extensions you wish to enable are already in the returned
|
||||
array, as it is an error to specify an extension more than once in the
|
||||
`VkInstanceCreateInfo` struct.
|
||||
|
||||
@macos MoltenVK is (as of July 2022) not yet a fully conformant implementation
|
||||
of Vulkan. As of Vulkan SDK 1.3.216.0, this means you must also enable the
|
||||
`VK_KHR_portability_enumeration` instance extension and set the
|
||||
`VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR` bit in the instance creation
|
||||
info flags for MoltenVK to show up in the list of physical devices. For more
|
||||
information, see the Vulkan and MoltenVK documentation.
|
||||
|
||||
|
||||
## Querying for Vulkan presentation support {#vulkan_present}
|
||||
|
||||
Not every queue family of every Vulkan device can present images to surfaces.
|
||||
To check whether a specific queue family of a physical device supports image
|
||||
presentation without first having to create a window and surface, call @ref
|
||||
glfwGetPhysicalDevicePresentationSupport.
|
||||
|
||||
```c
|
||||
if (glfwGetPhysicalDevicePresentationSupport(instance, physical_device, queue_family_index))
|
||||
{
|
||||
// Queue family supports image presentation
|
||||
}
|
||||
```
|
||||
|
||||
The `VK_KHR_surface` extension additionally provides the
|
||||
`vkGetPhysicalDeviceSurfaceSupportKHR` function, which performs the same test on
|
||||
an existing Vulkan surface.
|
||||
|
||||
|
||||
## Creating the window {#vulkan_window}
|
||||
|
||||
Unless you will be using OpenGL or OpenGL ES with the same window as Vulkan,
|
||||
there is no need to create a context. You can disable context creation with the
|
||||
[GLFW_CLIENT_API](@ref GLFW_CLIENT_API_hint) hint.
|
||||
|
||||
```c
|
||||
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
|
||||
GLFWwindow* window = glfwCreateWindow(640, 480, "Window Title", NULL, NULL);
|
||||
```
|
||||
|
||||
See @ref context_less for more information.
|
||||
|
||||
|
||||
## Creating a Vulkan window surface {#vulkan_surface}
|
||||
|
||||
You can create a Vulkan surface (as defined by the `VK_KHR_surface` extension)
|
||||
for a GLFW window with @ref glfwCreateWindowSurface.
|
||||
|
||||
```c
|
||||
VkSurfaceKHR surface;
|
||||
VkResult err = glfwCreateWindowSurface(instance, window, NULL, &surface);
|
||||
if (err)
|
||||
{
|
||||
// Window surface creation failed
|
||||
}
|
||||
```
|
||||
|
||||
If an OpenGL or OpenGL ES context was created on the window, the context has
|
||||
ownership of the presentation on the window and a Vulkan surface cannot be
|
||||
created.
|
||||
|
||||
It is your responsibility to destroy the surface. GLFW does not destroy it for
|
||||
you. Call `vkDestroySurfaceKHR` function from the same extension to destroy it.
|
||||
|
803
docs/window.dox
803
docs/window.dox
@ -1,803 +0,0 @@
|
||||
/*!
|
||||
|
||||
@page window Window guide
|
||||
|
||||
@tableofcontents
|
||||
|
||||
This guide introduces the window related functions of GLFW. There are also
|
||||
guides for the other areas of GLFW.
|
||||
|
||||
- @ref intro
|
||||
- @ref context
|
||||
- @ref monitor
|
||||
- @ref input
|
||||
|
||||
|
||||
@section window_object Window objects
|
||||
|
||||
The @ref GLFWwindow object encapsulates both a window and a context. They are
|
||||
created with @ref glfwCreateWindow and destroyed with @ref glfwDestroyWindow, or
|
||||
@ref glfwTerminate, if any remain. As the window and context are inseparably
|
||||
linked, the object pointer is used as both a context and window handle.
|
||||
|
||||
To see the event stream provided to the various window related callbacks, run
|
||||
the `events` test program.
|
||||
|
||||
|
||||
@subsection window_creation Window creation
|
||||
|
||||
A window and its OpenGL or OpenGL ES context are created with @ref
|
||||
glfwCreateWindow, which returns a handle to the created window object. For
|
||||
example, this creates a 640 by 480 windowed mode window:
|
||||
|
||||
@code
|
||||
GLFWwindow* window = glfwCreateWindow(640, 480, "My Title", NULL, NULL);
|
||||
@endcode
|
||||
|
||||
If window creation fails, `NULL` will be returned, so it is necessary to check
|
||||
the return value.
|
||||
|
||||
The window handle is passed to all window related functions and is provided to
|
||||
along with all input events, so event handlers can tell which window received
|
||||
the event.
|
||||
|
||||
|
||||
@subsubsection window_full_screen Full screen windows
|
||||
|
||||
To create a full screen window, you need to specify which monitor the window
|
||||
should use. In most cases, the user's primary monitor is a good choice.
|
||||
For more information about retrieving monitors, see @ref monitor_monitors.
|
||||
|
||||
@code
|
||||
GLFWwindow* window = glfwCreateWindow(640, 480, "My Title", glfwGetPrimaryMonitor(), NULL);
|
||||
@endcode
|
||||
|
||||
Full screen windows cover the entire display area of a monitor, have no border
|
||||
or decorations.
|
||||
|
||||
Each field of the @ref GLFWvidmode structure corresponds to a function parameter
|
||||
or window hint and combine to form the _desired video mode_ for that window.
|
||||
The supported video mode most closely matching the desired video mode will be
|
||||
set for the chosen monitor as long as the window has input focus. For more
|
||||
information about retrieving video modes, see @ref monitor_modes.
|
||||
|
||||
Video mode field | Corresponds to
|
||||
----------------------- | ------------------------
|
||||
GLFWvidmode.width | `width` parameter
|
||||
GLFWvidmode.height | `height` parameter
|
||||
GLFWvidmode.redBits | `GLFW_RED_BITS` hint
|
||||
GLFWvidmode.greenBits | `GLFW_GREEN_BITS` hint
|
||||
GLFWvidmode.blueBits | `GLFW_BLUE_BITS` hint
|
||||
GLFWvidmode.refreshRate | `GLFW_REFRESH_RATE` hint
|
||||
|
||||
Once you have a full screen window, you can change its resolution with @ref
|
||||
glfwSetWindowSize. The new video mode will be selected and set the same way as
|
||||
the video mode chosen by @ref glfwCreateWindow.
|
||||
|
||||
By default, the original video mode of the monitor will be restored and the
|
||||
window iconified if it loses input focus, to allow the user to switch back to
|
||||
the desktop. This behavior can be disabled with the `GLFW_AUTO_ICONIFY` window
|
||||
hint, for example if you wish to simultaneously cover multiple windows with full
|
||||
screen windows.
|
||||
|
||||
|
||||
@subsubsection window_windowed_full_screen "Windowed full screen" windows
|
||||
|
||||
If the closest match for the desired video mode is the current one, the video
|
||||
mode will not be changed, making window creation faster and application
|
||||
switching much smoother. This is sometimes called _windowed full screen_ or
|
||||
_borderless full screen_ window and counts as a full screen window. To create
|
||||
such a window, simply request the current video mode.
|
||||
|
||||
@code
|
||||
const GLFWvidmode* mode = glfwGetVideoMode(monitor);
|
||||
|
||||
glfwWindowHint(GLFW_RED_BITS, mode->redBits);
|
||||
glfwWindowHint(GLFW_GREEN_BITS, mode->greenBits);
|
||||
glfwWindowHint(GLFW_BLUE_BITS, mode->blueBits);
|
||||
glfwWindowHint(GLFW_REFRESH_RATE, mode->refreshRate);
|
||||
|
||||
GLFWwindow* window = glfwCreateWindow(mode->width, mode->height, "My Title", monitor, NULL);
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection window_destruction Window destruction
|
||||
|
||||
When a window is no longer needed, destroy it with @ref glfwDestroyWindow.
|
||||
|
||||
@code
|
||||
glfwDestroyWindow(window);
|
||||
@endcode
|
||||
|
||||
Window destruction always succeeds. Before the actual destruction, all
|
||||
callbacks are removed so no further events will be delivered for the window.
|
||||
All windows remaining when @ref glfwTerminate is called are destroyed as well.
|
||||
|
||||
When a full screen window is destroyed, the original video mode of its monitor
|
||||
is restored, but the gamma ramp is left untouched.
|
||||
|
||||
|
||||
@subsection window_hints Window creation hints
|
||||
|
||||
There are a number of hints that can be set before the creation of a window and
|
||||
context. Some affect the window itself, others affect the framebuffer or
|
||||
context. These hints are set to their default values each time the library is
|
||||
initialized with @ref glfwInit, can be set individually with @ref glfwWindowHint
|
||||
and reset all at once to their defaults with @ref glfwDefaultWindowHints.
|
||||
|
||||
Note that hints need to be set _before_ the creation of the window and context
|
||||
you wish to have the specified attributes.
|
||||
|
||||
|
||||
@subsubsection window_hints_hard Hard and soft constraints
|
||||
|
||||
Some window hints are hard constraints. These must match the available
|
||||
capabilities _exactly_ for window and context creation to succeed. Hints
|
||||
that are not hard constraints are matched as closely as possible, but the
|
||||
resulting window and context may differ from what these hints requested. To
|
||||
find out the actual attributes of the created window and context, use the
|
||||
@ref glfwGetWindowAttrib function.
|
||||
|
||||
The following hints are always hard constraints:
|
||||
- `GLFW_STEREO`
|
||||
- `GLFW_DOUBLEBUFFER`
|
||||
- `GLFW_CLIENT_API`
|
||||
|
||||
The following additional hints are hard constraints when requesting an OpenGL
|
||||
context, but are ignored when requesting an OpenGL ES context:
|
||||
- `GLFW_OPENGL_FORWARD_COMPAT`
|
||||
- `GLFW_OPENGL_PROFILE`
|
||||
|
||||
|
||||
@subsubsection window_hints_wnd Window related hints
|
||||
|
||||
`GLFW_RESIZABLE` specifies whether the (windowed mode) window will be resizable
|
||||
_by the user_. The window will still be resizable using the @ref
|
||||
glfwSetWindowSize function. This hint is ignored for full screen windows.
|
||||
|
||||
`GLFW_VISIBLE` specifies whether the (windowed mode) window will be initially
|
||||
visible. This hint is ignored for full screen windows.
|
||||
|
||||
`GLFW_DECORATED` specifies whether the (windowed mode) window will have window
|
||||
decorations such as a border, a close widget, etc. This hint is ignored for
|
||||
full screen windows. Note that even though a window may lack a close widget, it
|
||||
is usually still possible for the user to generate close events.
|
||||
|
||||
`GLFW_FOCUSED` specifies whether the (windowed mode) window will be given input
|
||||
focus when created. This hint is ignored for full screen and initially hidden
|
||||
windows.
|
||||
|
||||
`GLFW_AUTO_ICONIFY` specifies whether the (full screen) window will
|
||||
automatically iconify and restore the previous video mode on input focus loss.
|
||||
This hint is ignored for windowed mode windows.
|
||||
|
||||
`GLFW_FLOATING` specifies whether the window will be floating above other
|
||||
regular windows, also called topmost or always-on-top. This is intended
|
||||
primarily for debugging purposes and cannot be used to implement proper full
|
||||
screen windows. This hint is ignored for full screen windows.
|
||||
|
||||
|
||||
@subsubsection window_hints_fb Framebuffer related hints
|
||||
|
||||
`GLFW_RED_BITS`, `GLFW_GREEN_BITS`, `GLFW_BLUE_BITS`, `GLFW_ALPHA_BITS`,
|
||||
`GLFW_DEPTH_BITS` and `GLFW_STENCIL_BITS` specify the desired bit depths of the
|
||||
various components of the default framebuffer. `GLFW_DONT_CARE` means the
|
||||
application has no preference.
|
||||
|
||||
`GLFW_ACCUM_RED_BITS`, `GLFW_ACCUM_GREEN_BITS`, `GLFW_ACCUM_BLUE_BITS` and
|
||||
`GLFW_ACCUM_ALPHA_BITS` specify the desired bit depths of the various components
|
||||
of the accumulation buffer. `GLFW_DONT_CARE` means the application has no
|
||||
preference.
|
||||
|
||||
@par
|
||||
Accumulation buffers are a legacy OpenGL feature and should not be used in new
|
||||
code.
|
||||
|
||||
`GLFW_AUX_BUFFERS` specifies the desired number of auxiliary buffers.
|
||||
`GLFW_DONT_CARE` means the application has no preference.
|
||||
|
||||
@par
|
||||
Auxiliary buffers are a legacy OpenGL feature and should not be used in new
|
||||
code.
|
||||
|
||||
`GLFW_STEREO` specifies whether to use stereoscopic rendering. This is a hard
|
||||
constraint.
|
||||
|
||||
`GLFW_SAMPLES` specifies the desired number of samples to use for multisampling.
|
||||
Zero disables multisampling. `GLFW_DONT_CARE` means the application has no
|
||||
preference.
|
||||
|
||||
`GLFW_SRGB_CAPABLE` specifies whether the framebuffer should be sRGB capable.
|
||||
|
||||
`GLFW_DOUBLEBUFFER` specifies whether the framebuffer should be double buffered.
|
||||
You nearly always want to use double buffering. This is a hard constraint.
|
||||
|
||||
|
||||
@subsubsection window_hints_mtr Monitor related hints
|
||||
|
||||
`GLFW_REFRESH_RATE` specifies the desired refresh rate for full screen windows.
|
||||
If set to `GLFW_DONT_CARE`, the highest available refresh rate will be used.
|
||||
This hint is ignored for windowed mode windows.
|
||||
|
||||
|
||||
@subsubsection window_hints_ctx Context related hints
|
||||
|
||||
`GLFW_CLIENT_API` specifies which client API to create the context for.
|
||||
Possible values are `GLFW_OPENGL_API` and `GLFW_OPENGL_ES_API`. This is a hard
|
||||
constraint.
|
||||
|
||||
`GLFW_CONTEXT_VERSION_MAJOR` and `GLFW_CONTEXT_VERSION_MINOR` specify the client
|
||||
API version that the created context must be compatible with. The exact
|
||||
behavior of these hints depend on the requested client API.
|
||||
|
||||
@par
|
||||
__OpenGL:__ `GLFW_CONTEXT_VERSION_MAJOR` and `GLFW_CONTEXT_VERSION_MINOR` are not hard
|
||||
constraints, but creation will fail if the OpenGL version of the created context
|
||||
is less than the one requested. It is therefore perfectly safe to use the
|
||||
default of version 1.0 for legacy code and you may still get
|
||||
backwards-compatible contexts of version 3.0 and above when available.
|
||||
|
||||
@par
|
||||
While there is no way to ask the driver for a context of the highest supported
|
||||
version, GLFW will attempt to provide this when you ask for a version 1.0
|
||||
context, which is the default for these hints.
|
||||
|
||||
@par
|
||||
__OpenGL ES:__ `GLFW_CONTEXT_VERSION_MAJOR` and `GLFW_CONTEXT_VERSION_MINOR` are not hard
|
||||
constraints, but creation will fail if the OpenGL ES version of the created
|
||||
context is less than the one requested. Additionally, OpenGL ES 1.x cannot be
|
||||
returned if 2.0 or later was requested, and vice versa. This is because OpenGL
|
||||
ES 3.x is backward compatible with 2.0, but OpenGL ES 2.0 is not backward
|
||||
compatible with 1.x.
|
||||
|
||||
`GLFW_OPENGL_FORWARD_COMPAT` specifies whether the OpenGL context should be
|
||||
forward-compatible, i.e. one where all functionality deprecated in the requested
|
||||
version of OpenGL is removed. This may only be used if the requested OpenGL
|
||||
version is 3.0 or above. If OpenGL ES is requested, this hint is ignored.
|
||||
|
||||
@par
|
||||
Forward-compatibility is described in detail in the
|
||||
[OpenGL Reference Manual](https://www.opengl.org/registry/).
|
||||
|
||||
`GLFW_OPENGL_DEBUG_CONTEXT` specifies whether to create a debug OpenGL context,
|
||||
which may have additional error and performance issue reporting functionality.
|
||||
If OpenGL ES is requested, this hint is ignored.
|
||||
|
||||
`GLFW_OPENGL_PROFILE` specifies which OpenGL profile to create the context for.
|
||||
Possible values are one of `GLFW_OPENGL_CORE_PROFILE` or
|
||||
`GLFW_OPENGL_COMPAT_PROFILE`, or `GLFW_OPENGL_ANY_PROFILE` to not request
|
||||
a specific profile. If requesting an OpenGL version below 3.2,
|
||||
`GLFW_OPENGL_ANY_PROFILE` must be used. If OpenGL ES is requested,
|
||||
this hint is ignored.
|
||||
|
||||
@par
|
||||
OpenGL profiles are described in detail in the
|
||||
[OpenGL Reference Manual](https://www.opengl.org/registry/).
|
||||
|
||||
`GLFW_CONTEXT_ROBUSTNESS` specifies the robustness strategy to be used by the
|
||||
context. This can be one of `GLFW_NO_RESET_NOTIFICATION` or
|
||||
`GLFW_LOSE_CONTEXT_ON_RESET`, or `GLFW_NO_ROBUSTNESS` to not request
|
||||
a robustness strategy.
|
||||
|
||||
`GLFW_CONTEXT_RELEASE_BEHAVIOR` specifies the release behavior to be
|
||||
used by the context. Possible values are one of `GLFW_ANY_RELEASE_BEHAVIOR`,
|
||||
`GLFW_RELEASE_BEHAVIOR_FLUSH` or `GLFW_RELEASE_BEHAVIOR_NONE`. If the
|
||||
behavior is `GLFW_ANY_RELEASE_BEHAVIOR`, the default behavior of the context
|
||||
creation API will be used. If the behavior is `GLFW_RELEASE_BEHAVIOR_FLUSH`,
|
||||
the pipeline will be flushed whenever the context is released from being the
|
||||
current one. If the behavior is `GLFW_RELEASE_BEHAVIOR_NONE`, the pipeline will
|
||||
not be flushed on release.
|
||||
|
||||
@par
|
||||
Context release behaviors are described in detail by the
|
||||
[GL_KHR_context_flush_control](https://www.opengl.org/registry/specs/KHR/context_flush_control.txt)
|
||||
extension.
|
||||
|
||||
|
||||
@subsubsection window_hints_values Supported and default values
|
||||
|
||||
Window hint | Default value | Supported values
|
||||
------------------------------- | --------------------------- | ----------------
|
||||
`GLFW_RESIZABLE` | `GL_TRUE` | `GL_TRUE` or `GL_FALSE`
|
||||
`GLFW_VISIBLE` | `GL_TRUE` | `GL_TRUE` or `GL_FALSE`
|
||||
`GLFW_DECORATED` | `GL_TRUE` | `GL_TRUE` or `GL_FALSE`
|
||||
`GLFW_FOCUSED` | `GL_TRUE` | `GL_TRUE` or `GL_FALSE`
|
||||
`GLFW_AUTO_ICONIFY` | `GL_TRUE` | `GL_TRUE` or `GL_FALSE`
|
||||
`GLFW_FLOATING` | `GL_FALSE` | `GL_TRUE` or `GL_FALSE`
|
||||
`GLFW_RED_BITS` | 8 | 0 to `INT_MAX` or `GLFW_DONT_CARE`
|
||||
`GLFW_GREEN_BITS` | 8 | 0 to `INT_MAX` or `GLFW_DONT_CARE`
|
||||
`GLFW_BLUE_BITS` | 8 | 0 to `INT_MAX` or `GLFW_DONT_CARE`
|
||||
`GLFW_ALPHA_BITS` | 8 | 0 to `INT_MAX` or `GLFW_DONT_CARE`
|
||||
`GLFW_DEPTH_BITS` | 24 | 0 to `INT_MAX` or `GLFW_DONT_CARE`
|
||||
`GLFW_STENCIL_BITS` | 8 | 0 to `INT_MAX` or `GLFW_DONT_CARE`
|
||||
`GLFW_ACCUM_RED_BITS` | 0 | 0 to `INT_MAX` or `GLFW_DONT_CARE`
|
||||
`GLFW_ACCUM_GREEN_BITS` | 0 | 0 to `INT_MAX` or `GLFW_DONT_CARE`
|
||||
`GLFW_ACCUM_BLUE_BITS` | 0 | 0 to `INT_MAX` or `GLFW_DONT_CARE`
|
||||
`GLFW_ACCUM_ALPHA_BITS` | 0 | 0 to `INT_MAX` or `GLFW_DONT_CARE`
|
||||
`GLFW_AUX_BUFFERS` | 0 | 0 to `INT_MAX` or `GLFW_DONT_CARE`
|
||||
`GLFW_SAMPLES` | 0 | 0 to `INT_MAX` or `GLFW_DONT_CARE`
|
||||
`GLFW_REFRESH_RATE` | `GLFW_DONT_CARE` | 0 to `INT_MAX` or `GLFW_DONT_CARE`
|
||||
`GLFW_STEREO` | `GL_FALSE` | `GL_TRUE` or `GL_FALSE`
|
||||
`GLFW_SRGB_CAPABLE` | `GL_FALSE` | `GL_TRUE` or `GL_FALSE`
|
||||
`GLFW_DOUBLEBUFFER` | `GL_TRUE` | `GL_TRUE` or `GL_FALSE`
|
||||
`GLFW_CLIENT_API` | `GLFW_OPENGL_API` | `GLFW_OPENGL_API` or `GLFW_OPENGL_ES_API`
|
||||
`GLFW_CONTEXT_VERSION_MAJOR` | 1 | Any valid major version number of the chosen client API
|
||||
`GLFW_CONTEXT_VERSION_MINOR` | 0 | Any valid minor version number of the chosen client API
|
||||
`GLFW_CONTEXT_ROBUSTNESS` | `GLFW_NO_ROBUSTNESS` | `GLFW_NO_ROBUSTNESS`, `GLFW_NO_RESET_NOTIFICATION` or `GLFW_LOSE_CONTEXT_ON_RESET`
|
||||
`GLFW_CONTEXT_RELEASE_BEHAVIOR` | `GLFW_ANY_RELEASE_BEHAVIOR` | `GLFW_ANY_RELEASE_BEHAVIOR`, `GLFW_RELEASE_BEHAVIOR_FLUSH` or `GLFW_RELEASE_BEHAVIOR_NONE`
|
||||
`GLFW_OPENGL_FORWARD_COMPAT` | `GL_FALSE` | `GL_TRUE` or `GL_FALSE`
|
||||
`GLFW_OPENGL_DEBUG_CONTEXT` | `GL_FALSE` | `GL_TRUE` or `GL_FALSE`
|
||||
`GLFW_OPENGL_PROFILE` | `GLFW_OPENGL_ANY_PROFILE` | `GLFW_OPENGL_ANY_PROFILE`, `GLFW_OPENGL_COMPAT_PROFILE` or `GLFW_OPENGL_CORE_PROFILE`
|
||||
|
||||
|
||||
@section window_events Window event processing
|
||||
|
||||
See @ref events.
|
||||
|
||||
|
||||
@section window_properties Window properties and events
|
||||
|
||||
@subsection window_userptr User pointer
|
||||
|
||||
Each window has a user pointer that can be set with @ref
|
||||
glfwSetWindowUserPointer and fetched with @ref glfwGetWindowUserPointer. This
|
||||
can be used for any purpose you need and will not be modified by GLFW throughout
|
||||
the life-time of the window.
|
||||
|
||||
The initial value of the pointer is `NULL`.
|
||||
|
||||
|
||||
@subsection window_close Window closing and close flag
|
||||
|
||||
When the user attempts to close the window, for example by clicking the close
|
||||
widget or using a key chord like Alt+F4, the _close flag_ of the window is set.
|
||||
The window is however not actually destroyed and, unless you watch for this
|
||||
state change, nothing further happens.
|
||||
|
||||
The current state of the close flag is returned by @ref glfwWindowShouldClose
|
||||
and can be set or cleared directly with @ref glfwSetWindowShouldClose. A common
|
||||
pattern is to use the close flag as a main loop condition.
|
||||
|
||||
@code
|
||||
while (!glfwWindowShouldClose(window))
|
||||
{
|
||||
render(window);
|
||||
|
||||
glfwSwapBuffers(window);
|
||||
glfwPollEvents();
|
||||
}
|
||||
@endcode
|
||||
|
||||
If you wish to be notified when the user attempts to close a window, set a close
|
||||
callback.
|
||||
|
||||
@code
|
||||
glfwSetWindowCloseCallback(window, window_close_callback);
|
||||
@endcode
|
||||
|
||||
The callback function is called directly _after_ the close flag has been set.
|
||||
It can be used for example to filter close requests and clear the close flag
|
||||
again unless certain conditions are met.
|
||||
|
||||
@code
|
||||
void window_close_callback(GLFWwindow* window)
|
||||
{
|
||||
if (!time_to_close)
|
||||
glfwSetWindowShouldClose(window, GL_FALSE);
|
||||
}
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection window_size Window size
|
||||
|
||||
The size of a window can be changed with @ref glfwSetWindowSize. For windowed
|
||||
mode windows, this sets the size, in
|
||||
[screen coordinates](@ref coordinate_systems) of the _client area_ or _content
|
||||
area_ of the window. The window system may impose limits on window size.
|
||||
|
||||
@code
|
||||
glfwSetWindowSize(window, 640, 480);
|
||||
@endcode
|
||||
|
||||
For full screen windows, the specified size becomes the new resolution of the
|
||||
window's *desired video mode*. The video mode most closely matching the new
|
||||
desired video mode is set immediately. The window is resized to fit the
|
||||
resolution of the set video mode.
|
||||
|
||||
If you wish to be notified when a window is resized, whether by the user or
|
||||
the system, set a size callback.
|
||||
|
||||
@code
|
||||
glfwSetWindowSizeCallback(window, window_size_callback);
|
||||
@endcode
|
||||
|
||||
The callback function receives the new size, in screen coordinates, of the
|
||||
client area of the window when it is resized.
|
||||
|
||||
@code
|
||||
void window_size_callback(GLFWwindow* window, int width, int height)
|
||||
{
|
||||
}
|
||||
@endcode
|
||||
|
||||
There is also @ref glfwGetWindowSize for directly retrieving the current size of
|
||||
a window.
|
||||
|
||||
@code
|
||||
int width, height;
|
||||
glfwGetWindowSize(window, &width, &height);
|
||||
@endcode
|
||||
|
||||
@note Do not pass the window size to `glViewport` or other pixel-based OpenGL
|
||||
calls. The window size is in screen coordinates, not pixels. Use the
|
||||
[framebuffer size](@ref window_fbsize), which is in pixels, for pixel-based
|
||||
calls.
|
||||
|
||||
The above functions work with the size of the client area, but decorated windows
|
||||
typically have title bars and window frames around this rectangle. You can
|
||||
retrieve the extents of these with @ref glfwGetWindowFrameSize.
|
||||
|
||||
@code
|
||||
int left, top, right, bottom;
|
||||
glfwGetWindowFrameSize(window, &left, &top, &right, &bottom);
|
||||
@endcode
|
||||
|
||||
The returned values are the distances, in screen coordinates, from the edges of
|
||||
the client area to the corresponding edges of the full window. As they are
|
||||
distances and not coordinates, they are always zero or positive.
|
||||
|
||||
|
||||
@subsection window_fbsize Framebuffer size
|
||||
|
||||
While the size of a window is measured in screen coordinates, OpenGL works with
|
||||
pixels. The size you pass into `glViewport`, for example, should be in pixels.
|
||||
On some machines screen coordinates and pixels are the same, but on others they
|
||||
will not be. There is a second set of functions to retrieve the size, in
|
||||
pixels, of the framebuffer of a window.
|
||||
|
||||
If you wish to be notified when the framebuffer of a window is resized, whether
|
||||
by the user or the system, set a size callback.
|
||||
|
||||
@code
|
||||
glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);
|
||||
@endcode
|
||||
|
||||
The callback function receives the new size of the framebuffer when it is
|
||||
resized, which can for example be used to update the OpenGL viewport.
|
||||
|
||||
@code
|
||||
void framebuffer_size_callback(GLFWwindow* window, int width, int height)
|
||||
{
|
||||
glViewport(0, 0, width, height);
|
||||
}
|
||||
@endcode
|
||||
|
||||
There is also @ref glfwGetFramebufferSize for directly retrieving the current
|
||||
size of the framebuffer of a window.
|
||||
|
||||
@code
|
||||
int width, height;
|
||||
glfwGetFramebufferSize(window, &width, &height);
|
||||
glViewport(0, 0, width, height);
|
||||
@endcode
|
||||
|
||||
The size of a framebuffer may change independently of the size of a window, for
|
||||
example if the window is dragged between a regular monitor and a high-DPI one.
|
||||
|
||||
|
||||
@subsection window_pos Window position
|
||||
|
||||
The position of a windowed-mode window can be changed with @ref
|
||||
glfwSetWindowPos. This moves the window so that the upper-left corner of its
|
||||
client area has the specified [screen coordinates](@ref coordinate_systems).
|
||||
The window system may put limitations on window placement.
|
||||
|
||||
@code
|
||||
glfwSetWindowPos(window, 100, 100);
|
||||
@endcode
|
||||
|
||||
If you wish to be notified when a window is moved, whether by the user, system
|
||||
or your own code, set a position callback.
|
||||
|
||||
@code
|
||||
glfwSetWindowPosCallback(window, window_pos_callback);
|
||||
@endcode
|
||||
|
||||
The callback function receives the new position of the upper-left corner of the
|
||||
client area when the window is moved.
|
||||
|
||||
@code
|
||||
void window_pos_callback(GLFWwindow* window, int xpos, int ypos)
|
||||
{
|
||||
}
|
||||
@endcode
|
||||
|
||||
There is also @ref glfwGetWindowPos for directly retrieving the current position
|
||||
of the client area of the window.
|
||||
|
||||
@code
|
||||
int xpos, ypos;
|
||||
glfwGetWindowPos(window, &xpos, &ypos);
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection window_title Window title
|
||||
|
||||
All GLFW windows have a title, although undecorated or full screen windows may
|
||||
not display it or only display it in a task bar or similar interface. You can
|
||||
set a UTF-8 encoded window title with @ref glfwSetWindowTitle.
|
||||
|
||||
@code
|
||||
glfwSetWindowTitle(window, "My Window");
|
||||
@endcode
|
||||
|
||||
The specified string is copied before the function returns, so there is no need
|
||||
to keep it around.
|
||||
|
||||
As long as your source file is encoded as UTF-8, you can use any Unicode
|
||||
characters directly in the source.
|
||||
|
||||
@code
|
||||
glfwSetWindowTitle(window, "おもひでぽろぽろ");
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection window_monitor Window monitor
|
||||
|
||||
Full screen windows are associated with a specific monitor. You can get the
|
||||
handle for this monitor with @ref glfwGetWindowMonitor.
|
||||
|
||||
@code
|
||||
GLFWmonitor* monitor = glfwGetWindowMonitor(window);
|
||||
@endcode
|
||||
|
||||
This monitor handle is one of those returned by @ref glfwGetMonitors.
|
||||
|
||||
For windowed mode windows, this function returns `NULL`. This is the
|
||||
recommended way to tell full screen windows from windowed mode windows.
|
||||
|
||||
|
||||
@subsection window_iconify Window iconification
|
||||
|
||||
Windows can be iconified (i.e. minimized) with @ref glfwIconifyWindow.
|
||||
|
||||
@code
|
||||
glfwIconifyWindow(window);
|
||||
@endcode
|
||||
|
||||
When a full screen window is iconified, the original video mode of its monitor
|
||||
is restored until the user or application restores the window.
|
||||
|
||||
Iconified windows can be restored with @ref glfwRestoreWindow.
|
||||
|
||||
@code
|
||||
glfwRestoreWindow(window);
|
||||
@endcode
|
||||
|
||||
When a full screen window is restored, the desired video mode is restored to its
|
||||
monitor as well.
|
||||
|
||||
If you wish to be notified when a window is iconified or restored, whether by
|
||||
the user, system or your own code, set a iconify callback.
|
||||
|
||||
@code
|
||||
glfwSetWindowIconifyCallback(window, window_iconify_callback);
|
||||
@endcode
|
||||
|
||||
The callback function receives changes in the iconification state of the window.
|
||||
|
||||
@code
|
||||
void window_iconify_callback(GLFWwindow* window, int iconified)
|
||||
{
|
||||
if (iconified)
|
||||
{
|
||||
// The window was iconified
|
||||
}
|
||||
else
|
||||
{
|
||||
// The window was restored
|
||||
}
|
||||
}
|
||||
@endcode
|
||||
|
||||
You can also get the current iconification state with @ref glfwGetWindowAttrib.
|
||||
|
||||
@code
|
||||
int iconified = glfwGetWindowAttrib(window, GLFW_ICONIFIED);
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection window_hide Window visibility
|
||||
|
||||
Windowed mode windows can be hidden with @ref glfwHideWindow.
|
||||
|
||||
@code
|
||||
glfwHideWindow(window);
|
||||
@endcode
|
||||
|
||||
This makes the window completely invisible to the user, including removing it
|
||||
from the task bar, dock or window list. Full screen windows cannot be hidden
|
||||
and calling @ref glfwHideWindow on a full screen window does nothing.
|
||||
|
||||
Hidden windows can be shown with @ref glfwShowWindow.
|
||||
|
||||
@code
|
||||
glfwShowWindow(window);
|
||||
@endcode
|
||||
|
||||
Windowed mode windows can be created initially hidden with the `GLFW_VISIBLE`
|
||||
[window hint](@ref window_hints_wnd). Windows created hidden are completely
|
||||
invisible to the user until shown. This can be useful if you need to set up
|
||||
your window further before showing it, for example moving it to a specific
|
||||
location.
|
||||
|
||||
You can also get the current visibility state with @ref glfwGetWindowAttrib.
|
||||
|
||||
@code
|
||||
int visible = glfwGetWindowAttrib(window, GLFW_VISIBLE);
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection window_focus Window input focus
|
||||
|
||||
If you wish to be notified when a window gains or loses input focus, whether by
|
||||
the user, system or your own code, set a focus callback.
|
||||
|
||||
@code
|
||||
glfwSetWindowFocusCallback(window, window_focus_callback);
|
||||
@endcode
|
||||
|
||||
The callback function receives changes in the input focus state of the window.
|
||||
|
||||
@code
|
||||
void window_focus_callback(GLFWwindow* window, int focused)
|
||||
{
|
||||
if (focused)
|
||||
{
|
||||
// The window gained input focus
|
||||
}
|
||||
else
|
||||
{
|
||||
// The window lost input focus
|
||||
}
|
||||
}
|
||||
@endcode
|
||||
|
||||
You can also get the current input focus state with @ref glfwGetWindowAttrib.
|
||||
|
||||
@code
|
||||
int focused = glfwGetWindowAttrib(window, GLFW_FOCUSED);
|
||||
@endcode
|
||||
|
||||
|
||||
@subsection window_refresh Window damage and refresh
|
||||
|
||||
If you wish to be notified when the contents of a window is damaged and needs
|
||||
to be refreshed, set a window refresh callback.
|
||||
|
||||
@code
|
||||
glfwSetWindowRefreshCallback(m_handle, window_refresh_callback);
|
||||
@endcode
|
||||
|
||||
The callback function is called when the contents of the window needs to be
|
||||
refreshed.
|
||||
|
||||
@code
|
||||
void window_refresh_callback(GLFWwindow* window)
|
||||
{
|
||||
draw_editor_ui(window);
|
||||
glfwSwapBuffers(window);
|
||||
}
|
||||
@endcode
|
||||
|
||||
@note On compositing window systems such as Aero, Compiz or Aqua, where the
|
||||
window contents are saved off-screen, this callback might only be called when
|
||||
the window or framebuffer is resized.
|
||||
|
||||
|
||||
@subsection window_attribs Window attributes
|
||||
|
||||
Windows have a number of attributes that can be returned using @ref
|
||||
glfwGetWindowAttrib. Some reflect state that may change during the lifetime of
|
||||
the window, while others reflect the corresponding hints and are fixed at the
|
||||
time of creation. Some are related to the actual window and others to its
|
||||
context.
|
||||
|
||||
@code
|
||||
if (glfwGetWindowAttrib(window, GLFW_FOCUSED))
|
||||
{
|
||||
// window has input focus
|
||||
}
|
||||
@endcode
|
||||
|
||||
|
||||
@subsubsection window_attribs_wnd Window related attributes
|
||||
|
||||
`GLFW_FOCUSED` indicates whether the specified window has input focus. Initial
|
||||
input focus is controlled by the [window hint](@ref window_hints_wnd) with the
|
||||
same name.
|
||||
|
||||
`GLFW_ICONIFIED` indicates whether the specified window is iconified, whether by
|
||||
the user or with @ref glfwIconifyWindow.
|
||||
|
||||
`GLFW_VISIBLE` indicates whether the specified window is visible. Window
|
||||
visibility can be controlled with @ref glfwShowWindow and @ref glfwHideWindow
|
||||
and initial visibility is controlled by the [window hint](@ref window_hints_wnd)
|
||||
with the same name.
|
||||
|
||||
`GLFW_RESIZABLE` indicates whether the specified window is resizable _by the
|
||||
user_. This is set on creation with the [window hint](@ref window_hints_wnd)
|
||||
with the same name.
|
||||
|
||||
`GLFW_DECORATED` indicates whether the specified window has decorations such as
|
||||
a border, a close widget, etc. This is set on creation with the
|
||||
[window hint](@ref window_hints_wnd) with the same name.
|
||||
|
||||
`GLFW_FLOATING` indicates whether the specified window is floating, also called
|
||||
topmost or always-on-top. This is controlled by the
|
||||
[window hint](@ref window_hints_wnd) with the same name.
|
||||
|
||||
|
||||
@subsubsection window_attribs_ctx Context related attributes
|
||||
|
||||
`GLFW_CLIENT_API` indicates the client API provided by the window's context;
|
||||
either `GLFW_OPENGL_API` or `GLFW_OPENGL_ES_API`.
|
||||
|
||||
`GLFW_CONTEXT_VERSION_MAJOR`, `GLFW_CONTEXT_VERSION_MINOR` and
|
||||
`GLFW_CONTEXT_REVISION` indicate the client API version of the window's context.
|
||||
|
||||
`GLFW_OPENGL_FORWARD_COMPAT` is `GL_TRUE` if the window's context is an OpenGL
|
||||
forward-compatible one, or `GL_FALSE` otherwise.
|
||||
|
||||
`GLFW_OPENGL_DEBUG_CONTEXT` is `GL_TRUE` if the window's context is an OpenGL
|
||||
debug context, or `GL_FALSE` otherwise.
|
||||
|
||||
`GLFW_OPENGL_PROFILE` indicates the OpenGL profile used by the context. This is
|
||||
`GLFW_OPENGL_CORE_PROFILE` or `GLFW_OPENGL_COMPAT_PROFILE` if the context uses
|
||||
a known profile, or `GLFW_OPENGL_ANY_PROFILE` if the OpenGL profile is unknown
|
||||
or the context is an OpenGL ES context. Note that the returned profile may not
|
||||
match the profile bits of the context flags, as GLFW will try other means of
|
||||
detecting the profile when no bits are set.
|
||||
|
||||
`GLFW_CONTEXT_ROBUSTNESS` indicates the robustness strategy used by the context.
|
||||
This is `GLFW_LOSE_CONTEXT_ON_RESET` or `GLFW_NO_RESET_NOTIFICATION` if the
|
||||
window's context supports robustness, or `GLFW_NO_ROBUSTNESS` otherwise.
|
||||
|
||||
|
||||
@section buffer_swap Buffer swapping
|
||||
|
||||
GLFW windows are by default double buffered. That means that you have two
|
||||
rendering buffers; a front buffer and a back buffer. The front buffer is
|
||||
the one being displayed and the back buffer the one you render to.
|
||||
|
||||
When the entire frame has been rendered, it is time to swap the back and the
|
||||
front buffers in order to display what has been rendered and begin rendering
|
||||
a new frame. This is done with @ref glfwSwapBuffers.
|
||||
|
||||
@code
|
||||
glfwSwapBuffers(window);
|
||||
@endcode
|
||||
|
||||
Sometimes it can be useful to select when the buffer swap will occur. With the
|
||||
function @ref glfwSwapInterval it is possible to select the minimum number of
|
||||
monitor refreshes the driver wait should from the time @ref glfwSwapBuffers was
|
||||
called before swapping the buffers:
|
||||
|
||||
@code
|
||||
glfwSwapInterval(1);
|
||||
@endcode
|
||||
|
||||
If the interval is zero, the swap will take place immediately when @ref
|
||||
glfwSwapBuffers is called without waiting for a refresh. Otherwise at least
|
||||
interval retraces will pass between each buffer swap. Using a swap interval of
|
||||
zero can be useful for benchmarking purposes, when it is not desirable to
|
||||
measure the time it takes to wait for the vertical retrace. However, a swap
|
||||
interval of one lets you avoid tearing.
|
||||
|
||||
Note that this may not work on all machines, as some drivers have
|
||||
user-controlled settings that override any swap interval the application
|
||||
requests. It is also by default disabled on Windows Vista and later when using
|
||||
DWM (Aero), as using it there sometimes leads to severe jitter. You can
|
||||
forcibly enable it for machines using DWM using @ref compile_options_win32.
|
||||
|
||||
*/
|
1530
docs/window.md
Normal file
1530
docs/window.md
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,82 +1,83 @@
|
||||
|
||||
link_libraries(glfw "${OPENGL_glu_LIBRARY}")
|
||||
link_libraries(glfw)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
add_definitions(-DGLFW_DLL)
|
||||
link_libraries("${OPENGL_gl_LIBRARY}" "${MATH_LIBRARY}")
|
||||
else()
|
||||
link_libraries(${glfw_LIBRARIES})
|
||||
include_directories("${GLFW_SOURCE_DIR}/deps")
|
||||
|
||||
if (MATH_LIBRARY)
|
||||
link_libraries("${MATH_LIBRARY}")
|
||||
endif()
|
||||
|
||||
include_directories("${GLFW_SOURCE_DIR}/include"
|
||||
"${GLFW_SOURCE_DIR}/deps")
|
||||
|
||||
if ("${OPENGL_INCLUDE_DIR}")
|
||||
include_directories("${OPENGL_INCLUDE_DIR}")
|
||||
# Workaround for the MS CRT deprecating parts of the standard library
|
||||
if (MSVC OR CMAKE_C_SIMULATE_ID STREQUAL "MSVC")
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
set(GLAD "${GLFW_SOURCE_DIR}/deps/glad/glad.h"
|
||||
"${GLFW_SOURCE_DIR}/deps/glad.c")
|
||||
if (WIN32)
|
||||
set(ICON glfw.rc)
|
||||
elseif (APPLE)
|
||||
set(ICON glfw.icns)
|
||||
endif()
|
||||
|
||||
set(GLAD_GL "${GLFW_SOURCE_DIR}/deps/glad/gl.h")
|
||||
set(GLAD_GLES2 "${GLFW_SOURCE_DIR}/deps/glad/gles2.h")
|
||||
set(GETOPT "${GLFW_SOURCE_DIR}/deps/getopt.h"
|
||||
"${GLFW_SOURCE_DIR}/deps/getopt.c")
|
||||
set(TINYCTHREAD "${GLFW_SOURCE_DIR}/deps/tinycthread.h"
|
||||
"${GLFW_SOURCE_DIR}/deps/tinycthread.c")
|
||||
|
||||
if (APPLE)
|
||||
# Set fancy names for bundles
|
||||
add_executable(Boing MACOSX_BUNDLE boing.c)
|
||||
add_executable(Gears MACOSX_BUNDLE gears.c)
|
||||
add_executable(Heightmap MACOSX_BUNDLE heightmap.c ${GLAD})
|
||||
add_executable(Particles MACOSX_BUNDLE particles.c ${TINYCTHREAD})
|
||||
add_executable(Simple MACOSX_BUNDLE simple.c)
|
||||
add_executable(SplitView MACOSX_BUNDLE splitview.c)
|
||||
add_executable(Wave MACOSX_BUNDLE wave.c)
|
||||
add_executable(boing WIN32 MACOSX_BUNDLE boing.c ${ICON} ${GLAD_GL})
|
||||
add_executable(gears WIN32 MACOSX_BUNDLE gears.c ${ICON} ${GLAD_GL})
|
||||
add_executable(heightmap WIN32 MACOSX_BUNDLE heightmap.c ${ICON} ${GLAD_GL})
|
||||
add_executable(offscreen offscreen.c ${ICON} ${GLAD_GL})
|
||||
add_executable(particles WIN32 MACOSX_BUNDLE particles.c ${ICON} ${TINYCTHREAD} ${GETOPT} ${GLAD_GL})
|
||||
add_executable(sharing WIN32 MACOSX_BUNDLE sharing.c ${ICON} ${GLAD_GL})
|
||||
add_executable(splitview WIN32 MACOSX_BUNDLE splitview.c ${ICON} ${GLAD_GL})
|
||||
add_executable(triangle-opengl WIN32 MACOSX_BUNDLE triangle-opengl.c ${ICON} ${GLAD_GL})
|
||||
add_executable(triangle-opengles WIN32 MACOSX_BUNDLE triangle-opengles.c ${ICON} ${GLAD_GLES2})
|
||||
add_executable(wave WIN32 MACOSX_BUNDLE wave.c ${ICON} ${GLAD_GL})
|
||||
add_executable(windows WIN32 MACOSX_BUNDLE windows.c ${ICON} ${GLAD_GL})
|
||||
|
||||
set_target_properties(Boing PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Boing")
|
||||
set_target_properties(Gears PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Gears")
|
||||
set_target_properties(Heightmap PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Heightmap")
|
||||
set_target_properties(Particles PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Particles")
|
||||
set_target_properties(Simple PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Simple")
|
||||
set_target_properties(SplitView PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Split View")
|
||||
set_target_properties(Wave PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Wave")
|
||||
|
||||
set_target_properties(Boing Gears Heightmap Particles Simple SplitView Wave PROPERTIES
|
||||
FOLDER "GLFW3/Examples"
|
||||
MACOSX_BUNDLE_INFO_PLIST "${GLFW_SOURCE_DIR}/CMake/AppleInfo.plist")
|
||||
|
||||
else()
|
||||
# Set boring names for executables
|
||||
add_executable(boing WIN32 boing.c)
|
||||
add_executable(gears WIN32 gears.c)
|
||||
add_executable(heightmap WIN32 heightmap.c ${GLAD})
|
||||
add_executable(particles WIN32 particles.c ${TINYCTHREAD} ${GETOPT})
|
||||
add_executable(simple WIN32 simple.c)
|
||||
add_executable(splitview WIN32 splitview.c)
|
||||
add_executable(wave WIN32 wave.c)
|
||||
|
||||
set_target_properties(boing gears heightmap particles simple splitview wave PROPERTIES
|
||||
FOLDER "GLFW3/Examples")
|
||||
target_link_libraries(particles Threads::Threads)
|
||||
if (RT_LIBRARY)
|
||||
target_link_libraries(particles "${RT_LIBRARY}")
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
target_link_libraries(Particles "${CMAKE_THREAD_LIBS_INIT}")
|
||||
elseif (UNIX)
|
||||
target_link_libraries(particles "${CMAKE_THREAD_LIBS_INIT}" "${RT_LIBRARY}")
|
||||
endif()
|
||||
set(GUI_ONLY_BINARIES boing gears heightmap particles sharing splitview
|
||||
triangle-opengl triangle-opengles wave windows)
|
||||
set(CONSOLE_BINARIES offscreen)
|
||||
|
||||
set_target_properties(${GUI_ONLY_BINARIES} ${CONSOLE_BINARIES} PROPERTIES
|
||||
C_STANDARD 99
|
||||
FOLDER "GLFW3/Examples")
|
||||
|
||||
if (MSVC)
|
||||
set(WINDOWS_BINARIES boing gears heightmap particles simple splitview wave)
|
||||
|
||||
# Tell MSVC to use main instead of WinMain for Windows subsystem executables
|
||||
set_target_properties(${WINDOWS_BINARIES} PROPERTIES
|
||||
# Tell MSVC to use main instead of WinMain
|
||||
set_target_properties(${GUI_ONLY_BINARIES} PROPERTIES
|
||||
LINK_FLAGS "/ENTRY:mainCRTStartup")
|
||||
elseif (CMAKE_C_SIMULATE_ID STREQUAL "MSVC")
|
||||
# Tell Clang using MS CRT to use main instead of WinMain
|
||||
set_target_properties(${GUI_ONLY_BINARIES} PROPERTIES
|
||||
LINK_FLAGS "-Wl,/entry:mainCRTStartup")
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
set(BUNDLE_BINARIES Boing Gears Heightmap Particles Simple SplitView Wave)
|
||||
set_target_properties(boing PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Boing")
|
||||
set_target_properties(gears PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Gears")
|
||||
set_target_properties(heightmap PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Heightmap")
|
||||
set_target_properties(particles PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Particles")
|
||||
set_target_properties(sharing PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Sharing")
|
||||
set_target_properties(triangle-opengl PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "OpenGL Triangle")
|
||||
set_target_properties(triangle-opengles PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "OpenGL ES Triangle")
|
||||
set_target_properties(splitview PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "SplitView")
|
||||
set_target_properties(wave PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Wave")
|
||||
set_target_properties(windows PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "Windows")
|
||||
|
||||
set_target_properties(${BUNDLE_BINARIES} PROPERTIES
|
||||
set_source_files_properties(glfw.icns PROPERTIES
|
||||
MACOSX_PACKAGE_LOCATION "Resources")
|
||||
set_target_properties(${GUI_ONLY_BINARIES} PROPERTIES
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${GLFW_VERSION}
|
||||
MACOSX_BUNDLE_LONG_VERSION_STRING ${GLFW_VERSION_FULL})
|
||||
MACOSX_BUNDLE_LONG_VERSION_STRING ${GLFW_VERSION}
|
||||
MACOSX_BUNDLE_ICON_FILE glfw.icns
|
||||
MACOSX_BUNDLE_INFO_PLIST "${GLFW_SOURCE_DIR}/CMake/Info.plist.in")
|
||||
endif()
|
||||
|
||||
|
109
examples/boing.c
109
examples/boing.c
@ -27,13 +27,22 @@
|
||||
* a hidden computer or VCR.
|
||||
*****************************************************************************/
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
// Make MS math.h define M_PI
|
||||
#define _USE_MATH_DEFINES
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
#define GLFW_INCLUDE_GLU
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
#define GLFW_INCLUDE_NONE
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
#include <linmath.h>
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Various declarations and macros
|
||||
@ -82,10 +91,11 @@ typedef enum { DRAW_BALL, DRAW_BALL_SHADOW } DRAW_BALL_ENUM;
|
||||
typedef struct {float x; float y; float z;} vertex_t;
|
||||
|
||||
/* Global vars */
|
||||
int windowed_xpos, windowed_ypos, windowed_width, windowed_height;
|
||||
int width, height;
|
||||
GLfloat deg_rot_y = 0.f;
|
||||
GLfloat deg_rot_y_inc = 2.f;
|
||||
GLboolean override_pos = GL_FALSE;
|
||||
int override_pos = GLFW_FALSE;
|
||||
GLfloat cursor_x = 0.f;
|
||||
GLfloat cursor_y = 0.f;
|
||||
GLfloat ball_x = -RADIUS;
|
||||
@ -102,11 +112,6 @@ double dt;
|
||||
#define RAND_MAX 4095
|
||||
#endif
|
||||
|
||||
/* PI */
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.1415926535897932384626433832795
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Truncate a degree.
|
||||
@ -162,33 +167,11 @@ void CrossProduct( vertex_t a, vertex_t b, vertex_t c, vertex_t *n )
|
||||
v2 = c.y - a.y;
|
||||
v3 = c.z - a.z;
|
||||
|
||||
n->x = u2 * v3 - v2 * v3;
|
||||
n->x = u2 * v3 - v2 * u3;
|
||||
n->y = u3 * v1 - v3 * u1;
|
||||
n->z = u1 * v2 - v1 * u2;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* Calculate the angle to be passed to gluPerspective() so that a scene
|
||||
* is visible. This function originates from the OpenGL Red Book.
|
||||
*
|
||||
* Parms : size
|
||||
* The size of the segment when the angle is intersected at "dist"
|
||||
* (ie at the outermost edge of the angle of vision).
|
||||
*
|
||||
* dist
|
||||
* Distance from viewpoint to scene.
|
||||
*****************************************************************************/
|
||||
GLfloat PerspectiveAngle( GLfloat size,
|
||||
GLfloat dist )
|
||||
{
|
||||
GLfloat radTheta, degTheta;
|
||||
|
||||
radTheta = 2.f * (GLfloat) atan2( size / 2.f, dist );
|
||||
degTheta = (180.f * radTheta) / (GLfloat) M_PI;
|
||||
return degTheta;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define BOING_DEBUG 0
|
||||
|
||||
@ -233,28 +216,55 @@ void display(void)
|
||||
*****************************************************************************/
|
||||
void reshape( GLFWwindow* window, int w, int h )
|
||||
{
|
||||
mat4x4 projection, view;
|
||||
|
||||
glViewport( 0, 0, (GLsizei)w, (GLsizei)h );
|
||||
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadIdentity();
|
||||
|
||||
gluPerspective( PerspectiveAngle( RADIUS * 2, 200 ),
|
||||
(GLfloat)w / (GLfloat)h,
|
||||
1.0,
|
||||
VIEW_SCENE_DIST );
|
||||
mat4x4_perspective( projection,
|
||||
2.f * (float) atan2( RADIUS, 200.f ),
|
||||
(float)w / (float)h,
|
||||
1.f, VIEW_SCENE_DIST );
|
||||
glLoadMatrixf((const GLfloat*) projection);
|
||||
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glLoadIdentity();
|
||||
|
||||
gluLookAt( 0.0, 0.0, VIEW_SCENE_DIST,/* eye */
|
||||
0.0, 0.0, 0.0, /* center of vision */
|
||||
0.0, -1.0, 0.0 ); /* up vector */
|
||||
{
|
||||
vec3 eye = { 0.f, 0.f, VIEW_SCENE_DIST };
|
||||
vec3 center = { 0.f, 0.f, 0.f };
|
||||
vec3 up = { 0.f, -1.f, 0.f };
|
||||
mat4x4_look_at( view, eye, center, up );
|
||||
}
|
||||
glLoadMatrixf((const GLfloat*) view);
|
||||
}
|
||||
|
||||
void key_callback( GLFWwindow* window, int key, int scancode, int action, int mods )
|
||||
{
|
||||
if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS)
|
||||
glfwSetWindowShouldClose(window, GL_TRUE);
|
||||
if (action != GLFW_PRESS)
|
||||
return;
|
||||
|
||||
if (key == GLFW_KEY_ESCAPE && mods == 0)
|
||||
glfwSetWindowShouldClose(window, GLFW_TRUE);
|
||||
if ((key == GLFW_KEY_ENTER && mods == GLFW_MOD_ALT) ||
|
||||
(key == GLFW_KEY_F11 && mods == GLFW_MOD_ALT))
|
||||
{
|
||||
if (glfwGetWindowMonitor(window))
|
||||
{
|
||||
glfwSetWindowMonitor(window, NULL,
|
||||
windowed_xpos, windowed_ypos,
|
||||
windowed_width, windowed_height, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
GLFWmonitor* monitor = glfwGetPrimaryMonitor();
|
||||
if (monitor)
|
||||
{
|
||||
const GLFWvidmode* mode = glfwGetVideoMode(monitor);
|
||||
glfwGetWindowPos(window, &windowed_xpos, &windowed_ypos);
|
||||
glfwGetWindowSize(window, &windowed_width, &windowed_height);
|
||||
glfwSetWindowMonitor(window, monitor, 0, 0, mode->width, mode->height, mode->refreshRate);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void set_ball_pos ( GLfloat x, GLfloat y )
|
||||
@ -270,12 +280,12 @@ void mouse_button_callback( GLFWwindow* window, int button, int action, int mods
|
||||
|
||||
if (action == GLFW_PRESS)
|
||||
{
|
||||
override_pos = GL_TRUE;
|
||||
override_pos = GLFW_TRUE;
|
||||
set_ball_pos(cursor_x, cursor_y);
|
||||
}
|
||||
else
|
||||
{
|
||||
override_pos = GL_FALSE;
|
||||
override_pos = GLFW_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -294,7 +304,7 @@ void cursor_position_callback( GLFWwindow* window, double x, double y )
|
||||
* The Boing ball is sphere in which each facet is a rectangle.
|
||||
* Facet colors alternate between red and white.
|
||||
* The ball is built by stacking latitudinal circles. Each circle is composed
|
||||
* of a widely-separated set of points, so that each facet is noticably large.
|
||||
* of a widely-separated set of points, so that each facet is noticeably large.
|
||||
*****************************************************************************/
|
||||
void DrawBoingBall( void )
|
||||
{
|
||||
@ -438,7 +448,7 @@ void DrawBoingBallBand( GLfloat long_lo,
|
||||
static int colorToggle = 0;
|
||||
|
||||
/*
|
||||
* Iterate thru the points of a latitude circle.
|
||||
* Iterate through the points of a latitude circle.
|
||||
* A latitude circle is a 2D set of X,Z points.
|
||||
*/
|
||||
for ( lat_deg = 0;
|
||||
@ -619,8 +629,6 @@ int main( void )
|
||||
if( !glfwInit() )
|
||||
exit( EXIT_FAILURE );
|
||||
|
||||
glfwWindowHint(GLFW_DEPTH_BITS, 16);
|
||||
|
||||
window = glfwCreateWindow( 400, 400, "Boing (classic Amiga demo)", NULL, NULL );
|
||||
if (!window)
|
||||
{
|
||||
@ -628,12 +636,15 @@ int main( void )
|
||||
exit( EXIT_FAILURE );
|
||||
}
|
||||
|
||||
glfwSetWindowAspectRatio(window, 1, 1);
|
||||
|
||||
glfwSetFramebufferSizeCallback(window, reshape);
|
||||
glfwSetKeyCallback(window, key_callback);
|
||||
glfwSetMouseButtonCallback(window, mouse_button_callback);
|
||||
glfwSetCursorPosCallback(window, cursor_position_callback);
|
||||
|
||||
glfwMakeContextCurrent(window);
|
||||
gladLoadGL(glfwGetProcAddress);
|
||||
glfwSwapInterval( 1 );
|
||||
|
||||
glfwGetFramebufferSize(window, &width, &height);
|
||||
|
@ -15,27 +15,27 @@
|
||||
* - Slightly modified camera that should work better for stereo viewing
|
||||
*
|
||||
*
|
||||
* Camilla Berglund:
|
||||
* Camilla Löwy:
|
||||
* - Removed FPS counter (this is not a benchmark)
|
||||
* - Added a few comments
|
||||
* - Enabled vsync
|
||||
*/
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
// Make MS math.h define M_PI
|
||||
#define _USE_MATH_DEFINES
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
#define GLFW_INCLUDE_NONE
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.141592654
|
||||
#endif
|
||||
|
||||
/* If non-zero, the program exits after that many seconds
|
||||
*/
|
||||
static int autoexit = 0;
|
||||
|
||||
/**
|
||||
|
||||
Draw a gear wheel. You'll probably want to call this function when
|
||||
@ -174,6 +174,7 @@ static GLfloat angle = 0.f;
|
||||
/* OpenGL draw function & timing */
|
||||
static void draw(void)
|
||||
{
|
||||
glClearColor(0.0, 0.0, 0.0, 0.0);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
glPushMatrix();
|
||||
@ -223,7 +224,7 @@ void key( GLFWwindow* window, int k, int s, int action, int mods )
|
||||
view_rotz += 5.0;
|
||||
break;
|
||||
case GLFW_KEY_ESCAPE:
|
||||
glfwSetWindowShouldClose(window, GL_TRUE);
|
||||
glfwSetWindowShouldClose(window, GLFW_TRUE);
|
||||
break;
|
||||
case GLFW_KEY_UP:
|
||||
view_rotx += 5.0;
|
||||
@ -264,13 +265,12 @@ void reshape( GLFWwindow* window, int width, int height )
|
||||
|
||||
|
||||
/* program & OpenGL initialization */
|
||||
static void init(int argc, char *argv[])
|
||||
static void init(void)
|
||||
{
|
||||
static GLfloat pos[4] = {5.f, 5.f, 10.f, 0.f};
|
||||
static GLfloat red[4] = {0.8f, 0.1f, 0.f, 1.f};
|
||||
static GLfloat green[4] = {0.f, 0.8f, 0.2f, 1.f};
|
||||
static GLfloat blue[4] = {0.2f, 0.2f, 1.f, 1.f};
|
||||
GLint i;
|
||||
|
||||
glLightfv(GL_LIGHT0, GL_POSITION, pos);
|
||||
glEnable(GL_CULL_FACE);
|
||||
@ -298,19 +298,6 @@ static void init(int argc, char *argv[])
|
||||
glEndList();
|
||||
|
||||
glEnable(GL_NORMALIZE);
|
||||
|
||||
for ( i=1; i<argc; i++ ) {
|
||||
if (strcmp(argv[i], "-info")==0) {
|
||||
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS));
|
||||
}
|
||||
else if ( strcmp(argv[i], "-exit")==0) {
|
||||
autoexit = 30;
|
||||
printf("Auto Exit after %i seconds.\n", autoexit );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -327,6 +314,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
glfwWindowHint(GLFW_DEPTH_BITS, 16);
|
||||
glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE);
|
||||
|
||||
window = glfwCreateWindow( 300, 300, "Gears", NULL, NULL );
|
||||
if (!window)
|
||||
@ -341,13 +329,14 @@ int main(int argc, char *argv[])
|
||||
glfwSetKeyCallback(window, key);
|
||||
|
||||
glfwMakeContextCurrent(window);
|
||||
gladLoadGL(glfwGetProcAddress);
|
||||
glfwSwapInterval( 1 );
|
||||
|
||||
glfwGetFramebufferSize(window, &width, &height);
|
||||
reshape(window, width, height);
|
||||
|
||||
// Parse command-line options
|
||||
init(argc, argv);
|
||||
init();
|
||||
|
||||
// Main loop
|
||||
while( !glfwWindowShouldClose(window) )
|
||||
|
BIN
examples/glfw.icns
Normal file
BIN
examples/glfw.icns
Normal file
Binary file not shown.
BIN
examples/glfw.ico
Normal file
BIN
examples/glfw.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
3
examples/glfw.rc
Normal file
3
examples/glfw.rc
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
GLFW_ICON ICON "glfw.ico"
|
||||
|
@ -29,7 +29,9 @@
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <glad/glad.h>
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
#define GLFW_INCLUDE_NONE
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
/* Map height updates */
|
||||
@ -291,12 +293,12 @@ static void generate_heightmap__circle(float* center_x, float* center_y,
|
||||
{
|
||||
float sign;
|
||||
/* random value for element in between [0-1.0] */
|
||||
*center_x = (MAP_SIZE * rand()) / (1.0f * RAND_MAX);
|
||||
*center_y = (MAP_SIZE * rand()) / (1.0f * RAND_MAX);
|
||||
*size = (MAX_CIRCLE_SIZE * rand()) / (1.0f * RAND_MAX);
|
||||
sign = (1.0f * rand()) / (1.0f * RAND_MAX);
|
||||
*center_x = (MAP_SIZE * rand()) / (float) RAND_MAX;
|
||||
*center_y = (MAP_SIZE * rand()) / (float) RAND_MAX;
|
||||
*size = (MAX_CIRCLE_SIZE * rand()) / (float) RAND_MAX;
|
||||
sign = (1.0f * rand()) / (float) RAND_MAX;
|
||||
sign = (sign < DISPLACEMENT_SIGN_LIMIT) ? -1.0f : 1.0f;
|
||||
*displacement = (sign * (MAX_DISPLACEMENT * rand())) / (1.0f * RAND_MAX);
|
||||
*displacement = (sign * (MAX_DISPLACEMENT * rand())) / (float) RAND_MAX;
|
||||
}
|
||||
|
||||
/* Run the specified number of iterations of the generation process for the
|
||||
@ -319,7 +321,7 @@ static void update_map(int num_iter)
|
||||
{
|
||||
GLfloat dx = center_x - map_vertices[0][ii];
|
||||
GLfloat dz = center_z - map_vertices[2][ii];
|
||||
GLfloat pd = (2.0f * sqrtf((dx * dx) + (dz * dz))) / circle_size;
|
||||
GLfloat pd = (2.0f * (float) sqrt((dx * dx) + (dz * dz))) / circle_size;
|
||||
if (fabs(pd) <= 1.0f)
|
||||
{
|
||||
/* tx,tz is within the circle */
|
||||
@ -386,7 +388,7 @@ static void key_callback(GLFWwindow* window, int key, int scancode, int action,
|
||||
{
|
||||
case GLFW_KEY_ESCAPE:
|
||||
/* Exit program on Escape */
|
||||
glfwSetWindowShouldClose(window, GL_TRUE);
|
||||
glfwSetWindowShouldClose(window, GLFW_TRUE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -406,6 +408,7 @@ int main(int argc, char** argv)
|
||||
float f;
|
||||
GLint uloc_modelview;
|
||||
GLint uloc_project;
|
||||
int width, height;
|
||||
|
||||
GLuint shader_program;
|
||||
|
||||
@ -414,11 +417,11 @@ int main(int argc, char** argv)
|
||||
if (!glfwInit())
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
|
||||
glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
|
||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
|
||||
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GLFW_TRUE);
|
||||
|
||||
window = glfwCreateWindow(800, 600, "GLFW OpenGL3 Heightmap demo", NULL, NULL);
|
||||
if (! window )
|
||||
@ -431,7 +434,7 @@ int main(int argc, char** argv)
|
||||
glfwSetKeyCallback(window, key_callback);
|
||||
|
||||
glfwMakeContextCurrent(window);
|
||||
gladLoadGLLoader((GLADloadproc) glfwGetProcAddress);
|
||||
gladLoadGL(glfwGetProcAddress);
|
||||
|
||||
/* Prepare opengl resources for rendering */
|
||||
shader_program = make_shader_program(vertex_shader_text, fragment_shader_text);
|
||||
@ -469,7 +472,8 @@ int main(int argc, char** argv)
|
||||
/* Create the vbo to store all the information for the grid and the height */
|
||||
|
||||
/* setup the scene ready for rendering */
|
||||
glViewport(0, 0, 800, 600);
|
||||
glfwGetFramebufferSize(window, &width, &height);
|
||||
glViewport(0, 0, width, height);
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
/* main loop */
|
||||
|
165
examples/offscreen.c
Normal file
165
examples/offscreen.c
Normal file
@ -0,0 +1,165 @@
|
||||
//========================================================================
|
||||
// Offscreen rendering example
|
||||
// Copyright (c) Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
// arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it
|
||||
// freely, subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented; you must not
|
||||
// claim that you wrote the original software. If you use this software
|
||||
// in a product, an acknowledgment in the product documentation would
|
||||
// be appreciated but is not required.
|
||||
//
|
||||
// 2. Altered source versions must be plainly marked as such, and must not
|
||||
// be misrepresented as being the original software.
|
||||
//
|
||||
// 3. This notice may not be removed or altered from any source
|
||||
// distribution.
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
#define GLFW_INCLUDE_NONE
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
#include "linmath.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
#include <stb_image_write.h>
|
||||
|
||||
static const struct
|
||||
{
|
||||
float x, y;
|
||||
float r, g, b;
|
||||
} vertices[3] =
|
||||
{
|
||||
{ -0.6f, -0.4f, 1.f, 0.f, 0.f },
|
||||
{ 0.6f, -0.4f, 0.f, 1.f, 0.f },
|
||||
{ 0.f, 0.6f, 0.f, 0.f, 1.f }
|
||||
};
|
||||
|
||||
static const char* vertex_shader_text =
|
||||
"#version 110\n"
|
||||
"uniform mat4 MVP;\n"
|
||||
"attribute vec3 vCol;\n"
|
||||
"attribute vec2 vPos;\n"
|
||||
"varying vec3 color;\n"
|
||||
"void main()\n"
|
||||
"{\n"
|
||||
" gl_Position = MVP * vec4(vPos, 0.0, 1.0);\n"
|
||||
" color = vCol;\n"
|
||||
"}\n";
|
||||
|
||||
static const char* fragment_shader_text =
|
||||
"#version 110\n"
|
||||
"varying vec3 color;\n"
|
||||
"void main()\n"
|
||||
"{\n"
|
||||
" gl_FragColor = vec4(color, 1.0);\n"
|
||||
"}\n";
|
||||
|
||||
static void error_callback(int error, const char* description)
|
||||
{
|
||||
fprintf(stderr, "Error: %s\n", description);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
GLFWwindow* window;
|
||||
GLuint vertex_buffer, vertex_shader, fragment_shader, program;
|
||||
GLint mvp_location, vpos_location, vcol_location;
|
||||
float ratio;
|
||||
int width, height;
|
||||
mat4x4 mvp;
|
||||
char* buffer;
|
||||
|
||||
glfwSetErrorCallback(error_callback);
|
||||
|
||||
glfwInitHint(GLFW_COCOA_MENUBAR, GLFW_FALSE);
|
||||
|
||||
if (!glfwInit())
|
||||
exit(EXIT_FAILURE);
|
||||
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
|
||||
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
|
||||
|
||||
window = glfwCreateWindow(640, 480, "Simple example", NULL, NULL);
|
||||
if (!window)
|
||||
{
|
||||
glfwTerminate();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
glfwMakeContextCurrent(window);
|
||||
gladLoadGL(glfwGetProcAddress);
|
||||
|
||||
// NOTE: OpenGL error checks have been omitted for brevity
|
||||
|
||||
glGenBuffers(1, &vertex_buffer);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer);
|
||||
glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
|
||||
|
||||
vertex_shader = glCreateShader(GL_VERTEX_SHADER);
|
||||
glShaderSource(vertex_shader, 1, &vertex_shader_text, NULL);
|
||||
glCompileShader(vertex_shader);
|
||||
|
||||
fragment_shader = glCreateShader(GL_FRAGMENT_SHADER);
|
||||
glShaderSource(fragment_shader, 1, &fragment_shader_text, NULL);
|
||||
glCompileShader(fragment_shader);
|
||||
|
||||
program = glCreateProgram();
|
||||
glAttachShader(program, vertex_shader);
|
||||
glAttachShader(program, fragment_shader);
|
||||
glLinkProgram(program);
|
||||
|
||||
mvp_location = glGetUniformLocation(program, "MVP");
|
||||
vpos_location = glGetAttribLocation(program, "vPos");
|
||||
vcol_location = glGetAttribLocation(program, "vCol");
|
||||
|
||||
glEnableVertexAttribArray(vpos_location);
|
||||
glVertexAttribPointer(vpos_location, 2, GL_FLOAT, GL_FALSE,
|
||||
sizeof(vertices[0]), (void*) 0);
|
||||
glEnableVertexAttribArray(vcol_location);
|
||||
glVertexAttribPointer(vcol_location, 3, GL_FLOAT, GL_FALSE,
|
||||
sizeof(vertices[0]), (void*) (sizeof(float) * 2));
|
||||
|
||||
glfwGetFramebufferSize(window, &width, &height);
|
||||
ratio = width / (float) height;
|
||||
|
||||
glViewport(0, 0, width, height);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
mat4x4_ortho(mvp, -ratio, ratio, -1.f, 1.f, 1.f, -1.f);
|
||||
|
||||
glUseProgram(program);
|
||||
glUniformMatrix4fv(mvp_location, 1, GL_FALSE, (const GLfloat*) mvp);
|
||||
glDrawArrays(GL_TRIANGLES, 0, 3);
|
||||
glFinish();
|
||||
|
||||
buffer = calloc(4, width * height);
|
||||
glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
|
||||
|
||||
// Write image Y-flipped because OpenGL
|
||||
stbi_write_png("offscreen.png",
|
||||
width, height, 4,
|
||||
buffer + (width * 4 * (height - 1)),
|
||||
-width * 4);
|
||||
|
||||
free(buffer);
|
||||
|
||||
glfwDestroyWindow(window);
|
||||
|
||||
glfwTerminate();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user