Compare commits
697 Commits
mesa_7_1_r
...
mesa_7_1
Author | SHA1 | Date | |
---|---|---|---|
|
6d9b25e522 | ||
|
31bad23f0f | ||
|
29b9b25e72 | ||
|
e794f496c6 | ||
|
68067c66d3 | ||
|
ad5474e995 | ||
|
7c81124d7c | ||
|
a35002c167 | ||
|
6f4fd3a432 | ||
|
be30fddc7c | ||
|
1a244cd9e2 | ||
|
687cd467b3 | ||
|
021ce883e6 | ||
|
3a94b25538 | ||
|
495c02262e | ||
|
8f1d5ca086 | ||
|
8434c65bb9 | ||
|
8b51278134 | ||
|
e206034863 | ||
|
fb36a54a1c | ||
|
145f5f60f1 | ||
|
2848b55ed5 | ||
|
9cc13eba3e | ||
|
ce61660ab9 | ||
|
b17b110716 | ||
|
a667d67cd6 | ||
|
7855ea2af2 | ||
|
12e84a8b84 | ||
|
e438827dec | ||
|
6a00625fbb | ||
|
c5d25c8509 | ||
|
b7ff70e16a | ||
|
567d87744a | ||
|
5d762e1613 | ||
|
35479fd4b4 | ||
|
7970b2a908 | ||
|
c0dd9122fd | ||
|
ce00d232f3 | ||
|
db1103ebe8 | ||
|
1f4997c2aa | ||
|
1b39b92e6d | ||
|
37f452096b | ||
|
2e79b491fc | ||
|
57acb0fad9 | ||
|
505606349e | ||
|
b9c6f2b133 | ||
|
60b92129b1 | ||
|
f911ca0834 | ||
|
98e7c1cf38 | ||
|
c61f4e2cce | ||
|
8c51e0002a | ||
|
7536f39622 | ||
|
d80d0bb4d6 | ||
|
3a428aca93 | ||
|
ac0d19601c | ||
|
1724334d7c | ||
|
53675e5c05 | ||
|
d2796939f1 | ||
|
527e1cf172 | ||
|
501338d70e | ||
|
919ec22ecf | ||
|
ec770150ed | ||
|
01ac4540f0 | ||
|
ee8dfdf4c9 | ||
|
523ee3ddbe | ||
|
5f46093938 | ||
|
fb71a48413 | ||
|
f1e4ca776f | ||
|
c20a173656 | ||
|
8e8019b49a | ||
|
a3024caff1 | ||
|
62fb5f7b9a | ||
|
61b3ce8f97 | ||
|
ded9414024 | ||
|
e9bf3e4cc9 | ||
|
c9120a0d19 | ||
|
3e8e292db0 | ||
|
b068ab62a0 | ||
|
1bdb134570 | ||
|
40f7e5f674 | ||
|
ff916d718a | ||
|
016701f686 | ||
|
b26a80aa12 | ||
|
a7dd701421 | ||
|
6045f17138 | ||
|
a75015ef03 | ||
|
1638edb325 | ||
|
6225e51a73 | ||
|
d9b6425e00 | ||
|
91e1918f48 | ||
|
6f1abb9c21 | ||
|
1b465f287f | ||
|
16dc993d4f | ||
|
3d500f00d2 | ||
|
56bac7a35c | ||
|
5d9b33095a | ||
|
d4c73c619a | ||
|
01c0558f70 | ||
|
fb3422a241 | ||
|
7af8dddf27 | ||
|
a9412ca2e8 | ||
|
b36749d066 | ||
|
b7eea9a1ce | ||
|
ff9b6a0ae2 | ||
|
65db8c9518 | ||
|
19d44b95fe | ||
|
be50c48101 | ||
|
bc985b5790 | ||
|
ffbc66bf61 | ||
|
74a19b0abd | ||
|
38a62ede6c | ||
|
378017417a | ||
|
f45ed0eb8d | ||
|
5bfbcf7265 | ||
|
c3ad176158 | ||
|
153407f72d | ||
|
527e1357b5 | ||
|
1a5c99f4b5 | ||
|
44c7f37b44 | ||
|
b5095ab97f | ||
|
57aea290e1 | ||
|
c1fb448ce8 | ||
|
c117d0efd2 | ||
|
e88be7d375 | ||
|
322677b878 | ||
|
0973d348d7 | ||
|
1bdf5e09a0 | ||
|
902e401a38 | ||
|
85e44fcd51 | ||
|
477fa8fe12 | ||
|
1e645b3659 | ||
|
e5022c3fdf | ||
|
ff60e3fa03 | ||
|
9bc9e0ecb0 | ||
|
04c98089d1 | ||
|
d4244683a6 | ||
|
94979950e8 | ||
|
948f6e302c | ||
|
d8ababdcc2 | ||
|
51bfb6aa99 | ||
|
9a4be9785f | ||
|
6118d830a6 | ||
|
7c2d7f8cf5 | ||
|
9dd73d58ae | ||
|
117533759f | ||
|
2e37143800 | ||
|
d2d5abfaeb | ||
|
f0ca917924 | ||
|
1c8791c581 | ||
|
bdaa06ad63 | ||
|
97988ccc46 | ||
|
b993d539a7 | ||
|
77497eb73b | ||
|
99fe0c222c | ||
|
776c60d3c3 | ||
|
b4b7326717 | ||
|
3bfedb7ed4 | ||
|
73b8ee4121 | ||
|
d9f4d04111 | ||
|
f49d345a51 | ||
|
0138435643 | ||
|
33a25729e8 | ||
|
082cde143b | ||
|
29cb89d0c2 | ||
|
442c195c4a | ||
|
7d13dded5c | ||
|
b7c54945fe | ||
|
ece7183ff1 | ||
|
4c6dcbf091 | ||
|
e6218d071d | ||
|
546c7fb221 | ||
|
461e178806 | ||
|
716f70d782 | ||
|
b0d173f405 | ||
|
8c653f6e09 | ||
|
7d7d114e59 | ||
|
a5f02368d2 | ||
|
27e3f7f21d | ||
|
67108adb48 | ||
|
f214a848ab | ||
|
946abd9b5a | ||
|
c62cb6be6c | ||
|
4430597bf6 | ||
|
0a7df3794c | ||
|
f7eb0cec69 | ||
|
a63b90712a | ||
|
62db707a3d | ||
|
5e600209f4 | ||
|
93115c4b23 | ||
|
4fab47b13c | ||
|
e81ba58bf4 | ||
|
3b8081603b | ||
|
db072baaaf | ||
|
4f5d97ee9e | ||
|
9eee7f260f | ||
|
bfb27b5fc0 | ||
|
2d766923c4 | ||
|
cf0ae102db | ||
|
8774fcd89a | ||
|
11d711df36 | ||
|
b6765c3499 | ||
|
d8d086c20b | ||
|
7904c9fad4 | ||
|
2e841880cf | ||
|
b0ef353b46 | ||
|
6c44c6d020 | ||
|
99803a4ec9 | ||
|
e97ab72b59 | ||
|
b52398571b | ||
|
ac05da56ec | ||
|
4ca0af1882 | ||
|
a2e435054c | ||
|
75e4db1804 | ||
|
2f1b5ffcda | ||
|
e4d9cc94b8 | ||
|
ee2a101123 | ||
|
7d3feef9d6 | ||
|
2be54a8e8c | ||
|
44029f15a8 | ||
|
6fe7857629 | ||
|
c71fa34728 | ||
|
fd6cb1b11d | ||
|
d14b7890a4 | ||
|
477d597df6 | ||
|
92c075eeb7 | ||
|
a36bf890e8 | ||
|
e6e4f25aa5 | ||
|
11ac5b2456 | ||
|
056689d457 | ||
|
2b2cb56656 | ||
|
4746752f16 | ||
|
03abd021f2 | ||
|
62bccd6df0 | ||
|
77fdfaa23a | ||
|
364d45a3e1 | ||
|
dea8719f00 | ||
|
85b46fbe9c | ||
|
13c44679ad | ||
|
09e587fcf3 | ||
|
82635aad42 | ||
|
e187627c1d | ||
|
845e3f701d | ||
|
1f4d0748ba | ||
|
e06565b103 | ||
|
b931a0c1d9 | ||
|
9157b1e09a | ||
|
0c1e96e6d3 | ||
|
530df581dd | ||
|
011185396b | ||
|
3dc6591a7c | ||
|
7acb7c1ac0 | ||
|
d866cb3712 | ||
|
7f4f2ac39d | ||
|
6e46c121f9 | ||
|
1dc20c7916 | ||
|
b3e1f9bd52 | ||
|
1726b7d1d3 | ||
|
cb79c5c7c6 | ||
|
36a5826411 | ||
|
a405d69063 | ||
|
a2cddf58d2 | ||
|
def6e4f420 | ||
|
918f3b17e5 | ||
|
18adc71822 | ||
|
5ef4e4ffb8 | ||
|
a995bdced2 | ||
|
4b3ed4d2d1 | ||
|
19f585a3cf | ||
|
6befdca6a3 | ||
|
43346fb1fb | ||
|
ea190fe050 | ||
|
abd71144f0 | ||
|
21e0d47514 | ||
|
c52d6ad465 | ||
|
028739faed | ||
|
e19af171cf | ||
|
9ae4d778d8 | ||
|
e74f54793e | ||
|
32a5c40336 | ||
|
b2247c7d29 | ||
|
011b0e51e4 | ||
|
2ce4b985a5 | ||
|
634d2af2b0 | ||
|
d3f7b463c3 | ||
|
bcc2a3d7e3 | ||
|
5cae1b747b | ||
|
bb1744970d | ||
|
23e9b43ce4 | ||
|
4002b75e62 | ||
|
a74d22ba71 | ||
|
543893eefd | ||
|
0918023c28 | ||
|
bc775066aa | ||
|
6cb1270491 | ||
|
b429e9b2d7 | ||
|
f6da1453c5 | ||
|
985e1cdfe8 | ||
|
f059a33022 | ||
|
93f701bc36 | ||
|
3b132b297f | ||
|
f6abe8f0f2 | ||
|
5174b85a0c | ||
|
9a0d773116 | ||
|
744357e29c | ||
|
f5eb62a116 | ||
|
f23adc504d | ||
|
90d33edf37 | ||
|
eda68cccc0 | ||
|
5989098779 | ||
|
98fa0aec36 | ||
|
a42dac1879 | ||
|
62d66caeba | ||
|
fe3b62b5b1 | ||
|
5aa4d5a87d | ||
|
7ec5e6a032 | ||
|
71d2578ac5 | ||
|
ba97ed2b74 | ||
|
cc96d54920 | ||
|
37f19b94ac | ||
|
402e7f76b1 | ||
|
5ee7b7912c | ||
|
055ab81920 | ||
|
24197b4901 | ||
|
7899270b9f | ||
|
2e922b0e35 | ||
|
2c1bead069 | ||
|
77d917a74a | ||
|
e1f9adc274 | ||
|
f30e4af734 | ||
|
1043a7c71a | ||
|
4ba39c40ae | ||
|
3491cbea88 | ||
|
dc25661099 | ||
|
b3f1aac95e | ||
|
21177c8764 | ||
|
0da9bc6a69 | ||
|
bbe80af457 | ||
|
654258a4fe | ||
|
cf29ab3ba0 | ||
|
3e8aadee8b | ||
|
3064069540 | ||
|
64adeb163d | ||
|
e2baf564d1 | ||
|
5b5bf21874 | ||
|
51ad6e3425 | ||
|
a1523c61ea | ||
|
27b7f896d4 | ||
|
e9d1889891 | ||
|
ec2d0decbd | ||
|
bbce58802d | ||
|
588abd6696 | ||
|
1738a9a535 | ||
|
776580a6af | ||
|
f7b8a13d65 | ||
|
6e6ca40f29 | ||
|
4fc66be296 | ||
|
f1ae5d4b44 | ||
|
7413c55d93 | ||
|
43da118961 | ||
|
825fdfd0c1 | ||
|
b97e48ffe3 | ||
|
69004fb758 | ||
|
0a341ef296 | ||
|
9704414d13 | ||
|
a1c0c56d70 | ||
|
83ad2a756e | ||
|
2882e51625 | ||
|
e34dc8227c | ||
|
b5170bc9d3 | ||
|
e2aa45c2f9 | ||
|
caeabb1ebe | ||
|
4ba1c7d848 | ||
|
defadd9c03 | ||
|
b7669e4a86 | ||
|
4919cc3a2c | ||
|
b1056b6127 | ||
|
1087cc61b3 | ||
|
7ffb1230b3 | ||
|
341987f688 | ||
|
4297413656 | ||
|
95b34baa8f | ||
|
928ec5cd3b | ||
|
53f5b9741a | ||
|
effb73befa | ||
|
19659a50f9 | ||
|
2542c59c55 | ||
|
74964ff04d | ||
|
0440f5a187 | ||
|
41bdb88f27 | ||
|
2b0e75ea7a | ||
|
3f3e4f645d | ||
|
8d976aedc4 | ||
|
407ce3da3c | ||
|
0227d91a9e | ||
|
9563449c14 | ||
|
c233b4245f | ||
|
17ec0dbd75 | ||
|
fbb96a0301 | ||
|
a742bed99a | ||
|
72f87b6947 | ||
|
f6246f85d7 | ||
|
910b3bfaeb | ||
|
a80ccaadc7 | ||
|
08c07b60be | ||
|
376203cff8 | ||
|
5cf69fe511 | ||
|
906e189bd3 | ||
|
0793457039 | ||
|
4c7e02298f | ||
|
0009973119 | ||
|
f440b0ddd9 | ||
|
28c28f72fd | ||
|
21f50818b0 | ||
|
cb16876608 | ||
|
7cb63a25de | ||
|
731686b713 | ||
|
75bfe630ff | ||
|
bf1a7c884d | ||
|
5e58e5d777 | ||
|
f39780242e | ||
|
ae18cbcfc5 | ||
|
9286a14fbe | ||
|
fa1bc0d7d6 | ||
|
f5d03af109 | ||
|
03a1144cd1 | ||
|
665605234d | ||
|
0b72fada6a | ||
|
1d5b51abc8 | ||
|
bde6b57e48 | ||
|
847f54e2fa | ||
|
dd750e0763 | ||
|
358dcd7178 | ||
|
04c6ca99dd | ||
|
c9739b2055 | ||
|
f8563ddddb | ||
|
b55694512a | ||
|
4a68b62b86 | ||
|
e89e94e01a | ||
|
2b84b22bad | ||
|
ea7eb9a374 | ||
|
bf5e573926 | ||
|
f8c6b6628d | ||
|
18906b7904 | ||
|
91b491debe | ||
|
b2a9788ec6 | ||
|
4c7a17c251 | ||
|
6d9c3fa0c2 | ||
|
c35e021f37 | ||
|
c5342ad0d0 | ||
|
028fd5594c | ||
|
871125a68d | ||
|
0d8676822d | ||
|
f34767f04c | ||
|
9e95fad02e | ||
|
dbf3c5247c | ||
|
0b734bd7cf | ||
|
4b5b008d54 | ||
|
f688827ebd | ||
|
96adcc2e21 | ||
|
934a53eb44 | ||
|
7ead1c5d06 | ||
|
915e49e0fd | ||
|
c9ea62444c | ||
|
d9c7c5f071 | ||
|
3225e2cdb6 | ||
|
9a34c68faf | ||
|
bffa0909cb | ||
|
ea58dceb1c | ||
|
c9679ce1d2 | ||
|
7013eecf28 | ||
|
a947c1a3fe | ||
|
fccc427aac | ||
|
4a69c4173d | ||
|
ef56a563a1 | ||
|
1190261c47 | ||
|
645c131264 | ||
|
a1a0e51043 | ||
|
328621509f | ||
|
377016d728 | ||
|
d8395f9d9e | ||
|
74a217fbcd | ||
|
5adc763898 | ||
|
5429d4a04a | ||
|
3e6c791390 | ||
|
261a15cf63 | ||
|
85af4fde7f | ||
|
867f5aac53 | ||
|
5552500cdf | ||
|
8c39e24ec3 | ||
|
a242b331c6 | ||
|
9412aee4dc | ||
|
eee53dfb22 | ||
|
7278266612 | ||
|
774b3bc5a5 | ||
|
4af22c9076 | ||
|
8eb7df6302 | ||
|
b5372746ff | ||
|
9f03e93de9 | ||
|
7b88f40116 | ||
|
5a5ba35069 | ||
|
b57ba7c5b0 | ||
|
5499685931 | ||
|
a2db33219d | ||
|
924eaa2f95 | ||
|
21b352bb14 | ||
|
8ba91b4636 | ||
|
27d8fcd506 | ||
|
f776f693c0 | ||
|
594760148c | ||
|
bd74d2aa26 | ||
|
810270ad11 | ||
|
f1d04cd766 | ||
|
b6b5190682 | ||
|
6f918a9fda | ||
|
af77de66d9 | ||
|
e9031d6f63 | ||
|
200fd13d4a | ||
|
a74bf4ef34 | ||
|
9ab7a2df03 | ||
|
30e61500e1 | ||
|
34010bcc91 | ||
|
d4e93864b8 | ||
|
6cefae5354 | ||
|
76286bc76c | ||
|
a01816da59 | ||
|
4f9dcdc35b | ||
|
0dfbe9cdd7 | ||
|
d06f4edb14 | ||
|
1e2907f170 | ||
|
bb57c30a53 | ||
|
b453b0e2e1 | ||
|
9ec2b1c83f | ||
|
2bda1a9502 | ||
|
94994b13c5 | ||
|
78fa506059 | ||
|
f0d76d526b | ||
|
2005de48f9 | ||
|
282cdc8b5c | ||
|
476248befe | ||
|
03b3fed8f1 | ||
|
ac315792bf | ||
|
60b8e1f524 | ||
|
cddab021e3 | ||
|
c60bdcf8a8 | ||
|
2708d7f700 | ||
|
a6c38f2f64 | ||
|
2225b9bdb0 | ||
|
bdfd5d95c5 | ||
|
8b49cc104d | ||
|
126673261d | ||
|
0910d9d4d6 | ||
|
c57b3b1d2c | ||
|
6dd3c0ed96 | ||
|
16cc362f0b | ||
|
c11a33fe76 | ||
|
d5aa421661 | ||
|
405ee871c5 | ||
|
0de02f1716 | ||
|
d8529d9b00 | ||
|
5e075fb809 | ||
|
ba50c3fed3 | ||
|
791c95230c | ||
|
d6333af7e9 | ||
|
9aa62c7238 | ||
|
76f32499d2 | ||
|
a0bc6d2fb2 | ||
|
73af48fff5 | ||
|
c9d5d11d2d | ||
|
412c850eab | ||
|
350c80fa99 | ||
|
e1bffd0318 | ||
|
10e0a36a49 | ||
|
375656440b | ||
|
f86baae1a7 | ||
|
de3fc8b1c4 | ||
|
c5b7a1ee3c | ||
|
cba90d4a77 | ||
|
8d70181b03 | ||
|
d09aa2138b | ||
|
9ef4126d48 | ||
|
0cc8ed5ccc | ||
|
e000f2ab6e | ||
|
2a4d1085cb | ||
|
145523ba3a | ||
|
0cb006c1fd | ||
|
fda5687241 | ||
|
68a9161832 | ||
|
ead798eb10 | ||
|
ab50ddaa91 | ||
|
8b2a7f08bc | ||
|
3d15280278 | ||
|
53a7ccc08b | ||
|
1da094c9ad | ||
|
49c30ce958 | ||
|
dc24fb51a3 | ||
|
c75b2d74d8 | ||
|
a2ec8570ae | ||
|
40db59038c | ||
|
20baf128ef | ||
|
42d4f89264 | ||
|
96f52f089f | ||
|
1562dd2c26 | ||
|
fa465fb2b1 | ||
|
171ba1d0d1 | ||
|
06e2e1b87c | ||
|
537bbe6dec | ||
|
df4b49c2ce | ||
|
e9a2a67745 | ||
|
1decab06d1 | ||
|
01d1a292bf | ||
|
be59d52ca0 | ||
|
5290ec4756 | ||
|
1f810b85b1 | ||
|
87ccc03736 | ||
|
367b1e35dc | ||
|
66a49df9cb | ||
|
697680d687 | ||
|
3816ae9ce8 | ||
|
1f420b008b | ||
|
66a5562ce2 | ||
|
63503f2848 | ||
|
b79a769b2d | ||
|
4ef195a369 | ||
|
0f07e0aea3 | ||
|
a03e261193 | ||
|
d3eb5df259 | ||
|
37924cf175 | ||
|
cea4f1464b | ||
|
026ef8111a | ||
|
e081603850 | ||
|
81ec0545c9 | ||
|
3d19a095cd | ||
|
7349f218b4 | ||
|
ef33e76ceb | ||
|
568d369d77 | ||
|
92a0e93ac3 | ||
|
eb10cdc838 | ||
|
89bba44e96 | ||
|
ae09292a6e | ||
|
9a82fde43a | ||
|
9e7ae34da5 | ||
|
a94cd0d774 | ||
|
d5448ceb95 | ||
|
e61dadf3de | ||
|
2bd26f4afa | ||
|
e3721a3b3f | ||
|
831fc138c1 | ||
|
28904e54d2 | ||
|
de9c1c3627 | ||
|
fbab11e9b0 | ||
|
6864220c28 | ||
|
3b7c5bfb98 | ||
|
6443da0865 | ||
|
c07534dc71 | ||
|
c0cb9bc84c | ||
|
a453b3154e | ||
|
ed1584aed8 | ||
|
5a143e91dc | ||
|
8aa98a409b | ||
|
b15c49e59b | ||
|
029cb1fd0f | ||
|
b5246de562 | ||
|
6e96ea535a | ||
|
c02d1863d1 | ||
|
d06e61aa80 | ||
|
a3996ba2d1 | ||
|
8e33a83b68 | ||
|
70335540c6 | ||
|
14c3bdb3f7 | ||
|
e46c3d7bcf | ||
|
99e75135ee | ||
|
9d9f66cc8d | ||
|
a87914993d | ||
|
55418dc87d | ||
|
2ffa112ed3 | ||
|
cd66f0e2d9 | ||
|
1226aba119 | ||
|
25d9f2dd24 | ||
|
734ef96d5f | ||
|
db1fc51ccc | ||
|
45077fc323 | ||
|
279ea105d8 | ||
|
f25b37c1da | ||
|
44791e2d78 | ||
|
eff6f12032 | ||
|
09df5eaff2 | ||
|
9566cf0e2f | ||
|
4feac4e40e | ||
|
583ed4bde3 | ||
|
3eb8e5871f | ||
|
ed18005a99 | ||
|
d019f101e8 | ||
|
2b8e422b31 | ||
|
9e6e4ae49a | ||
|
57028236c8 | ||
|
1c71ec4d45 | ||
|
5da8289e9c |
19
Makefile
19
Makefile
@@ -174,10 +174,10 @@ ultrix-gcc:
|
|||||||
|
|
||||||
# Rules for making release tarballs
|
# Rules for making release tarballs
|
||||||
|
|
||||||
DIRECTORY = Mesa-7.1-rc1
|
DIRECTORY = Mesa-7.1
|
||||||
LIB_NAME = MesaLib-7.1-rc1
|
LIB_NAME = MesaLib-7.1
|
||||||
DEMO_NAME = MesaDemos-7.1-rc1
|
DEMO_NAME = MesaDemos-7.1
|
||||||
GLUT_NAME = MesaGLUT-7.1-rc1
|
GLUT_NAME = MesaGLUT-7.1
|
||||||
|
|
||||||
MAIN_FILES = \
|
MAIN_FILES = \
|
||||||
$(DIRECTORY)/Makefile* \
|
$(DIRECTORY)/Makefile* \
|
||||||
@@ -192,6 +192,7 @@ MAIN_FILES = \
|
|||||||
$(DIRECTORY)/bin/install-sh \
|
$(DIRECTORY)/bin/install-sh \
|
||||||
$(DIRECTORY)/bin/mklib \
|
$(DIRECTORY)/bin/mklib \
|
||||||
$(DIRECTORY)/bin/minstall \
|
$(DIRECTORY)/bin/minstall \
|
||||||
|
$(DIRECTORY)/bin/version.mk \
|
||||||
$(DIRECTORY)/configs/[a-z]* \
|
$(DIRECTORY)/configs/[a-z]* \
|
||||||
$(DIRECTORY)/docs/*.html \
|
$(DIRECTORY)/docs/*.html \
|
||||||
$(DIRECTORY)/docs/COPYING \
|
$(DIRECTORY)/docs/COPYING \
|
||||||
@@ -257,6 +258,7 @@ MAIN_FILES = \
|
|||||||
$(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \
|
$(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \
|
||||||
$(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \
|
$(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \
|
||||||
$(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \
|
$(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \
|
||||||
|
$(DIRECTORY)/src/mesa/drivers/Makefile \
|
||||||
$(DIRECTORY)/src/mesa/drivers/beos/*.cpp \
|
$(DIRECTORY)/src/mesa/drivers/beos/*.cpp \
|
||||||
$(DIRECTORY)/src/mesa/drivers/beos/Makefile \
|
$(DIRECTORY)/src/mesa/drivers/beos/Makefile \
|
||||||
$(DIRECTORY)/src/mesa/drivers/common/*.[ch] \
|
$(DIRECTORY)/src/mesa/drivers/common/*.[ch] \
|
||||||
@@ -264,6 +266,7 @@ MAIN_FILES = \
|
|||||||
$(DIRECTORY)/src/mesa/drivers/directfb/*.[ch] \
|
$(DIRECTORY)/src/mesa/drivers/directfb/*.[ch] \
|
||||||
$(DIRECTORY)/src/mesa/drivers/directfb/Makefile \
|
$(DIRECTORY)/src/mesa/drivers/directfb/Makefile \
|
||||||
$(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \
|
$(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \
|
||||||
|
$(DIRECTORY)/src/mesa/drivers/fbdev/Makefile \
|
||||||
$(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \
|
$(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \
|
||||||
$(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \
|
$(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \
|
||||||
$(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \
|
$(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \
|
||||||
@@ -273,6 +276,7 @@ MAIN_FILES = \
|
|||||||
$(DIRECTORY)/src/mesa/drivers/ggi/display/*.c \
|
$(DIRECTORY)/src/mesa/drivers/ggi/display/*.c \
|
||||||
$(DIRECTORY)/src/mesa/drivers/ggi/display/fbdev.conf.in \
|
$(DIRECTORY)/src/mesa/drivers/ggi/display/fbdev.conf.in \
|
||||||
$(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/mesa/*.h \
|
$(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/mesa/*.h \
|
||||||
|
$(DIRECTORY)/src/mesa/drivers/osmesa/Makefile \
|
||||||
$(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \
|
$(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \
|
||||||
$(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms \
|
$(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms \
|
||||||
$(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \
|
$(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \
|
||||||
@@ -280,6 +284,7 @@ MAIN_FILES = \
|
|||||||
$(DIRECTORY)/src/mesa/drivers/svga/*.[ch] \
|
$(DIRECTORY)/src/mesa/drivers/svga/*.[ch] \
|
||||||
$(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \
|
$(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \
|
||||||
$(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
|
$(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
|
||||||
|
$(DIRECTORY)/src/mesa/drivers/x11/Makefile \
|
||||||
$(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
|
$(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
|
||||||
$(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
|
$(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
|
||||||
$(DIRECTORY)/src/mesa/ppc/*.[ch] \
|
$(DIRECTORY)/src/mesa/ppc/*.[ch] \
|
||||||
@@ -316,6 +321,7 @@ DRI_FILES = \
|
|||||||
$(DIRECTORY)/src/glx/x11/*.[ch] \
|
$(DIRECTORY)/src/glx/x11/*.[ch] \
|
||||||
$(DIRECTORY)/src/mesa/drivers/dri/Makefile \
|
$(DIRECTORY)/src/mesa/drivers/dri/Makefile \
|
||||||
$(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
|
$(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
|
||||||
|
$(DIRECTORY)/src/mesa/drivers/dri/dri.pc.in \
|
||||||
$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.[ch] \
|
$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.[ch] \
|
||||||
$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \
|
$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \
|
||||||
$(DIRECTORY)/src/mesa/drivers/dri/*/*.[chS] \
|
$(DIRECTORY)/src/mesa/drivers/dri/*/*.[chS] \
|
||||||
@@ -334,6 +340,8 @@ SGI_GLU_FILES = \
|
|||||||
$(DIRECTORY)/src/glu/sgi/glu.def \
|
$(DIRECTORY)/src/glu/sgi/glu.def \
|
||||||
$(DIRECTORY)/src/glu/sgi/dummy.cc \
|
$(DIRECTORY)/src/glu/sgi/dummy.cc \
|
||||||
$(DIRECTORY)/src/glu/sgi/descrip.mms \
|
$(DIRECTORY)/src/glu/sgi/descrip.mms \
|
||||||
|
$(DIRECTORY)/src/glu/sgi/glu.exports \
|
||||||
|
$(DIRECTORY)/src/glu/sgi/glu.exports.darwin \
|
||||||
$(DIRECTORY)/src/glu/sgi/mesaglu.opt \
|
$(DIRECTORY)/src/glu/sgi/mesaglu.opt \
|
||||||
$(DIRECTORY)/src/glu/sgi/include/gluos.h \
|
$(DIRECTORY)/src/glu/sgi/include/gluos.h \
|
||||||
$(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h \
|
$(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h \
|
||||||
@@ -389,7 +397,8 @@ DEMO_FILES = \
|
|||||||
$(DIRECTORY)/progs/samples/*.c \
|
$(DIRECTORY)/progs/samples/*.c \
|
||||||
$(DIRECTORY)/progs/glsl/Makefile* \
|
$(DIRECTORY)/progs/glsl/Makefile* \
|
||||||
$(DIRECTORY)/progs/glsl/*.c \
|
$(DIRECTORY)/progs/glsl/*.c \
|
||||||
$(DIRECTORY)/progs/glsl/*.txt \
|
$(DIRECTORY)/progs/glsl/*.frag \
|
||||||
|
$(DIRECTORY)/progs/glsl/*.vert \
|
||||||
$(DIRECTORY)/progs/windml/Makefile.ugl \
|
$(DIRECTORY)/progs/windml/Makefile.ugl \
|
||||||
$(DIRECTORY)/progs/windml/*.c \
|
$(DIRECTORY)/progs/windml/*.c \
|
||||||
$(DIRECTORY)/progs/windml/*.bmp \
|
$(DIRECTORY)/progs/windml/*.bmp \
|
||||||
|
@@ -42,6 +42,8 @@ if [ $# -ge 2 ] ; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PWDSAVE=`pwd`
|
||||||
|
|
||||||
# determine file's type
|
# determine file's type
|
||||||
if [ -h "$FILE" ] ; then
|
if [ -h "$FILE" ] ; then
|
||||||
#echo $FILE is a symlink
|
#echo $FILE is a symlink
|
||||||
@@ -57,7 +59,6 @@ if [ $# -ge 2 ] ; then
|
|||||||
|
|
||||||
FILE=`basename "$FILE"`
|
FILE=`basename "$FILE"`
|
||||||
# Go to $DEST and make the link
|
# Go to $DEST and make the link
|
||||||
PWDSAVE="$PWD"
|
|
||||||
cd "$DEST" # pushd
|
cd "$DEST" # pushd
|
||||||
$RM "$FILE"
|
$RM "$FILE"
|
||||||
$SYMLINK "$TARGET" "$FILE"
|
$SYMLINK "$TARGET" "$FILE"
|
||||||
|
40
bin/mklib
40
bin/mklib
@@ -43,7 +43,7 @@ ARCH="auto"
|
|||||||
ARCHOPT=""
|
ARCHOPT=""
|
||||||
NOPREFIX=0
|
NOPREFIX=0
|
||||||
EXPORTS=""
|
EXPORTS=""
|
||||||
|
ID=""
|
||||||
|
|
||||||
#
|
#
|
||||||
# Parse arguments
|
# Parse arguments
|
||||||
@@ -61,7 +61,8 @@ do
|
|||||||
echo ' -minor N specifies minor version number (default is 0)'
|
echo ' -minor N specifies minor version number (default is 0)'
|
||||||
echo ' -patch N specifies patch version number (default is 0)'
|
echo ' -patch N specifies patch version number (default is 0)'
|
||||||
echo ' -lLIBRARY specifies a dependency on LIBRARY'
|
echo ' -lLIBRARY specifies a dependency on LIBRARY'
|
||||||
echo ' -LDIR search in DIR for library dependencies'
|
echo ' -LDIR search in DIR for library dependencies at build time'
|
||||||
|
echo ' -RDIR search in DIR for library dependencies at run time'
|
||||||
echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
|
echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
|
||||||
echo ' Not observed on all systems at this time.'
|
echo ' Not observed on all systems at this time.'
|
||||||
echo ' -ldflags OPT specify any additional linker flags in OPT'
|
echo ' -ldflags OPT specify any additional linker flags in OPT'
|
||||||
@@ -74,6 +75,7 @@ do
|
|||||||
echo ' -altopts OPTS alternate options to override all others'
|
echo ' -altopts OPTS alternate options to override all others'
|
||||||
echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
|
echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
|
||||||
echo ' -exports FILE only export the symbols listed in FILE'
|
echo ' -exports FILE only export the symbols listed in FILE'
|
||||||
|
echo ' -id NAME Sets the id of the dylib (Darwin)'
|
||||||
echo ' -h, --help display this information and exit'
|
echo ' -h, --help display this information and exit'
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
@@ -107,6 +109,9 @@ do
|
|||||||
-L*)
|
-L*)
|
||||||
DEPS="$DEPS $1"
|
DEPS="$DEPS $1"
|
||||||
;;
|
;;
|
||||||
|
-R*)
|
||||||
|
DEPS="$DEPS $1"
|
||||||
|
;;
|
||||||
-Wl*)
|
-Wl*)
|
||||||
DEPS="$DEPS $1"
|
DEPS="$DEPS $1"
|
||||||
;;
|
;;
|
||||||
@@ -149,6 +154,10 @@ do
|
|||||||
shift 1;
|
shift 1;
|
||||||
EXPORTS=$1
|
EXPORTS=$1
|
||||||
;;
|
;;
|
||||||
|
'-id')
|
||||||
|
shift 1;
|
||||||
|
ID=$1
|
||||||
|
;;
|
||||||
-*)
|
-*)
|
||||||
echo "mklib: Unknown option: " $1 ;
|
echo "mklib: Unknown option: " $1 ;
|
||||||
exit 1
|
exit 1
|
||||||
@@ -192,6 +201,7 @@ if [ ] ; then
|
|||||||
echo PATCH is $PATCH
|
echo PATCH is $PATCH
|
||||||
echo DEPS are $DEPS
|
echo DEPS are $DEPS
|
||||||
echo "EXPORTS in" $EXPORTS
|
echo "EXPORTS in" $EXPORTS
|
||||||
|
echo ID is $ID
|
||||||
echo "-----------------"
|
echo "-----------------"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -267,7 +277,7 @@ case $ARCH in
|
|||||||
if [ $EXPORTS ] ; then
|
if [ $EXPORTS ] ; then
|
||||||
#OPTS="${OPTS} -Xlinker --retain-symbols-file ${EXPORTS}"
|
#OPTS="${OPTS} -Xlinker --retain-symbols-file ${EXPORTS}"
|
||||||
# Make the 'exptmp' file for --version-script option
|
# Make the 'exptmp' file for --version-script option
|
||||||
echo "VERSION_${MAJOR}.${MINOR} {" > exptmp
|
echo "{" > exptmp
|
||||||
echo "global:" >> exptmp
|
echo "global:" >> exptmp
|
||||||
sed 's/$/;/' ${EXPORTS} >> exptmp
|
sed 's/$/;/' ${EXPORTS} >> exptmp
|
||||||
echo "local:" >> exptmp
|
echo "local:" >> exptmp
|
||||||
@@ -336,7 +346,7 @@ case $ARCH in
|
|||||||
# use g++
|
# use g++
|
||||||
LINK="g++"
|
LINK="g++"
|
||||||
else
|
else
|
||||||
echo "mklib: warning: can't find C++ comiler, trying CC."
|
echo "mklib: warning: can't find C++ compiler, trying CC."
|
||||||
LINK="CC"
|
LINK="CC"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -365,9 +375,11 @@ case $ARCH in
|
|||||||
# Check if objects are SPARC v9
|
# Check if objects are SPARC v9
|
||||||
# file says: ELF 64-bit MSB relocatable SPARCV9 Version 1
|
# file says: ELF 64-bit MSB relocatable SPARCV9 Version 1
|
||||||
set ${OBJECTS}
|
set ${OBJECTS}
|
||||||
SPARCV9=`file $1 | grep SPARCV9`
|
if [ ${LINK} = "cc" -o ${LINK} = "CC" ] ; then
|
||||||
if [ "${SPARCV9}" ] ; then
|
SPARCV9=`file $1 | grep SPARCV9`
|
||||||
OPTS="${OPTS} -xarch=v9"
|
if [ "${SPARCV9}" ] ; then
|
||||||
|
OPTS="${OPTS} -xarch=v9"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "${ALTOPTS}" ] ; then
|
if [ "${ALTOPTS}" ] ; then
|
||||||
OPTS=${ALTOPTS}
|
OPTS=${ALTOPTS}
|
||||||
@@ -379,7 +391,7 @@ case $ARCH in
|
|||||||
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||||
else
|
else
|
||||||
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
|
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
|
||||||
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
|
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} -h ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
|
||||||
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
|
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
|
||||||
fi
|
fi
|
||||||
FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
|
FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
|
||||||
@@ -624,13 +636,19 @@ case $ARCH in
|
|||||||
LIBSUFFIX="bundle"
|
LIBSUFFIX="bundle"
|
||||||
OPTS="${ARCHOPT} -bundle -multiply_defined suppress"
|
OPTS="${ARCHOPT} -bundle -multiply_defined suppress"
|
||||||
else
|
else
|
||||||
LIBSUFFIX="dylib"
|
LIBSUFFIX="dylib"
|
||||||
OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
|
if [ -z "$ID" ] ; then
|
||||||
|
ID="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
|
||||||
|
fi
|
||||||
|
OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name ${ID}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${EXPORTS} ] ; then
|
if [ ${EXPORTS} ] ; then
|
||||||
|
if [ -f ${EXPORTS}".darwin" ] ; then
|
||||||
|
EXPORTS=$EXPORTS".darwin"
|
||||||
|
fi
|
||||||
OPTS="${OPTS} -exported_symbols_list ${EXPORTS}"
|
OPTS="${OPTS} -exported_symbols_list ${EXPORTS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LINKNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
|
LINKNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
|
||||||
LINKNAME2="lib${LIBNAME}.${LIBSUFFIX}"
|
LINKNAME2="lib${LIBNAME}.${LIBSUFFIX}"
|
||||||
|
@@ -27,10 +27,10 @@ ASM_API = @ASM_API@
|
|||||||
|
|
||||||
# Misc tools and flags
|
# Misc tools and flags
|
||||||
MAKE = @MAKE@
|
MAKE = @MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
MKLIB_OPTIONS = @MKLIB_OPTIONS@
|
MKLIB_OPTIONS = @MKLIB_OPTIONS@
|
||||||
MKDEP = @MKDEP@
|
MKDEP = @MKDEP@
|
||||||
MKDEP_OPTIONS = @MKDEP_OPTIONS@
|
MKDEP_OPTIONS = @MKDEP_OPTIONS@
|
||||||
INSTALL = $(TOP)/bin/minstall
|
|
||||||
|
|
||||||
# Python and flags (generally only needed by the developers)
|
# Python and flags (generally only needed by the developers)
|
||||||
PYTHON2 = python
|
PYTHON2 = python
|
||||||
@@ -66,6 +66,10 @@ USING_EGL = @USING_EGL@
|
|||||||
# Dependencies
|
# Dependencies
|
||||||
X11_INCLUDES = @X11_INCLUDES@
|
X11_INCLUDES = @X11_INCLUDES@
|
||||||
|
|
||||||
|
# GLw motif setup
|
||||||
|
GLW_SOURCES = @GLW_SOURCES@
|
||||||
|
MOTIF_CFLAGS = @MOTIF_CFLAGS@
|
||||||
|
|
||||||
# Library/program dependencies
|
# Library/program dependencies
|
||||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) @GL_LIB_DEPS@
|
GL_LIB_DEPS = $(EXTRA_LIB_PATH) @GL_LIB_DEPS@
|
||||||
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @OSMESA_MESA_DEPS@ \
|
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @OSMESA_MESA_DEPS@ \
|
||||||
@@ -89,9 +93,12 @@ EXPAT_INCLUDES = @EXPAT_INCLUDES@
|
|||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
libdir = @libdir@
|
libdir = @libdir@
|
||||||
|
includedir = @includedir@
|
||||||
|
|
||||||
# Installation directories (for make install)
|
# Installation directories (for make install)
|
||||||
INSTALL_DIR = $(prefix)
|
INSTALL_DIR = $(prefix)
|
||||||
|
INSTALL_LIB_DIR = $(libdir)
|
||||||
|
INSTALL_INC_DIR = $(includedir)
|
||||||
|
|
||||||
# DRI installation directories
|
# DRI installation directories
|
||||||
DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@
|
DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@
|
||||||
|
@@ -4,22 +4,26 @@ include $(TOP)/configs/default
|
|||||||
|
|
||||||
CONFIG_NAME = darwin
|
CONFIG_NAME = darwin
|
||||||
|
|
||||||
DEFINES = -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \
|
INSTALL_DIR = /usr/X11
|
||||||
-D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE \
|
|
||||||
-DPTHREADS -DGLX_ALIAS_UNSUPPORTED -DGLX_INDIRECT_RENDERING
|
|
||||||
|
|
||||||
# Compiler and flags
|
# Compiler and flags
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CXX = gcc
|
CXX = gcc
|
||||||
CFLAGS = -I/usr/X11/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin $(DEFINES)
|
PIC_FLAGS = -fPIC
|
||||||
CXXFLAGS = -I/usr/X11/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin $(DEFINES)
|
DEFINES = -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \
|
||||||
|
-D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS \
|
||||||
|
-DGLX_INDIRECT_RENDERING \
|
||||||
|
-DGLX_ALIAS_UNSUPPORTED
|
||||||
|
|
||||||
CFLAGS += $(RC_CFLAGS)
|
# -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx/x11
|
||||||
CXXFLAGS += $(RC_CFLAGS)
|
# -DIN_DRI_DRIVER
|
||||||
|
|
||||||
# Work around aliasing bugs - developers should comment this out
|
ARCH_FLAGS += $(RC_CFLAGS)
|
||||||
CFLAGS += -fno-strict-aliasing
|
|
||||||
CXXFLAGS += -fno-strict-aliasing
|
CFLAGS = -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing \
|
||||||
|
-I$(INSTALL_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
||||||
|
CXXFLAGS = -g -O2 -Wall -fno-strict-aliasing \
|
||||||
|
-I$(INSTALL_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
||||||
|
|
||||||
# Library names (actual file names)
|
# Library names (actual file names)
|
||||||
GL_LIB_NAME = libGL.dylib
|
GL_LIB_NAME = libGL.dylib
|
||||||
@@ -28,13 +32,24 @@ GLUT_LIB_NAME = libglut.dylib
|
|||||||
GLW_LIB_NAME = libGLw.dylib
|
GLW_LIB_NAME = libGLw.dylib
|
||||||
OSMESA_LIB_NAME = libOSMesa.dylib
|
OSMESA_LIB_NAME = libOSMesa.dylib
|
||||||
|
|
||||||
GL_LIB_DEPS = -L/usr/X11/lib -lX11 -lXext -lm -lpthread
|
# globs used to install the lib and all symlinks
|
||||||
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
|
GL_LIB_GLOB = libGL.*dylib
|
||||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
|
GLU_LIB_GLOB = libGLU.*dylib
|
||||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext
|
GLUT_LIB_GLOB = libglut.*dylib
|
||||||
GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib
|
GLW_LIB_GLOB = libGLw.*dylib
|
||||||
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11/lib -lX11 -lXmu -lXt -lXi -lm
|
OSMESA_LIB_GLOB = libOSMesa.*dylib
|
||||||
|
|
||||||
|
GL_LIB_DEPS = -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXext -lm -lpthread
|
||||||
|
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
|
||||||
|
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
|
||||||
|
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXmu -lXi -lXext
|
||||||
|
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXt
|
||||||
|
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
|
||||||
|
|
||||||
# omit glw lib for now:
|
# omit glw lib for now:
|
||||||
SRC_DIRS = glx/x11 glu glut/glx mesa
|
SRC_DIRS = glx/x11 mesa glu glw glut/glx
|
||||||
|
GLU_DIRS = sgi
|
||||||
DRIVER_DIRS = osmesa
|
DRIVER_DIRS = osmesa
|
||||||
|
#DRIVER_DIRS = dri
|
||||||
|
DRI_DIRS = swrast
|
||||||
|
PROGRAM_DIRS = xdemos
|
||||||
|
@@ -1,28 +0,0 @@
|
|||||||
# Configuration for Darwin / MacOS X, making static libs
|
|
||||||
|
|
||||||
include $(TOP)/configs/darwin
|
|
||||||
|
|
||||||
CONFIG_NAME = darwin-static
|
|
||||||
|
|
||||||
# Compiler and flags
|
|
||||||
CFLAGS = -I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
|
||||||
CXXFLAGS = -I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
|
||||||
MKLIB_OPTIONS = -static
|
|
||||||
|
|
||||||
# Work around aliasing bugs - developers should comment this out
|
|
||||||
CFLAGS += -fno-strict-aliasing
|
|
||||||
CXXFLAGS += -fno-strict-aliasing
|
|
||||||
|
|
||||||
# Library names (actual file names)
|
|
||||||
GL_LIB_NAME = libGL.a
|
|
||||||
GLU_LIB_NAME = libGLU.a
|
|
||||||
GLUT_LIB_NAME = libglut.a
|
|
||||||
GLW_LIB_NAME = libGLw.a
|
|
||||||
OSMESA_LIB_NAME = libOSMesa.a
|
|
||||||
|
|
||||||
GL_LIB_DEPS =
|
|
||||||
OSMESA_LIB_DEPS =
|
|
||||||
GLU_LIB_DEPS =
|
|
||||||
GLUT_LIB_DEPS =
|
|
||||||
GLW_LIB_DEPS =
|
|
||||||
APP_LIB_DEPS = -Wl,-search_paths_first -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lstdc++ -lgcc_s.1 -lm
|
|
@@ -1,30 +0,0 @@
|
|||||||
# Configuration for Darwin / MacOS X, making static libs
|
|
||||||
|
|
||||||
include $(TOP)/configs/darwin
|
|
||||||
|
|
||||||
CONFIG_NAME = darwin-static
|
|
||||||
|
|
||||||
# Compiler and flags
|
|
||||||
CFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
|
||||||
-I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
|
||||||
CXXFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
|
||||||
-I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
|
||||||
MKLIB_OPTIONS = -static -archopt "-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
|
|
||||||
|
|
||||||
# Work around aliasing bugs - developers should comment this out
|
|
||||||
CFLAGS += -fno-strict-aliasing
|
|
||||||
CXXFLAGS += -fno-strict-aliasing
|
|
||||||
|
|
||||||
# Library names (actual file names)
|
|
||||||
GL_LIB_NAME = libGL.a
|
|
||||||
GLU_LIB_NAME = libGLU.a
|
|
||||||
GLUT_LIB_NAME = libglut.a
|
|
||||||
GLW_LIB_NAME = libGLw.a
|
|
||||||
OSMESA_LIB_NAME = libOSMesa.a
|
|
||||||
|
|
||||||
GL_LIB_DEPS =
|
|
||||||
OSMESA_LIB_DEPS =
|
|
||||||
GLU_LIB_DEPS =
|
|
||||||
GLUT_LIB_DEPS =
|
|
||||||
GLW_LIB_DEPS =
|
|
||||||
APP_LIB_DEPS = -Wl,-search_paths_first -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lstdc++ -lgcc_s.1 -lm
|
|
@@ -25,11 +25,13 @@ LDFLAGS =
|
|||||||
GLU_CFLAGS =
|
GLU_CFLAGS =
|
||||||
|
|
||||||
# Misc tools and flags
|
# Misc tools and flags
|
||||||
|
SHELL = /bin/sh
|
||||||
|
MKLIB = $(SHELL) $(TOP)/bin/mklib
|
||||||
MKLIB_OPTIONS =
|
MKLIB_OPTIONS =
|
||||||
MKDEP = makedepend
|
MKDEP = makedepend
|
||||||
MKDEP_OPTIONS = -fdepend
|
MKDEP_OPTIONS = -fdepend
|
||||||
MAKE = make
|
MAKE = make
|
||||||
INSTALL = $(TOP)/bin/minstall
|
INSTALL = $(SHELL) $(TOP)/bin/minstall
|
||||||
|
|
||||||
# Tools for regenerating glapi (generally only needed by the developers)
|
# Tools for regenerating glapi (generally only needed by the developers)
|
||||||
PYTHON2 = python
|
PYTHON2 = python
|
||||||
@@ -52,6 +54,12 @@ GLUT_LIB_NAME = lib$(GLUT_LIB).so
|
|||||||
GLW_LIB_NAME = lib$(GLW_LIB).so
|
GLW_LIB_NAME = lib$(GLW_LIB).so
|
||||||
OSMESA_LIB_NAME = lib$(OSMESA_LIB).so
|
OSMESA_LIB_NAME = lib$(OSMESA_LIB).so
|
||||||
|
|
||||||
|
# globs used to install the lib and all symlinks
|
||||||
|
GL_LIB_GLOB = $(GL_LIB_NAME)*
|
||||||
|
GLU_LIB_GLOB = $(GLU_LIB_NAME)*
|
||||||
|
GLUT_LIB_GLOB = $(GLUT_LIB_NAME)*
|
||||||
|
GLW_LIB_GLOB = $(GLW_LIB_NAME)*
|
||||||
|
OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)*
|
||||||
|
|
||||||
# Optional assembly language optimization files for libGL
|
# Optional assembly language optimization files for libGL
|
||||||
ASM_SOURCES =
|
ASM_SOURCES =
|
||||||
@@ -59,6 +67,7 @@ ASM_SOURCES =
|
|||||||
# GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in
|
# GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in
|
||||||
# order to build the Motif widget too)
|
# order to build the Motif widget too)
|
||||||
GLW_SOURCES = GLwDrawA.c
|
GLW_SOURCES = GLwDrawA.c
|
||||||
|
MOTIF_CFLAGS = -I/usr/include/Motif1.2
|
||||||
|
|
||||||
|
|
||||||
# Directories to build
|
# Directories to build
|
||||||
@@ -84,7 +93,9 @@ APP_LIB_DEPS = -lm
|
|||||||
|
|
||||||
# Installation directories (for make install)
|
# Installation directories (for make install)
|
||||||
INSTALL_DIR = /usr/local
|
INSTALL_DIR = /usr/local
|
||||||
DRI_DRIVER_INSTALL_DIR = $(INSTALL_DIR)/$(LIB_DIR)/dri
|
INSTALL_LIB_DIR = $(INSTALL_DIR)/$(LIB_DIR)
|
||||||
|
INSTALL_INC_DIR = $(INSTALL_DIR)/include
|
||||||
|
DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri
|
||||||
|
|
||||||
# Where libGL will look for DRI hardware drivers
|
# Where libGL will look for DRI hardware drivers
|
||||||
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
|
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
|
||||||
|
@@ -70,4 +70,4 @@ WINDOW_SYSTEM=dri
|
|||||||
# gamma are missing because they have not been converted to use the new
|
# gamma are missing because they have not been converted to use the new
|
||||||
# interface.
|
# interface.
|
||||||
DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon s3v \
|
DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon s3v \
|
||||||
savage sis tdfx trident unichrome ffb nouveau
|
savage sis tdfx trident unichrome ffb
|
||||||
|
353
configure.ac
353
configure.ac
@@ -12,6 +12,10 @@ m4_ifval(mesa_version,[],[
|
|||||||
m4_exit([1])
|
m4_exit([1])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl Tell the user about autoconf.html in the --help output
|
||||||
|
m4_divert_once([HELP_END], [
|
||||||
|
See docs/autoconf.html for more details on the options for Mesa.])
|
||||||
|
|
||||||
AC_INIT([Mesa],[mesa_version],
|
AC_INIT([Mesa],[mesa_version],
|
||||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
|
[https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
|
||||||
AC_CONFIG_AUX_DIR([bin])
|
AC_CONFIG_AUX_DIR([bin])
|
||||||
@@ -29,6 +33,16 @@ AC_CHECK_PROGS([MAKE], [gmake make])
|
|||||||
AC_PATH_PROG([MKDEP], [makedepend])
|
AC_PATH_PROG([MKDEP], [makedepend])
|
||||||
AC_PATH_PROG([SED], [sed])
|
AC_PATH_PROG([SED], [sed])
|
||||||
|
|
||||||
|
dnl We need a POSIX shell for parts of the build. Assume we have one
|
||||||
|
dnl in most cases.
|
||||||
|
case "$host_os" in
|
||||||
|
solaris*)
|
||||||
|
# Solaris /bin/sh is too old/non-POSIX compliant
|
||||||
|
AC_PATH_PROGS(POSIX_SHELL, [ksh93 ksh sh])
|
||||||
|
SHELL="$POSIX_SHELL"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
MKDEP_OPTIONS=-fdepend
|
MKDEP_OPTIONS=-fdepend
|
||||||
dnl Ask gcc where it's keeping its secret headers
|
dnl Ask gcc where it's keeping its secret headers
|
||||||
if test "x$GCC" = xyes; then
|
if test "x$GCC" = xyes; then
|
||||||
@@ -39,11 +53,6 @@ if test "x$GCC" = xyes; then
|
|||||||
fi
|
fi
|
||||||
AC_SUBST([MKDEP_OPTIONS])
|
AC_SUBST([MKDEP_OPTIONS])
|
||||||
|
|
||||||
dnl Check to see if dlopen is in default libraries (like Solaris, which
|
|
||||||
dnl has it in libc), or if libdl is needed to get it.
|
|
||||||
AC_CHECK_FUNC([dlopen], [],
|
|
||||||
[AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"])])
|
|
||||||
|
|
||||||
dnl Make sure the pkg-config macros are defined
|
dnl Make sure the pkg-config macros are defined
|
||||||
m4_ifdef([PKG_PROG_PKG_CONFIG],[],[
|
m4_ifdef([PKG_PROG_PKG_CONFIG],[],[
|
||||||
m4_errprint([Error: Could not locate the pkg-config autoconf macros.
|
m4_errprint([Error: Could not locate the pkg-config autoconf macros.
|
||||||
@@ -78,7 +87,10 @@ linux*)
|
|||||||
if test "x$GCC" = xyes; then
|
if test "x$GCC" = xyes; then
|
||||||
DEFINES="$DEFINES -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE"
|
DEFINES="$DEFINES -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE"
|
||||||
fi
|
fi
|
||||||
DEFINES="$DEFINES -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN"
|
DEFINES="$DEFINES -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS"
|
||||||
|
;;
|
||||||
|
solaris*)
|
||||||
|
DEFINES="$DEFINES -DPTHREADS -DSVR4"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -230,6 +242,120 @@ AC_SUBST([GLUT_LIB_NAME])
|
|||||||
AC_SUBST([GLW_LIB_NAME])
|
AC_SUBST([GLW_LIB_NAME])
|
||||||
AC_SUBST([OSMESA_LIB_NAME])
|
AC_SUBST([OSMESA_LIB_NAME])
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Arch/platform-specific settings
|
||||||
|
dnl
|
||||||
|
AC_ARG_ENABLE([asm],
|
||||||
|
[AS_HELP_STRING([--disable-asm],
|
||||||
|
[disable assembly usage @<:@default=enabled on supported plaforms@:>@])],
|
||||||
|
[enable_asm="$enableval"],
|
||||||
|
[enable_asm=yes]
|
||||||
|
)
|
||||||
|
asm_arch=""
|
||||||
|
ASM_FLAGS=""
|
||||||
|
ASM_SOURCES=""
|
||||||
|
ASM_API=""
|
||||||
|
AC_MSG_CHECKING([whether to enable assembly])
|
||||||
|
test "x$enable_asm" = xno && AC_MSG_RESULT([no])
|
||||||
|
# disable if cross compiling on x86/x86_64 since we must run gen_matypes
|
||||||
|
if test "x$enable_asm" = xyes && test "x$cross_compiling" = xyes; then
|
||||||
|
case "$host_cpu" in
|
||||||
|
i?86 | x86_64)
|
||||||
|
enable_asm=no
|
||||||
|
AC_MSG_RESULT([no, cross compiling])
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
# check for supported arches
|
||||||
|
if test "x$enable_asm" = xyes; then
|
||||||
|
case "$host_cpu" in
|
||||||
|
i?86)
|
||||||
|
case "$host_os" in
|
||||||
|
linux* | freebsd* | dragonfly*)
|
||||||
|
test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
x86_64)
|
||||||
|
case "$host_os" in
|
||||||
|
linux* | freebsd* | dragonfly*)
|
||||||
|
test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
powerpc)
|
||||||
|
case "$host_os" in
|
||||||
|
linux*)
|
||||||
|
asm_arch=ppc
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$asm_arch" in
|
||||||
|
x86)
|
||||||
|
ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
|
||||||
|
ASM_SOURCES='$(X86_SOURCES)'
|
||||||
|
ASM_API='$(X86_API)'
|
||||||
|
AC_MSG_RESULT([yes, x86])
|
||||||
|
;;
|
||||||
|
x86_64)
|
||||||
|
ASM_FLAGS="-DUSE_X86_64_ASM"
|
||||||
|
ASM_SOURCES='$(X86-64_SOURCES)'
|
||||||
|
ASM_API='$(X86-64_API)'
|
||||||
|
AC_MSG_RESULT([yes, x86_64])
|
||||||
|
;;
|
||||||
|
ppc)
|
||||||
|
ASM_FLAGS="-DUSE_PPC_ASM -DUSE_VMX_ASM"
|
||||||
|
ASM_SOURCES='$(PPC_SOURCES)'
|
||||||
|
AC_MSG_RESULT([yes, ppc])
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
AC_MSG_RESULT([no, platform not supported])
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
AC_SUBST([ASM_FLAGS])
|
||||||
|
AC_SUBST([ASM_SOURCES])
|
||||||
|
AC_SUBST([ASM_API])
|
||||||
|
|
||||||
|
dnl PIC code macro
|
||||||
|
MESA_PIC_FLAGS
|
||||||
|
|
||||||
|
dnl Check to see if dlopen is in default libraries (like Solaris, which
|
||||||
|
dnl has it in libc), or if libdl is needed to get it.
|
||||||
|
AC_CHECK_FUNC([dlopen], [],
|
||||||
|
[AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"])])
|
||||||
|
|
||||||
|
dnl See if posix_memalign is available
|
||||||
|
AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
|
||||||
|
|
||||||
|
dnl SELinux awareness.
|
||||||
|
AC_ARG_ENABLE([selinux],
|
||||||
|
[AS_HELP_STRING([--enable-selinux],
|
||||||
|
[Build SELinux-aware Mesa @<:@default=disabled@:>@])],
|
||||||
|
[MESA_SELINUX="$enableval"],
|
||||||
|
[MESA_SELINUX=no])
|
||||||
|
if test "x$enable_selinux" = "xyes"; then
|
||||||
|
AC_CHECK_HEADER([selinux/selinux.h],[],
|
||||||
|
[AC_MSG_ERROR([SELinux headers not found])])
|
||||||
|
AC_CHECK_LIB([selinux],[is_selinux_enabled],[],
|
||||||
|
[AC_MSG_ERROR([SELinux library not found])])
|
||||||
|
SELINUX_LIBS="-lselinux"
|
||||||
|
DEFINES="$DEFINES -DMESA_SELINUX"
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl OS-specific libraries
|
||||||
|
OS_LIBS=""
|
||||||
|
case "$host_os" in
|
||||||
|
solaris*)
|
||||||
|
OS_LIBS="-lc"
|
||||||
|
if test "x$GXX" != xyes; then
|
||||||
|
OS_CPLUSPLUS_LIBS="-lCrun $OS_LIBS"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Driver configuration. Options are xlib, dri and osmesa right now.
|
dnl Driver configuration. Options are xlib, dri and osmesa right now.
|
||||||
dnl More later: directfb, fbdev, ...
|
dnl More later: directfb, fbdev, ...
|
||||||
@@ -328,7 +454,7 @@ esac
|
|||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Find out if X is available. The variable have_x is set if libX11 is
|
dnl Find out if X is available. The variable have_x is set if libX11 is
|
||||||
dnl to mimic AC_PATH_XTRA.
|
dnl found to mimic AC_PATH_XTRA.
|
||||||
dnl
|
dnl
|
||||||
if test -n "$PKG_CONFIG"; then
|
if test -n "$PKG_CONFIG"; then
|
||||||
AC_MSG_CHECKING([pkg-config files for X11 are available])
|
AC_MSG_CHECKING([pkg-config files for X11 are available])
|
||||||
@@ -347,6 +473,12 @@ if test "$x11_pkgconfig" = no; then
|
|||||||
AC_PATH_XTRA
|
AC_PATH_XTRA
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl Try to tell the user that the --x-* options are only used when
|
||||||
|
dnl pkg-config is not available. This must be right after AC_PATH_XTRA.
|
||||||
|
m4_divert_once([HELP_BEGIN],
|
||||||
|
[These options are only used when the X libraries cannot be found by the
|
||||||
|
pkg-config utility.])
|
||||||
|
|
||||||
dnl We need X for xlib and dri, so bomb now if it's not found
|
dnl We need X for xlib and dri, so bomb now if it's not found
|
||||||
case "$mesa_driver" in
|
case "$mesa_driver" in
|
||||||
xlib|dri)
|
xlib|dri)
|
||||||
@@ -368,21 +500,6 @@ else
|
|||||||
enable_xcb=no
|
enable_xcb=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# SELinux awareness.
|
|
||||||
AC_ARG_ENABLE([selinux],
|
|
||||||
[AS_HELP_STRING([--enable-selinux],
|
|
||||||
[Build SELinux-aware Mesa (default: disabled)])],
|
|
||||||
[MESA_SELINUX="$enableval"],
|
|
||||||
[MESA_SELINUX=no])
|
|
||||||
if test "x$enable_selinux" = "xyes"; then
|
|
||||||
AC_CHECK_HEADER([selinux/selinux.h],[],
|
|
||||||
[AC_MSG_ERROR([SELinux headers not found])])
|
|
||||||
AC_CHECK_LIB([selinux],[is_selinux_enabled],[],
|
|
||||||
[AC_MSG_ERROR([SELinux library not found])])
|
|
||||||
SELINUX_LIBS="-lselinux"
|
|
||||||
DEFINES="$DEFINES -DMESA_SELINUX"
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl libGL configuration per driver
|
dnl libGL configuration per driver
|
||||||
dnl
|
dnl
|
||||||
@@ -397,7 +514,7 @@ xlib)
|
|||||||
X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
|
X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
|
||||||
GL_LIB_DEPS="$X_LIBS -lX11 -lXext"
|
GL_LIB_DEPS="$X_LIBS -lX11 -lXext"
|
||||||
fi
|
fi
|
||||||
GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread"
|
GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread $OS_LIBS"
|
||||||
|
|
||||||
# if static, move the external libraries to the programs
|
# if static, move the external libraries to the programs
|
||||||
# and empty the libraries for libGL
|
# and empty the libraries for libGL
|
||||||
@@ -441,11 +558,11 @@ dri)
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# need DRM libs, -lpthread, etc.
|
# need DRM libs, -lpthread, etc.
|
||||||
GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
|
GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS $OS_LIBS"
|
||||||
;;
|
;;
|
||||||
osmesa)
|
osmesa)
|
||||||
# No libGL for osmesa
|
# No libGL for osmesa
|
||||||
GL_LIB_DEPS=""
|
GL_LIB_DEPS="$OS_LIBS"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
AC_SUBST([GL_LIB_DEPS])
|
AC_SUBST([GL_LIB_DEPS])
|
||||||
@@ -478,11 +595,25 @@ AC_ARG_ENABLE([driglx-direct],
|
|||||||
[enable direct rendering in GLX for DRI @<:@default=enabled@:>@])],
|
[enable direct rendering in GLX for DRI @<:@default=enabled@:>@])],
|
||||||
[driglx_direct="$enableval"],
|
[driglx_direct="$enableval"],
|
||||||
[driglx_direct="yes"])
|
[driglx_direct="yes"])
|
||||||
|
dnl ttm support
|
||||||
|
AC_ARG_ENABLE([ttm-api],
|
||||||
|
[AS_HELP_STRING([--enable-ttm-api],
|
||||||
|
[enable TTM API users @<:@default=disabled@:>@])],
|
||||||
|
[ttmapi="$enableval"],
|
||||||
|
[ttmapi="no"])
|
||||||
|
|
||||||
|
if test "x$ttmapi" = "xyes"; then
|
||||||
|
save_CFLAGS=$CFLAGS
|
||||||
|
CFLAGS=$LIBDRM_CFLAGS
|
||||||
|
AC_CHECK_HEADERS([xf86mm.h],[],[AC_MSG_ERROR([xf86mm.h required for TTM.])],[#include "stdint.h"\n#include "drm.h"])
|
||||||
|
CFLAGS=$save_CFLAGS
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Which drivers to build - default is chosen by platform
|
dnl Which drivers to build - default is chosen by platform
|
||||||
AC_ARG_WITH([dri-drivers],
|
AC_ARG_WITH([dri-drivers],
|
||||||
[AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@],
|
[AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@],
|
||||||
[comma delimited DRI drivers, e.g. "i965,radeon,nouveau" @<:@default=auto@:>@])],
|
[comma delimited DRI drivers list, e.g.
|
||||||
|
"swrast,i965,radeon,nouveau" @<:@default=auto@:>@])],
|
||||||
[with_dri_drivers="$withval"],
|
[with_dri_drivers="$withval"],
|
||||||
[with_dri_drivers=yes])
|
[with_dri_drivers=yes])
|
||||||
if test "x$with_dri_drivers" = x; then
|
if test "x$with_dri_drivers" = x; then
|
||||||
@@ -493,10 +624,13 @@ dnl If $with_dri_drivers is yes, directories will be added through
|
|||||||
dnl platform checks
|
dnl platform checks
|
||||||
DRI_DIRS=""
|
DRI_DIRS=""
|
||||||
case "$with_dri_drivers" in
|
case "$with_dri_drivers" in
|
||||||
no|yes) ;;
|
no) ;;
|
||||||
|
yes)
|
||||||
|
DRI_DIRS="yes"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
# verify the requested driver directories exist
|
# verify the requested driver directories exist
|
||||||
dri_drivers=`IFS=,; echo $with_dri_drivers`
|
dri_drivers=`IFS=', '; echo $with_dri_drivers`
|
||||||
for driver in $dri_drivers; do
|
for driver in $dri_drivers; do
|
||||||
test -d "$srcdir/src/mesa/drivers/dri/$driver" || \
|
test -d "$srcdir/src/mesa/drivers/dri/$driver" || \
|
||||||
AC_MSG_ERROR([DRI driver directory '$driver' doesn't exist])
|
AC_MSG_ERROR([DRI driver directory '$driver' doesn't exist])
|
||||||
@@ -516,6 +650,10 @@ if test "$mesa_driver" = dri; then
|
|||||||
DEFINES="$DEFINES -DGLX_USE_TLS -DPTHREADS"
|
DEFINES="$DEFINES -DGLX_USE_TLS -DPTHREADS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "x$ttmapi" = xyes; then
|
||||||
|
DEFINES="$DEFINES -DTTM_API"
|
||||||
|
fi
|
||||||
|
|
||||||
if test "x$USING_EGL" = x1; then
|
if test "x$USING_EGL" = x1; then
|
||||||
PROGRAM_DIRS="egl"
|
PROGRAM_DIRS="egl"
|
||||||
fi
|
fi
|
||||||
@@ -535,7 +673,7 @@ if test "$mesa_driver" = dri; then
|
|||||||
# converted to use the new interface. i810 are missing
|
# converted to use the new interface. i810 are missing
|
||||||
# because there is no x86-64 system where they could *ever*
|
# because there is no x86-64 system where they could *ever*
|
||||||
# be used.
|
# be used.
|
||||||
if test "x$DRI_DIRS" = x; then
|
if test "x$DRI_DIRS" = "xyes"; then
|
||||||
DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 radeon \
|
DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 radeon \
|
||||||
savage tdfx unichrome swrast"
|
savage tdfx unichrome swrast"
|
||||||
fi
|
fi
|
||||||
@@ -543,10 +681,16 @@ if test "$mesa_driver" = dri; then
|
|||||||
powerpc*)
|
powerpc*)
|
||||||
# Build only the drivers for cards that exist on PowerPC.
|
# Build only the drivers for cards that exist on PowerPC.
|
||||||
# At some point MGA will be added, but not yet.
|
# At some point MGA will be added, but not yet.
|
||||||
if test "x$DRI_DIRS" = x; then
|
if test "x$DRI_DIRS" = "xyes"; then
|
||||||
DRI_DIRS="mach64 r128 r200 r300 radeon tdfx swrast"
|
DRI_DIRS="mach64 r128 r200 r300 radeon tdfx swrast"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
sparc*)
|
||||||
|
# Build only the drivers for cards that exist on sparc`
|
||||||
|
if test "x$DRI_DIRS" = "xyes"; then
|
||||||
|
DRI_DIRS="mach64 r128 r200 r300 radeon ffb swrast"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
freebsd* | dragonfly*)
|
freebsd* | dragonfly*)
|
||||||
@@ -562,15 +706,22 @@ if test "$mesa_driver" = dri; then
|
|||||||
|
|
||||||
# ffb and gamma are missing because they have not been converted
|
# ffb and gamma are missing because they have not been converted
|
||||||
# to use the new interface.
|
# to use the new interface.
|
||||||
if test "x$DRI_DIRS" = x; then
|
if test "x$DRI_DIRS" = "xyes"; then
|
||||||
DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \
|
DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \
|
||||||
unichrome savage sis swrast"
|
unichrome savage sis swrast"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
solaris*)
|
||||||
|
DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
|
||||||
|
DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING"
|
||||||
|
if test "x$driglx_direct" = xyes; then
|
||||||
|
DEFINES="$DEFINES -DGLX_DIRECT_RENDERING"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# default drivers
|
# default drivers
|
||||||
if test "x$DRI_DIRS" = x; then
|
if test "x$DRI_DIRS" = "xyes"; then
|
||||||
DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \
|
DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \
|
||||||
savage sis tdfx trident unichrome ffb swrast"
|
savage sis tdfx trident unichrome ffb swrast"
|
||||||
fi
|
fi
|
||||||
@@ -646,7 +797,7 @@ AC_SUBST([OSMESA_LIB])
|
|||||||
|
|
||||||
case "$mesa_driver" in
|
case "$mesa_driver" in
|
||||||
osmesa)
|
osmesa)
|
||||||
# only link librararies with osmesa if shared
|
# only link libraries with osmesa if shared
|
||||||
if test "$enable_static" = no; then
|
if test "$enable_static" = no; then
|
||||||
OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS"
|
OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS"
|
||||||
else
|
else
|
||||||
@@ -657,7 +808,7 @@ osmesa)
|
|||||||
*)
|
*)
|
||||||
# Link OSMesa to libGL otherwise
|
# Link OSMesa to libGL otherwise
|
||||||
OSMESA_LIB_DEPS=""
|
OSMESA_LIB_DEPS=""
|
||||||
# only link librararies with osmesa if shared
|
# only link libraries with osmesa if shared
|
||||||
if test "$enable_static" = no; then
|
if test "$enable_static" = no; then
|
||||||
OSMESA_MESA_DEPS='-l$(GL_LIB)'
|
OSMESA_MESA_DEPS='-l$(GL_LIB)'
|
||||||
else
|
else
|
||||||
@@ -665,6 +816,9 @@ osmesa)
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
if test "$enable_static" = no; then
|
||||||
|
OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS $OS_LIBS"
|
||||||
|
fi
|
||||||
AC_SUBST([OSMESA_LIB_DEPS])
|
AC_SUBST([OSMESA_LIB_DEPS])
|
||||||
AC_SUBST([OSMESA_MESA_DEPS])
|
AC_SUBST([OSMESA_MESA_DEPS])
|
||||||
|
|
||||||
@@ -708,6 +862,9 @@ if test "x$enable_glu" = xyes; then
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
if test "$enable_static" = no; then
|
||||||
|
GLU_LIB_DEPS="$GLU_LIB_DEPS $OS_CPLUSPLUS_LIBS"
|
||||||
|
fi
|
||||||
AC_SUBST([GLU_LIB_DEPS])
|
AC_SUBST([GLU_LIB_DEPS])
|
||||||
AC_SUBST([GLU_MESA_DEPS])
|
AC_SUBST([GLU_MESA_DEPS])
|
||||||
|
|
||||||
@@ -724,6 +881,12 @@ if test "x$enable_glw" = xyes && test "$mesa_driver" = osmesa; then
|
|||||||
AC_MSG_WARN([Disabling GLw since the driver is OSMesa])
|
AC_MSG_WARN([Disabling GLw since the driver is OSMesa])
|
||||||
enable_glw=no
|
enable_glw=no
|
||||||
fi
|
fi
|
||||||
|
AC_ARG_ENABLE([motif],
|
||||||
|
[AS_HELP_STRING([--enable-motif],
|
||||||
|
[use Motif widgets in GLw @<:@default=disabled@:>@])],
|
||||||
|
[enable_motif="$enableval"],
|
||||||
|
[enable_motif=no])
|
||||||
|
|
||||||
if test "x$enable_glw" = xyes; then
|
if test "x$enable_glw" = xyes; then
|
||||||
SRC_DIRS="$SRC_DIRS glw"
|
SRC_DIRS="$SRC_DIRS glw"
|
||||||
if test "$x11_pkgconfig" = yes; then
|
if test "$x11_pkgconfig" = yes; then
|
||||||
@@ -731,12 +894,31 @@ if test "x$enable_glw" = xyes; then
|
|||||||
GLW_LIB_DEPS="$GLW_LIBS"
|
GLW_LIB_DEPS="$GLW_LIBS"
|
||||||
else
|
else
|
||||||
# should check these...
|
# should check these...
|
||||||
GLW_LIB_DEPS="$X_LIBS -lX11 -lXt"
|
GLW_LIB_DEPS="$X_LIBS -lXt -lX11"
|
||||||
|
fi
|
||||||
|
|
||||||
|
GLW_SOURCES="GLwDrawA.c"
|
||||||
|
MOTIF_CFLAGS=
|
||||||
|
if test "x$enable_motif" = xyes; then
|
||||||
|
GLW_SOURCES="$GLW_SOURCES GLwMDrawA.c"
|
||||||
|
AC_PATH_PROG([MOTIF_CONFIG], [motif-config], [no])
|
||||||
|
if test "x$MOTIF_CONFIG" != xno; then
|
||||||
|
MOTIF_CFLAGS=`$MOTIF_CONFIG --cflags`
|
||||||
|
MOTIF_LIBS=`$MOTIF_CONFIG --libs`
|
||||||
|
else
|
||||||
|
AC_CHECK_HEADER([Xm/PrimitiveP.h], [],
|
||||||
|
[AC_MSG_ERROR([Can't locate Motif headers])])
|
||||||
|
AC_CHECK_LIB([Xm], [XmGetPixmap], [MOTIF_LIBS="-lXm"],
|
||||||
|
[AC_MSG_ERROR([Can't locate Motif Xm library])])
|
||||||
|
fi
|
||||||
|
# MOTIF_LIBS is prepended to GLW_LIB_DEPS since Xm needs Xt/X11
|
||||||
|
GLW_LIB_DEPS="$MOTIF_LIBS $GLW_LIB_DEPS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If static, empty GLW_LIB_DEPS and add libs for programs to link
|
# If static, empty GLW_LIB_DEPS and add libs for programs to link
|
||||||
if test "$enable_static" = no; then
|
if test "$enable_static" = no; then
|
||||||
GLW_MESA_DEPS='-l$(GL_LIB)'
|
GLW_MESA_DEPS='-l$(GL_LIB)'
|
||||||
|
GLW_LIB_DEPS="$GLW_LIB_DEPS $OS_LIBS"
|
||||||
else
|
else
|
||||||
APP_LIB_DEPS="$APP_LIB_DEPS $GLW_LIB_DEPS"
|
APP_LIB_DEPS="$APP_LIB_DEPS $GLW_LIB_DEPS"
|
||||||
GLW_LIB_DEPS=""
|
GLW_LIB_DEPS=""
|
||||||
@@ -745,6 +927,8 @@ if test "x$enable_glw" = xyes; then
|
|||||||
fi
|
fi
|
||||||
AC_SUBST([GLW_LIB_DEPS])
|
AC_SUBST([GLW_LIB_DEPS])
|
||||||
AC_SUBST([GLW_MESA_DEPS])
|
AC_SUBST([GLW_MESA_DEPS])
|
||||||
|
AC_SUBST([GLW_SOURCES])
|
||||||
|
AC_SUBST([MOTIF_CFLAGS])
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl GLUT configuration
|
dnl GLUT configuration
|
||||||
@@ -784,7 +968,7 @@ if test "x$enable_glut" = xyes; then
|
|||||||
# should check these...
|
# should check these...
|
||||||
GLUT_LIB_DEPS="$X_LIBS -lX11 -lXmu -lXi"
|
GLUT_LIB_DEPS="$X_LIBS -lX11 -lXmu -lXi"
|
||||||
fi
|
fi
|
||||||
GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm"
|
GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm $OS_LIBS"
|
||||||
|
|
||||||
# If glut is available, we can build most programs
|
# If glut is available, we can build most programs
|
||||||
if test "$with_demos" = yes; then
|
if test "$with_demos" = yes; then
|
||||||
@@ -810,91 +994,18 @@ dnl Only libm is added here if necessary as the libraries should
|
|||||||
dnl be pulled in by the linker
|
dnl be pulled in by the linker
|
||||||
dnl
|
dnl
|
||||||
if test "x$APP_LIB_DEPS" = x; then
|
if test "x$APP_LIB_DEPS" = x; then
|
||||||
APP_LIB_DEPS="-lm"
|
case "$host_os" in
|
||||||
|
solaris*)
|
||||||
|
APP_LIB_DEPS="-lX11 -lsocket -lnsl -lm"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
APP_LIB_DEPS="-lm"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
AC_SUBST([APP_LIB_DEPS])
|
AC_SUBST([APP_LIB_DEPS])
|
||||||
AC_SUBST([PROGRAM_DIRS])
|
AC_SUBST([PROGRAM_DIRS])
|
||||||
|
|
||||||
dnl
|
|
||||||
dnl Arch/platform-specific settings
|
|
||||||
dnl
|
|
||||||
AC_ARG_ENABLE([asm],
|
|
||||||
[AS_HELP_STRING([--disable-asm],
|
|
||||||
[disable assembly usage @<:@default=enabled on supported plaforms@:>@])],
|
|
||||||
[enable_asm="$enableval"],
|
|
||||||
[enable_asm=yes]
|
|
||||||
)
|
|
||||||
asm_arch=""
|
|
||||||
ASM_FLAGS=""
|
|
||||||
ASM_SOURCES=""
|
|
||||||
ASM_API=""
|
|
||||||
AC_MSG_CHECKING([whether to enable assembly])
|
|
||||||
test "x$enable_asm" = xno && AC_MSG_RESULT([no])
|
|
||||||
# disable if cross compiling on x86/x86_64 since we must run gen_matypes
|
|
||||||
if test "x$enable_asm" = xyes && test "x$cross_compiling" = xyes; then
|
|
||||||
case "$host_cpu" in
|
|
||||||
i?86 | x86_64)
|
|
||||||
enable_asm=no
|
|
||||||
AC_MSG_RESULT([no, cross compiling])
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
# check for supported arches
|
|
||||||
if test "x$enable_asm" = xyes; then
|
|
||||||
case "$host_cpu" in
|
|
||||||
i?86)
|
|
||||||
case "$host_os" in
|
|
||||||
linux* | freebsd* | dragonfly*)
|
|
||||||
test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
x86_64)
|
|
||||||
case "$host_os" in
|
|
||||||
linux* | freebsd* | dragonfly*)
|
|
||||||
test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
powerpc)
|
|
||||||
case "$host_os" in
|
|
||||||
linux*)
|
|
||||||
asm_arch=ppc
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "$asm_arch" in
|
|
||||||
x86)
|
|
||||||
ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
|
|
||||||
ASM_SOURCES='$(X86_SOURCES)'
|
|
||||||
ASM_API='$(X86_API)'
|
|
||||||
AC_MSG_RESULT([yes, x86])
|
|
||||||
;;
|
|
||||||
x86_64)
|
|
||||||
ASM_FLAGS="-DUSE_X86_64_ASM"
|
|
||||||
ASM_SOURCES='$(X86-64_SOURCES)'
|
|
||||||
ASM_API='$(X86-64_API)'
|
|
||||||
AC_MSG_RESULT([yes, x86_64])
|
|
||||||
;;
|
|
||||||
ppc)
|
|
||||||
ASM_FLAGS="-DUSE_PPC_ASM -DUSE_VMX_ASM"
|
|
||||||
ASM_SOURCES='$(PPC_SOURCES)'
|
|
||||||
AC_MSG_RESULT([yes, ppc])
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
AC_MSG_RESULT([no, platform not supported])
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
AC_SUBST([ASM_FLAGS])
|
|
||||||
AC_SUBST([ASM_SOURCES])
|
|
||||||
AC_SUBST([ASM_API])
|
|
||||||
|
|
||||||
dnl PIC code macro
|
|
||||||
MESA_PIC_FLAGS
|
|
||||||
|
|
||||||
|
|
||||||
dnl Restore LDFLAGS and CPPFLAGS
|
dnl Restore LDFLAGS and CPPFLAGS
|
||||||
LDFLAGS="$_SAVE_LDFLAGS"
|
LDFLAGS="$_SAVE_LDFLAGS"
|
||||||
@@ -920,6 +1031,7 @@ echo ""
|
|||||||
echo " prefix: $prefix"
|
echo " prefix: $prefix"
|
||||||
echo " exec_prefix: $exec_prefix"
|
echo " exec_prefix: $exec_prefix"
|
||||||
echo " libdir: $libdir"
|
echo " libdir: $libdir"
|
||||||
|
echo " includedir: $includedir"
|
||||||
|
|
||||||
dnl Driver info
|
dnl Driver info
|
||||||
echo ""
|
echo ""
|
||||||
@@ -932,8 +1044,13 @@ fi
|
|||||||
if test "$mesa_driver" = dri; then
|
if test "$mesa_driver" = dri; then
|
||||||
# cleanup the drivers var
|
# cleanup the drivers var
|
||||||
dri_dirs=`echo $DRI_DIRS | $SED 's/^ *//;s/ */ /;s/ *$//'`
|
dri_dirs=`echo $DRI_DIRS | $SED 's/^ *//;s/ */ /;s/ *$//'`
|
||||||
|
if test "x$DRI_DIRS" = x; then
|
||||||
|
echo " DRI drivers: no"
|
||||||
|
else
|
||||||
echo " DRI drivers: $dri_dirs"
|
echo " DRI drivers: $dri_dirs"
|
||||||
|
fi
|
||||||
echo " DRI driver dir: $DRI_DRIVER_INSTALL_DIR"
|
echo " DRI driver dir: $DRI_DRIVER_INSTALL_DIR"
|
||||||
|
echo " TTM API support: $ttmapi"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Libraries
|
dnl Libraries
|
||||||
@@ -941,7 +1058,7 @@ echo ""
|
|||||||
echo " Shared libs: $enable_shared"
|
echo " Shared libs: $enable_shared"
|
||||||
echo " Static libs: $enable_static"
|
echo " Static libs: $enable_static"
|
||||||
echo " GLU: $enable_glu"
|
echo " GLU: $enable_glu"
|
||||||
echo " GLw: $enable_glw"
|
echo " GLw: $enable_glw (Motif: $enable_motif)"
|
||||||
echo " glut: $enable_glut"
|
echo " glut: $enable_glut"
|
||||||
|
|
||||||
dnl Programs
|
dnl Programs
|
||||||
|
@@ -182,11 +182,12 @@ will search for DRI drivers. The default is <code>${libdir}/dri</code>.
|
|||||||
</li>
|
</li>
|
||||||
<li><code>--with-dri-drivers=DRIVER,DRIVER,...</code> - This option
|
<li><code>--with-dri-drivers=DRIVER,DRIVER,...</code> - This option
|
||||||
allows a specific set of DRI drivers to be built. For example,
|
allows a specific set of DRI drivers to be built. For example,
|
||||||
<code>--with-dri-drivers="i965,radeon,nouveau"</code>. By default,
|
<code>--with-dri-drivers="swrast,i965,radeon,nouveau"</code>. By
|
||||||
the drivers will be chosen depending on the target platform. See the
|
default, the drivers will be chosen depending on the target platform.
|
||||||
directory <code>src/mesa/drivers/dri</code> in the source tree for
|
See the directory <code>src/mesa/drivers/dri</code> in the source tree
|
||||||
available drivers.
|
for available drivers. Beware that the swrast DRI driver is used by both
|
||||||
</li>
|
libGL and the X.Org xserver GLX module to do software rendering, so you
|
||||||
|
may run into problems if it is not available.</li>
|
||||||
<!-- This explanation might be totally bogus. Kristian? -->
|
<!-- This explanation might be totally bogus. Kristian? -->
|
||||||
<li><code>--disable-driglx-direct</code> - Disable direct rendering in
|
<li><code>--disable-driglx-direct</code> - Disable direct rendering in
|
||||||
GLX. Normally, direct hardware rendering through the DRI drivers and
|
GLX. Normally, direct hardware rendering through the DRI drivers and
|
||||||
|
@@ -48,6 +48,7 @@ a:visited {
|
|||||||
<li><a href="lists.html" target="MainFrame">Mailing Lists</a>
|
<li><a href="lists.html" target="MainFrame">Mailing Lists</a>
|
||||||
<li><a href="bugs.html" target="MainFrame">Bug Database</a>
|
<li><a href="bugs.html" target="MainFrame">Bug Database</a>
|
||||||
<li><a href="webmaster.html" target="MainFrame">Webmaster</a>
|
<li><a href="webmaster.html" target="MainFrame">Webmaster</a>
|
||||||
|
<li><a href="http://dri.freedesktop.org/" target="MainFrame">Wiki</a>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<b>User Topics</b>
|
<b>User Topics</b>
|
||||||
|
@@ -9,7 +9,9 @@
|
|||||||
<H1>Downloading</H1>
|
<H1>Downloading</H1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Last stable release: <b>7.0.3</b>
|
Current development release: <b>7.1</b>
|
||||||
|
<br>
|
||||||
|
Last stable release: <b>7.0.4</b>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -18,6 +20,11 @@ Primary download site:
|
|||||||
target="_parent">SourceForge</a>
|
target="_parent">SourceForge</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
When a new release is coming, release candidates (betas) can be found
|
||||||
|
<a href="http://www.mesa3d.org/beta/">here</a>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Mesa is distributed in several parts:
|
Mesa is distributed in several parts:
|
||||||
|
@@ -25,23 +25,12 @@
|
|||||||
<h3>1.1 Prerequisites for DRI and Hardware Acceleration</h3>
|
<h3>1.1 Prerequisites for DRI and Hardware Acceleration</h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
To build Mesa with DRI-based hardware acceleration you must first have
|
To build Mesa 7.1 with DRI-based hardware acceleration you must first have
|
||||||
the right version of DRM.
|
the <a href="http://dri.freedesktop.org/libdrm/" target="_parent">DRM version 2.3.1</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
For Mesa 7.1 a particular snapshot of
|
You should also be using the Xorg server version 1.4 or 1.5.
|
||||||
<a href="http://dri.freedesktop.org/libdrm/">DRM</a> from git is required:
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
git-clone git://anongit.freedesktop.org/git/mesa/drm
|
|
||||||
git-checkout (XXXX HASH ID TBD)
|
|
||||||
</pre>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
You should also be using Xorg server version 1.4
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,9 +22,10 @@ for modern GPUs.
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
Mesa ties into several other open-source projects: the
|
Mesa ties into several other open-source projects: the
|
||||||
<a href="http://dri.sf.net/" target="_parent">Direct Rendering Infrastructure</a>
|
<a href="http://dri.freedesktop.org/" target="_parent">Direct Rendering
|
||||||
and <a href="http://x.org" target="_parent">X.org</a> to provide OpenGL
|
Infrastructure</a> and <a href="http://x.org" target="_parent">X.org</a> to
|
||||||
support to users of X on Linux, FreeBSD and other operating systems.
|
provide OpenGL support to users of X on Linux, FreeBSD and other operating
|
||||||
|
systems.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
<H1>Mailing Lists</H1>
|
<H1>Mailing Lists</H1>
|
||||||
|
|
||||||
|
|
||||||
<p>There are four Mesa mailing lists:
|
<p>There are four Mesa 3D / DRI mailing lists:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
@@ -19,14 +19,14 @@ versions are sent to this list.
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-users"
|
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-users"
|
||||||
target="_parent">mesa3d-users</a> - intended for users of the Mesa library.
|
target="_parent">mesa3d-users</a> - intended for users of the Mesa and DRI.
|
||||||
Newbie questions are appropriate, but please try the general OpenGL
|
Newbie questions are appropriate, but please try the general OpenGL
|
||||||
resources and Mesa documentation first.
|
resources and Mesa/DRI documentation first.
|
||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-dev"
|
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-dev"
|
||||||
target="_parent">mesa3d-dev</a> - for discussion of Mesa development.
|
target="_parent">mesa3d-dev</a> - for discussion of Mesa and Direct Rendering
|
||||||
Not for beginners.
|
Infrastructure development. Not for beginners.
|
||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-commit"
|
<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-commit"
|
||||||
@@ -37,6 +37,9 @@ Note: the old mesa3d-cvs list is no longer in use.
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<p>For mailing lists about Direct Rendering Modules (drm) in Linux/BSD
|
||||||
|
kernels, see <a href="http://dri.freedesktop.org/wiki/MailingLists">wiki</a>.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<b>Notice</b>: non-member posts to any of these lists will be automatically
|
<b>Notice</b>: non-member posts to any of these lists will be automatically
|
||||||
rejected.
|
rejected.
|
||||||
|
@@ -11,6 +11,23 @@
|
|||||||
<H1>News</H1>
|
<H1>News</H1>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>August 26, 2008</h2>
|
||||||
|
<p>
|
||||||
|
<a href="relnotes-7.1.html">Mesa 7.1</a> is released.
|
||||||
|
This is a new development release.
|
||||||
|
It should be relatively stable, but those especially concerned about
|
||||||
|
stability should wait for the 7.2 release or use Mesa 7.0.4 (the
|
||||||
|
previous stable release).
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>August 16, 2008</h2>
|
||||||
|
<p>
|
||||||
|
<a href="relnotes-7.0.4.html">Mesa 7.0.4</a> is released.
|
||||||
|
This is a bug-fix release.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h2>April 4, 2008</h2>
|
<h2>April 4, 2008</h2>
|
||||||
<p>
|
<p>
|
||||||
<a href="relnotes-7.0.3.html">Mesa 7.0.3</a> is released.
|
<a href="relnotes-7.0.3.html">Mesa 7.0.3</a> is released.
|
||||||
|
80
docs/relnotes-7.0.4.html
Normal file
80
docs/relnotes-7.0.4.html
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
<HTML>
|
||||||
|
|
||||||
|
<TITLE>Mesa Release Notes</TITLE>
|
||||||
|
|
||||||
|
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||||
|
|
||||||
|
<BODY>
|
||||||
|
|
||||||
|
<body bgcolor="#eeeeee">
|
||||||
|
|
||||||
|
<H1>Mesa 7.0.4 Release Notes / August 16, 2008</H1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Mesa 7.0.4 is a stable release with bug fixes since version 7.0.3.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>MD5 checksums</h2>
|
||||||
|
<pre>
|
||||||
|
909afa3a01ae31478d363837681415ac MesaLib-7.0.4.tar.gz
|
||||||
|
8d7bacbe0234742a5d08c8088c4619e9 MesaLib-7.0.4.tar.bz2
|
||||||
|
5e44261ef85b049a868e1785d9adc276 MesaLib-7.0.4.zip
|
||||||
|
53dcd77d37a819feaf50b5fcdd0a6e0f MesaDemos-7.0.4.tar.gz
|
||||||
|
c1215b31c5f7b85f81eed3bfba07d556 MesaDemos-7.0.4.tar.bz2
|
||||||
|
b1825a7361f116b28d82d328077630b4 MesaDemos-7.0.4.zip
|
||||||
|
d7677d015f52602d1bf8b837fb717848 MesaGLUT-7.0.4.tar.gz
|
||||||
|
f5f8b46f7e763d9f7b7d1d115c1c44ee MesaGLUT-7.0.4.tar.bz2
|
||||||
|
a786775271a02c62a3370b13b26bf48d MesaGLUT-7.0.4.zip
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Bug fixes</h2>
|
||||||
|
<ul>
|
||||||
|
<li>define #extension GL_ARB_texture_rectangle in shading language
|
||||||
|
<li>fixed WIN32 compile problem in libGLU
|
||||||
|
<li>Fixed a per-vertex glMaterial bug which could cause bad lighting
|
||||||
|
<li>Fixed potential crash in AA/smoothed triangle rendering when using a fragment shader
|
||||||
|
<li>Fixed glDrawElement + VBO segfault (bug 16156)
|
||||||
|
<li>Fixed GLSL linker bug causing generic vertex attributes to get aliased
|
||||||
|
<li>Fixed stack overflow when using glPixelZoom on Windows
|
||||||
|
<li>Fixed broken all(bvec2) GLSL function, added misc missing bvec constructors
|
||||||
|
<li>ARB program "state.clip[n].plane" didn't parse correctly
|
||||||
|
<li>Fixed broken glGetUniformiv() (bug 13774)
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h2>Changes</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Including the latest glext.h and glxext.h header files from Khronos
|
||||||
|
<li>Added support for DragonFly OS
|
||||||
|
<li>Added a build config for FreeBSD static libs (Anatolij Shkodin)
|
||||||
|
<li>Enabled GL_EXT_multi_draw_arrays extension in R200/R300 drivers
|
||||||
|
<li>Enabled GL_ARB_point_sprite extension in I965 driver
|
||||||
|
<li>Enabled GL_EXT_texture_sRGB extension in I965 driver
|
||||||
|
<li>Added support for GL shading language in I965 driver
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Driver Status</h2>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
Driver Status
|
||||||
|
---------------------- ----------------------
|
||||||
|
DRI drivers varies with the driver
|
||||||
|
XMesa/GLX (on Xlib) implements OpenGL 2.1
|
||||||
|
OSMesa (off-screen) implements OpenGL 2.1
|
||||||
|
Windows/Win32 implements OpenGL 2.1
|
||||||
|
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
|
||||||
|
SVGA unsupported
|
||||||
|
Wind River UGL unsupported
|
||||||
|
DJGPP unsupported
|
||||||
|
GGI unsupported
|
||||||
|
BeOS unsupported
|
||||||
|
Allegro unsupported
|
||||||
|
D3D unsupported
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -8,13 +8,21 @@
|
|||||||
|
|
||||||
<body bgcolor="#eeeeee">
|
<body bgcolor="#eeeeee">
|
||||||
|
|
||||||
<H1>Mesa 7.1 Release Notes / May XX, 2008</H1>
|
<H1>Mesa 7.1 Release Notes / August 26, 2008</H1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Mesa 7.1 is a new development release.
|
Mesa 7.1 is a new development release.
|
||||||
There have been many internal code changes since Mesa 7.0.x.
|
There have been many internal code changes since Mesa 7.0.x.
|
||||||
It should be relatively stable, but those who are especially concerned about
|
It should be relatively stable, but those who are especially concerned about
|
||||||
stability should wait for Mesa 7.2.
|
stability should wait for Mesa 7.2 or use Mesa 7.0.4 (the previous stable
|
||||||
|
release).
|
||||||
|
</p>
|
||||||
|
</>
|
||||||
|
Note that this version of Mesa does not use the GEM memory manager.
|
||||||
|
The master branch of git uses GEM.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
DRM version 2.3.1 should be used with Mesa 7.1
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
@@ -26,10 +34,20 @@ TBD
|
|||||||
|
|
||||||
<h2>New features</h2>
|
<h2>New features</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>autoconf-based configuration
|
<li>autoconf-based configuration (and clean-up of Makefiles)
|
||||||
|
<li>Assorted DRI driver enhancements
|
||||||
<li>Reduced dependencies between X server and Mesa
|
<li>Reduced dependencies between X server and Mesa
|
||||||
<li>GL_EXT_texture_from_pixmap extension for Xlib driver
|
<li>GL_EXT_texture_from_pixmap extension for Xlib driver
|
||||||
<li>Support for the GL shading language with i965 driver (implemented by Intel)
|
<li>Support for the GL shading language with i965 driver (implemented by Intel)
|
||||||
|
<li>ATI R500 series support (Radeon X1300–X1950) in r300 DRI driver
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Bug fixes</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Numerous GLSL fixes
|
||||||
|
<li>Fixed some error code/detection bugs in the GLSL-related API functions
|
||||||
|
<li>Lots of DRI driver fixes.
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
@@ -21,6 +21,7 @@ The release notes summarize what's new or changed in each Mesa release.
|
|||||||
|
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A HREF="relnotes-7.1.html">7.1 release notes</A>
|
<LI><A HREF="relnotes-7.1.html">7.1 release notes</A>
|
||||||
|
<LI><A HREF="relnotes-7.0.4.html">7.0.4 release notes</A>
|
||||||
<LI><A HREF="relnotes-7.0.3.html">7.0.3 release notes</A>
|
<LI><A HREF="relnotes-7.0.3.html">7.0.3 release notes</A>
|
||||||
<LI><A HREF="relnotes-7.0.2.html">7.0.2 release notes</A>
|
<LI><A HREF="relnotes-7.0.2.html">7.0.2 release notes</A>
|
||||||
<LI><A HREF="relnotes-7.0.1.html">7.0.1 release notes</A>
|
<LI><A HREF="relnotes-7.0.1.html">7.0.1 release notes</A>
|
||||||
|
@@ -25,9 +25,10 @@ Contents
|
|||||||
<li><a href="#unsup">Unsupported Features</a>
|
<li><a href="#unsup">Unsupported Features</a>
|
||||||
<li><a href="#notes">Implementation Notes</a>
|
<li><a href="#notes">Implementation Notes</a>
|
||||||
<li><a href="#hints">Programming Hints</a>
|
<li><a href="#hints">Programming Hints</a>
|
||||||
<li><a href="#standalone">Stand-alone Compiler</a>
|
<li><a href="#standalone">Stand-alone GLSL Compiler</a>
|
||||||
<li><a href="#implementation">Compiler Implementation</a>
|
<li><a href="#implementation">Compiler Implementation</a>
|
||||||
<li><a href="#validation">Compiler Validation</a>
|
<li><a href="#validation">Compiler Validation</a>
|
||||||
|
<li><a href="#120">GLSL 1.20 support</a>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
@@ -133,7 +134,7 @@ These issues will be addressed/resolved in the future.
|
|||||||
|
|
||||||
|
|
||||||
<a name="standalone">
|
<a name="standalone">
|
||||||
<h2>Stand-alone Compiler</h2>
|
<h2>Stand-alone GLSL Compiler</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
A unique stand-alone GLSL compiler driver has been added to Mesa.
|
A unique stand-alone GLSL compiler driver has been added to Mesa.
|
||||||
@@ -155,12 +156,10 @@ This tool is useful for:
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
To build the glslcompiler program (this will be improved someday):
|
After building Mesa, the glslcompiler can be built by manually running:
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
cd src/mesa
|
cd src/mesa/drivers/glslcompiler
|
||||||
make libmesa.a
|
|
||||||
cd drivers/glslcompiler
|
|
||||||
make
|
make
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
@@ -170,20 +169,31 @@ Here's an example of using the compiler to compile a vertex shader and
|
|||||||
emit GL_ARB_vertex_program-style instructions:
|
emit GL_ARB_vertex_program-style instructions:
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
glslcompiler --arb --linenumbers --vs vertshader.txt
|
bin/glslcompiler --debug --numbers --fs progs/glsl/CH06-brick.frag.txt
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
The output may look similar to this:
|
results in:
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
!!ARBvp1.0
|
# Fragment Program/Shader
|
||||||
0: MOV result.texcoord[0], vertex.texcoord[0];
|
0: RCP TEMP[4].x, UNIFORM[2].xxxx;
|
||||||
1: DP4 temp0.x, state.matrix.mvp.row[0], vertex.position;
|
1: RCP TEMP[4].y, UNIFORM[2].yyyy;
|
||||||
2: DP4 temp0.y, state.matrix.mvp.row[1], vertex.position;
|
2: MUL TEMP[3].xy, VARYING[0], TEMP[4];
|
||||||
3: DP4 temp0.z, state.matrix.mvp.row[2], vertex.position;
|
3: MOV TEMP[1], TEMP[3];
|
||||||
4: DP4 temp0.w, state.matrix.mvp.row[3], vertex.position;
|
4: MUL TEMP[0].w, TEMP[1].yyyy, CONST[4].xxxx;
|
||||||
5: MOV result.position, temp0;
|
5: FRC TEMP[1].z, TEMP[0].wwww;
|
||||||
6: END
|
6: SGT.C TEMP[0].w, TEMP[1].zzzz, CONST[4].xxxx;
|
||||||
|
7: IF (NE.wwww); # (if false, goto 9);
|
||||||
|
8: ADD TEMP[1].x, TEMP[1].xxxx, CONST[4].xxxx;
|
||||||
|
9: ENDIF;
|
||||||
|
10: FRC TEMP[1].xy, TEMP[1];
|
||||||
|
11: SGT TEMP[2].xy, UNIFORM[3], TEMP[1];
|
||||||
|
12: MUL TEMP[1].z, TEMP[2].xxxx, TEMP[2].yyyy;
|
||||||
|
13: LRP TEMP[0], TEMP[1].zzzz, UNIFORM[0], UNIFORM[1];
|
||||||
|
14: MUL TEMP[0].xyz, TEMP[0], VARYING[1].xxxx;
|
||||||
|
15: MOV OUTPUT[0].xyz, TEMP[0];
|
||||||
|
16: MOV OUTPUT[0].w, CONST[4].yyyy;
|
||||||
|
17: END
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -309,5 +319,39 @@ should be added.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="120">
|
||||||
|
<h2>GLSL 1.20 support</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Support for GLSL version 1.20 is underway. Status as follows.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>Supported</h3>
|
||||||
|
<ul>
|
||||||
|
<li><code>mat2x3, mat2x4</code>, etc. types and functions
|
||||||
|
<li><code>transpose(), outerProduct(), matrixCompMult()</code> functions
|
||||||
|
(but untested)
|
||||||
|
<li>precision qualifiers (lowp, mediump, highp)
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Partially Complete</h3>
|
||||||
|
<ul>
|
||||||
|
<li><code>invariant</code> qualifier
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h3>Not Completed</h3>
|
||||||
|
<ul>
|
||||||
|
<li><code>array.length()</code> method
|
||||||
|
<li><code>float[5] a;</code> array syntax
|
||||||
|
<li><code>centroid</code> qualifier
|
||||||
|
<li>unsized array constructors
|
||||||
|
<li>initializers for uniforms
|
||||||
|
<li>const initializers calling built-in functions
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
||||||
|
@@ -1,17 +1,17 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Mesa Source Code Documentation</title>
|
<title>Mesa Source Code Documentation</title>
|
||||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="qindex">
|
<div class="qindex">
|
||||||
<a class="qindex" href="../main/index.html">core</a> |
|
<a class="qindex" href="../main/index.html">core</a> |
|
||||||
<a class="qindex" href="../glapi/index.html">glapi</a> |
|
<a class="qindex" href="../glapi/index.html">glapi</a> |
|
||||||
<a class="qindex" href="../vbo/index.html">vbo</a> |
|
<a class="qindex" href="../vbo/index.html">vbo</a> |
|
||||||
<a class="qindex" href="../math/index.html">math</a> |
|
<a class="qindex" href="../math/index.html">math</a> |
|
||||||
<a class="qindex" href="../shader/index.html">shader</a> |
|
<a class="qindex" href="../shader/index.html">shader</a> |
|
||||||
<a class="qindex" href="../swrast/index.html">swrast</a> |
|
<a class="qindex" href="../swrast/index.html">swrast</a> |
|
||||||
<a class="qindex" href="../swrast_setup/index.html">swrast_setup</a> |
|
<a class="qindex" href="../swrast_setup/index.html">swrast_setup</a> |
|
||||||
<a class="qindex" href="../tnl/index.html">tnl</a> |
|
<a class="qindex" href="../tnl/index.html">tnl</a> |
|
||||||
<a class="qindex" href="../tnl_dd/index.html">tnl_dd</a>
|
<a class="qindex" href="../tnl_dd/index.html">tnl_dd</a>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
<html>
|
<html>
|
||||||
<head><title>Mesa Source Code Documentation</title>
|
<head><title>Mesa Source Code Documentation</title>
|
||||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="qindex">
|
<div class="qindex">
|
||||||
<a class="qindex" href="../core_subset/index.html">Mesa Core</a> |
|
<a class="qindex" href="../core_subset/index.html">Mesa Core</a> |
|
||||||
<a class="qindex" href="../math_subset/index.html">math</a> |
|
<a class="qindex" href="../math_subset/index.html">math</a> |
|
||||||
<a class="qindex" href="../miniglx/index.html">MiniGLX</a> |
|
<a class="qindex" href="../miniglx/index.html">MiniGLX</a> |
|
||||||
<a class="qindex" href="../radeon_subset/index.html">radeon_subset</a>
|
<a class="qindex" href="../radeon_subset/index.html">radeon_subset</a>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,76 +0,0 @@
|
|||||||
/*
|
|
||||||
* Mesa 3-D graphics library
|
|
||||||
* Version: 3.0
|
|
||||||
* Copyright (C) 1995-1998 Brian Paul
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Library General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2 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
|
|
||||||
* Library General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Library General Public
|
|
||||||
* License along with this library; if not, write to the Free
|
|
||||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Example Foo/Mesa interface. See src/ddsample.c for more info.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef FOOMESA_H
|
|
||||||
#define FOOMESA_H
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct foo_mesa_visual *FooMesaVisual;
|
|
||||||
|
|
||||||
typedef struct foo_mesa_buffer *FooMesaBuffer;
|
|
||||||
|
|
||||||
typedef struct foo_mesa_context *FooMesaContext;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef BEOS
|
|
||||||
#pragma export on
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
extern FooMesaVisual FooMesaChooseVisual( /* your params */ );
|
|
||||||
|
|
||||||
extern void FooMesaDestroyVisual( FooMesaVisual visual );
|
|
||||||
|
|
||||||
|
|
||||||
extern FooMesaBuffer FooMesaCreateBuffer( FooMesaVisual visual,
|
|
||||||
void *your_window_id );
|
|
||||||
|
|
||||||
extern void FooMesaDestroyBuffer( FooMesaBuffer buffer );
|
|
||||||
|
|
||||||
|
|
||||||
extern FooMesaContext FooMesaCreateContext( FooMesaVisual visual,
|
|
||||||
FooMesaContext sharelist );
|
|
||||||
|
|
||||||
extern void FooMesaDestroyContext( FooMesaContext context );
|
|
||||||
|
|
||||||
|
|
||||||
extern void FooMesaMakeCurrent( FooMesaContext context, FooMesaBuffer buffer );
|
|
||||||
|
|
||||||
|
|
||||||
extern void FooMesaSwapBuffers( FooMesaBuffer buffer );
|
|
||||||
|
|
||||||
|
|
||||||
/* Probably some more functions... */
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef BEOS
|
|
||||||
#pragma export off
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@@ -46,9 +46,9 @@ extern "C" {
|
|||||||
/*************************************************************/
|
/*************************************************************/
|
||||||
|
|
||||||
/* Header file version number, required by OpenGL ABI for Linux */
|
/* Header file version number, required by OpenGL ABI for Linux */
|
||||||
/* glext.h last updated 2008/03/24 */
|
/* glext.h last updated 2008/08/10 */
|
||||||
/* Current version at http://www.opengl.org/registry/ */
|
/* Current version at http://www.opengl.org/registry/ */
|
||||||
#define GL_GLEXT_VERSION 40
|
#define GL_GLEXT_VERSION 41
|
||||||
|
|
||||||
#ifndef GL_VERSION_1_2
|
#ifndef GL_VERSION_1_2
|
||||||
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
|
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
|
||||||
@@ -479,6 +479,117 @@ extern "C" {
|
|||||||
#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
|
#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_VERSION_3_0
|
||||||
|
#define GL_COMPARE_REF_TO_TEXTURE GL_COMPARE_R_TO_TEXTURE_ARB
|
||||||
|
#define GL_CLIP_DISTANCE0 GL_CLIP_PLANE0
|
||||||
|
#define GL_CLIP_DISTANCE1 GL_CLIP_PLANE1
|
||||||
|
#define GL_CLIP_DISTANCE2 GL_CLIP_PLANE2
|
||||||
|
#define GL_CLIP_DISTANCE3 GL_CLIP_PLANE3
|
||||||
|
#define GL_CLIP_DISTANCE4 GL_CLIP_PLANE4
|
||||||
|
#define GL_CLIP_DISTANCE5 GL_CLIP_PLANE5
|
||||||
|
#define GL_MAX_CLIP_DISTANCES GL_MAX_CLIP_PLANES
|
||||||
|
#define GL_MAJOR_VERSION 0x821B
|
||||||
|
#define GL_MINOR_VERSION 0x821C
|
||||||
|
#define GL_NUM_EXTENSIONS 0x821D
|
||||||
|
#define GL_CONTEXT_FLAGS 0x821E
|
||||||
|
#define GL_DEPTH_BUFFER 0x8223
|
||||||
|
#define GL_STENCIL_BUFFER 0x8224
|
||||||
|
#define GL_COMPRESSED_RED 0x8225
|
||||||
|
#define GL_COMPRESSED_RG 0x8226
|
||||||
|
#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001
|
||||||
|
#define GL_RGBA32F 0x8814
|
||||||
|
#define GL_RGB32F 0x8815
|
||||||
|
#define GL_RGBA16F 0x881A
|
||||||
|
#define GL_RGB16F 0x881B
|
||||||
|
#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD
|
||||||
|
#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
|
||||||
|
#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904
|
||||||
|
#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905
|
||||||
|
#define GL_CLAMP_VERTEX_COLOR 0x891A
|
||||||
|
#define GL_CLAMP_FRAGMENT_COLOR 0x891B
|
||||||
|
#define GL_CLAMP_READ_COLOR 0x891C
|
||||||
|
#define GL_FIXED_ONLY 0x891D
|
||||||
|
#define GL_MAX_VARYING_COMPONENTS GL_MAX_VARYING_FLOATS
|
||||||
|
#define GL_TEXTURE_RED_TYPE 0x8C10
|
||||||
|
#define GL_TEXTURE_GREEN_TYPE 0x8C11
|
||||||
|
#define GL_TEXTURE_BLUE_TYPE 0x8C12
|
||||||
|
#define GL_TEXTURE_ALPHA_TYPE 0x8C13
|
||||||
|
#define GL_TEXTURE_LUMINANCE_TYPE 0x8C14
|
||||||
|
#define GL_TEXTURE_INTENSITY_TYPE 0x8C15
|
||||||
|
#define GL_TEXTURE_DEPTH_TYPE 0x8C16
|
||||||
|
#define GL_UNSIGNED_NORMALIZED 0x8C17
|
||||||
|
#define GL_TEXTURE_1D_ARRAY 0x8C18
|
||||||
|
#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19
|
||||||
|
#define GL_TEXTURE_2D_ARRAY 0x8C1A
|
||||||
|
#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B
|
||||||
|
#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C
|
||||||
|
#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
|
||||||
|
#define GL_R11F_G11F_B10F 0x8C3A
|
||||||
|
#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
|
||||||
|
#define GL_RGB9_E5 0x8C3D
|
||||||
|
#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E
|
||||||
|
#define GL_TEXTURE_SHARED_SIZE 0x8C3F
|
||||||
|
#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
|
||||||
|
#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
|
||||||
|
#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
|
||||||
|
#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83
|
||||||
|
#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
|
||||||
|
#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
|
||||||
|
#define GL_PRIMITIVES_GENERATED 0x8C87
|
||||||
|
#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
|
||||||
|
#define GL_RASTERIZER_DISCARD 0x8C89
|
||||||
|
#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
|
||||||
|
#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
|
||||||
|
#define GL_INTERLEAVED_ATTRIBS 0x8C8C
|
||||||
|
#define GL_SEPARATE_ATTRIBS 0x8C8D
|
||||||
|
#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
|
||||||
|
#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
|
||||||
|
#define GL_RGBA32UI 0x8D70
|
||||||
|
#define GL_RGB32UI 0x8D71
|
||||||
|
#define GL_RGBA16UI 0x8D76
|
||||||
|
#define GL_RGB16UI 0x8D77
|
||||||
|
#define GL_RGBA8UI 0x8D7C
|
||||||
|
#define GL_RGB8UI 0x8D7D
|
||||||
|
#define GL_RGBA32I 0x8D82
|
||||||
|
#define GL_RGB32I 0x8D83
|
||||||
|
#define GL_RGBA16I 0x8D88
|
||||||
|
#define GL_RGB16I 0x8D89
|
||||||
|
#define GL_RGBA8I 0x8D8E
|
||||||
|
#define GL_RGB8I 0x8D8F
|
||||||
|
#define GL_RED_INTEGER 0x8D94
|
||||||
|
#define GL_GREEN_INTEGER 0x8D95
|
||||||
|
#define GL_BLUE_INTEGER 0x8D96
|
||||||
|
#define GL_ALPHA_INTEGER 0x8D97
|
||||||
|
#define GL_RGB_INTEGER 0x8D98
|
||||||
|
#define GL_RGBA_INTEGER 0x8D99
|
||||||
|
#define GL_BGR_INTEGER 0x8D9A
|
||||||
|
#define GL_BGRA_INTEGER 0x8D9B
|
||||||
|
#define GL_SAMPLER_1D_ARRAY 0x8DC0
|
||||||
|
#define GL_SAMPLER_2D_ARRAY 0x8DC1
|
||||||
|
#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3
|
||||||
|
#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
|
||||||
|
#define GL_SAMPLER_CUBE_SHADOW 0x8DC5
|
||||||
|
#define GL_UNSIGNED_INT_VEC2 0x8DC6
|
||||||
|
#define GL_UNSIGNED_INT_VEC3 0x8DC7
|
||||||
|
#define GL_UNSIGNED_INT_VEC4 0x8DC8
|
||||||
|
#define GL_INT_SAMPLER_1D 0x8DC9
|
||||||
|
#define GL_INT_SAMPLER_2D 0x8DCA
|
||||||
|
#define GL_INT_SAMPLER_3D 0x8DCB
|
||||||
|
#define GL_INT_SAMPLER_CUBE 0x8DCC
|
||||||
|
#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE
|
||||||
|
#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
|
||||||
|
#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1
|
||||||
|
#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
|
||||||
|
#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
|
||||||
|
#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
|
||||||
|
#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6
|
||||||
|
#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
|
||||||
|
#define GL_QUERY_WAIT 0x8E13
|
||||||
|
#define GL_QUERY_NO_WAIT 0x8E14
|
||||||
|
#define GL_QUERY_BY_REGION_WAIT 0x8E15
|
||||||
|
#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef GL_ARB_multitexture
|
#ifndef GL_ARB_multitexture
|
||||||
#define GL_TEXTURE0_ARB 0x84C0
|
#define GL_TEXTURE0_ARB 0x84C0
|
||||||
#define GL_TEXTURE1_ARB 0x84C1
|
#define GL_TEXTURE1_ARB 0x84C1
|
||||||
@@ -974,6 +1085,175 @@ extern "C" {
|
|||||||
#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
|
#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_depth_buffer_float
|
||||||
|
#define GL_DEPTH_COMPONENT32F 0x8CAC
|
||||||
|
#define GL_DEPTH32F_STENCIL8 0x8CAD
|
||||||
|
#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_draw_instanced
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_framebuffer_object
|
||||||
|
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
|
||||||
|
#define GL_FRAMEBUFFER_DEFAULT 0x8218
|
||||||
|
#define GL_FRAMEBUFFER_UNDEFINED 0x8219
|
||||||
|
#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A
|
||||||
|
#define GL_INDEX 0x8222
|
||||||
|
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
|
||||||
|
#define GL_DEPTH_STENCIL 0x84F9
|
||||||
|
#define GL_UNSIGNED_INT_24_8 0x84FA
|
||||||
|
#define GL_DEPTH24_STENCIL8 0x88F0
|
||||||
|
#define GL_TEXTURE_STENCIL_SIZE 0x88F1
|
||||||
|
#define GL_FRAMEBUFFER_BINDING 0x8CA6
|
||||||
|
#define GL_DRAW_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING
|
||||||
|
#define GL_RENDERBUFFER_BINDING 0x8CA7
|
||||||
|
#define GL_READ_FRAMEBUFFER 0x8CA8
|
||||||
|
#define GL_DRAW_FRAMEBUFFER 0x8CA9
|
||||||
|
#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
|
||||||
|
#define GL_RENDERBUFFER_SAMPLES 0x8CAB
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
|
||||||
|
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
|
||||||
|
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
|
||||||
|
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
|
||||||
|
#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
|
||||||
|
#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
|
||||||
|
#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
|
||||||
|
#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
|
||||||
|
#define GL_COLOR_ATTACHMENT0 0x8CE0
|
||||||
|
#define GL_COLOR_ATTACHMENT1 0x8CE1
|
||||||
|
#define GL_COLOR_ATTACHMENT2 0x8CE2
|
||||||
|
#define GL_COLOR_ATTACHMENT3 0x8CE3
|
||||||
|
#define GL_COLOR_ATTACHMENT4 0x8CE4
|
||||||
|
#define GL_COLOR_ATTACHMENT5 0x8CE5
|
||||||
|
#define GL_COLOR_ATTACHMENT6 0x8CE6
|
||||||
|
#define GL_COLOR_ATTACHMENT7 0x8CE7
|
||||||
|
#define GL_COLOR_ATTACHMENT8 0x8CE8
|
||||||
|
#define GL_COLOR_ATTACHMENT9 0x8CE9
|
||||||
|
#define GL_COLOR_ATTACHMENT10 0x8CEA
|
||||||
|
#define GL_COLOR_ATTACHMENT11 0x8CEB
|
||||||
|
#define GL_COLOR_ATTACHMENT12 0x8CEC
|
||||||
|
#define GL_COLOR_ATTACHMENT13 0x8CED
|
||||||
|
#define GL_COLOR_ATTACHMENT14 0x8CEE
|
||||||
|
#define GL_COLOR_ATTACHMENT15 0x8CEF
|
||||||
|
#define GL_DEPTH_ATTACHMENT 0x8D00
|
||||||
|
#define GL_STENCIL_ATTACHMENT 0x8D20
|
||||||
|
#define GL_FRAMEBUFFER 0x8D40
|
||||||
|
#define GL_RENDERBUFFER 0x8D41
|
||||||
|
#define GL_RENDERBUFFER_WIDTH 0x8D42
|
||||||
|
#define GL_RENDERBUFFER_HEIGHT 0x8D43
|
||||||
|
#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
|
||||||
|
#define GL_STENCIL_INDEX1 0x8D46
|
||||||
|
#define GL_STENCIL_INDEX4 0x8D47
|
||||||
|
#define GL_STENCIL_INDEX8 0x8D48
|
||||||
|
#define GL_STENCIL_INDEX16 0x8D49
|
||||||
|
#define GL_RENDERBUFFER_RED_SIZE 0x8D50
|
||||||
|
#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
|
||||||
|
#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
|
||||||
|
#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
|
||||||
|
#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
|
||||||
|
#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
|
||||||
|
#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
|
||||||
|
#define GL_MAX_SAMPLES 0x8D57
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_framebuffer_sRGB
|
||||||
|
#define GL_FRAMEBUFFER_SRGB 0x8DB9
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_geometry_shader4
|
||||||
|
#define GL_LINES_ADJACENCY_ARB 0x000A
|
||||||
|
#define GL_LINE_STRIP_ADJACENCY_ARB 0x000B
|
||||||
|
#define GL_TRIANGLES_ADJACENCY_ARB 0x000C
|
||||||
|
#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D
|
||||||
|
#define GL_PROGRAM_POINT_SIZE_ARB 0x8642
|
||||||
|
#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7
|
||||||
|
#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8
|
||||||
|
#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9
|
||||||
|
#define GL_GEOMETRY_SHADER_ARB 0x8DD9
|
||||||
|
#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA
|
||||||
|
#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB
|
||||||
|
#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC
|
||||||
|
#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD
|
||||||
|
#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE
|
||||||
|
#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF
|
||||||
|
#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0
|
||||||
|
#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_half_float_vertex
|
||||||
|
#define GL_HALF_FLOAT 0x140B
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_instanced_arrays
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_map_buffer_range
|
||||||
|
#define GL_MAP_READ_BIT 0x0001
|
||||||
|
#define GL_MAP_WRITE_BIT 0x0002
|
||||||
|
#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
|
||||||
|
#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
|
||||||
|
#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
|
||||||
|
#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_texture_buffer_object
|
||||||
|
#define GL_TEXTURE_BUFFER_ARB 0x8C2A
|
||||||
|
#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B
|
||||||
|
#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C
|
||||||
|
#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D
|
||||||
|
#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_texture_compression_rgtc
|
||||||
|
#define GL_COMPRESSED_RED_RGTC1 0x8DBB
|
||||||
|
#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC
|
||||||
|
#define GL_COMPRESSED_RG_RGTC2 0x8DBD
|
||||||
|
#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_texture_rg
|
||||||
|
#define GL_RG 0x8227
|
||||||
|
#define GL_RG_INTEGER 0x8228
|
||||||
|
#define GL_R8 0x8229
|
||||||
|
#define GL_R16 0x822A
|
||||||
|
#define GL_RG8 0x822B
|
||||||
|
#define GL_RG16 0x822C
|
||||||
|
#define GL_R16F 0x822D
|
||||||
|
#define GL_R32F 0x822E
|
||||||
|
#define GL_RG16F 0x822F
|
||||||
|
#define GL_RG32F 0x8230
|
||||||
|
#define GL_R8I 0x8231
|
||||||
|
#define GL_R8UI 0x8232
|
||||||
|
#define GL_R16I 0x8233
|
||||||
|
#define GL_R16UI 0x8234
|
||||||
|
#define GL_R32I 0x8235
|
||||||
|
#define GL_R32UI 0x8236
|
||||||
|
#define GL_RG8I 0x8237
|
||||||
|
#define GL_RG8UI 0x8238
|
||||||
|
#define GL_RG16I 0x8239
|
||||||
|
#define GL_RG16UI 0x823A
|
||||||
|
#define GL_RG32I 0x823B
|
||||||
|
#define GL_RG32UI 0x823C
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_vertex_array_object
|
||||||
|
#define GL_VERTEX_ARRAY_BINDING 0x85B5
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef GL_EXT_abgr
|
#ifndef GL_EXT_abgr
|
||||||
#define GL_ABGR_EXT 0x8000
|
#define GL_ABGR_EXT 0x8000
|
||||||
#endif
|
#endif
|
||||||
@@ -3382,6 +3662,40 @@ extern "C" {
|
|||||||
#ifndef GL_GREMEDY_frame_terminator
|
#ifndef GL_GREMEDY_frame_terminator
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_NV_conditional_render
|
||||||
|
#define GL_QUERY_WAIT_NV 0x8E13
|
||||||
|
#define GL_QUERY_NO_WAIT_NV 0x8E14
|
||||||
|
#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15
|
||||||
|
#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_NV_present_video
|
||||||
|
#define GL_FRAME_NV 0x8E26
|
||||||
|
#define GL_FIELDS_NV 0x8E27
|
||||||
|
#define GL_CURRENT_TIME_NV 0x8E28
|
||||||
|
#define GL_NUM_FILL_STREAMS_NV 0x8E29
|
||||||
|
#define GL_PRESENT_TIME_NV 0x8E2A
|
||||||
|
#define GL_PRESENT_DURATION_NV 0x8E2B
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_EXT_transform_feedback
|
||||||
|
#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E
|
||||||
|
#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84
|
||||||
|
#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85
|
||||||
|
#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F
|
||||||
|
#define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C
|
||||||
|
#define GL_SEPARATE_ATTRIBS_EXT 0x8C8D
|
||||||
|
#define GL_PRIMITIVES_GENERATED_EXT 0x8C87
|
||||||
|
#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88
|
||||||
|
#define GL_RASTERIZER_DISCARD_EXT 0x8C89
|
||||||
|
#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A
|
||||||
|
#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B
|
||||||
|
#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80
|
||||||
|
#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83
|
||||||
|
#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F
|
||||||
|
#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************/
|
/*************************************************************/
|
||||||
|
|
||||||
@@ -3419,16 +3733,16 @@ typedef unsigned short GLhalfNV;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GLEXT_64_TYPES_DEFINED
|
#ifndef GLEXT_64_TYPES_DEFINED
|
||||||
/* This code block is duplicated in glext.h, so must be protected */
|
/* This code block is duplicated in glxext.h, so must be protected */
|
||||||
#define GLEXT_64_TYPES_DEFINED
|
#define GLEXT_64_TYPES_DEFINED
|
||||||
/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
|
/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
|
||||||
/* (as used in the GL_EXT_timer_query extension). */
|
/* (as used in the GL_EXT_timer_query extension). */
|
||||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#elif defined(__sun__)
|
#elif defined(__sun__) || defined(__digital__)
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#if defined(__STDC__)
|
#if defined(__STDC__)
|
||||||
#if defined(__arch64__)
|
#if defined(__arch64__) || defined(_LP64)
|
||||||
typedef long int int64_t;
|
typedef long int int64_t;
|
||||||
typedef unsigned long int uint64_t;
|
typedef unsigned long int uint64_t;
|
||||||
#else
|
#else
|
||||||
@@ -3436,7 +3750,7 @@ typedef long long int int64_t;
|
|||||||
typedef unsigned long long int uint64_t;
|
typedef unsigned long long int uint64_t;
|
||||||
#endif /* __arch64__ */
|
#endif /* __arch64__ */
|
||||||
#endif /* __STDC__ */
|
#endif /* __STDC__ */
|
||||||
#elif defined( __VMS )
|
#elif defined( __VMS ) || defined(__sgi)
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#elif defined(__SCO__) || defined(__USLC__)
|
#elif defined(__SCO__) || defined(__USLC__)
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@@ -3990,6 +4304,10 @@ typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei co
|
|||||||
typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_VERSION_3_0
|
||||||
|
#define GL_VERSION_3_0 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef GL_ARB_multitexture
|
#ifndef GL_ARB_multitexture
|
||||||
#define GL_ARB_multitexture 1
|
#define GL_ARB_multitexture 1
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
@@ -4569,6 +4887,54 @@ typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
|
|||||||
#define GL_ARB_pixel_buffer_object 1
|
#define GL_ARB_pixel_buffer_object 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_depth_buffer_float
|
||||||
|
#define GL_ARB_depth_buffer_float 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_draw_instanced
|
||||||
|
#define GL_ARB_draw_instanced 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_framebuffer_object
|
||||||
|
#define GL_ARB_framebuffer_object 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_framebuffer_sRGB
|
||||||
|
#define GL_ARB_framebuffer_sRGB 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_geometry_shader4
|
||||||
|
#define GL_ARB_geometry_shader4 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_half_float_vertex
|
||||||
|
#define GL_ARB_half_float_vertex 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_instanced_arrays
|
||||||
|
#define GL_ARB_instanced_arrays 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_map_buffer_range
|
||||||
|
#define GL_ARB_map_buffer_range 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_texture_buffer_object
|
||||||
|
#define GL_ARB_texture_buffer_object 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_texture_compression_rgtc
|
||||||
|
#define GL_ARB_texture_compression_rgtc 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_texture_rg
|
||||||
|
#define GL_ARB_texture_rg 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_ARB_vertex_array_object
|
||||||
|
#define GL_ARB_vertex_array_object 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef GL_EXT_abgr
|
#ifndef GL_EXT_abgr
|
||||||
#define GL_EXT_abgr 1
|
#define GL_EXT_abgr 1
|
||||||
#endif
|
#endif
|
||||||
@@ -7263,6 +7629,18 @@ GLAPI void APIENTRY glFrameTerminatorGREMEDY (void);
|
|||||||
typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void);
|
typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_NV_conditional_render
|
||||||
|
#define GL_NV_conditional_render 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_NV_present_video
|
||||||
|
#define GL_NV_present_video 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_EXT_transform_feedback
|
||||||
|
#define GL_EXT_transform_feedback 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -46,9 +46,9 @@ extern "C" {
|
|||||||
/*************************************************************/
|
/*************************************************************/
|
||||||
|
|
||||||
/* Header file version number, required by OpenGL ABI for Linux */
|
/* Header file version number, required by OpenGL ABI for Linux */
|
||||||
/* glxext.h last updated 2007/04/21 */
|
/* glxext.h last updated 2008/08/10 */
|
||||||
/* Current version at http://www.opengl.org/registry/ */
|
/* Current version at http://www.opengl.org/registry/ */
|
||||||
#define GLX_GLXEXT_VERSION 19
|
#define GLX_GLXEXT_VERSION 20
|
||||||
|
|
||||||
#ifndef GLX_VERSION_1_3
|
#ifndef GLX_VERSION_1_3
|
||||||
#define GLX_WINDOW_BIT 0x00000001
|
#define GLX_WINDOW_BIT 0x00000001
|
||||||
@@ -346,6 +346,26 @@ extern "C" {
|
|||||||
#define GLX_AUX9_EXT 0x20EB
|
#define GLX_AUX9_EXT 0x20EB
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_NV_present_video
|
||||||
|
#define GLX_GLX_NUM_VIDEO_SLOTS_NV 0x20F0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_NV_video_out
|
||||||
|
#define GLX_GLX_VIDEO_OUT_COLOR_NV 0x20C3
|
||||||
|
#define GLX_GLX_VIDEO_OUT_ALPHA_NV 0x20C4
|
||||||
|
#define GLX_GLX_VIDEO_OUT_DEPTH_NV 0x20C5
|
||||||
|
#define GLX_GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
|
||||||
|
#define GLX_GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
|
||||||
|
#define GLX_GLX_VIDEO_OUT_FRAME_NV 0x20C8
|
||||||
|
#define GLX_GLX_VIDEO_OUT_FIELD_1_NV 0x20C9
|
||||||
|
#define GLX_GLX_VIDEO_OUT_FIELD_2_NV 0x20CA
|
||||||
|
#define GLX_GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB
|
||||||
|
#define GLX_GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_NV_swap_group
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************/
|
/*************************************************************/
|
||||||
|
|
||||||
@@ -380,7 +400,7 @@ typedef struct {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GLEXT_64_TYPES_DEFINED
|
#ifndef GLEXT_64_TYPES_DEFINED
|
||||||
/* This code block is duplicated in glxext.h, so must be protected */
|
/* This code block is duplicated in glext.h, so must be protected */
|
||||||
#define GLEXT_64_TYPES_DEFINED
|
#define GLEXT_64_TYPES_DEFINED
|
||||||
/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
|
/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
|
||||||
/* (as used in the GLX_OML_sync_control extension). */
|
/* (as used in the GLX_OML_sync_control extension). */
|
||||||
@@ -389,7 +409,7 @@ typedef struct {
|
|||||||
#elif defined(__sun__) || defined(__digital__)
|
#elif defined(__sun__) || defined(__digital__)
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#if defined(__STDC__)
|
#if defined(__STDC__)
|
||||||
#if defined(__arch64__)
|
#if defined(__arch64__) || defined(_LP64)
|
||||||
typedef long int int64_t;
|
typedef long int int64_t;
|
||||||
typedef unsigned long int uint64_t;
|
typedef unsigned long int uint64_t;
|
||||||
#else
|
#else
|
||||||
@@ -397,7 +417,7 @@ typedef long long int int64_t;
|
|||||||
typedef unsigned long long int uint64_t;
|
typedef unsigned long long int uint64_t;
|
||||||
#endif /* __arch64__ */
|
#endif /* __arch64__ */
|
||||||
#endif /* __STDC__ */
|
#endif /* __STDC__ */
|
||||||
#elif defined( __VMS )
|
#elif defined( __VMS ) || defined(__sgi)
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#elif defined(__SCO__) || defined(__USLC__)
|
#elif defined(__SCO__) || defined(__USLC__)
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@@ -777,6 +797,18 @@ typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable,
|
|||||||
typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
|
typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_NV_present_video
|
||||||
|
#define GLX_NV_present_video 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_NV_video_out
|
||||||
|
#define GLX_NV_video_out 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GLX_NV_swap_group
|
||||||
|
#define GLX_NV_swap_group 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -40,7 +40,14 @@
|
|||||||
#ifndef DRI_INTERFACE_H
|
#ifndef DRI_INTERFACE_H
|
||||||
#define DRI_INTERFACE_H
|
#define DRI_INTERFACE_H
|
||||||
|
|
||||||
|
/* Make this something other than __APPLE__ for other arcs with no drm.h */
|
||||||
|
#ifndef __APPLE__
|
||||||
#include <drm.h>
|
#include <drm.h>
|
||||||
|
#else
|
||||||
|
typedef unsigned int drm_context_t;
|
||||||
|
typedef unsigned int drm_drawable_t;
|
||||||
|
typedef struct drm_clip_rect drm_clip_rect_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \name DRI interface structures
|
* \name DRI interface structures
|
||||||
|
@@ -130,7 +130,7 @@ extern void WMesaPaletteChange(HPALETTE Pal);
|
|||||||
|
|
||||||
extern void WMesaMove(void);
|
extern void WMesaMove(void);
|
||||||
|
|
||||||
|
void WMesaShareLists(WMesaContext ctx_to_share, WMesaContext ctx);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -27,6 +27,7 @@ PROGS = \
|
|||||||
cubemap \
|
cubemap \
|
||||||
drawpix \
|
drawpix \
|
||||||
engine \
|
engine \
|
||||||
|
fbo_firecube \
|
||||||
fire \
|
fire \
|
||||||
fogcoord \
|
fogcoord \
|
||||||
fplight \
|
fplight \
|
||||||
@@ -124,41 +125,41 @@ extfuncs.h: $(TOP)/progs/util/extfuncs.h
|
|||||||
|
|
||||||
|
|
||||||
reflect: reflect.o showbuffer.o readtex.o
|
reflect: reflect.o showbuffer.o readtex.o
|
||||||
$(CC) $(LDFLAGS) reflect.o showbuffer.o readtex.o $(LIBS) -o $@
|
$(CC) $(CFLAGS) $(LDFLAGS) reflect.o showbuffer.o readtex.o $(LIBS) -o $@
|
||||||
|
|
||||||
reflect.o: reflect.c showbuffer.h
|
reflect.o: reflect.c showbuffer.h
|
||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) reflect.c
|
$(CC) -c -I$(INCDIR) $(CFLAGS) reflect.c
|
||||||
|
|
||||||
|
|
||||||
shadowtex: shadowtex.o showbuffer.o
|
shadowtex: shadowtex.o showbuffer.o
|
||||||
$(CC) $(LDFLAGS) shadowtex.o showbuffer.o $(LIBS) -o $@
|
$(CC) $(CFLAGS) $(LDFLAGS) shadowtex.o showbuffer.o $(LIBS) -o $@
|
||||||
|
|
||||||
shadowtex.o: shadowtex.c showbuffer.h
|
shadowtex.o: shadowtex.c showbuffer.h
|
||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) shadowtex.c
|
$(CC) -c -I$(INCDIR) $(CFLAGS) shadowtex.c
|
||||||
|
|
||||||
|
|
||||||
gloss: gloss.o trackball.o readtex.o
|
gloss: gloss.o trackball.o readtex.o
|
||||||
$(CC) $(LDFLAGS) gloss.o trackball.o readtex.o $(LIBS) -o $@
|
$(CC) $(CFLAGS) $(LDFLAGS) gloss.o trackball.o readtex.o $(LIBS) -o $@
|
||||||
|
|
||||||
gloss.o: gloss.c trackball.h
|
gloss.o: gloss.c trackball.h
|
||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) gloss.c
|
$(CC) -c -I$(INCDIR) $(CFLAGS) gloss.c
|
||||||
|
|
||||||
|
|
||||||
engine: engine.o trackball.o readtex.o
|
engine: engine.o trackball.o readtex.o
|
||||||
$(CC) $(LDFLAGS) engine.o trackball.o readtex.o $(LIBS) -o $@
|
$(CC) $(CFLAGS) $(LDFLAGS) engine.o trackball.o readtex.o $(LIBS) -o $@
|
||||||
|
|
||||||
engine.o: engine.c trackball.h
|
engine.o: engine.c trackball.h
|
||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) engine.c
|
$(CC) -c -I$(INCDIR) $(CFLAGS) engine.c
|
||||||
|
|
||||||
|
|
||||||
fslight: fslight.o
|
fslight: fslight.o
|
||||||
$(CC) $(LDFLAGS) fslight.o $(LIBS) -o $@
|
$(CC) $(CFLAGS) $(LDFLAGS) fslight.o $(LIBS) -o $@
|
||||||
|
|
||||||
fslight.o: fslight.c extfuncs.h
|
fslight.o: fslight.c extfuncs.h
|
||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) fslight.c
|
$(CC) -c -I$(INCDIR) $(CFLAGS) fslight.c
|
||||||
|
|
||||||
rain: particles.o rain.o readtex.o
|
rain: particles.o rain.o readtex.o
|
||||||
$(CXX) $(LDFLAGS) $^ $(LIBS) -o $@
|
$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
|
||||||
|
|
||||||
rain.o: rain.cxx readtex.h
|
rain.o: rain.cxx readtex.h
|
||||||
$(CXX) -c -I$(INCDIR) $(CXXFLAGS) $<
|
$(CXX) -c -I$(INCDIR) $(CXXFLAGS) $<
|
||||||
|
1041
progs/demos/fbo_firecube.c
Normal file
1041
progs/demos/fbo_firecube.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -264,38 +264,44 @@ draw(void)
|
|||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
glTranslatef(0.0, 0.0, -40.0);
|
glTranslatef(0.0, 0.0, -40.0);
|
||||||
|
|
||||||
|
/* clear whole depth buffer */
|
||||||
glDisable(GL_SCISSOR_TEST);
|
glDisable(GL_SCISSOR_TEST);
|
||||||
glClear(GL_DEPTH_BUFFER_BIT);
|
glClear(GL_DEPTH_BUFFER_BIT);
|
||||||
glEnable(GL_SCISSOR_TEST);
|
glEnable(GL_SCISSOR_TEST);
|
||||||
|
|
||||||
/* draw gears */
|
/* clear upper-left corner of color buffer (unused space) */
|
||||||
|
glScissor(0, TexHeight, TexWidth, WinHeight - TexHeight);
|
||||||
|
glClearColor(0.0, 0.0, 0.0, 0.0);
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
|
/* clear lower-left corner of color buffer */
|
||||||
glViewport(0, 0, TexWidth, TexHeight);
|
glViewport(0, 0, TexWidth, TexHeight);
|
||||||
glScissor(0, 0, TexWidth, TexHeight);
|
glScissor(0, 0, TexWidth, TexHeight);
|
||||||
glClearColor(0.5, 0.5, 0.8, 0.0);
|
|
||||||
glClearColor(1, 1, 1, 0);
|
glClearColor(1, 1, 1, 0);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
|
/* draw gears in lower-left corner */
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 60.0);
|
glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 60.0);
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
|
||||||
DrawGears();
|
DrawGears();
|
||||||
|
|
||||||
|
/* copy color buffer to texture */
|
||||||
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, TexWidth, TexHeight);
|
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, TexWidth, TexHeight);
|
||||||
|
|
||||||
/* draw textured cube */
|
/* clear right half of color buffer */
|
||||||
glViewport(TexWidth, 0, WinWidth - TexWidth, WinHeight);
|
glViewport(TexWidth, 0, WinWidth - TexWidth, WinHeight);
|
||||||
glScissor(TexWidth, 0, WinWidth - TexWidth, WinHeight);
|
glScissor(TexWidth, 0, WinWidth - TexWidth, WinHeight);
|
||||||
glClearColor(0.5, 0.5, 0.8, 0.0);
|
glClearColor(0.5, 0.5, 0.8, 0.0);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
|
/* draw textured cube in right half of window */
|
||||||
ar = (float) (WinWidth - TexWidth) / WinHeight;
|
ar = (float) (WinWidth - TexWidth) / WinHeight;
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
glFrustum(-ar, ar, -1.0, 1.0, 5.0, 60.0);
|
glFrustum(-ar, ar, -1.0, 1.0, 5.0, 60.0);
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
|
||||||
DrawCube();
|
DrawCube();
|
||||||
|
|
||||||
/* finish up */
|
/* finish up */
|
||||||
|
@@ -955,7 +955,6 @@ Init(void)
|
|||||||
glGenTextures(1, &GrayTexture);
|
glGenTextures(1, &GrayTexture);
|
||||||
glBindTexture(GL_TEXTURE_1D, GrayTexture);
|
glBindTexture(GL_TEXTURE_1D, GrayTexture);
|
||||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP);
|
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP);
|
||||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP);
|
|
||||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
{
|
{
|
||||||
|
@@ -76,6 +76,7 @@ int textureWidth = 64;
|
|||||||
int textureHeight = 64;
|
int textureHeight = 64;
|
||||||
|
|
||||||
int winWidth = 580, winHeight = 720;
|
int winWidth = 580, winHeight = 720;
|
||||||
|
int win;
|
||||||
|
|
||||||
struct formatInfo {
|
struct formatInfo {
|
||||||
GLenum baseFormat;
|
GLenum baseFormat;
|
||||||
@@ -288,6 +289,7 @@ static void keyboard( unsigned char c, int x, int y )
|
|||||||
displayLevelInfo = !displayLevelInfo;
|
displayLevelInfo = !displayLevelInfo;
|
||||||
break;
|
break;
|
||||||
case 27: /* Escape key should force exit. */
|
case 27: /* Escape key should force exit. */
|
||||||
|
glutDestroyWindow(win);
|
||||||
exit(0);
|
exit(0);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -785,7 +787,7 @@ int main( int argc, char *argv[] )
|
|||||||
|
|
||||||
glutInitWindowSize( winWidth, winHeight );
|
glutInitWindowSize( winWidth, winHeight );
|
||||||
glutInitWindowPosition( 0, 0 );
|
glutInitWindowPosition( 0, 0 );
|
||||||
glutCreateWindow( "Texture Environment Test" );
|
win = glutCreateWindow( "Texture Environment Test" );
|
||||||
|
|
||||||
initialize();
|
initialize();
|
||||||
instructions();
|
instructions();
|
||||||
|
@@ -72,7 +72,7 @@ UTIL_FILES = readtex.h readtex.c
|
|||||||
.SUFFIXES: .c
|
.SUFFIXES: .c
|
||||||
|
|
||||||
.c:
|
.c:
|
||||||
$(CC) $(INCLUDES) $(CFLAGS) $< $(LIBS) -o $@
|
$(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
||||||
@@ -99,13 +99,13 @@ getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.
|
|||||||
|
|
||||||
|
|
||||||
texrect: texrect.o readtex.o
|
texrect: texrect.o readtex.o
|
||||||
$(CC) texrect.o readtex.o $(LIBS) -o $@
|
$(CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
|
||||||
|
|
||||||
texrect.o: texrect.c readtex.h
|
texrect.o: texrect.c readtex.h
|
||||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
||||||
|
|
||||||
invert: invert.o readtex.o
|
invert: invert.o readtex.o
|
||||||
$(CC) invert.o readtex.o $(LIBS) -o $@
|
$(CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
|
||||||
|
|
||||||
invert.o: invert.c readtex.h
|
invert.o: invert.c readtex.h
|
||||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
||||||
|
3
progs/glsl/.gitignore
vendored
3
progs/glsl/.gitignore
vendored
@@ -4,10 +4,13 @@ bump
|
|||||||
deriv
|
deriv
|
||||||
extfuncs.h
|
extfuncs.h
|
||||||
mandelbrot
|
mandelbrot
|
||||||
|
multitex
|
||||||
noise
|
noise
|
||||||
points
|
points
|
||||||
readtex.c
|
readtex.c
|
||||||
readtex.h
|
readtex.h
|
||||||
|
shaderutil.c
|
||||||
|
shaderutil.h
|
||||||
texdemo1
|
texdemo1
|
||||||
toyball
|
toyball
|
||||||
trirast
|
trirast
|
||||||
|
@@ -13,11 +13,13 @@ PROGS = \
|
|||||||
bitmap \
|
bitmap \
|
||||||
brick \
|
brick \
|
||||||
bump \
|
bump \
|
||||||
|
convolutions \
|
||||||
deriv \
|
deriv \
|
||||||
mandelbrot \
|
mandelbrot \
|
||||||
multitex \
|
multitex \
|
||||||
noise \
|
noise \
|
||||||
points \
|
points \
|
||||||
|
pointcoord \
|
||||||
texdemo1 \
|
texdemo1 \
|
||||||
toyball \
|
toyball \
|
||||||
twoside \
|
twoside \
|
||||||
@@ -89,6 +91,13 @@ bump: bump.o shaderutil.o
|
|||||||
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) bump.o shaderutil.o $(LIBS) -o $@
|
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) bump.o shaderutil.o $(LIBS) -o $@
|
||||||
|
|
||||||
|
|
||||||
|
convolutions.o: convolutions.c readtex.h
|
||||||
|
$(CC) -c -I$(INCDIR) $(CFLAGS) convolutions.c
|
||||||
|
|
||||||
|
convolutions: convolutions.o readtex.o
|
||||||
|
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) convolutions.o readtex.o $(LIBS) -o $@
|
||||||
|
|
||||||
|
|
||||||
deriv.o: deriv.c extfuncs.h shaderutil.h
|
deriv.o: deriv.c extfuncs.h shaderutil.h
|
||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) deriv.c
|
$(CC) -c -I$(INCDIR) $(CFLAGS) deriv.c
|
||||||
|
|
||||||
@@ -124,6 +133,13 @@ points: points.o shaderutil.o
|
|||||||
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) points.o shaderutil.o $(LIBS) -o $@
|
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) points.o shaderutil.o $(LIBS) -o $@
|
||||||
|
|
||||||
|
|
||||||
|
pointcoord.o: pointcoord.c readtex.h extfuncs.h shaderutil.h
|
||||||
|
$(CC) -c -I$(INCDIR) $(CFLAGS) pointcoord.c
|
||||||
|
|
||||||
|
pointcoord: pointcoord.o readtex.o shaderutil.o
|
||||||
|
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) pointcoord.o readtex.o shaderutil.o $(LIBS) -o $@
|
||||||
|
|
||||||
|
|
||||||
texdemo1.o: texdemo1.c readtex.h extfuncs.h shaderutil.h
|
texdemo1.o: texdemo1.c readtex.h extfuncs.h shaderutil.h
|
||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) texdemo1.c
|
$(CC) -c -I$(INCDIR) $(CFLAGS) texdemo1.c
|
||||||
|
|
||||||
|
@@ -16,8 +16,8 @@
|
|||||||
#include "shaderutil.h"
|
#include "shaderutil.h"
|
||||||
|
|
||||||
|
|
||||||
static char *FragProgFile = "CH06-brick.frag.txt";
|
static char *FragProgFile = "CH06-brick.frag";
|
||||||
static char *VertProgFile = "CH06-brick.vert.txt";
|
static char *VertProgFile = "CH06-brick.vert";
|
||||||
|
|
||||||
/* program/shader objects */
|
/* program/shader objects */
|
||||||
static GLuint fragShader;
|
static GLuint fragShader;
|
||||||
|
@@ -16,8 +16,8 @@
|
|||||||
#include "shaderutil.h"
|
#include "shaderutil.h"
|
||||||
|
|
||||||
|
|
||||||
static char *FragProgFile = "CH11-bumpmap.frag.txt";
|
static char *FragProgFile = "CH11-bumpmap.frag";
|
||||||
static char *VertProgFile = "CH11-bumpmap.vert.txt";
|
static char *VertProgFile = "CH11-bumpmap.vert";
|
||||||
|
|
||||||
/* program/shader objects */
|
/* program/shader objects */
|
||||||
static GLuint fragShader;
|
static GLuint fragShader;
|
||||||
|
21
progs/glsl/convolution.frag
Normal file
21
progs/glsl/convolution.frag
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
const int KernelSize = 9;
|
||||||
|
|
||||||
|
//texture offsets
|
||||||
|
uniform vec2 Offset[KernelSize];
|
||||||
|
//convolution kernel
|
||||||
|
uniform vec4 KernelValue[KernelSize];
|
||||||
|
uniform sampler2D srcTex;
|
||||||
|
uniform vec4 ScaleFactor;
|
||||||
|
uniform vec4 BaseColor;
|
||||||
|
|
||||||
|
void main(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
vec4 sum = vec4(0.0);
|
||||||
|
for (i = 0; i < KernelSize; ++i) {
|
||||||
|
vec4 tmp = texture2D(srcTex, gl_TexCoord[0].st + Offset[i]);
|
||||||
|
sum += tmp * KernelValue[i];
|
||||||
|
}
|
||||||
|
gl_FragColor = sum * ScaleFactor + BaseColor;
|
||||||
|
}
|
5
progs/glsl/convolution.vert
Normal file
5
progs/glsl/convolution.vert
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
void main() {
|
||||||
|
gl_FrontColor = gl_Color;
|
||||||
|
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||||
|
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
||||||
|
}
|
469
progs/glsl/convolutions.c
Normal file
469
progs/glsl/convolutions.c
Normal file
@@ -0,0 +1,469 @@
|
|||||||
|
/**
|
||||||
|
* Convolution with GLSL.
|
||||||
|
* Note: uses GL_ARB_shader_objects, GL_ARB_vertex_shader, GL_ARB_fragment_shader,
|
||||||
|
* not the OpenGL 2.0 shader API.
|
||||||
|
* Author: Zack Rusin
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define GL_GLEXT_PROTOTYPES
|
||||||
|
#include "readtex.h"
|
||||||
|
|
||||||
|
#include <GL/glut.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
enum Filter {
|
||||||
|
GAUSSIAN_BLUR,
|
||||||
|
SHARPEN,
|
||||||
|
MEAN_REMOVAL,
|
||||||
|
EMBOSS,
|
||||||
|
EDGE_DETECT,
|
||||||
|
NO_FILTER,
|
||||||
|
LAST
|
||||||
|
};
|
||||||
|
#define QUIT LAST
|
||||||
|
|
||||||
|
struct BoundingBox {
|
||||||
|
float minx, miny, minz;
|
||||||
|
float maxx, maxy, maxz;
|
||||||
|
};
|
||||||
|
struct Texture {
|
||||||
|
GLuint id;
|
||||||
|
GLfloat x;
|
||||||
|
GLfloat y;
|
||||||
|
GLint width;
|
||||||
|
GLint height;
|
||||||
|
GLenum format;
|
||||||
|
};
|
||||||
|
|
||||||
|
static const char *textureLocation = "../images/girl2.rgb";
|
||||||
|
|
||||||
|
static GLfloat viewRotx = 0.0, viewRoty = 0.0, viewRotz = 0.0;
|
||||||
|
static struct BoundingBox box;
|
||||||
|
static struct Texture texture;
|
||||||
|
static GLuint program;
|
||||||
|
static GLint menuId;
|
||||||
|
static enum Filter filter = GAUSSIAN_BLUR;
|
||||||
|
|
||||||
|
|
||||||
|
static void checkError(int line)
|
||||||
|
{
|
||||||
|
GLenum err = glGetError();
|
||||||
|
if (err) {
|
||||||
|
printf("GL Error %s (0x%x) at line %d\n",
|
||||||
|
gluErrorString(err), (int) err, line);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void loadAndCompileShader(GLuint shader, const char *text)
|
||||||
|
{
|
||||||
|
GLint stat;
|
||||||
|
|
||||||
|
glShaderSourceARB(shader, 1, (const GLchar **) &text, NULL);
|
||||||
|
|
||||||
|
glCompileShaderARB(shader);
|
||||||
|
|
||||||
|
glGetObjectParameterivARB(shader, GL_COMPILE_STATUS, &stat);
|
||||||
|
if (!stat) {
|
||||||
|
GLchar log[1000];
|
||||||
|
GLsizei len;
|
||||||
|
glGetInfoLogARB(shader, 1000, &len, log);
|
||||||
|
fprintf(stderr, "Problem compiling shader: %s\n", log);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
printf("Shader compiled OK\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void readShader(GLuint shader, const char *filename)
|
||||||
|
{
|
||||||
|
const int max = 100*1000;
|
||||||
|
int n;
|
||||||
|
char *buffer = (char*) malloc(max);
|
||||||
|
FILE *f = fopen(filename, "r");
|
||||||
|
if (!f) {
|
||||||
|
fprintf(stderr, "Unable to open shader file %s\n", filename);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
n = fread(buffer, 1, max, f);
|
||||||
|
printf("Read %d bytes from shader file %s\n", n, filename);
|
||||||
|
if (n > 0) {
|
||||||
|
buffer[n] = 0;
|
||||||
|
loadAndCompileShader(shader, buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose(f);
|
||||||
|
free(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
checkLink(GLuint prog)
|
||||||
|
{
|
||||||
|
GLint stat;
|
||||||
|
glGetObjectParameterivARB(prog, GL_LINK_STATUS, &stat);
|
||||||
|
if (!stat) {
|
||||||
|
GLchar log[1000];
|
||||||
|
GLsizei len;
|
||||||
|
glGetInfoLogARB(prog, 1000, &len, log);
|
||||||
|
fprintf(stderr, "Linker error:\n%s\n", log);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
fprintf(stderr, "Link success!\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void fillConvolution(GLint *k,
|
||||||
|
GLfloat *scale,
|
||||||
|
GLfloat *color)
|
||||||
|
{
|
||||||
|
switch(filter) {
|
||||||
|
case GAUSSIAN_BLUR:
|
||||||
|
k[0] = 1; k[1] = 2; k[2] = 1;
|
||||||
|
k[3] = 2; k[4] = 4; k[5] = 2;
|
||||||
|
k[6] = 1; k[7] = 2; k[8] = 1;
|
||||||
|
|
||||||
|
*scale = 1./16.;
|
||||||
|
break;
|
||||||
|
case SHARPEN:
|
||||||
|
k[0] = 0; k[1] = -2; k[2] = 0;
|
||||||
|
k[3] = -2; k[4] = 11; k[5] = -2;
|
||||||
|
k[6] = 0; k[7] = -2; k[8] = 0;
|
||||||
|
|
||||||
|
*scale = 1./3.;
|
||||||
|
break;
|
||||||
|
case MEAN_REMOVAL:
|
||||||
|
k[0] = -1; k[1] = -1; k[2] = -1;
|
||||||
|
k[3] = -1; k[4] = 9; k[5] = -1;
|
||||||
|
k[6] = -1; k[7] = -1; k[8] = -1;
|
||||||
|
|
||||||
|
*scale = 1./1.;
|
||||||
|
break;
|
||||||
|
case EMBOSS:
|
||||||
|
k[0] = -1; k[1] = 0; k[2] = -1;
|
||||||
|
k[3] = 0; k[4] = 4; k[5] = 0;
|
||||||
|
k[6] = -1; k[7] = 0; k[8] = -1;
|
||||||
|
|
||||||
|
*scale = 1./1.;
|
||||||
|
color[0] = 0.5;
|
||||||
|
color[1] = 0.5;
|
||||||
|
color[2] = 0.5;
|
||||||
|
color[3] = 0.5;
|
||||||
|
break;
|
||||||
|
case EDGE_DETECT:
|
||||||
|
k[0] = 1; k[1] = 1; k[2] = 1;
|
||||||
|
k[3] = 0; k[4] = 0; k[5] = 0;
|
||||||
|
k[6] = -1; k[7] = -1; k[8] = -1;
|
||||||
|
|
||||||
|
*scale = 1.;
|
||||||
|
color[0] = 0.5;
|
||||||
|
color[1] = 0.5;
|
||||||
|
color[2] = 0.5;
|
||||||
|
color[3] = 0.5;
|
||||||
|
break;
|
||||||
|
case NO_FILTER:
|
||||||
|
k[0] = 0; k[1] = 0; k[2] = 0;
|
||||||
|
k[3] = 0; k[4] = 1; k[5] = 0;
|
||||||
|
k[6] = 0; k[7] = 0; k[8] = 0;
|
||||||
|
|
||||||
|
*scale = 1.;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
assert(!"Unhandled switch value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void setupConvolution()
|
||||||
|
{
|
||||||
|
GLint *kernel = (GLint*)malloc(sizeof(GLint) * 9);
|
||||||
|
GLfloat scale;
|
||||||
|
GLfloat *vecKer = (GLfloat*)malloc(sizeof(GLfloat) * 9 * 4);
|
||||||
|
GLuint loc;
|
||||||
|
GLuint i;
|
||||||
|
GLfloat baseColor[4];
|
||||||
|
baseColor[0] = 0;
|
||||||
|
baseColor[1] = 0;
|
||||||
|
baseColor[2] = 0;
|
||||||
|
baseColor[3] = 0;
|
||||||
|
|
||||||
|
fillConvolution(kernel, &scale, baseColor);
|
||||||
|
/*vector of 4*/
|
||||||
|
for (i = 0; i < 9; ++i) {
|
||||||
|
vecKer[i*4 + 0] = kernel[i];
|
||||||
|
vecKer[i*4 + 1] = kernel[i];
|
||||||
|
vecKer[i*4 + 2] = kernel[i];
|
||||||
|
vecKer[i*4 + 3] = kernel[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
loc = glGetUniformLocationARB(program, "KernelValue");
|
||||||
|
glUniform4fvARB(loc, 9, vecKer);
|
||||||
|
loc = glGetUniformLocationARB(program, "ScaleFactor");
|
||||||
|
glUniform4fARB(loc, scale, scale, scale, scale);
|
||||||
|
loc = glGetUniformLocationARB(program, "BaseColor");
|
||||||
|
glUniform4fARB(loc, baseColor[0], baseColor[1],
|
||||||
|
baseColor[2], baseColor[3]);
|
||||||
|
|
||||||
|
free(vecKer);
|
||||||
|
free(kernel);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void createProgram(const char *vertProgFile,
|
||||||
|
const char *fragProgFile)
|
||||||
|
{
|
||||||
|
GLuint fragShader = 0, vertShader = 0;
|
||||||
|
|
||||||
|
program = glCreateProgram();
|
||||||
|
if (vertProgFile) {
|
||||||
|
vertShader = glCreateShader(GL_VERTEX_SHADER);
|
||||||
|
readShader(vertShader, vertProgFile);
|
||||||
|
glAttachShader(program, vertShader);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fragProgFile) {
|
||||||
|
fragShader = glCreateShader(GL_FRAGMENT_SHADER);
|
||||||
|
readShader(fragShader, fragProgFile);
|
||||||
|
glAttachShader(program, fragShader);
|
||||||
|
}
|
||||||
|
|
||||||
|
glLinkProgramARB(program);
|
||||||
|
checkLink(program);
|
||||||
|
|
||||||
|
glUseProgramObjectARB(program);
|
||||||
|
|
||||||
|
/*
|
||||||
|
assert(glIsProgram(program));
|
||||||
|
assert(glIsShader(fragShader));
|
||||||
|
assert(glIsShader(vertShader));
|
||||||
|
*/
|
||||||
|
|
||||||
|
checkError(__LINE__);
|
||||||
|
{/*texture*/
|
||||||
|
GLuint texLoc = glGetUniformLocationARB(program, "srcTex");
|
||||||
|
glUniform1iARB(texLoc, 0);
|
||||||
|
}
|
||||||
|
{/*setup offsets */
|
||||||
|
float offsets[] = { 1.0 / texture.width, 1.0 / texture.height,
|
||||||
|
0.0 , 1.0 / texture.height,
|
||||||
|
-1.0 / texture.width, 1.0 / texture.height,
|
||||||
|
1.0 / texture.width, 0.0,
|
||||||
|
0.0 , 0.0,
|
||||||
|
-1.0 / texture.width, 0.0,
|
||||||
|
1.0 / texture.width, -1.0 / texture.height,
|
||||||
|
0.0 , -1.0 / texture.height,
|
||||||
|
-1.0 / texture.width, -1.0 / texture.height };
|
||||||
|
GLuint offsetLoc = glGetUniformLocationARB(program, "Offset");
|
||||||
|
glUniform2fvARB(offsetLoc, 9, offsets);
|
||||||
|
}
|
||||||
|
setupConvolution();
|
||||||
|
|
||||||
|
checkError(__LINE__);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void readTexture(const char *filename)
|
||||||
|
{
|
||||||
|
GLubyte *data;
|
||||||
|
|
||||||
|
texture.x = 0;
|
||||||
|
texture.y = 0;
|
||||||
|
|
||||||
|
glGenTextures(1, &texture.id);
|
||||||
|
glBindTexture(GL_TEXTURE_2D, texture.id);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D,
|
||||||
|
GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D,
|
||||||
|
GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
|
||||||
|
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||||
|
data = LoadRGBImage(filename, &texture.width, &texture.height,
|
||||||
|
&texture.format);
|
||||||
|
if (!data) {
|
||||||
|
printf("Error: couldn't load texture image '%s'\n", filename);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
printf("Texture %s (%d x %d)\n",
|
||||||
|
filename, texture.width, texture.height);
|
||||||
|
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB,
|
||||||
|
texture.width, texture.height, 0, texture.format,
|
||||||
|
GL_UNSIGNED_BYTE, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void menuSelected(int entry)
|
||||||
|
{
|
||||||
|
switch (entry) {
|
||||||
|
case QUIT:
|
||||||
|
exit(0);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
filter = (enum Filter)entry;
|
||||||
|
}
|
||||||
|
setupConvolution();
|
||||||
|
|
||||||
|
glutPostRedisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void menuInit()
|
||||||
|
{
|
||||||
|
menuId = glutCreateMenu(menuSelected);
|
||||||
|
|
||||||
|
glutAddMenuEntry("Gaussian blur", GAUSSIAN_BLUR);
|
||||||
|
glutAddMenuEntry("Sharpen", SHARPEN);
|
||||||
|
glutAddMenuEntry("Mean removal", MEAN_REMOVAL);
|
||||||
|
glutAddMenuEntry("Emboss", EMBOSS);
|
||||||
|
glutAddMenuEntry("Edge detect", EDGE_DETECT);
|
||||||
|
glutAddMenuEntry("None", NO_FILTER);
|
||||||
|
|
||||||
|
glutAddMenuEntry("Quit", QUIT);
|
||||||
|
|
||||||
|
glutAttachMenu(GLUT_RIGHT_BUTTON);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void init()
|
||||||
|
{
|
||||||
|
if (!glutExtensionSupported("GL_ARB_shader_objects") ||
|
||||||
|
!glutExtensionSupported("GL_ARB_vertex_shader") ||
|
||||||
|
!glutExtensionSupported("GL_ARB_fragment_shader")) {
|
||||||
|
fprintf(stderr, "Sorry, this program requires GL_ARB_shader_objects, GL_ARB_vertex_shader, and GL_ARB_fragment_shader\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||||
|
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||||
|
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||||
|
|
||||||
|
menuInit();
|
||||||
|
readTexture(textureLocation);
|
||||||
|
createProgram("convolution.vert", "convolution.frag");
|
||||||
|
|
||||||
|
glEnable(GL_TEXTURE_2D);
|
||||||
|
glClearColor(1.0, 1.0, 1.0, 1.0);
|
||||||
|
/*glShadeModel(GL_SMOOTH);*/
|
||||||
|
glShadeModel(GL_FLAT);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void reshape(int width, int height)
|
||||||
|
{
|
||||||
|
glViewport(0, 0, width, height);
|
||||||
|
glMatrixMode(GL_PROJECTION);
|
||||||
|
glLoadIdentity();
|
||||||
|
box.minx = 0;
|
||||||
|
box.maxx = width;
|
||||||
|
box.miny = 0;
|
||||||
|
box.maxy = height;
|
||||||
|
box.minz = 0;
|
||||||
|
box.maxz = 1;
|
||||||
|
glOrtho(box.minx, box.maxx, box.miny, box.maxy, -999999, 999999);
|
||||||
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void keyPress(unsigned char key, int x, int y)
|
||||||
|
{
|
||||||
|
switch(key) {
|
||||||
|
case 27:
|
||||||
|
exit(0);
|
||||||
|
default:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
glutPostRedisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
special(int k, int x, int y)
|
||||||
|
{
|
||||||
|
switch (k) {
|
||||||
|
case GLUT_KEY_UP:
|
||||||
|
viewRotx += 2.0;
|
||||||
|
break;
|
||||||
|
case GLUT_KEY_DOWN:
|
||||||
|
viewRotx -= 2.0;
|
||||||
|
break;
|
||||||
|
case GLUT_KEY_LEFT:
|
||||||
|
viewRoty += 2.0;
|
||||||
|
break;
|
||||||
|
case GLUT_KEY_RIGHT:
|
||||||
|
viewRoty -= 2.0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
glutPostRedisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void draw()
|
||||||
|
{
|
||||||
|
GLfloat center[2];
|
||||||
|
GLfloat anchor[2];
|
||||||
|
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
|
glLoadIdentity();
|
||||||
|
glPushMatrix();
|
||||||
|
|
||||||
|
center[0] = box.maxx/2;
|
||||||
|
center[1] = box.maxy/2;
|
||||||
|
anchor[0] = center[0] - texture.width/2;
|
||||||
|
anchor[1] = center[1] - texture.height/2;
|
||||||
|
|
||||||
|
glTranslatef(center[0], center[1], 0);
|
||||||
|
glRotatef(viewRotx, 1.0, 0.0, 0.0);
|
||||||
|
glRotatef(viewRoty, 0.0, 1.0, 0.0);
|
||||||
|
glRotatef(viewRotz, 0.0, 0.0, 1.0);
|
||||||
|
glTranslatef(-center[0], -center[1], 0);
|
||||||
|
|
||||||
|
glTranslatef(anchor[0], anchor[1], 0);
|
||||||
|
glBegin(GL_TRIANGLE_STRIP);
|
||||||
|
{
|
||||||
|
glColor3f(1., 0., 0.);
|
||||||
|
glTexCoord2f(0, 0);
|
||||||
|
glVertex3f(0, 0, 0);
|
||||||
|
|
||||||
|
glColor3f(0., 1., 0.);
|
||||||
|
glTexCoord2f(0, 1.0);
|
||||||
|
glVertex3f(0, texture.height, 0);
|
||||||
|
|
||||||
|
glColor3f(1., 0., 0.);
|
||||||
|
glTexCoord2f(1.0, 0);
|
||||||
|
glVertex3f(texture.width, 0, 0);
|
||||||
|
|
||||||
|
glColor3f(0., 1., 0.);
|
||||||
|
glTexCoord2f(1, 1);
|
||||||
|
glVertex3f(texture.width, texture.height, 0);
|
||||||
|
}
|
||||||
|
glEnd();
|
||||||
|
|
||||||
|
glPopMatrix();
|
||||||
|
|
||||||
|
glFlush();
|
||||||
|
|
||||||
|
glutSwapBuffers();
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
glutInit(&argc, argv);
|
||||||
|
|
||||||
|
glutInitWindowPosition(0, 0);
|
||||||
|
glutInitWindowSize(400, 400);
|
||||||
|
glutInitDisplayMode(GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE);
|
||||||
|
|
||||||
|
if (!glutCreateWindow("Image Convolutions")) {
|
||||||
|
fprintf(stderr, "Couldn't create window!\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
init();
|
||||||
|
|
||||||
|
glutReshapeFunc(reshape);
|
||||||
|
glutKeyboardFunc(keyPress);
|
||||||
|
glutSpecialFunc(special);
|
||||||
|
glutDisplayFunc(draw);
|
||||||
|
|
||||||
|
|
||||||
|
glutMainLoop();
|
||||||
|
return 0;
|
||||||
|
}
|
@@ -16,8 +16,8 @@
|
|||||||
#include "shaderutil.h"
|
#include "shaderutil.h"
|
||||||
|
|
||||||
|
|
||||||
static char *FragProgFile = "CH18-mandel.frag.txt";
|
static char *FragProgFile = "CH18-mandel.frag";
|
||||||
static char *VertProgFile = "CH18-mandel.vert.txt";
|
static char *VertProgFile = "CH18-mandel.vert";
|
||||||
|
|
||||||
/* program/shader objects */
|
/* program/shader objects */
|
||||||
static GLuint fragShader;
|
static GLuint fragShader;
|
||||||
|
@@ -35,8 +35,8 @@
|
|||||||
|
|
||||||
static const char *Demo = "multitex";
|
static const char *Demo = "multitex";
|
||||||
|
|
||||||
static const char *VertFile = "multitex.vert.txt";
|
static const char *VertFile = "multitex.vert";
|
||||||
static const char *FragFile = "multitex.frag.txt";
|
static const char *FragFile = "multitex.frag";
|
||||||
|
|
||||||
static const char *TexFiles[2] =
|
static const char *TexFiles[2] =
|
||||||
{
|
{
|
||||||
|
@@ -9,7 +9,7 @@ uniform sampler2D tex2;
|
|||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec4 t1 = texture2D(tex1, gl_TexCoord[0].xy, 0.0);
|
vec4 t1 = texture2D(tex1, gl_TexCoord[0].xy);
|
||||||
vec4 t2 = texture2D(tex2, gl_TexCoord[1].xy, 0.0);
|
vec4 t2 = texture2D(tex2, gl_TexCoord[1].xy);
|
||||||
gl_FragColor = mix(t1, t2, t2.w);
|
gl_FragColor = mix(t1, t2, t2.w);
|
||||||
}
|
}
|
205
progs/glsl/pointcoord.c
Normal file
205
progs/glsl/pointcoord.c
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
/**
|
||||||
|
* Test GLSL 1.20 gl_PointCoord fragment program attribute.
|
||||||
|
* Brian Paul
|
||||||
|
* 11 Aug 2007
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <GL/gl.h>
|
||||||
|
#include <GL/glut.h>
|
||||||
|
#include <GL/glext.h>
|
||||||
|
#include "extfuncs.h"
|
||||||
|
#include "shaderutil.h"
|
||||||
|
|
||||||
|
|
||||||
|
static GLint WinWidth = 300, WinHeight = 300;
|
||||||
|
static char *FragProgFile = NULL;
|
||||||
|
static char *VertProgFile = NULL;
|
||||||
|
static GLuint fragShader;
|
||||||
|
static GLuint vertShader;
|
||||||
|
static GLuint program;
|
||||||
|
static GLint win = 0;
|
||||||
|
static GLint tex0;
|
||||||
|
static GLenum Filter = GL_NEAREST;
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
Redisplay(void)
|
||||||
|
{
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
|
/* draw one point/sprite */
|
||||||
|
glPushMatrix();
|
||||||
|
glPointSize(60);
|
||||||
|
glBegin(GL_POINTS);
|
||||||
|
glVertex2f(WinWidth / 2.0f, WinHeight / 2.0f);
|
||||||
|
glEnd();
|
||||||
|
glPopMatrix();
|
||||||
|
|
||||||
|
glutSwapBuffers();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
Reshape(int width, int height)
|
||||||
|
{
|
||||||
|
glViewport(0, 0, width, height);
|
||||||
|
glMatrixMode(GL_PROJECTION);
|
||||||
|
glLoadIdentity();
|
||||||
|
glOrtho(0, width, 0, height, -1, 1);
|
||||||
|
|
||||||
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
glLoadIdentity();
|
||||||
|
|
||||||
|
WinWidth = width;
|
||||||
|
WinHeight = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
CleanUp(void)
|
||||||
|
{
|
||||||
|
glDeleteShader_func(fragShader);
|
||||||
|
glDeleteShader_func(vertShader);
|
||||||
|
glDeleteProgram_func(program);
|
||||||
|
glutDestroyWindow(win);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
Key(unsigned char key, int x, int y)
|
||||||
|
{
|
||||||
|
(void) x;
|
||||||
|
(void) y;
|
||||||
|
|
||||||
|
switch(key) {
|
||||||
|
case 27:
|
||||||
|
CleanUp();
|
||||||
|
exit(0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
glutPostRedisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
MakeTexture(void)
|
||||||
|
{
|
||||||
|
#define SZ 16
|
||||||
|
GLubyte image[SZ][SZ][4];
|
||||||
|
GLuint i, j;
|
||||||
|
|
||||||
|
for (i = 0; i < SZ; i++) {
|
||||||
|
for (j = 0; j < SZ; j++) {
|
||||||
|
if ((i + j) & 1) {
|
||||||
|
image[i][j][0] = 0;
|
||||||
|
image[i][j][1] = 0;
|
||||||
|
image[i][j][2] = 0;
|
||||||
|
image[i][j][3] = 255;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
image[i][j][0] = j * 255 / (SZ-1);
|
||||||
|
image[i][j][1] = i * 255 / (SZ-1);
|
||||||
|
image[i][j][2] = 0;
|
||||||
|
image[i][j][3] = 255;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
glActiveTexture(GL_TEXTURE0); /* unit 0 */
|
||||||
|
glBindTexture(GL_TEXTURE_2D, 42);
|
||||||
|
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, SZ, SZ, 0,
|
||||||
|
GL_RGBA, GL_UNSIGNED_BYTE, image);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, Filter);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, Filter);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||||
|
#undef SZ
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
Init(void)
|
||||||
|
{
|
||||||
|
static const char *fragShaderText =
|
||||||
|
"#version 120 \n"
|
||||||
|
"uniform sampler2D tex0; \n"
|
||||||
|
"void main() { \n"
|
||||||
|
" gl_FragColor = texture2D(tex0, gl_PointCoord.xy, 0.0); \n"
|
||||||
|
"}\n";
|
||||||
|
static const char *vertShaderText =
|
||||||
|
"void main() {\n"
|
||||||
|
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n"
|
||||||
|
"}\n";
|
||||||
|
|
||||||
|
if (!ShadersSupported())
|
||||||
|
exit(1);
|
||||||
|
|
||||||
|
GetExtensionFuncs();
|
||||||
|
|
||||||
|
vertShader = CompileShaderText(GL_VERTEX_SHADER, vertShaderText);
|
||||||
|
fragShader = CompileShaderText(GL_FRAGMENT_SHADER, fragShaderText);
|
||||||
|
program = LinkShaders(vertShader, fragShader);
|
||||||
|
|
||||||
|
glUseProgram_func(program);
|
||||||
|
|
||||||
|
tex0 = glGetUniformLocation_func(program, "tex0");
|
||||||
|
printf("Uniforms: tex0: %d\n", tex0);
|
||||||
|
|
||||||
|
glUniform1i_func(tex0, 0); /* tex unit 0 */
|
||||||
|
|
||||||
|
/*assert(glGetError() == 0);*/
|
||||||
|
|
||||||
|
glClearColor(0.3f, 0.3f, 0.3f, 0.0f);
|
||||||
|
|
||||||
|
printf("GL_RENDERER = %s\n",(const char *) glGetString(GL_RENDERER));
|
||||||
|
|
||||||
|
assert(glIsProgram_func(program));
|
||||||
|
assert(glIsShader_func(fragShader));
|
||||||
|
assert(glIsShader_func(vertShader));
|
||||||
|
|
||||||
|
MakeTexture();
|
||||||
|
|
||||||
|
glEnable(GL_POINT_SPRITE);
|
||||||
|
|
||||||
|
glColor3f(1, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
ParseOptions(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 1; i < argc; i++) {
|
||||||
|
if (strcmp(argv[i], "-fs") == 0) {
|
||||||
|
FragProgFile = argv[i+1];
|
||||||
|
}
|
||||||
|
else if (strcmp(argv[i], "-vs") == 0) {
|
||||||
|
VertProgFile = argv[i+1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
glutInit(&argc, argv);
|
||||||
|
glutInitWindowPosition( 0, 0);
|
||||||
|
glutInitWindowSize(WinWidth, WinHeight);
|
||||||
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
||||||
|
win = glutCreateWindow(argv[0]);
|
||||||
|
glutReshapeFunc(Reshape);
|
||||||
|
glutKeyboardFunc(Key);
|
||||||
|
glutDisplayFunc(Redisplay);
|
||||||
|
ParseOptions(argc, argv);
|
||||||
|
Init();
|
||||||
|
glutMainLoop();
|
||||||
|
return 0;
|
||||||
|
}
|
@@ -35,11 +35,11 @@
|
|||||||
|
|
||||||
static const char *Demo = "texdemo1";
|
static const char *Demo = "texdemo1";
|
||||||
|
|
||||||
static const char *ReflectVertFile = "reflect.vert.txt";
|
static const char *ReflectVertFile = "reflect.vert";
|
||||||
static const char *CubeFragFile = "cubemap.frag.txt";
|
static const char *CubeFragFile = "cubemap.frag";
|
||||||
|
|
||||||
static const char *SimpleVertFile = "simple.vert.txt";
|
static const char *SimpleVertFile = "simple.vert";
|
||||||
static const char *SimpleTexFragFile = "shadowtex.frag.txt";
|
static const char *SimpleTexFragFile = "shadowtex.frag";
|
||||||
|
|
||||||
static const char *GroundImage = "../images/tile.rgb";
|
static const char *GroundImage = "../images/tile.rgb";
|
||||||
|
|
||||||
|
@@ -16,8 +16,8 @@
|
|||||||
#include "shaderutil.h"
|
#include "shaderutil.h"
|
||||||
|
|
||||||
|
|
||||||
static char *FragProgFile = "CH11-toyball.frag.txt";
|
static char *FragProgFile = "CH11-toyball.frag";
|
||||||
static char *VertProgFile = "CH11-toyball.vert.txt";
|
static char *VertProgFile = "CH11-toyball.vert";
|
||||||
|
|
||||||
/* program/shader objects */
|
/* program/shader objects */
|
||||||
static GLuint fragShader;
|
static GLuint fragShader;
|
||||||
|
@@ -190,7 +190,7 @@ Init(void)
|
|||||||
"}\n";
|
"}\n";
|
||||||
static const char *vertShaderText =
|
static const char *vertShaderText =
|
||||||
"void main() {\n"
|
"void main() {\n"
|
||||||
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n"
|
" gl_Position = ftransform(); \n"
|
||||||
"}\n";
|
"}\n";
|
||||||
|
|
||||||
if (!ShadersSupported())
|
if (!ShadersSupported())
|
||||||
|
@@ -28,7 +28,7 @@ static GLuint program;
|
|||||||
static GLint win = 0;
|
static GLint win = 0;
|
||||||
static GLboolean anim = 0*GL_TRUE;
|
static GLboolean anim = 0*GL_TRUE;
|
||||||
static GLboolean DetermineInFragProg = GL_TRUE;
|
static GLboolean DetermineInFragProg = GL_TRUE;
|
||||||
static GLfloat Yrot = 0.0f;
|
static GLfloat Xrot = 30.0f;
|
||||||
static GLint u_fragface;
|
static GLint u_fragface;
|
||||||
static GLenum FrontWinding = GL_CCW;
|
static GLenum FrontWinding = GL_CCW;
|
||||||
static int prevTime = 0;
|
static int prevTime = 0;
|
||||||
@@ -41,7 +41,8 @@ static const GLfloat Green[4] = {0, 1, 0, 0};
|
|||||||
static void
|
static void
|
||||||
Redisplay(void)
|
Redisplay(void)
|
||||||
{
|
{
|
||||||
float xmin = -1, xmax = 1, ymin = -1, ymax = 1;
|
int i;
|
||||||
|
float radius = 2;
|
||||||
|
|
||||||
glFrontFace(FrontWinding);
|
glFrontFace(FrontWinding);
|
||||||
|
|
||||||
@@ -54,18 +55,22 @@ Redisplay(void)
|
|||||||
glEnable(GL_VERTEX_PROGRAM_TWO_SIDE);
|
glEnable(GL_VERTEX_PROGRAM_TWO_SIDE);
|
||||||
}
|
}
|
||||||
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
||||||
|
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
glRotatef(Yrot, 0, 1, 0);
|
glRotatef(Xrot, 1, 0, 0);
|
||||||
|
|
||||||
glBegin(GL_POLYGON);
|
/* Draw a tristrip ring */
|
||||||
|
glBegin(GL_TRIANGLE_STRIP);
|
||||||
glColor4fv(Red);
|
glColor4fv(Red);
|
||||||
glSecondaryColor3fv_func(Green);
|
glSecondaryColor3fv_func(Green);
|
||||||
glVertex2f(xmin, ymin);
|
for (i = 0; i < 20; i++) {
|
||||||
glVertex2f(xmax, ymin);
|
float a = i / 19.0 * M_PI * 2.0;
|
||||||
glVertex2f(xmax, ymax);
|
float x = radius * cos(a);
|
||||||
glVertex2f(xmin, ymax);
|
float y = radius * sin(a);
|
||||||
|
glVertex3f(x, -1, y);
|
||||||
|
glVertex3f(x, +1, y);
|
||||||
|
}
|
||||||
glEnd();
|
glEnd();
|
||||||
|
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
@@ -86,7 +91,7 @@ Idle(void)
|
|||||||
}
|
}
|
||||||
prevTime = curTime;
|
prevTime = curTime;
|
||||||
|
|
||||||
Yrot += dt * 0.1;
|
Xrot += dt * 0.1;
|
||||||
glutPostRedisplay();
|
glutPostRedisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,7 +103,7 @@ Reshape(int width, int height)
|
|||||||
glViewport(0, 0, width, height);
|
glViewport(0, 0, width, height);
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
glFrustum(-ar, ar, -1, 1, 5, 15);
|
glFrustum(-ar, ar, -1, 1, 3, 25);
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
glTranslatef(0, 0, -10);
|
glTranslatef(0, 0, -10);
|
||||||
@@ -141,12 +146,16 @@ Key(unsigned char key, int x, int y)
|
|||||||
DetermineInFragProg = GL_FALSE;
|
DetermineInFragProg = GL_FALSE;
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
Yrot = 0;
|
/* reset */
|
||||||
|
Xrot = 30;
|
||||||
anim = 0;
|
anim = 0;
|
||||||
glutIdleFunc(NULL);
|
glutIdleFunc(NULL);
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
Yrot += 5;
|
Xrot += 5;
|
||||||
|
break;
|
||||||
|
case 'S':
|
||||||
|
Xrot -= 5;
|
||||||
break;
|
break;
|
||||||
case 'w':
|
case 'w':
|
||||||
if (FrontWinding == GL_CCW) {
|
if (FrontWinding == GL_CCW) {
|
||||||
@@ -173,12 +182,24 @@ Init(void)
|
|||||||
static const char *fragShaderText =
|
static const char *fragShaderText =
|
||||||
"uniform bool fragface; \n"
|
"uniform bool fragface; \n"
|
||||||
"void main() { \n"
|
"void main() { \n"
|
||||||
|
#if 0
|
||||||
" if (!fragface || gl_FrontFacing) { \n"
|
" if (!fragface || gl_FrontFacing) { \n"
|
||||||
" gl_FragColor = gl_Color; \n"
|
" gl_FragColor = gl_Color; \n"
|
||||||
" } \n"
|
" } \n"
|
||||||
" else { \n"
|
" else { \n"
|
||||||
" gl_FragColor = 0.8 * gl_SecondaryColor; \n"
|
" gl_FragColor = 0.8 * gl_SecondaryColor; \n"
|
||||||
" } \n"
|
" } \n"
|
||||||
|
#else
|
||||||
|
" bool f = gl_FrontFacing; \n"
|
||||||
|
" if (f) { \n"
|
||||||
|
" gl_FragColor = vec4(1.0, 0.0, 0.0, 0.0); \n"
|
||||||
|
" } \n"
|
||||||
|
" else { \n"
|
||||||
|
" gl_FragColor = vec4(0.0, 1.0, 0.0, 0.0); \n"
|
||||||
|
" } \n"
|
||||||
|
" //float g = float(gl_FrontFacing) * 0.5 + 0.5; \n"
|
||||||
|
" //gl_FragColor = vec4(g); \n"
|
||||||
|
#endif
|
||||||
"} \n";
|
"} \n";
|
||||||
static const char *vertShaderText =
|
static const char *vertShaderText =
|
||||||
"uniform bool fragface; \n"
|
"uniform bool fragface; \n"
|
||||||
@@ -218,6 +239,8 @@ Init(void)
|
|||||||
assert(glIsProgram_func(program));
|
assert(glIsProgram_func(program));
|
||||||
assert(glIsShader_func(fragShader));
|
assert(glIsShader_func(fragShader));
|
||||||
assert(glIsShader_func(vertShader));
|
assert(glIsShader_func(vertShader));
|
||||||
|
|
||||||
|
glEnable(GL_DEPTH_TEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -246,6 +269,7 @@ Usage(void)
|
|||||||
printf(" a - toggle animation\n");
|
printf(" a - toggle animation\n");
|
||||||
printf(" s - step rotation\n");
|
printf(" s - step rotation\n");
|
||||||
printf(" w - toggle CW, CCW front-face winding\n");
|
printf(" w - toggle CW, CCW front-face winding\n");
|
||||||
|
printf("NOTE: red = front face, green = back face.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -255,7 +279,7 @@ main(int argc, char *argv[])
|
|||||||
glutInit(&argc, argv);
|
glutInit(&argc, argv);
|
||||||
glutInitWindowPosition( 0, 0);
|
glutInitWindowPosition( 0, 0);
|
||||||
glutInitWindowSize(WinWidth, WinHeight);
|
glutInitWindowSize(WinWidth, WinHeight);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
|
||||||
win = glutCreateWindow(argv[0]);
|
win = glutCreateWindow(argv[0]);
|
||||||
glutReshapeFunc(Reshape);
|
glutReshapeFunc(Reshape);
|
||||||
glutKeyboardFunc(Key);
|
glutKeyboardFunc(Key);
|
||||||
|
@@ -407,7 +407,10 @@ test(GLenum type, GLint bits, const char *filename)
|
|||||||
glGetIntegerv(GL_ALPHA_BITS, &cBits);
|
glGetIntegerv(GL_ALPHA_BITS, &cBits);
|
||||||
assert(cBits == bits);
|
assert(cBits == bits);
|
||||||
|
|
||||||
printf("Rendering %d bit/channel image: %s\n", bits, filename);
|
if (WriteFiles)
|
||||||
|
printf("Rendering %d bit/channel image: %s\n", bits, filename);
|
||||||
|
else
|
||||||
|
printf("Rendering %d bit/channel image\n", bits);
|
||||||
|
|
||||||
OSMesaColorClamp(GL_TRUE);
|
OSMesaColorClamp(GL_TRUE);
|
||||||
|
|
||||||
@@ -458,6 +461,8 @@ main( int argc, char *argv[] )
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
printf("Use -f to write image files\n");
|
||||||
|
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
if (strcmp(argv[i], "-f") == 0)
|
if (strcmp(argv[i], "-f") == 0)
|
||||||
WriteFiles = GL_TRUE;
|
WriteFiles = GL_TRUE;
|
||||||
|
@@ -31,27 +31,27 @@ clean:
|
|||||||
#
|
#
|
||||||
|
|
||||||
cltest: cltest.o framework.o $(LIB_DEP)
|
cltest: cltest.o framework.o $(LIB_DEP)
|
||||||
$(CC) $(LDFLAGS) cltest.o framework.o $(LIBS) -o cltest
|
$(CC) $(CFLAGS) $(LDFLAGS) cltest.o framework.o $(LIBS) -o cltest
|
||||||
|
|
||||||
sotest: sotest.o framework.o $(LIB_DEP)
|
sotest: sotest.o framework.o $(LIB_DEP)
|
||||||
$(CC) $(LDFLAGS) sotest.o framework.o $(LIBS) -o sotest
|
$(CC) $(CFLAGS) $(LDFLAGS) sotest.o framework.o $(LIBS) -o sotest
|
||||||
|
|
||||||
vstest: vstest.o framework.o $(LIB_DEP)
|
vstest: vstest.o framework.o $(LIB_DEP)
|
||||||
$(CC) $(LDFLAGS) vstest.o framework.o $(LIBS) -o vstest
|
$(CC) $(CFLAGS) $(LDFLAGS) vstest.o framework.o $(LIBS) -o vstest
|
||||||
|
|
||||||
#
|
#
|
||||||
# objects
|
# objects
|
||||||
#
|
#
|
||||||
|
|
||||||
framework.o: framework.c framework.h
|
framework.o: framework.c framework.h
|
||||||
$(CC) -c -I$(INCDIR) framework.c -o framework.o
|
$(CC) -c -I$(INCDIR) $(CFLAGS) framework.c -o framework.o
|
||||||
|
|
||||||
cltest.o: cltest.c framework.h
|
cltest.o: cltest.c framework.h
|
||||||
$(CC) -c -I$(INCDIR) cltest.c -o cltest.o
|
$(CC) -c -I$(INCDIR) $(CFLAGS) cltest.c -o cltest.o
|
||||||
|
|
||||||
sotest.o: sotest.c framework.h
|
sotest.o: sotest.c framework.h
|
||||||
$(CC) -c -I$(INCDIR) sotest.c -o sotest.o
|
$(CC) -c -I$(INCDIR) $(CFLAGS) sotest.c -o sotest.o
|
||||||
|
|
||||||
vstest.o: vstest.c framework.h
|
vstest.o: vstest.c framework.h
|
||||||
$(CC) -c -I$(INCDIR) vstest.c -o vstest.o
|
$(CC) -c -I$(INCDIR) $(CFLAGS) vstest.c -o vstest.o
|
||||||
|
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
static GLfloat Zrot = 0;
|
static GLfloat Zrot = 0;
|
||||||
static GLboolean Anim = GL_TRUE;
|
static GLboolean Anim = GL_TRUE;
|
||||||
static GLboolean HaveMultisample = GL_TRUE;
|
static GLboolean HaveMultisample = GL_TRUE;
|
||||||
|
static GLboolean DoMultisample = GL_TRUE;
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -86,7 +87,10 @@ Display( void )
|
|||||||
glColor3f(1, 1, 1);
|
glColor3f(1, 1, 1);
|
||||||
if (HaveMultisample) {
|
if (HaveMultisample) {
|
||||||
glRasterPos2f(-3.1, -1.6);
|
glRasterPos2f(-3.1, -1.6);
|
||||||
PrintString("MULTISAMPLE");
|
if (DoMultisample)
|
||||||
|
PrintString("MULTISAMPLE");
|
||||||
|
else
|
||||||
|
PrintString("MULTISAMPLE (off)");
|
||||||
}
|
}
|
||||||
glRasterPos2f(-0.8, -1.6);
|
glRasterPos2f(-0.8, -1.6);
|
||||||
PrintString("No antialiasing");
|
PrintString("No antialiasing");
|
||||||
@@ -96,7 +100,8 @@ Display( void )
|
|||||||
/* multisample */
|
/* multisample */
|
||||||
if (HaveMultisample) {
|
if (HaveMultisample) {
|
||||||
glEnable(GL_DEPTH_TEST);
|
glEnable(GL_DEPTH_TEST);
|
||||||
glEnable(GL_MULTISAMPLE_ARB);
|
if (DoMultisample)
|
||||||
|
glEnable(GL_MULTISAMPLE_ARB);
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
glTranslatef(-2.5, 0, 0);
|
glTranslatef(-2.5, 0, 0);
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
@@ -173,6 +178,9 @@ Key( unsigned char key, int x, int y )
|
|||||||
else
|
else
|
||||||
glutIdleFunc(NULL);
|
glutIdleFunc(NULL);
|
||||||
break;
|
break;
|
||||||
|
case 'm':
|
||||||
|
DoMultisample = !DoMultisample;
|
||||||
|
break;
|
||||||
case 'z':
|
case 'z':
|
||||||
Zrot = (int) (Zrot - step);
|
Zrot = (int) (Zrot - step);
|
||||||
break;
|
break;
|
||||||
|
@@ -16,7 +16,7 @@ TRACER = gltrace.so
|
|||||||
default: $(TRACER)
|
default: $(TRACER)
|
||||||
|
|
||||||
$(TRACER): $(OBJECTS)
|
$(TRACER): $(OBJECTS)
|
||||||
$(TOP)/bin/mklib -o $(TRACER) -noprefix -cplusplus \
|
$(MKLIB) -o $(TRACER) -noprefix -cplusplus -linker '$(CXX)' \
|
||||||
-ldflags '$(LDFLAGS)' $(MKLIB_OPTIONS) $(OBJECTS)
|
-ldflags '$(LDFLAGS)' $(MKLIB_OPTIONS) $(OBJECTS)
|
||||||
|
|
||||||
gltrace.cc: gltrace.py
|
gltrace.cc: gltrace.py
|
||||||
|
@@ -20,6 +20,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gltrace_support.h"
|
#include "gltrace_support.h"
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <cstring>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
@@ -136,7 +138,7 @@ namespace gltrace {
|
|||||||
|
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
struct tm t;
|
struct tm t;
|
||||||
static char *months[12] =
|
static char const *months[12] =
|
||||||
{
|
{
|
||||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
|
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
|
||||||
|
@@ -115,13 +115,13 @@ getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.
|
|||||||
|
|
||||||
|
|
||||||
texrect: texrect.o readtex.o
|
texrect: texrect.o readtex.o
|
||||||
$(CC) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
|
$(CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
|
||||||
|
|
||||||
texrect.o: texrect.c readtex.h
|
texrect.o: texrect.c readtex.h
|
||||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
||||||
|
|
||||||
invert: invert.o readtex.o
|
invert: invert.o readtex.o
|
||||||
$(CC) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
|
$(CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
|
||||||
|
|
||||||
invert.o: invert.c readtex.h
|
invert.o: invert.c readtex.h
|
||||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
||||||
|
@@ -27,12 +27,15 @@ Init(void)
|
|||||||
GLboolean
|
GLboolean
|
||||||
ShadersSupported(void)
|
ShadersSupported(void)
|
||||||
{
|
{
|
||||||
const char *version;
|
const char *version = (const char *) glGetString(GL_VERSION);
|
||||||
|
if (version[0] == '2' && version[1] == '.') {
|
||||||
version = (const char *) glGetString(GL_VERSION);
|
return GL_TRUE;
|
||||||
if (version[0] != '2' || version[1] != '.') {
|
}
|
||||||
printf("GL_RENDERER = %s\n",(const char *) glGetString(GL_RENDERER));
|
else if (glutExtensionSupported("GL_ARB_vertex_shader")
|
||||||
return GL_FALSE;
|
&& glutExtensionSupported("GL_ARB_fragment_shader")
|
||||||
|
&& glutExtensionSupported("GL_ARB_shader_objects")) {
|
||||||
|
fprintf(stderr, "Warning: Trying ARB GLSL instead of OpenGL 2.x. This may not work.\n");
|
||||||
|
return GL_TRUE;
|
||||||
}
|
}
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
}
|
}
|
||||||
|
@@ -67,10 +67,10 @@ clean:
|
|||||||
|
|
||||||
# special cases
|
# special cases
|
||||||
pbinfo: pbinfo.o pbutil.o
|
pbinfo: pbinfo.o pbutil.o
|
||||||
$(CC) $(LDFLAGS) pbinfo.o pbutil.o $(LIBS) -o $@
|
$(CC) $(CFLAGS) $(LDFLAGS) pbinfo.o pbutil.o $(LIBS) -o $@
|
||||||
|
|
||||||
pbdemo: pbdemo.o pbutil.o
|
pbdemo: pbdemo.o pbutil.o
|
||||||
$(CC) $(LDFLAGS) pbdemo.o pbutil.o $(LIBS) -o $@
|
$(CC) $(CFLAGS) $(LDFLAGS) pbdemo.o pbutil.o $(LIBS) -o $@
|
||||||
|
|
||||||
pbinfo.o: pbinfo.c pbutil.h
|
pbinfo.o: pbinfo.c pbutil.h
|
||||||
$(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbinfo.c
|
$(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbinfo.c
|
||||||
@@ -82,13 +82,13 @@ pbutil.o: pbutil.c pbutil.h
|
|||||||
$(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbutil.c
|
$(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbutil.c
|
||||||
|
|
||||||
glxgears_fbconfig: glxgears_fbconfig.o pbutil.o
|
glxgears_fbconfig: glxgears_fbconfig.o pbutil.o
|
||||||
$(CC) $(LDFLAGS) glxgears_fbconfig.o pbutil.o $(LIBS) -o $@
|
$(CC) $(CFLAGS) $(LDFLAGS) glxgears_fbconfig.o pbutil.o $(LIBS) -o $@
|
||||||
|
|
||||||
glxgears_fbconfig.o: glxgears_fbconfig.c pbutil.h
|
glxgears_fbconfig.o: glxgears_fbconfig.c pbutil.h
|
||||||
$(CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) -c -I. $(CFLAGS) glxgears_fbconfig.c
|
$(CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) -c -I. $(CFLAGS) glxgears_fbconfig.c
|
||||||
|
|
||||||
xrotfontdemo: xrotfontdemo.o xuserotfont.o
|
xrotfontdemo: xrotfontdemo.o xuserotfont.o
|
||||||
$(CC) $(LDFLAGS) xrotfontdemo.o xuserotfont.o $(LIBS) -o $@
|
$(CC) $(CFLAGS) $(LDFLAGS) xrotfontdemo.o xuserotfont.o $(LIBS) -o $@
|
||||||
|
|
||||||
xuserotfont.o: xuserotfont.c xuserotfont.h
|
xuserotfont.o: xuserotfont.c xuserotfont.h
|
||||||
$(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xuserotfont.c
|
$(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xuserotfont.c
|
||||||
|
@@ -88,12 +88,18 @@ current_time(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/** Event handler results: */
|
||||||
|
#define NOP 0
|
||||||
|
#define EXIT 1
|
||||||
|
#define DRAW 2
|
||||||
|
|
||||||
static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0;
|
static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0;
|
||||||
static GLint gear1, gear2, gear3;
|
static GLint gear1, gear2, gear3;
|
||||||
static GLfloat angle = 0.0;
|
static GLfloat angle = 0.0;
|
||||||
|
|
||||||
static GLboolean fullscreen = GL_FALSE; /* Create a single fullscreen window */
|
static GLboolean fullscreen = GL_FALSE; /* Create a single fullscreen window */
|
||||||
static GLboolean stereo = GL_FALSE; /* Enable stereo. */
|
static GLboolean stereo = GL_FALSE; /* Enable stereo. */
|
||||||
|
static GLboolean animate = GL_TRUE; /* Animation */
|
||||||
static GLfloat eyesep = 5.0; /* Eye separation. */
|
static GLfloat eyesep = 5.0; /* Eye separation. */
|
||||||
static GLfloat fix_point = 40.0; /* Fixation point distance. */
|
static GLfloat fix_point = 40.0; /* Fixation point distance. */
|
||||||
static GLfloat left, right, asp; /* Stereo frustum params. */
|
static GLfloat left, right, asp; /* Stereo frustum params. */
|
||||||
@@ -239,7 +245,7 @@ gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width,
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
do_draw(void)
|
draw(void)
|
||||||
{
|
{
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
@@ -269,8 +275,9 @@ do_draw(void)
|
|||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
draw(void)
|
draw_gears(void)
|
||||||
{
|
{
|
||||||
if (stereo) {
|
if (stereo) {
|
||||||
/* First left eye. */
|
/* First left eye. */
|
||||||
@@ -284,7 +291,7 @@ draw(void)
|
|||||||
|
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
glTranslated(+0.5 * eyesep, 0.0, 0.0);
|
glTranslated(+0.5 * eyesep, 0.0, 0.0);
|
||||||
do_draw();
|
draw();
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
|
|
||||||
/* Then right eye. */
|
/* Then right eye. */
|
||||||
@@ -298,10 +305,50 @@ draw(void)
|
|||||||
|
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
glTranslated(-0.5 * eyesep, 0.0, 0.0);
|
glTranslated(-0.5 * eyesep, 0.0, 0.0);
|
||||||
do_draw();
|
draw();
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
} else
|
}
|
||||||
do_draw();
|
else {
|
||||||
|
draw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** Draw single frame, do SwapBuffers, compute FPS */
|
||||||
|
static void
|
||||||
|
draw_frame(Display *dpy, Window win)
|
||||||
|
{
|
||||||
|
static int frames = 0;
|
||||||
|
static double tRot0 = -1.0, tRate0 = -1.0;
|
||||||
|
double dt, t = current_time();
|
||||||
|
|
||||||
|
if (tRot0 < 0.0)
|
||||||
|
tRot0 = t;
|
||||||
|
dt = t - tRot0;
|
||||||
|
tRot0 = t;
|
||||||
|
|
||||||
|
if (animate) {
|
||||||
|
/* advance rotation for next frame */
|
||||||
|
angle += 70.0 * dt; /* 70 degrees per second */
|
||||||
|
if (angle > 3600.0)
|
||||||
|
angle -= 3600.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
draw_gears();
|
||||||
|
glXSwapBuffers(dpy, win);
|
||||||
|
|
||||||
|
frames++;
|
||||||
|
|
||||||
|
if (tRate0 < 0.0)
|
||||||
|
tRate0 = t;
|
||||||
|
if (t - tRate0 >= 5.0) {
|
||||||
|
GLfloat seconds = t - tRate0;
|
||||||
|
GLfloat fps = frames / seconds;
|
||||||
|
printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds,
|
||||||
|
fps);
|
||||||
|
tRate0 = t;
|
||||||
|
frames = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -319,7 +366,8 @@ reshape(int width, int height)
|
|||||||
|
|
||||||
left = -5.0 * ((w - 0.5 * eyesep) / fix_point);
|
left = -5.0 * ((w - 0.5 * eyesep) / fix_point);
|
||||||
right = 5.0 * ((w + 0.5 * eyesep) / fix_point);
|
right = 5.0 * ((w + 0.5 * eyesep) / fix_point);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
GLfloat h = (GLfloat) height / (GLfloat) width;
|
GLfloat h = (GLfloat) height / (GLfloat) width;
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
@@ -430,6 +478,7 @@ make_window( Display *dpy, const char *name,
|
|||||||
attr.border_pixel = 0;
|
attr.border_pixel = 0;
|
||||||
attr.colormap = XCreateColormap( dpy, root, visinfo->visual, AllocNone);
|
attr.colormap = XCreateColormap( dpy, root, visinfo->visual, AllocNone);
|
||||||
attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask;
|
attr.event_mask = StructureNotifyMask | ExposureMask | KeyPressMask;
|
||||||
|
/* XXX this is a bad way to get a borderless window! */
|
||||||
attr.override_redirect = fullscreen;
|
attr.override_redirect = fullscreen;
|
||||||
mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask | CWOverrideRedirect;
|
mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask | CWOverrideRedirect;
|
||||||
|
|
||||||
@@ -463,79 +512,70 @@ make_window( Display *dpy, const char *name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle one X event.
|
||||||
|
* \return NOP, EXIT or DRAW
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
handle_event(Display *dpy, Window win, XEvent *event)
|
||||||
|
{
|
||||||
|
switch (event->type) {
|
||||||
|
case Expose:
|
||||||
|
return DRAW;
|
||||||
|
case ConfigureNotify:
|
||||||
|
reshape(event->xconfigure.width, event->xconfigure.height);
|
||||||
|
break;
|
||||||
|
case KeyPress:
|
||||||
|
{
|
||||||
|
char buffer[10];
|
||||||
|
int r, code;
|
||||||
|
code = XLookupKeysym(&event->xkey, 0);
|
||||||
|
if (code == XK_Left) {
|
||||||
|
view_roty += 5.0;
|
||||||
|
}
|
||||||
|
else if (code == XK_Right) {
|
||||||
|
view_roty -= 5.0;
|
||||||
|
}
|
||||||
|
else if (code == XK_Up) {
|
||||||
|
view_rotx += 5.0;
|
||||||
|
}
|
||||||
|
else if (code == XK_Down) {
|
||||||
|
view_rotx -= 5.0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
r = XLookupString(&event->xkey, buffer, sizeof(buffer),
|
||||||
|
NULL, NULL);
|
||||||
|
if (buffer[0] == 27) {
|
||||||
|
/* escape */
|
||||||
|
return EXIT;
|
||||||
|
}
|
||||||
|
else if (buffer[0] == 'a' || buffer[0] == 'A') {
|
||||||
|
animate = !animate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return DRAW;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NOP;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
event_loop(Display *dpy, Window win)
|
event_loop(Display *dpy, Window win)
|
||||||
{
|
{
|
||||||
while (1) {
|
while (1) {
|
||||||
while (XPending(dpy) > 0) {
|
int op;
|
||||||
|
while (!animate || XPending(dpy) > 0) {
|
||||||
XEvent event;
|
XEvent event;
|
||||||
XNextEvent(dpy, &event);
|
XNextEvent(dpy, &event);
|
||||||
switch (event.type) {
|
op = handle_event(dpy, win, &event);
|
||||||
case Expose:
|
if (op == EXIT)
|
||||||
/* we'll redraw below */
|
return;
|
||||||
break;
|
else if (op == DRAW)
|
||||||
case ConfigureNotify:
|
break;
|
||||||
reshape(event.xconfigure.width, event.xconfigure.height);
|
|
||||||
break;
|
|
||||||
case KeyPress:
|
|
||||||
{
|
|
||||||
char buffer[10];
|
|
||||||
int r, code;
|
|
||||||
code = XLookupKeysym(&event.xkey, 0);
|
|
||||||
if (code == XK_Left) {
|
|
||||||
view_roty += 5.0;
|
|
||||||
}
|
|
||||||
else if (code == XK_Right) {
|
|
||||||
view_roty -= 5.0;
|
|
||||||
}
|
|
||||||
else if (code == XK_Up) {
|
|
||||||
view_rotx += 5.0;
|
|
||||||
}
|
|
||||||
else if (code == XK_Down) {
|
|
||||||
view_rotx -= 5.0;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
r = XLookupString(&event.xkey, buffer, sizeof(buffer),
|
|
||||||
NULL, NULL);
|
|
||||||
if (buffer[0] == 27) {
|
|
||||||
/* escape */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
draw_frame(dpy, win);
|
||||||
static int frames = 0;
|
|
||||||
static double tRot0 = -1.0, tRate0 = -1.0;
|
|
||||||
double dt, t = current_time();
|
|
||||||
if (tRot0 < 0.0)
|
|
||||||
tRot0 = t;
|
|
||||||
dt = t - tRot0;
|
|
||||||
tRot0 = t;
|
|
||||||
|
|
||||||
/* advance rotation for next frame */
|
|
||||||
angle += 70.0 * dt; /* 70 degrees per second */
|
|
||||||
if (angle > 3600.0)
|
|
||||||
angle -= 3600.0;
|
|
||||||
|
|
||||||
draw();
|
|
||||||
glXSwapBuffers(dpy, win);
|
|
||||||
|
|
||||||
frames++;
|
|
||||||
|
|
||||||
if (tRate0 < 0.0)
|
|
||||||
tRate0 = t;
|
|
||||||
if (t - tRate0 >= 5.0) {
|
|
||||||
GLfloat seconds = t - tRate0;
|
|
||||||
GLfloat fps = frames / seconds;
|
|
||||||
printf("%d frames in %3.1f seconds = %6.3f FPS\n", frames, seconds,
|
|
||||||
fps);
|
|
||||||
tRate0 = t;
|
|
||||||
frames = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -548,8 +588,7 @@ usage(void)
|
|||||||
printf(" -stereo run in stereo mode\n");
|
printf(" -stereo run in stereo mode\n");
|
||||||
printf(" -fullscreen run in fullscreen mode\n");
|
printf(" -fullscreen run in fullscreen mode\n");
|
||||||
printf(" -info display OpenGL renderer info\n");
|
printf(" -info display OpenGL renderer info\n");
|
||||||
printf(" -winwidth <width> window width (default: 300)\n");
|
printf(" -geometry WxH+X+Y window geometry\n");
|
||||||
printf(" -winheight <height> window height (default: 300)\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -523,6 +523,13 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect, GLboolean limits)
|
|||||||
printf("OpenGL vendor string: %s\n", glVendor);
|
printf("OpenGL vendor string: %s\n", glVendor);
|
||||||
printf("OpenGL renderer string: %s\n", glRenderer);
|
printf("OpenGL renderer string: %s\n", glRenderer);
|
||||||
printf("OpenGL version string: %s\n", glVersion);
|
printf("OpenGL version string: %s\n", glVersion);
|
||||||
|
#ifdef GL_VERSION_2_0
|
||||||
|
if (glVersion[0] >= '2' && glVersion[1] == '.') {
|
||||||
|
char *v = (char *) glGetString(GL_SHADING_LANGUAGE_VERSION);
|
||||||
|
printf("OpenGL shading language version string: %s\n", v);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
printf("OpenGL extensions:\n");
|
printf("OpenGL extensions:\n");
|
||||||
print_extension_list(glExtensions);
|
print_extension_list(glExtensions);
|
||||||
if (limits)
|
if (limits)
|
||||||
|
@@ -21,7 +21,7 @@ subdirs:
|
|||||||
fi \
|
fi \
|
||||||
done
|
done
|
||||||
|
|
||||||
install:
|
install: $(TOP)/$(LIB_DIR)
|
||||||
@for dir in $(SUBDIRS) ; do \
|
@for dir in $(SUBDIRS) ; do \
|
||||||
if [ -d $$dir ] ; then \
|
if [ -d $$dir ] ; then \
|
||||||
(cd $$dir && $(MAKE) install) || exit 1 ; \
|
(cd $$dir && $(MAKE) install) || exit 1 ; \
|
||||||
@@ -29,7 +29,7 @@ install:
|
|||||||
done
|
done
|
||||||
|
|
||||||
$(TOP)/$(LIB_DIR):
|
$(TOP)/$(LIB_DIR):
|
||||||
-mkdir $(TOP)/$(LIB_DIR)
|
-@test -d $(TOP)/$(LIB_DIR) || mkdir -p $(TOP)/$(LIB_DIR)
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@@ -21,8 +21,9 @@ default: $(TOP)/$(LIB_DIR)/demodriver.so
|
|||||||
|
|
||||||
|
|
||||||
$(TOP)/$(LIB_DIR)/demodriver.so: $(OBJECTS)
|
$(TOP)/$(LIB_DIR)/demodriver.so: $(OBJECTS)
|
||||||
$(TOP)/bin/mklib -o demodriver.so -noprefix -ldflags '$(LDFLAGS)' \
|
$(MKLIB) -o demodriver.so -noprefix -linker '$(CC)' \
|
||||||
-install $(TOP)/$(LIB_DIR) $(OBJECTS)
|
-ldflags '$(LDFLAGS)' -install $(TOP)/$(LIB_DIR) \
|
||||||
|
$(OBJECTS)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -42,7 +42,8 @@ default: depend library Makefile
|
|||||||
library: $(TOP)/$(LIB_DIR)/libEGLdri.so
|
library: $(TOP)/$(LIB_DIR)/libEGLdri.so
|
||||||
|
|
||||||
$(TOP)/$(LIB_DIR)/libEGLdri.so: $(OBJECTS)
|
$(TOP)/$(LIB_DIR)/libEGLdri.so: $(OBJECTS)
|
||||||
$(TOP)/bin/mklib -o EGLdri -ldflags '$(LDFLAGS)' -major 1 -minor 0 \
|
$(MKLIB) -o EGLdri -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||||
|
-major 1 -minor 0 \
|
||||||
-install $(TOP)/$(LIB_DIR) -ldl $(OBJECTS)
|
-install $(TOP)/$(LIB_DIR) -ldl $(OBJECTS)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -46,7 +46,8 @@ default: depend library
|
|||||||
library: $(TOP)/$(LIB_DIR)/libEGL.so
|
library: $(TOP)/$(LIB_DIR)/libEGL.so
|
||||||
|
|
||||||
$(TOP)/$(LIB_DIR)/libEGL.so: $(OBJECTS)
|
$(TOP)/$(LIB_DIR)/libEGL.so: $(OBJECTS)
|
||||||
$(TOP)/bin/mklib -o EGL -ldflags '$(LDFLAGS)' -major 1 -minor 0 \
|
$(MKLIB) -o EGL -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||||
|
-major 1 -minor 0 \
|
||||||
-install $(TOP)/$(LIB_DIR) -ldl $(OBJECTS)
|
-install $(TOP)/$(LIB_DIR) -ldl $(OBJECTS)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -16,18 +16,20 @@ default: $(TOP)/configs/current
|
|||||||
# GLU pkg-config file
|
# GLU pkg-config file
|
||||||
pcedit = sed \
|
pcedit = sed \
|
||||||
-e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
|
-e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
|
||||||
-e 's,@LIB_DIR@,$(LIB_DIR),' \
|
-e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
|
||||||
|
-e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
|
||||||
-e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),'
|
-e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),'
|
||||||
glu.pc: glu.pc.in
|
glu.pc: glu.pc.in
|
||||||
$(pcedit) $< > $@
|
$(pcedit) $< > $@
|
||||||
|
|
||||||
install: glu.pc
|
install: glu.pc
|
||||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
|
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
|
||||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
|
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
|
||||||
$(INSTALL) $(TOP)/$(LIB_DIR)/libGLU.* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
|
$(INSTALL) $(TOP)/$(LIB_DIR)/$(GLU_LIB_GLOB) $(DESTDIR)$(INSTALL_LIB_DIR)
|
||||||
$(INSTALL) -m 644 glu.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
|
$(INSTALL) -m 644 glu.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-@for dir in $(SUBDIRS) ; do \
|
-@for dir in $(SUBDIRS) ; do \
|
||||||
(cd $$dir && $(MAKE) clean) ; \
|
(cd $$dir && $(MAKE) clean) ; \
|
||||||
done
|
done
|
||||||
|
-rm -f *.pc
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
prefix=@INSTALL_DIR@
|
prefix=@INSTALL_DIR@
|
||||||
exec_prefix=${prefix}
|
exec_prefix=${prefix}
|
||||||
libdir=${exec_prefix}/@LIB_DIR@
|
libdir=@INSTALL_LIB_DIR@
|
||||||
includedir=${prefix}/include
|
includedir=@INSTALL_INC_DIR@
|
||||||
|
|
||||||
Name: glu
|
Name: glu
|
||||||
Description: Mesa OpenGL Utility library
|
Description: Mesa OpenGL Utility library
|
||||||
|
@@ -45,7 +45,7 @@ $(TOP)/$(LIB_DIR):
|
|||||||
|
|
||||||
# Make the library:
|
# Make the library:
|
||||||
$(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
|
$(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
|
||||||
@ $(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
@ $(MKLIB) -o $(GLU_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||||
-major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
|
-major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
|
||||||
$(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
|
$(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
|
||||||
$(GLU_LIB_DEPS) $(OBJECTS)
|
$(GLU_LIB_DEPS) $(OBJECTS)
|
||||||
|
@@ -136,9 +136,10 @@ $(TOP)/$(LIB_DIR):
|
|||||||
|
|
||||||
# Make the library:
|
# Make the library:
|
||||||
$(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
|
$(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
|
||||||
$(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
|
$(MKLIB) -o $(GLU_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
|
||||||
-major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
|
-major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
|
||||||
-cplusplus $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
|
-cplusplus $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
|
||||||
|
-exports glu.exports -id $(INSTALL_LIB_DIR)/lib$(GLU_LIB).$(GLU_MAJOR).dylib \
|
||||||
$(GLU_LIB_DEPS) $(OBJECTS)
|
$(GLU_LIB_DEPS) $(OBJECTS)
|
||||||
|
|
||||||
|
|
||||||
|
59
src/glu/sgi/glu.exports
Normal file
59
src/glu/sgi/glu.exports
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
gluBeginCurve
|
||||||
|
gluBeginPolygon
|
||||||
|
gluBeginSurface
|
||||||
|
gluBeginTrim
|
||||||
|
gluBuild1DMipmapLevels
|
||||||
|
gluBuild1DMipmaps
|
||||||
|
gluBuild2DMipmapLevels
|
||||||
|
gluBuild2DMipmaps
|
||||||
|
gluBuild3DMipmapLevels
|
||||||
|
gluBuild3DMipmaps
|
||||||
|
gluCheckExtension
|
||||||
|
gluCylinder
|
||||||
|
gluDeleteNurbsRenderer
|
||||||
|
gluDeleteQuadric
|
||||||
|
gluDeleteTess
|
||||||
|
gluDisk
|
||||||
|
gluEndCurve
|
||||||
|
gluEndPolygon
|
||||||
|
gluEndSurface
|
||||||
|
gluEndTrim
|
||||||
|
gluErrorString
|
||||||
|
gluGetNurbsProperty
|
||||||
|
gluGetString
|
||||||
|
gluGetTessProperty
|
||||||
|
gluLoadSamplingMatrices
|
||||||
|
gluLookAt
|
||||||
|
gluNewNurbsRenderer
|
||||||
|
gluNewQuadric
|
||||||
|
gluNewTess
|
||||||
|
gluNextContour
|
||||||
|
gluNurbsCallback
|
||||||
|
gluNurbsCallbackData
|
||||||
|
gluNurbsCallbackDataEXT
|
||||||
|
gluNurbsCurve
|
||||||
|
gluNurbsProperty
|
||||||
|
gluNurbsSurface
|
||||||
|
gluOrtho2D
|
||||||
|
gluPartialDisk
|
||||||
|
gluPerspective
|
||||||
|
gluPickMatrix
|
||||||
|
gluProject
|
||||||
|
gluPwlCurve
|
||||||
|
gluQuadricCallback
|
||||||
|
gluQuadricDrawStyle
|
||||||
|
gluQuadricNormals
|
||||||
|
gluQuadricOrientation
|
||||||
|
gluQuadricTexture
|
||||||
|
gluScaleImage
|
||||||
|
gluSphere
|
||||||
|
gluTessBeginContour
|
||||||
|
gluTessBeginPolygon
|
||||||
|
gluTessCallback
|
||||||
|
gluTessEndContour
|
||||||
|
gluTessEndPolygon
|
||||||
|
gluTessNormal
|
||||||
|
gluTessProperty
|
||||||
|
gluTessVertex
|
||||||
|
gluUnProject
|
||||||
|
gluUnProject4
|
59
src/glu/sgi/glu.exports.darwin
Normal file
59
src/glu/sgi/glu.exports.darwin
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
_gluBeginCurve
|
||||||
|
_gluBeginPolygon
|
||||||
|
_gluBeginSurface
|
||||||
|
_gluBeginTrim
|
||||||
|
_gluBuild1DMipmapLevels
|
||||||
|
_gluBuild1DMipmaps
|
||||||
|
_gluBuild2DMipmapLevels
|
||||||
|
_gluBuild2DMipmaps
|
||||||
|
_gluBuild3DMipmapLevels
|
||||||
|
_gluBuild3DMipmaps
|
||||||
|
_gluCheckExtension
|
||||||
|
_gluCylinder
|
||||||
|
_gluDeleteNurbsRenderer
|
||||||
|
_gluDeleteQuadric
|
||||||
|
_gluDeleteTess
|
||||||
|
_gluDisk
|
||||||
|
_gluEndCurve
|
||||||
|
_gluEndPolygon
|
||||||
|
_gluEndSurface
|
||||||
|
_gluEndTrim
|
||||||
|
_gluErrorString
|
||||||
|
_gluGetNurbsProperty
|
||||||
|
_gluGetString
|
||||||
|
_gluGetTessProperty
|
||||||
|
_gluLoadSamplingMatrices
|
||||||
|
_gluLookAt
|
||||||
|
_gluNewNurbsRenderer
|
||||||
|
_gluNewQuadric
|
||||||
|
_gluNewTess
|
||||||
|
_gluNextContour
|
||||||
|
_gluNurbsCallback
|
||||||
|
_gluNurbsCallbackData
|
||||||
|
_gluNurbsCallbackDataEXT
|
||||||
|
_gluNurbsCurve
|
||||||
|
_gluNurbsProperty
|
||||||
|
_gluNurbsSurface
|
||||||
|
_gluOrtho2D
|
||||||
|
_gluPartialDisk
|
||||||
|
_gluPerspective
|
||||||
|
_gluPickMatrix
|
||||||
|
_gluProject
|
||||||
|
_gluPwlCurve
|
||||||
|
_gluQuadricCallback
|
||||||
|
_gluQuadricDrawStyle
|
||||||
|
_gluQuadricNormals
|
||||||
|
_gluQuadricOrientation
|
||||||
|
_gluQuadricTexture
|
||||||
|
_gluScaleImage
|
||||||
|
_gluSphere
|
||||||
|
_gluTessBeginContour
|
||||||
|
_gluTessBeginPolygon
|
||||||
|
_gluTessCallback
|
||||||
|
_gluTessEndContour
|
||||||
|
_gluTessEndPolygon
|
||||||
|
_gluTessNormal
|
||||||
|
_gluTessProperty
|
||||||
|
_gluTessVertex
|
||||||
|
_gluUnProject
|
||||||
|
_gluUnProject4
|
@@ -713,8 +713,8 @@ gluSphere(GLUquadric *qobj, GLdouble radius, GLint slices, GLint stacks)
|
|||||||
GLfloat cosCache3b[CACHE_SIZE];
|
GLfloat cosCache3b[CACHE_SIZE];
|
||||||
GLfloat angle;
|
GLfloat angle;
|
||||||
GLfloat zLow, zHigh;
|
GLfloat zLow, zHigh;
|
||||||
GLfloat sintemp1, sintemp2, sintemp3 = 0.0, sintemp4 = 0.0;
|
GLfloat sintemp1 = 0.0, sintemp2 = 0.0, sintemp3 = 0.0, sintemp4 = 0.0;
|
||||||
GLfloat costemp1, costemp2 = 0.0, costemp3 = 0.0, costemp4 = 0.0;
|
GLfloat costemp1 = 0.0, costemp2 = 0.0, costemp3 = 0.0, costemp4 = 0.0;
|
||||||
GLboolean needCache2, needCache3;
|
GLboolean needCache2, needCache3;
|
||||||
GLint start, finish;
|
GLint start, finish;
|
||||||
|
|
||||||
|
@@ -83,10 +83,10 @@ $(TOP)/$(LIB_DIR):
|
|||||||
|
|
||||||
# Make the library
|
# Make the library
|
||||||
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
|
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
|
||||||
@$(TOP)/bin/mklib -o $(GLUT_LIB) -ldflags '$(LDFLAGS)' \
|
@$(MKLIB) -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||||
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
|
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
|
||||||
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) $(GLUT_LIB_DEPS) \
|
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
|
||||||
$(OBJECTS)
|
$(GLUT_LIB_DEPS) $(OBJECTS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -f *.o
|
-rm -f *.o
|
||||||
|
@@ -61,7 +61,7 @@ default: depend $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
|
|||||||
|
|
||||||
# Make the library
|
# Make the library
|
||||||
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
|
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
|
||||||
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
$(MKLIB) -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||||
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
|
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
|
||||||
$(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
|
$(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
|
||||||
$(MKLIB_OPTIONS) $(OBJECTS)
|
$(MKLIB_OPTIONS) $(OBJECTS)
|
||||||
|
@@ -63,16 +63,16 @@ default: depend $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
|
|||||||
|
|
||||||
# Make the library
|
# Make the library
|
||||||
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
|
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
|
||||||
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
$(MKLIB) -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||||
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
|
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
|
||||||
$(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
|
$(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
|
||||||
$(MKLIB_OPTIONS) $(OBJECTS)
|
$(MKLIB_OPTIONS) $(OBJECTS)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
|
$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL
|
||||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
|
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
|
||||||
$(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_DIR)/include/GL
|
$(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_INC_DIR)/GL
|
||||||
$(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
|
$(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_LIB_DIR)
|
||||||
|
|
||||||
# Run 'make -f Makefile.solo dep' to update the dependencies if you change
|
# Run 'make -f Makefile.solo dep' to update the dependencies if you change
|
||||||
# what's included by any source file.
|
# what's included by any source file.
|
||||||
|
@@ -32,7 +32,7 @@ default: $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
|
|||||||
|
|
||||||
# Make the library
|
# Make the library
|
||||||
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
|
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
|
||||||
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
$(MKLIB) -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||||
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) \
|
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) \
|
||||||
-patch $(GLUT_TINY) $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
|
-patch $(GLUT_TINY) $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
|
||||||
$(GLUT_LIB_DEPS) $(OBJECTS)
|
$(GLUT_LIB_DEPS) $(OBJECTS)
|
||||||
|
@@ -91,33 +91,36 @@ default: $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
|
|||||||
|
|
||||||
# Make the library
|
# Make the library
|
||||||
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
|
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
|
||||||
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
$(MKLIB) -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||||
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
|
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
|
||||||
$(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
|
$(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
|
||||||
|
-id $(INSTALL_LIB_DIR)/lib$(GLUT_LIB).$(GLUT_MAJOR).dylib \
|
||||||
$(GLUT_LIB_DEPS) $(OBJECTS)
|
$(GLUT_LIB_DEPS) $(OBJECTS)
|
||||||
|
|
||||||
|
|
||||||
# glut pkgconfig file
|
# glut pkgconfig file
|
||||||
pcedit = sed \
|
pcedit = sed \
|
||||||
-e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
|
-e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
|
||||||
-e 's,@LIB_DIR@,$(LIB_DIR),' \
|
-e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
|
||||||
|
-e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
|
||||||
-e 's,@VERSION@,$(GLUT_MAJOR).$(GLUT_MINOR).$(GLUT_TINY),'
|
-e 's,@VERSION@,$(GLUT_MAJOR).$(GLUT_MINOR).$(GLUT_TINY),'
|
||||||
glut.pc: glut.pc.in
|
glut.pc: glut.pc.in
|
||||||
$(pcedit) $< > $@
|
$(pcedit) $< > $@
|
||||||
|
|
||||||
install: glut.pc
|
install: glut.pc
|
||||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
|
$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL
|
||||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
|
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
|
||||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
|
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
|
||||||
$(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_DIR)/include/GL
|
$(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_INC_DIR)/GL
|
||||||
$(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
|
$(INSTALL) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_GLOB) $(DESTDIR)$(INSTALL_LIB_DIR)
|
||||||
$(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
|
$(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -f *.o *~
|
-rm -f *.o *~
|
||||||
-rm -f *.lo
|
-rm -f *.lo
|
||||||
-rm -f *.la
|
-rm -f *.la
|
||||||
|
-rm -f *.pc
|
||||||
-rm -rf .libs
|
-rm -rf .libs
|
||||||
-rm -f depend depend.bak
|
-rm -f depend depend.bak
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
prefix=@INSTALL_DIR@
|
prefix=@INSTALL_DIR@
|
||||||
exec_prefix=${prefix}
|
exec_prefix=${prefix}
|
||||||
libdir=${exec_prefix}/@LIB_DIR@
|
libdir=@INSTALL_LIB_DIR@
|
||||||
includedir=${prefix}/include
|
includedir=@INSTALL_INC_DIR@
|
||||||
|
|
||||||
Name: glut
|
Name: glut
|
||||||
Description: Mesa OpenGL Utility Toolkit library
|
Description: Mesa OpenGL Utility Toolkit library
|
||||||
|
@@ -55,7 +55,7 @@ default: depend $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
|
|||||||
|
|
||||||
# Make the library
|
# Make the library
|
||||||
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
|
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
|
||||||
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
$(MKLIB) -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||||
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
|
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
|
||||||
$(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
|
$(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
|
||||||
$(MKLIB_OPTIONS) $(OBJECTS)
|
$(MKLIB_OPTIONS) $(OBJECTS)
|
||||||
@@ -75,23 +75,24 @@ tags:
|
|||||||
# glut pkgconfig file
|
# glut pkgconfig file
|
||||||
pcedit = sed \
|
pcedit = sed \
|
||||||
-e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
|
-e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
|
||||||
-e 's,@LIB_DIR@,$(LIB_DIR),' \
|
-e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
|
||||||
|
-e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
|
||||||
-e 's,@VERSION@,$(GLUT_MAJOR).$(GLUT_MINOR).$(GLUT_TINY),'
|
-e 's,@VERSION@,$(GLUT_MAJOR).$(GLUT_MINOR).$(GLUT_TINY),'
|
||||||
glut.pc: glut.pc.in
|
glut.pc: glut.pc.in
|
||||||
$(pcedit) $< > $@
|
$(pcedit) $< > $@
|
||||||
|
|
||||||
install: glut.pc
|
install: glut.pc
|
||||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
|
$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL
|
||||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
|
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
|
||||||
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
|
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
|
||||||
$(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_DIR)/include/GL
|
$(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_INC_DIR)/GL
|
||||||
$(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
|
$(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_LIB_DIR)
|
||||||
$(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
|
$(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
|
||||||
|
|
||||||
|
|
||||||
# Remove .o and backup files
|
# Remove .o and backup files
|
||||||
clean: depend
|
clean: depend
|
||||||
-rm -f depend depend.bak
|
-rm -f depend depend.bak
|
||||||
-rm -f *.o *~ *.o *~ *.so libglut.so.3.7
|
-rm -f *.o *~ *.o *~ *.so *.pc libglut.so.3.7
|
||||||
|
|
||||||
include depend
|
include depend
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
prefix=@INSTALL_DIR@
|
prefix=@INSTALL_DIR@
|
||||||
exec_prefix=${prefix}
|
exec_prefix=${prefix}
|
||||||
libdir=${exec_prefix}/@LIB_DIR@
|
libdir=@INSTALL_LIB_DIR@
|
||||||
includedir=${prefix}/include
|
includedir=@INSTALL_INC_DIR@
|
||||||
|
|
||||||
Name: glut
|
Name: glut
|
||||||
Description: Mesa OpenGL Utility Toolkit library
|
Description: Mesa OpenGL Utility Toolkit library
|
||||||
|
@@ -1,420 +1,420 @@
|
|||||||
/* WarpWin.c */
|
/* WarpWin.c */
|
||||||
/* glut for Warp */
|
/* glut for Warp */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "WarpWin.h"
|
#include "WarpWin.h"
|
||||||
#include "WarpGL.h"
|
#include "WarpGL.h"
|
||||||
|
|
||||||
#define POKA 0
|
#define POKA 0
|
||||||
|
|
||||||
/* global variables that must be set for some functions to operate
|
/* global variables that must be set for some functions to operate
|
||||||
correctly. */
|
correctly. */
|
||||||
HDC XHDC;
|
HDC XHDC;
|
||||||
HWND XHWND;
|
HWND XHWND;
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
XStoreColor(Display* display, Colormap colormap, XColor* color)
|
XStoreColor(Display* display, Colormap colormap, XColor* color)
|
||||||
{
|
{
|
||||||
/* KLUDGE: set XHDC to 0 if the palette should NOT be realized after
|
/* KLUDGE: set XHDC to 0 if the palette should NOT be realized after
|
||||||
setting the color. set XHDC to the correct HDC if it should. */
|
setting the color. set XHDC to the correct HDC if it should. */
|
||||||
|
|
||||||
LONG pe;
|
LONG pe;
|
||||||
ULONG cclr;
|
ULONG cclr;
|
||||||
int r,g,b;
|
int r,g,b;
|
||||||
/* X11 stores color from 0-65535, Win32 expects them to be 0-256, so
|
/* X11 stores color from 0-65535, Win32 expects them to be 0-256, so
|
||||||
twiddle the bits ( / 256). */
|
twiddle the bits ( / 256). */
|
||||||
r = color->red / 256;
|
r = color->red / 256;
|
||||||
g = color->green / 256;
|
g = color->green / 256;
|
||||||
b = color->blue / 256;
|
b = color->blue / 256;
|
||||||
pe = LONGFromRGB(r,g,b);
|
pe = LONGFromRGB(r,g,b);
|
||||||
/* make sure we use this flag, otherwise the colors might get mapped
|
/* make sure we use this flag, otherwise the colors might get mapped
|
||||||
to another place in the colormap, and when we glIndex() that
|
to another place in the colormap, and when we glIndex() that
|
||||||
color, it may have moved (argh!!) */
|
color, it may have moved (argh!!) */
|
||||||
pe |= (PC_NOCOLLAPSE<<24);
|
pe |= (PC_NOCOLLAPSE<<24);
|
||||||
/* This function changes the entries in a palette. */
|
/* This function changes the entries in a palette. */
|
||||||
#if POKA
|
#if POKA
|
||||||
OS2:
|
OS2:
|
||||||
rc = GpiSetPaletteEntries(colormap,LCOLF_CONSECRGB, color->pixel, 1, &pe);
|
rc = GpiSetPaletteEntries(colormap,LCOLF_CONSECRGB, color->pixel, 1, &pe);
|
||||||
GpiSelectPalette(hps,colormap);
|
GpiSelectPalette(hps,colormap);
|
||||||
WinRealizePalette(hwnd,hps,&cclr);
|
WinRealizePalette(hwnd,hps,&cclr);
|
||||||
source Win:
|
source Win:
|
||||||
if (XHDC) {
|
if (XHDC) {
|
||||||
UnrealizeObject(colormap);
|
UnrealizeObject(colormap);
|
||||||
SelectPalette(XHDC, colormap, FALSE);
|
SelectPalette(XHDC, colormap, FALSE);
|
||||||
RealizePalette(XHDC);
|
RealizePalette(XHDC);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
XSetWindowColormap(Display* display, Window window, Colormap colormap)
|
XSetWindowColormap(Display* display, Window window, Colormap colormap)
|
||||||
{
|
{
|
||||||
#if POKA
|
#if POKA
|
||||||
HDC hdc = GetDC(window);
|
HDC hdc = GetDC(window);
|
||||||
|
|
||||||
/* if the third parameter is FALSE, the logical colormap is copied
|
/* if the third parameter is FALSE, the logical colormap is copied
|
||||||
into the device palette when the application is in the
|
into the device palette when the application is in the
|
||||||
foreground, if it is TRUE, the colors are mapped into the current
|
foreground, if it is TRUE, the colors are mapped into the current
|
||||||
palette in the best possible way. */
|
palette in the best possible way. */
|
||||||
SelectPalette(hdc, colormap, FALSE);
|
SelectPalette(hdc, colormap, FALSE);
|
||||||
RealizePalette(hdc);
|
RealizePalette(hdc);
|
||||||
|
|
||||||
/* note that we don't have to release the DC, since our window class
|
/* note that we don't have to release the DC, since our window class
|
||||||
uses the WC_OWNDC flag! */
|
uses the WC_OWNDC flag! */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* display, root and visual - don't used at all */
|
/* display, root and visual - don't used at all */
|
||||||
Colormap
|
Colormap
|
||||||
XCreateColormap(Display* display, Window root, Visual* visual, int alloc)
|
XCreateColormap(Display* display, Window root, Visual* visual, int alloc)
|
||||||
{
|
{
|
||||||
/* KLUDGE: this function needs XHDC to be set to the HDC currently
|
/* KLUDGE: this function needs XHDC to be set to the HDC currently
|
||||||
being operated on before it is invoked! */
|
being operated on before it is invoked! */
|
||||||
|
|
||||||
HPAL palette;
|
HPAL palette;
|
||||||
int n;
|
int n;
|
||||||
#if POKA
|
#if POKA
|
||||||
PIXELFORMATDESCRIPTOR pfd;
|
PIXELFORMATDESCRIPTOR pfd;
|
||||||
LOGPALETTE *logical;
|
LOGPALETTE *logical;
|
||||||
|
|
||||||
/* grab the pixel format */
|
/* grab the pixel format */
|
||||||
memset(&pfd, 0, sizeof(PIXELFORMATDESCRIPTOR));
|
memset(&pfd, 0, sizeof(PIXELFORMATDESCRIPTOR));
|
||||||
DescribePixelFormat(XHDC, GetPixelFormat(XHDC),
|
DescribePixelFormat(XHDC, GetPixelFormat(XHDC),
|
||||||
sizeof(PIXELFORMATDESCRIPTOR), &pfd);
|
sizeof(PIXELFORMATDESCRIPTOR), &pfd);
|
||||||
|
|
||||||
if (!(pfd.dwFlags & PFD_NEED_PALETTE ||
|
if (!(pfd.dwFlags & PFD_NEED_PALETTE ||
|
||||||
pfd.iPixelType == PFD_TYPE_COLORINDEX))
|
pfd.iPixelType == PFD_TYPE_COLORINDEX))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
n = 1 << pfd.cColorBits;
|
n = 1 << pfd.cColorBits;
|
||||||
|
|
||||||
/* allocate a bunch of memory for the logical palette (assume 256
|
/* allocate a bunch of memory for the logical palette (assume 256
|
||||||
colors in a Win32 palette */
|
colors in a Win32 palette */
|
||||||
logical = (LOGPALETTE*)malloc(sizeof(LOGPALETTE) +
|
logical = (LOGPALETTE*)malloc(sizeof(LOGPALETTE) +
|
||||||
sizeof(PALETTEENTRY) * n);
|
sizeof(PALETTEENTRY) * n);
|
||||||
memset(logical, 0, sizeof(LOGPALETTE) + sizeof(PALETTEENTRY) * n);
|
memset(logical, 0, sizeof(LOGPALETTE) + sizeof(PALETTEENTRY) * n);
|
||||||
|
|
||||||
/* set the entries in the logical palette */
|
/* set the entries in the logical palette */
|
||||||
logical->palVersion = 0x300;
|
logical->palVersion = 0x300;
|
||||||
logical->palNumEntries = n;
|
logical->palNumEntries = n;
|
||||||
|
|
||||||
/* start with a copy of the current system palette */
|
/* start with a copy of the current system palette */
|
||||||
GetSystemPaletteEntries(XHDC, 0, 256, &logical->palPalEntry[0]);
|
GetSystemPaletteEntries(XHDC, 0, 256, &logical->palPalEntry[0]);
|
||||||
|
|
||||||
if (pfd.iPixelType == PFD_TYPE_RGBA) {
|
if (pfd.iPixelType == PFD_TYPE_RGBA) {
|
||||||
int redMask = (1 << pfd.cRedBits) - 1;
|
int redMask = (1 << pfd.cRedBits) - 1;
|
||||||
int greenMask = (1 << pfd.cGreenBits) - 1;
|
int greenMask = (1 << pfd.cGreenBits) - 1;
|
||||||
int blueMask = (1 << pfd.cBlueBits) - 1;
|
int blueMask = (1 << pfd.cBlueBits) - 1;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* fill in an RGBA color palette */
|
/* fill in an RGBA color palette */
|
||||||
for (i = 0; i < n; ++i) {
|
for (i = 0; i < n; ++i) {
|
||||||
logical->palPalEntry[i].peRed =
|
logical->palPalEntry[i].peRed =
|
||||||
(((i >> pfd.cRedShift) & redMask) * 255) / redMask;
|
(((i >> pfd.cRedShift) & redMask) * 255) / redMask;
|
||||||
logical->palPalEntry[i].peGreen =
|
logical->palPalEntry[i].peGreen =
|
||||||
(((i >> pfd.cGreenShift) & greenMask) * 255) / greenMask;
|
(((i >> pfd.cGreenShift) & greenMask) * 255) / greenMask;
|
||||||
logical->palPalEntry[i].peBlue =
|
logical->palPalEntry[i].peBlue =
|
||||||
(((i >> pfd.cBlueShift) & blueMask) * 255) / blueMask;
|
(((i >> pfd.cBlueShift) & blueMask) * 255) / blueMask;
|
||||||
logical->palPalEntry[i].peFlags = 0;
|
logical->palPalEntry[i].peFlags = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
palette = CreatePalette(logical);
|
palette = CreatePalette(logical);
|
||||||
free(logical);
|
free(logical);
|
||||||
|
|
||||||
SelectPalette(XHDC, palette, FALSE);
|
SelectPalette(XHDC, palette, FALSE);
|
||||||
RealizePalette(XHDC);
|
RealizePalette(XHDC);
|
||||||
#endif /* POKA */
|
#endif /* POKA */
|
||||||
|
|
||||||
return palette;
|
return palette;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int GetSystemMetrics( int mode)
|
int GetSystemMetrics( int mode)
|
||||||
{ RECTL rect;
|
{ RECTL rect;
|
||||||
|
|
||||||
switch(mode)
|
switch(mode)
|
||||||
{ case SM_CXSCREEN:
|
{ case SM_CXSCREEN:
|
||||||
WinQueryWindowRect(HWND_DESKTOP,&rect);
|
WinQueryWindowRect(HWND_DESKTOP,&rect);
|
||||||
return (rect.xRight-rect.xLeft);
|
return (rect.xRight-rect.xLeft);
|
||||||
break;
|
break;
|
||||||
case SM_CYSCREEN:
|
case SM_CYSCREEN:
|
||||||
WinQueryWindowRect(HWND_DESKTOP,&rect);
|
WinQueryWindowRect(HWND_DESKTOP,&rect);
|
||||||
return (rect.yTop-rect.yBottom);
|
return (rect.yTop-rect.yBottom);
|
||||||
break;
|
break;
|
||||||
default: ;
|
default: ;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* XParseGeometry parses strings of the form
|
* XParseGeometry parses strings of the form
|
||||||
* "=<width>x<height>{+-}<xoffset>{+-}<yoffset>", where
|
* "=<width>x<height>{+-}<xoffset>{+-}<yoffset>", where
|
||||||
* width, height, xoffset, and yoffset are unsigned integers.
|
* width, height, xoffset, and yoffset are unsigned integers.
|
||||||
* Example: "=80x24+300-49"
|
* Example: "=80x24+300-49"
|
||||||
* The equal sign is optional.
|
* The equal sign is optional.
|
||||||
* It returns a bitmask that indicates which of the four values
|
* It returns a bitmask that indicates which of the four values
|
||||||
* were actually found in the string. For each value found,
|
* were actually found in the string. For each value found,
|
||||||
* the corresponding argument is updated; for each value
|
* the corresponding argument is updated; for each value
|
||||||
* not found, the corresponding argument is left unchanged.
|
* not found, the corresponding argument is left unchanged.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ReadInteger(char *string, char **NextString)
|
ReadInteger(char *string, char **NextString)
|
||||||
{
|
{
|
||||||
register int Result = 0;
|
register int Result = 0;
|
||||||
int Sign = 1;
|
int Sign = 1;
|
||||||
|
|
||||||
if (*string == '+')
|
if (*string == '+')
|
||||||
string++;
|
string++;
|
||||||
else if (*string == '-')
|
else if (*string == '-')
|
||||||
{
|
{
|
||||||
string++;
|
string++;
|
||||||
Sign = -1;
|
Sign = -1;
|
||||||
}
|
}
|
||||||
for (; (*string >= '0') && (*string <= '9'); string++)
|
for (; (*string >= '0') && (*string <= '9'); string++)
|
||||||
{
|
{
|
||||||
Result = (Result * 10) + (*string - '0');
|
Result = (Result * 10) + (*string - '0');
|
||||||
}
|
}
|
||||||
*NextString = string;
|
*NextString = string;
|
||||||
if (Sign >= 0)
|
if (Sign >= 0)
|
||||||
return (Result);
|
return (Result);
|
||||||
else
|
else
|
||||||
return (-Result);
|
return (-Result);
|
||||||
}
|
}
|
||||||
|
|
||||||
int XParseGeometry(char *string, int *x, int *y, unsigned int *width, unsigned int *height)
|
int XParseGeometry(char *string, int *x, int *y, unsigned int *width, unsigned int *height)
|
||||||
{
|
{
|
||||||
int mask = NoValue;
|
int mask = NoValue;
|
||||||
register char *strind;
|
register char *strind;
|
||||||
unsigned int tempWidth, tempHeight;
|
unsigned int tempWidth, tempHeight;
|
||||||
int tempX, tempY;
|
int tempX, tempY;
|
||||||
char *nextCharacter;
|
char *nextCharacter;
|
||||||
|
|
||||||
if ( (string == NULL) || (*string == '\0')) return(mask);
|
if ( (string == NULL) || (*string == '\0')) return(mask);
|
||||||
if (*string == '=')
|
if (*string == '=')
|
||||||
string++; /* ignore possible '=' at beg of geometry spec */
|
string++; /* ignore possible '=' at beg of geometry spec */
|
||||||
|
|
||||||
strind = (char *)string;
|
strind = (char *)string;
|
||||||
if (*strind != '+' && *strind != '-' && *strind != 'x') {
|
if (*strind != '+' && *strind != '-' && *strind != 'x') {
|
||||||
tempWidth = ReadInteger(strind, &nextCharacter);
|
tempWidth = ReadInteger(strind, &nextCharacter);
|
||||||
if (strind == nextCharacter)
|
if (strind == nextCharacter)
|
||||||
return (0);
|
return (0);
|
||||||
strind = nextCharacter;
|
strind = nextCharacter;
|
||||||
mask |= WidthValue;
|
mask |= WidthValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*strind == 'x' || *strind == 'X') {
|
if (*strind == 'x' || *strind == 'X') {
|
||||||
strind++;
|
strind++;
|
||||||
tempHeight = ReadInteger(strind, &nextCharacter);
|
tempHeight = ReadInteger(strind, &nextCharacter);
|
||||||
if (strind == nextCharacter)
|
if (strind == nextCharacter)
|
||||||
return (0);
|
return (0);
|
||||||
strind = nextCharacter;
|
strind = nextCharacter;
|
||||||
mask |= HeightValue;
|
mask |= HeightValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((*strind == '+') || (*strind == '-')) {
|
if ((*strind == '+') || (*strind == '-')) {
|
||||||
if (*strind == '-') {
|
if (*strind == '-') {
|
||||||
strind++;
|
strind++;
|
||||||
tempX = -ReadInteger(strind, &nextCharacter);
|
tempX = -ReadInteger(strind, &nextCharacter);
|
||||||
if (strind == nextCharacter)
|
if (strind == nextCharacter)
|
||||||
return (0);
|
return (0);
|
||||||
strind = nextCharacter;
|
strind = nextCharacter;
|
||||||
mask |= XNegative;
|
mask |= XNegative;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ strind++;
|
{ strind++;
|
||||||
tempX = ReadInteger(strind, &nextCharacter);
|
tempX = ReadInteger(strind, &nextCharacter);
|
||||||
if (strind == nextCharacter)
|
if (strind == nextCharacter)
|
||||||
return(0);
|
return(0);
|
||||||
strind = nextCharacter;
|
strind = nextCharacter;
|
||||||
}
|
}
|
||||||
mask |= XValue;
|
mask |= XValue;
|
||||||
if ((*strind == '+') || (*strind == '-')) {
|
if ((*strind == '+') || (*strind == '-')) {
|
||||||
if (*strind == '-') {
|
if (*strind == '-') {
|
||||||
strind++;
|
strind++;
|
||||||
tempY = -ReadInteger(strind, &nextCharacter);
|
tempY = -ReadInteger(strind, &nextCharacter);
|
||||||
if (strind == nextCharacter)
|
if (strind == nextCharacter)
|
||||||
return(0);
|
return(0);
|
||||||
strind = nextCharacter;
|
strind = nextCharacter;
|
||||||
mask |= YNegative;
|
mask |= YNegative;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strind++;
|
strind++;
|
||||||
tempY = ReadInteger(strind, &nextCharacter);
|
tempY = ReadInteger(strind, &nextCharacter);
|
||||||
if (strind == nextCharacter)
|
if (strind == nextCharacter)
|
||||||
return(0);
|
return(0);
|
||||||
strind = nextCharacter;
|
strind = nextCharacter;
|
||||||
}
|
}
|
||||||
mask |= YValue;
|
mask |= YValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If strind isn't at the end of the string the it's an invalid
|
/* If strind isn't at the end of the string the it's an invalid
|
||||||
geometry specification. */
|
geometry specification. */
|
||||||
|
|
||||||
if (*strind != '\0') return (0);
|
if (*strind != '\0') return (0);
|
||||||
|
|
||||||
if (mask & XValue)
|
if (mask & XValue)
|
||||||
*x = tempX;
|
*x = tempX;
|
||||||
if (mask & YValue)
|
if (mask & YValue)
|
||||||
*y = tempY;
|
*y = tempY;
|
||||||
if (mask & WidthValue)
|
if (mask & WidthValue)
|
||||||
*width = tempWidth;
|
*width = tempWidth;
|
||||||
if (mask & HeightValue)
|
if (mask & HeightValue)
|
||||||
*height = tempHeight;
|
*height = tempHeight;
|
||||||
return (mask);
|
return (mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
int gettimeofday(struct timeval* tp, void* tzp)
|
int gettimeofday(struct timeval* tp, void* tzp)
|
||||||
{
|
{
|
||||||
DATETIME DateTime;
|
DATETIME DateTime;
|
||||||
APIRET ulrc; /* Return Code. */
|
APIRET ulrc; /* Return Code. */
|
||||||
|
|
||||||
ulrc = DosGetDateTime(&DateTime);
|
ulrc = DosGetDateTime(&DateTime);
|
||||||
tp->tv_sec = 60 * (60*DateTime.hours + DateTime.minutes) + DateTime.seconds;
|
tp->tv_sec = 60 * (60*DateTime.hours + DateTime.minutes) + DateTime.seconds;
|
||||||
tp->tv_usec = DateTime.hundredths * 10000;
|
tp->tv_usec = DateTime.hundredths * 10000;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
XPending(Display* display)
|
XPending(Display* display)
|
||||||
{
|
{
|
||||||
/* similar functionality...I don't think that it is exact, but this
|
/* similar functionality...I don't think that it is exact, but this
|
||||||
will have to do. */
|
will have to do. */
|
||||||
QMSG msg;
|
QMSG msg;
|
||||||
extern HAB hab; /* PM anchor block handle */
|
extern HAB hab; /* PM anchor block handle */
|
||||||
|
|
||||||
//?? WinPeekMsg(hab
|
//?? WinPeekMsg(hab
|
||||||
return WinPeekMsg(hab, &msg, NULLHANDLE, 0, 0, PM_NOREMOVE);
|
return WinPeekMsg(hab, &msg, NULLHANDLE, 0, 0, PM_NOREMOVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
__glutAdjustCoords(Window parent, int* x, int* y, int* width, int* height)
|
__glutAdjustCoords(Window parent, int* x, int* y, int* width, int* height)
|
||||||
{
|
{
|
||||||
RECTL rect;
|
RECTL rect;
|
||||||
|
|
||||||
/* adjust the window rectangle because Win32 thinks that the x, y,
|
/* adjust the window rectangle because Win32 thinks that the x, y,
|
||||||
width & height are the WHOLE window (including decorations),
|
width & height are the WHOLE window (including decorations),
|
||||||
whereas GLUT treats the x, y, width & height as only the CLIENT
|
whereas GLUT treats the x, y, width & height as only the CLIENT
|
||||||
area of the window. */
|
area of the window. */
|
||||||
rect.xLeft = *x; rect.yTop = *y;
|
rect.xLeft = *x; rect.yTop = *y;
|
||||||
rect.xRight = *x + *width; rect.yBottom = *y + *height;
|
rect.xRight = *x + *width; rect.yBottom = *y + *height;
|
||||||
|
|
||||||
/* must adjust the coordinates according to the correct style
|
/* must adjust the coordinates according to the correct style
|
||||||
because depending on the style, there may or may not be
|
because depending on the style, there may or may not be
|
||||||
borders. */
|
borders. */
|
||||||
//?? AdjustWindowRect(&rect, WS_CLIPSIBLINGS | WS_CLIPCHILDREN |
|
//?? AdjustWindowRect(&rect, WS_CLIPSIBLINGS | WS_CLIPCHILDREN |
|
||||||
//?? (parent ? WS_CHILD : WS_OVERLAPPEDWINDOW),
|
//?? (parent ? WS_CHILD : WS_OVERLAPPEDWINDOW),
|
||||||
//?? FALSE);
|
//?? FALSE);
|
||||||
/* FALSE in the third parameter = window has no menu bar */
|
/* FALSE in the third parameter = window has no menu bar */
|
||||||
|
|
||||||
/* readjust if the x and y are offscreen */
|
/* readjust if the x and y are offscreen */
|
||||||
if(rect.xLeft < 0) {
|
if(rect.xLeft < 0) {
|
||||||
*x = 0;
|
*x = 0;
|
||||||
} else {
|
} else {
|
||||||
*x = rect.xLeft;
|
*x = rect.xLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(rect.yTop < 0) {
|
if(rect.yTop < 0) {
|
||||||
*y = 0;
|
*y = 0;
|
||||||
} else {
|
} else {
|
||||||
*y = rect.yTop;
|
*y = rect.yTop;
|
||||||
}
|
}
|
||||||
|
|
||||||
*width = rect.xRight - rect.xLeft; /* adjusted width */
|
*width = rect.xRight - rect.xLeft; /* adjusted width */
|
||||||
*height = -(rect.yBottom - rect.yTop); /* adjusted height */
|
*height = -(rect.yBottom - rect.yTop); /* adjusted height */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
__glutGetTransparentPixel(Display * dpy, XVisualInfo * vinfo)
|
__glutGetTransparentPixel(Display * dpy, XVisualInfo * vinfo)
|
||||||
{
|
{
|
||||||
/* the transparent pixel on Win32 is always index number 0. So if
|
/* the transparent pixel on Win32 is always index number 0. So if
|
||||||
we put this routine in this file, we can avoid compiling the
|
we put this routine in this file, we can avoid compiling the
|
||||||
whole of layerutil.c which is where this routine normally comes
|
whole of layerutil.c which is where this routine normally comes
|
||||||
from. */
|
from. */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Translate point coordinates src_x and src_y from src to dst */
|
/* Translate point coordinates src_x and src_y from src to dst */
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
XTranslateCoordinates(Display *display, Window src, Window dst,
|
XTranslateCoordinates(Display *display, Window src, Window dst,
|
||||||
int src_x, int src_y,
|
int src_x, int src_y,
|
||||||
int* dest_x_return, int* dest_y_return,
|
int* dest_x_return, int* dest_y_return,
|
||||||
Window* child_return)
|
Window* child_return)
|
||||||
{
|
{
|
||||||
SWP swp_src,swp_dst;
|
SWP swp_src,swp_dst;
|
||||||
|
|
||||||
WinQueryWindowPos(src,&swp_src);
|
WinQueryWindowPos(src,&swp_src);
|
||||||
WinQueryWindowPos(dst,&swp_dst);
|
WinQueryWindowPos(dst,&swp_dst);
|
||||||
|
|
||||||
*dest_x_return = src_x + swp_src.x - swp_dst.x;
|
*dest_x_return = src_x + swp_src.x - swp_dst.x;
|
||||||
*dest_y_return = src_y + swp_src.y - swp_dst.y;
|
*dest_y_return = src_y + swp_src.y - swp_dst.y;
|
||||||
|
|
||||||
/* just to make compilers happy...we don't use the return value. */
|
/* just to make compilers happy...we don't use the return value. */
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status
|
Status
|
||||||
XGetGeometry(Display* display, Window window, Window* root_return,
|
XGetGeometry(Display* display, Window window, Window* root_return,
|
||||||
int* x_return, int* y_return,
|
int* x_return, int* y_return,
|
||||||
unsigned int* width_return, unsigned int* height_return,
|
unsigned int* width_return, unsigned int* height_return,
|
||||||
unsigned int *border_width_return, unsigned int* depth_return)
|
unsigned int *border_width_return, unsigned int* depth_return)
|
||||||
{
|
{
|
||||||
/* KLUDGE: doesn't return the border_width or depth or root, x & y
|
/* KLUDGE: doesn't return the border_width or depth or root, x & y
|
||||||
are in screen coordinates. */
|
are in screen coordinates. */
|
||||||
SWP swp_src;
|
SWP swp_src;
|
||||||
WinQueryWindowPos(window,&swp_src);
|
WinQueryWindowPos(window,&swp_src);
|
||||||
|
|
||||||
*x_return = swp_src.x;
|
*x_return = swp_src.x;
|
||||||
*y_return = swp_src.y;
|
*y_return = swp_src.y;
|
||||||
*width_return = swp_src.cx;
|
*width_return = swp_src.cx;
|
||||||
*height_return = swp_src.cy;
|
*height_return = swp_src.cy;
|
||||||
|
|
||||||
/* just to make compilers happy...we don't use the return value. */
|
/* just to make compilers happy...we don't use the return value. */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get Display Width in millimeters */
|
/* Get Display Width in millimeters */
|
||||||
int
|
int
|
||||||
DisplayWidthMM(Display* display, int screen)
|
DisplayWidthMM(Display* display, int screen)
|
||||||
{
|
{
|
||||||
int width;
|
int width;
|
||||||
LONG *pVC_Caps;
|
LONG *pVC_Caps;
|
||||||
pVC_Caps = GetVideoConfig(NULLHANDLE);
|
pVC_Caps = GetVideoConfig(NULLHANDLE);
|
||||||
width = (int)( 0.001 * pVC_Caps[CAPS_WIDTH] / pVC_Caps[CAPS_HORIZONTAL_RESOLUTION]);/* mm */
|
width = (int)( 0.001 * pVC_Caps[CAPS_WIDTH] / pVC_Caps[CAPS_HORIZONTAL_RESOLUTION]);/* mm */
|
||||||
return width;
|
return width;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get Display Height in millimeters */
|
/* Get Display Height in millimeters */
|
||||||
int
|
int
|
||||||
DisplayHeightMM(Display* display, int screen)
|
DisplayHeightMM(Display* display, int screen)
|
||||||
{
|
{
|
||||||
int height;
|
int height;
|
||||||
LONG *pVC_Caps;
|
LONG *pVC_Caps;
|
||||||
pVC_Caps = GetVideoConfig(NULLHANDLE);
|
pVC_Caps = GetVideoConfig(NULLHANDLE);
|
||||||
height = (int)( 0.001 * pVC_Caps[CAPS_HEIGHT] / pVC_Caps[CAPS_VERTICAL_RESOLUTION]); /* mm */
|
height = (int)( 0.001 * pVC_Caps[CAPS_HEIGHT] / pVC_Caps[CAPS_VERTICAL_RESOLUTION]); /* mm */
|
||||||
return height;
|
return height;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenToClient( HWND hwnd, POINTL *point)
|
void ScreenToClient( HWND hwnd, POINTL *point)
|
||||||
{
|
{
|
||||||
SWP swp_src;
|
SWP swp_src;
|
||||||
WinQueryWindowPos(hwnd,&swp_src);
|
WinQueryWindowPos(hwnd,&swp_src);
|
||||||
point->x -= swp_src.x;
|
point->x -= swp_src.x;
|
||||||
point->y -= swp_src.y;
|
point->y -= swp_src.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@@ -1,259 +1,259 @@
|
|||||||
|
|
||||||
/* Copyright (c) Mark J. Kilgard, 1994, 1996, 1997. */
|
/* Copyright (c) Mark J. Kilgard, 1994, 1996, 1997. */
|
||||||
|
|
||||||
/* This program is freely distributable without licensing fees
|
/* This program is freely distributable without licensing fees
|
||||||
and is provided without guarantee or warrantee expressed or
|
and is provided without guarantee or warrantee expressed or
|
||||||
implied. This program is -not- in the public domain. */
|
implied. This program is -not- in the public domain. */
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "glutint.h"
|
#include "glutint.h"
|
||||||
|
|
||||||
#if defined(__OS2PM__)
|
#if defined(__OS2PM__)
|
||||||
#define IsWindowVisible WinIsWindowVisible
|
#define IsWindowVisible WinIsWindowVisible
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CLAMP(i) ((i) > 1.0 ? 1.0 : ((i) < 0.0 ? 0.0 : (i)))
|
#define CLAMP(i) ((i) > 1.0 ? 1.0 : ((i) < 0.0 ? 0.0 : (i)))
|
||||||
|
|
||||||
/* CENTRY */
|
/* CENTRY */
|
||||||
void GLUTAPIENTRY
|
void GLUTAPIENTRY
|
||||||
glutSetColor(int ndx, GLfloat red, GLfloat green, GLfloat blue)
|
glutSetColor(int ndx, GLfloat red, GLfloat green, GLfloat blue)
|
||||||
{
|
{
|
||||||
GLUTcolormap *cmap, *newcmap;
|
GLUTcolormap *cmap, *newcmap;
|
||||||
XVisualInfo *vis;
|
XVisualInfo *vis;
|
||||||
XColor color;
|
XColor color;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) {
|
if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) {
|
||||||
cmap = __glutCurrentWindow->colormap;
|
cmap = __glutCurrentWindow->colormap;
|
||||||
vis = __glutCurrentWindow->vis;
|
vis = __glutCurrentWindow->vis;
|
||||||
} else {
|
} else {
|
||||||
cmap = __glutCurrentWindow->overlay->colormap;
|
cmap = __glutCurrentWindow->overlay->colormap;
|
||||||
vis = __glutCurrentWindow->overlay->vis;
|
vis = __glutCurrentWindow->overlay->vis;
|
||||||
if (ndx == __glutCurrentWindow->overlay->transparentPixel) {
|
if (ndx == __glutCurrentWindow->overlay->transparentPixel) {
|
||||||
__glutWarning(
|
__glutWarning(
|
||||||
"glutSetColor: cannot set color of overlay transparent index %d\n",
|
"glutSetColor: cannot set color of overlay transparent index %d\n",
|
||||||
ndx);
|
ndx);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cmap) {
|
if (!cmap) {
|
||||||
__glutWarning("glutSetColor: current window is RGBA");
|
__glutWarning("glutSetColor: current window is RGBA");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#if defined(_WIN32) || defined(__OS2PM__)
|
#if defined(_WIN32) || defined(__OS2PM__)
|
||||||
if (ndx >= 256 || /* always assume 256 colors on Win32 */
|
if (ndx >= 256 || /* always assume 256 colors on Win32 */
|
||||||
#else
|
#else
|
||||||
if (ndx >= vis->visual->map_entries ||
|
if (ndx >= vis->visual->map_entries ||
|
||||||
#endif
|
#endif
|
||||||
ndx < 0) {
|
ndx < 0) {
|
||||||
__glutWarning("glutSetColor: index %d out of range", ndx);
|
__glutWarning("glutSetColor: index %d out of range", ndx);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cmap->refcnt > 1) {
|
if (cmap->refcnt > 1) {
|
||||||
newcmap = __glutAssociateNewColormap(vis);
|
newcmap = __glutAssociateNewColormap(vis);
|
||||||
cmap->refcnt--;
|
cmap->refcnt--;
|
||||||
/* Wouldn't it be nice if XCopyColormapAndFree could be
|
/* Wouldn't it be nice if XCopyColormapAndFree could be
|
||||||
told not to free the old colormap's entries! */
|
told not to free the old colormap's entries! */
|
||||||
for (i = cmap->size - 1; i >= 0; i--) {
|
for (i = cmap->size - 1; i >= 0; i--) {
|
||||||
if (i == ndx) {
|
if (i == ndx) {
|
||||||
/* We are going to set this cell shortly! */
|
/* We are going to set this cell shortly! */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (cmap->cells[i].component[GLUT_RED] >= 0.0) {
|
if (cmap->cells[i].component[GLUT_RED] >= 0.0) {
|
||||||
color.pixel = i;
|
color.pixel = i;
|
||||||
newcmap->cells[i].component[GLUT_RED] =
|
newcmap->cells[i].component[GLUT_RED] =
|
||||||
cmap->cells[i].component[GLUT_RED];
|
cmap->cells[i].component[GLUT_RED];
|
||||||
color.red = (GLfloat) 0xffff *
|
color.red = (GLfloat) 0xffff *
|
||||||
cmap->cells[i].component[GLUT_RED];
|
cmap->cells[i].component[GLUT_RED];
|
||||||
newcmap->cells[i].component[GLUT_GREEN] =
|
newcmap->cells[i].component[GLUT_GREEN] =
|
||||||
cmap->cells[i].component[GLUT_GREEN];
|
cmap->cells[i].component[GLUT_GREEN];
|
||||||
color.green = (GLfloat) 0xffff *
|
color.green = (GLfloat) 0xffff *
|
||||||
cmap->cells[i].component[GLUT_GREEN];
|
cmap->cells[i].component[GLUT_GREEN];
|
||||||
newcmap->cells[i].component[GLUT_BLUE] =
|
newcmap->cells[i].component[GLUT_BLUE] =
|
||||||
cmap->cells[i].component[GLUT_BLUE];
|
cmap->cells[i].component[GLUT_BLUE];
|
||||||
color.blue = (GLfloat) 0xffff *
|
color.blue = (GLfloat) 0xffff *
|
||||||
cmap->cells[i].component[GLUT_BLUE];
|
cmap->cells[i].component[GLUT_BLUE];
|
||||||
color.flags = DoRed | DoGreen | DoBlue;
|
color.flags = DoRed | DoGreen | DoBlue;
|
||||||
#if defined(_WIN32) || defined(__OS2PM__)
|
#if defined(_WIN32) || defined(__OS2PM__)
|
||||||
if (IsWindowVisible(__glutCurrentWindow->win)) {
|
if (IsWindowVisible(__glutCurrentWindow->win)) {
|
||||||
XHDC = __glutCurrentWindow->hdc;
|
XHDC = __glutCurrentWindow->hdc;
|
||||||
} else {
|
} else {
|
||||||
XHDC = 0;
|
XHDC = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
XStoreColor(__glutDisplay, newcmap->cmap, &color);
|
XStoreColor(__glutDisplay, newcmap->cmap, &color);
|
||||||
} else {
|
} else {
|
||||||
/* Leave unallocated entries unallocated. */
|
/* Leave unallocated entries unallocated. */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmap = newcmap;
|
cmap = newcmap;
|
||||||
if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) {
|
if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) {
|
||||||
__glutCurrentWindow->colormap = cmap;
|
__glutCurrentWindow->colormap = cmap;
|
||||||
__glutCurrentWindow->cmap = cmap->cmap;
|
__glutCurrentWindow->cmap = cmap->cmap;
|
||||||
} else {
|
} else {
|
||||||
__glutCurrentWindow->overlay->colormap = cmap;
|
__glutCurrentWindow->overlay->colormap = cmap;
|
||||||
__glutCurrentWindow->overlay->cmap = cmap->cmap;
|
__glutCurrentWindow->overlay->cmap = cmap->cmap;
|
||||||
}
|
}
|
||||||
XSetWindowColormap(__glutDisplay,
|
XSetWindowColormap(__glutDisplay,
|
||||||
__glutCurrentWindow->renderWin, cmap->cmap);
|
__glutCurrentWindow->renderWin, cmap->cmap);
|
||||||
|
|
||||||
#if !defined(_WIN32) && !defined(__OS2PM__)
|
#if !defined(_WIN32) && !defined(__OS2PM__)
|
||||||
{
|
{
|
||||||
GLUTwindow *toplevel;
|
GLUTwindow *toplevel;
|
||||||
|
|
||||||
toplevel = __glutToplevelOf(__glutCurrentWindow);
|
toplevel = __glutToplevelOf(__glutCurrentWindow);
|
||||||
if (toplevel->cmap != cmap->cmap) {
|
if (toplevel->cmap != cmap->cmap) {
|
||||||
__glutPutOnWorkList(toplevel, GLUT_COLORMAP_WORK);
|
__glutPutOnWorkList(toplevel, GLUT_COLORMAP_WORK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
color.pixel = ndx;
|
color.pixel = ndx;
|
||||||
red = CLAMP(red);
|
red = CLAMP(red);
|
||||||
cmap->cells[ndx].component[GLUT_RED] = red;
|
cmap->cells[ndx].component[GLUT_RED] = red;
|
||||||
color.red = (GLfloat) 0xffff *red;
|
color.red = (GLfloat) 0xffff *red;
|
||||||
green = CLAMP(green);
|
green = CLAMP(green);
|
||||||
cmap->cells[ndx].component[GLUT_GREEN] = green;
|
cmap->cells[ndx].component[GLUT_GREEN] = green;
|
||||||
color.green = (GLfloat) 0xffff *green;
|
color.green = (GLfloat) 0xffff *green;
|
||||||
blue = CLAMP(blue);
|
blue = CLAMP(blue);
|
||||||
cmap->cells[ndx].component[GLUT_BLUE] = blue;
|
cmap->cells[ndx].component[GLUT_BLUE] = blue;
|
||||||
color.blue = (GLfloat) 0xffff *blue;
|
color.blue = (GLfloat) 0xffff *blue;
|
||||||
color.flags = DoRed | DoGreen | DoBlue;
|
color.flags = DoRed | DoGreen | DoBlue;
|
||||||
#if defined(_WIN32) || defined(__OS2PM__)
|
#if defined(_WIN32) || defined(__OS2PM__)
|
||||||
if (IsWindowVisible(__glutCurrentWindow->win)) {
|
if (IsWindowVisible(__glutCurrentWindow->win)) {
|
||||||
XHDC = __glutCurrentWindow->hdc;
|
XHDC = __glutCurrentWindow->hdc;
|
||||||
} else {
|
} else {
|
||||||
XHDC = 0;
|
XHDC = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
XStoreColor(__glutDisplay, cmap->cmap, &color);
|
XStoreColor(__glutDisplay, cmap->cmap, &color);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLfloat GLUTAPIENTRY
|
GLfloat GLUTAPIENTRY
|
||||||
glutGetColor(int ndx, int comp)
|
glutGetColor(int ndx, int comp)
|
||||||
{
|
{
|
||||||
GLUTcolormap *colormap;
|
GLUTcolormap *colormap;
|
||||||
XVisualInfo *vis;
|
XVisualInfo *vis;
|
||||||
|
|
||||||
if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) {
|
if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) {
|
||||||
colormap = __glutCurrentWindow->colormap;
|
colormap = __glutCurrentWindow->colormap;
|
||||||
vis = __glutCurrentWindow->vis;
|
vis = __glutCurrentWindow->vis;
|
||||||
} else {
|
} else {
|
||||||
colormap = __glutCurrentWindow->overlay->colormap;
|
colormap = __glutCurrentWindow->overlay->colormap;
|
||||||
vis = __glutCurrentWindow->overlay->vis;
|
vis = __glutCurrentWindow->overlay->vis;
|
||||||
if (ndx == __glutCurrentWindow->overlay->transparentPixel) {
|
if (ndx == __glutCurrentWindow->overlay->transparentPixel) {
|
||||||
__glutWarning("glutGetColor: requesting overlay transparent index %d\n",
|
__glutWarning("glutGetColor: requesting overlay transparent index %d\n",
|
||||||
ndx);
|
ndx);
|
||||||
return -1.0;
|
return -1.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!colormap) {
|
if (!colormap) {
|
||||||
__glutWarning("glutGetColor: current window is RGBA");
|
__glutWarning("glutGetColor: current window is RGBA");
|
||||||
return -1.0;
|
return -1.0;
|
||||||
}
|
}
|
||||||
#if defined(_WIN32) || defined(__OS2PM__)
|
#if defined(_WIN32) || defined(__OS2PM__)
|
||||||
#define OUT_OF_RANGE_NDX(ndx) (ndx >= 256 || ndx < 0)
|
#define OUT_OF_RANGE_NDX(ndx) (ndx >= 256 || ndx < 0)
|
||||||
#else
|
#else
|
||||||
#define OUT_OF_RANGE_NDX(ndx) (ndx >= vis->visual->map_entries || ndx < 0)
|
#define OUT_OF_RANGE_NDX(ndx) (ndx >= vis->visual->map_entries || ndx < 0)
|
||||||
#endif
|
#endif
|
||||||
if (OUT_OF_RANGE_NDX(ndx)) {
|
if (OUT_OF_RANGE_NDX(ndx)) {
|
||||||
__glutWarning("glutGetColor: index %d out of range", ndx);
|
__glutWarning("glutGetColor: index %d out of range", ndx);
|
||||||
return -1.0;
|
return -1.0;
|
||||||
}
|
}
|
||||||
return colormap->cells[ndx].component[comp];
|
return colormap->cells[ndx].component[comp];
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLUTAPIENTRY
|
void GLUTAPIENTRY
|
||||||
glutCopyColormap(int winnum)
|
glutCopyColormap(int winnum)
|
||||||
{
|
{
|
||||||
GLUTwindow *window = __glutWindowList[winnum - 1];
|
GLUTwindow *window = __glutWindowList[winnum - 1];
|
||||||
GLUTcolormap *oldcmap, *newcmap;
|
GLUTcolormap *oldcmap, *newcmap;
|
||||||
XVisualInfo *dstvis;
|
XVisualInfo *dstvis;
|
||||||
|
|
||||||
if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) {
|
if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) {
|
||||||
oldcmap = __glutCurrentWindow->colormap;
|
oldcmap = __glutCurrentWindow->colormap;
|
||||||
dstvis = __glutCurrentWindow->vis;
|
dstvis = __glutCurrentWindow->vis;
|
||||||
newcmap = window->colormap;
|
newcmap = window->colormap;
|
||||||
} else {
|
} else {
|
||||||
oldcmap = __glutCurrentWindow->overlay->colormap;
|
oldcmap = __glutCurrentWindow->overlay->colormap;
|
||||||
dstvis = __glutCurrentWindow->overlay->vis;
|
dstvis = __glutCurrentWindow->overlay->vis;
|
||||||
if (!window->overlay) {
|
if (!window->overlay) {
|
||||||
__glutWarning("glutCopyColormap: window %d has no overlay", winnum);
|
__glutWarning("glutCopyColormap: window %d has no overlay", winnum);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
newcmap = window->overlay->colormap;
|
newcmap = window->overlay->colormap;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!oldcmap) {
|
if (!oldcmap) {
|
||||||
__glutWarning("glutCopyColormap: destination colormap must be color index");
|
__glutWarning("glutCopyColormap: destination colormap must be color index");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!newcmap) {
|
if (!newcmap) {
|
||||||
__glutWarning(
|
__glutWarning(
|
||||||
"glutCopyColormap: source colormap of window %d must be color index",
|
"glutCopyColormap: source colormap of window %d must be color index",
|
||||||
winnum);
|
winnum);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (newcmap == oldcmap) {
|
if (newcmap == oldcmap) {
|
||||||
/* Source and destination are the same; now copy needed. */
|
/* Source and destination are the same; now copy needed. */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#if !defined(_WIN32) && !defined(__OS2PM__)
|
#if !defined(_WIN32) && !defined(__OS2PM__)
|
||||||
/* Play safe: compare visual IDs, not Visual*'s. */
|
/* Play safe: compare visual IDs, not Visual*'s. */
|
||||||
if (newcmap->visual->visualid == oldcmap->visual->visualid) {
|
if (newcmap->visual->visualid == oldcmap->visual->visualid) {
|
||||||
#endif
|
#endif
|
||||||
/* Visuals match! "Copy" by reference... */
|
/* Visuals match! "Copy" by reference... */
|
||||||
__glutFreeColormap(oldcmap);
|
__glutFreeColormap(oldcmap);
|
||||||
newcmap->refcnt++;
|
newcmap->refcnt++;
|
||||||
if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) {
|
if (__glutCurrentWindow->renderWin == __glutCurrentWindow->win) {
|
||||||
__glutCurrentWindow->colormap = newcmap;
|
__glutCurrentWindow->colormap = newcmap;
|
||||||
__glutCurrentWindow->cmap = newcmap->cmap;
|
__glutCurrentWindow->cmap = newcmap->cmap;
|
||||||
} else {
|
} else {
|
||||||
__glutCurrentWindow->overlay->colormap = newcmap;
|
__glutCurrentWindow->overlay->colormap = newcmap;
|
||||||
__glutCurrentWindow->overlay->cmap = newcmap->cmap;
|
__glutCurrentWindow->overlay->cmap = newcmap->cmap;
|
||||||
}
|
}
|
||||||
XSetWindowColormap(__glutDisplay, __glutCurrentWindow->renderWin,
|
XSetWindowColormap(__glutDisplay, __glutCurrentWindow->renderWin,
|
||||||
newcmap->cmap);
|
newcmap->cmap);
|
||||||
#if !defined(_WIN32) && !defined(__OS2PM__)
|
#if !defined(_WIN32) && !defined(__OS2PM__)
|
||||||
__glutPutOnWorkList(__glutToplevelOf(window), GLUT_COLORMAP_WORK);
|
__glutPutOnWorkList(__glutToplevelOf(window), GLUT_COLORMAP_WORK);
|
||||||
bla bla bla
|
bla bla bla
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
GLUTcolormap *copycmap;
|
GLUTcolormap *copycmap;
|
||||||
XColor color;
|
XColor color;
|
||||||
int i, last;
|
int i, last;
|
||||||
|
|
||||||
/* Visuals different - need a distinct X colormap! */
|
/* Visuals different - need a distinct X colormap! */
|
||||||
copycmap = __glutAssociateNewColormap(dstvis);
|
copycmap = __glutAssociateNewColormap(dstvis);
|
||||||
/* Wouldn't it be nice if XCopyColormapAndFree could be
|
/* Wouldn't it be nice if XCopyColormapAndFree could be
|
||||||
told not to free the old colormap's entries! */
|
told not to free the old colormap's entries! */
|
||||||
last = newcmap->size;
|
last = newcmap->size;
|
||||||
if (last > copycmap->size) {
|
if (last > copycmap->size) {
|
||||||
last = copycmap->size;
|
last = copycmap->size;
|
||||||
}
|
}
|
||||||
for (i = last - 1; i >= 0; i--) {
|
for (i = last - 1; i >= 0; i--) {
|
||||||
if (newcmap->cells[i].component[GLUT_RED] >= 0.0) {
|
if (newcmap->cells[i].component[GLUT_RED] >= 0.0) {
|
||||||
color.pixel = i;
|
color.pixel = i;
|
||||||
copycmap->cells[i].component[GLUT_RED] =
|
copycmap->cells[i].component[GLUT_RED] =
|
||||||
newcmap->cells[i].component[GLUT_RED];
|
newcmap->cells[i].component[GLUT_RED];
|
||||||
color.red = (GLfloat) 0xffff *
|
color.red = (GLfloat) 0xffff *
|
||||||
newcmap->cells[i].component[GLUT_RED];
|
newcmap->cells[i].component[GLUT_RED];
|
||||||
copycmap->cells[i].component[GLUT_GREEN] =
|
copycmap->cells[i].component[GLUT_GREEN] =
|
||||||
newcmap->cells[i].component[GLUT_GREEN];
|
newcmap->cells[i].component[GLUT_GREEN];
|
||||||
color.green = (GLfloat) 0xffff *
|
color.green = (GLfloat) 0xffff *
|
||||||
newcmap->cells[i].component[GLUT_GREEN];
|
newcmap->cells[i].component[GLUT_GREEN];
|
||||||
copycmap->cells[i].component[GLUT_BLUE] =
|
copycmap->cells[i].component[GLUT_BLUE] =
|
||||||
newcmap->cells[i].component[GLUT_BLUE];
|
newcmap->cells[i].component[GLUT_BLUE];
|
||||||
color.blue = (GLfloat) 0xffff *
|
color.blue = (GLfloat) 0xffff *
|
||||||
newcmap->cells[i].component[GLUT_BLUE];
|
newcmap->cells[i].component[GLUT_BLUE];
|
||||||
color.flags = DoRed | DoGreen | DoBlue;
|
color.flags = DoRed | DoGreen | DoBlue;
|
||||||
XStoreColor(__glutDisplay, copycmap->cmap, &color);
|
XStoreColor(__glutDisplay, copycmap->cmap, &color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
/* ENDCENTRY */
|
/* ENDCENTRY */
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,127 +1,127 @@
|
|||||||
|
|
||||||
/* Copyright (c) Mark J. Kilgard, 1994. */
|
/* Copyright (c) Mark J. Kilgard, 1994. */
|
||||||
|
|
||||||
/* This program is freely distributable without licensing fees
|
/* This program is freely distributable without licensing fees
|
||||||
and is provided without guarantee or warrantee expressed or
|
and is provided without guarantee or warrantee expressed or
|
||||||
implied. This program is -not- in the public domain. */
|
implied. This program is -not- in the public domain. */
|
||||||
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
|
||||||
#include "glutint.h"
|
#include "glutint.h"
|
||||||
|
|
||||||
/* CENTRY */
|
/* CENTRY */
|
||||||
void GLUTAPIENTRY
|
void GLUTAPIENTRY
|
||||||
glutSetWindowTitle(const char *title)
|
glutSetWindowTitle(const char *title)
|
||||||
{
|
{
|
||||||
#if defined(__OS2PM__)
|
#if defined(__OS2PM__)
|
||||||
__glutSetWindowText(__glutCurrentWindow->win, (char *)title);
|
__glutSetWindowText(__glutCurrentWindow->win, (char *)title);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
XTextProperty textprop;
|
XTextProperty textprop;
|
||||||
|
|
||||||
assert(!__glutCurrentWindow->parent);
|
assert(!__glutCurrentWindow->parent);
|
||||||
IGNORE_IN_GAME_MODE();
|
IGNORE_IN_GAME_MODE();
|
||||||
textprop.value = (unsigned char *) title;
|
textprop.value = (unsigned char *) title;
|
||||||
textprop.encoding = XA_STRING;
|
textprop.encoding = XA_STRING;
|
||||||
textprop.format = 8;
|
textprop.format = 8;
|
||||||
textprop.nitems = strlen(title);
|
textprop.nitems = strlen(title);
|
||||||
XSetWMName(__glutDisplay,
|
XSetWMName(__glutDisplay,
|
||||||
__glutCurrentWindow->win, &textprop);
|
__glutCurrentWindow->win, &textprop);
|
||||||
XFlush(__glutDisplay);
|
XFlush(__glutDisplay);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLUTAPIENTRY
|
void GLUTAPIENTRY
|
||||||
glutSetIconTitle(const char *title)
|
glutSetIconTitle(const char *title)
|
||||||
{
|
{
|
||||||
#if defined(__OS2PM__)
|
#if defined(__OS2PM__)
|
||||||
//todo ?
|
//todo ?
|
||||||
#else
|
#else
|
||||||
|
|
||||||
XTextProperty textprop;
|
XTextProperty textprop;
|
||||||
|
|
||||||
assert(!__glutCurrentWindow->parent);
|
assert(!__glutCurrentWindow->parent);
|
||||||
IGNORE_IN_GAME_MODE();
|
IGNORE_IN_GAME_MODE();
|
||||||
textprop.value = (unsigned char *) title;
|
textprop.value = (unsigned char *) title;
|
||||||
textprop.encoding = XA_STRING;
|
textprop.encoding = XA_STRING;
|
||||||
textprop.format = 8;
|
textprop.format = 8;
|
||||||
textprop.nitems = strlen(title);
|
textprop.nitems = strlen(title);
|
||||||
XSetWMIconName(__glutDisplay,
|
XSetWMIconName(__glutDisplay,
|
||||||
__glutCurrentWindow->win, &textprop);
|
__glutCurrentWindow->win, &textprop);
|
||||||
XFlush(__glutDisplay);
|
XFlush(__glutDisplay);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLUTAPIENTRY
|
void GLUTAPIENTRY
|
||||||
glutPositionWindow(int x, int y)
|
glutPositionWindow(int x, int y)
|
||||||
{
|
{
|
||||||
IGNORE_IN_GAME_MODE();
|
IGNORE_IN_GAME_MODE();
|
||||||
__glutCurrentWindow->desiredX = x;
|
__glutCurrentWindow->desiredX = x;
|
||||||
__glutCurrentWindow->desiredY = y;
|
__glutCurrentWindow->desiredY = y;
|
||||||
__glutCurrentWindow->desiredConfMask |= CWX | CWY;
|
__glutCurrentWindow->desiredConfMask |= CWX | CWY;
|
||||||
__glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK);
|
__glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLUTAPIENTRY
|
void GLUTAPIENTRY
|
||||||
glutReshapeWindow(int w, int h)
|
glutReshapeWindow(int w, int h)
|
||||||
{
|
{
|
||||||
IGNORE_IN_GAME_MODE();
|
IGNORE_IN_GAME_MODE();
|
||||||
if (w <= 0 || h <= 0)
|
if (w <= 0 || h <= 0)
|
||||||
__glutWarning("glutReshapeWindow: non-positive width or height not allowed");
|
__glutWarning("glutReshapeWindow: non-positive width or height not allowed");
|
||||||
|
|
||||||
__glutCurrentWindow->desiredWidth = w;
|
__glutCurrentWindow->desiredWidth = w;
|
||||||
__glutCurrentWindow->desiredHeight = h;
|
__glutCurrentWindow->desiredHeight = h;
|
||||||
__glutCurrentWindow->desiredConfMask |= CWWidth | CWHeight;
|
__glutCurrentWindow->desiredConfMask |= CWWidth | CWHeight;
|
||||||
__glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK);
|
__glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLUTAPIENTRY
|
void GLUTAPIENTRY
|
||||||
glutPopWindow(void)
|
glutPopWindow(void)
|
||||||
{
|
{
|
||||||
IGNORE_IN_GAME_MODE();
|
IGNORE_IN_GAME_MODE();
|
||||||
__glutCurrentWindow->desiredStack = Above;
|
__glutCurrentWindow->desiredStack = Above;
|
||||||
__glutCurrentWindow->desiredConfMask |= CWStackMode;
|
__glutCurrentWindow->desiredConfMask |= CWStackMode;
|
||||||
__glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK);
|
__glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLUTAPIENTRY
|
void GLUTAPIENTRY
|
||||||
glutPushWindow(void)
|
glutPushWindow(void)
|
||||||
{
|
{
|
||||||
IGNORE_IN_GAME_MODE();
|
IGNORE_IN_GAME_MODE();
|
||||||
__glutCurrentWindow->desiredStack = Below;
|
__glutCurrentWindow->desiredStack = Below;
|
||||||
__glutCurrentWindow->desiredConfMask |= CWStackMode;
|
__glutCurrentWindow->desiredConfMask |= CWStackMode;
|
||||||
__glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK);
|
__glutPutOnWorkList(__glutCurrentWindow, GLUT_CONFIGURE_WORK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLUTAPIENTRY
|
void GLUTAPIENTRY
|
||||||
glutIconifyWindow(void)
|
glutIconifyWindow(void)
|
||||||
{
|
{
|
||||||
IGNORE_IN_GAME_MODE();
|
IGNORE_IN_GAME_MODE();
|
||||||
assert(!__glutCurrentWindow->parent);
|
assert(!__glutCurrentWindow->parent);
|
||||||
__glutCurrentWindow->desiredMapState = IconicState;
|
__glutCurrentWindow->desiredMapState = IconicState;
|
||||||
__glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK);
|
__glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLUTAPIENTRY
|
void GLUTAPIENTRY
|
||||||
glutShowWindow(void)
|
glutShowWindow(void)
|
||||||
{
|
{
|
||||||
IGNORE_IN_GAME_MODE();
|
IGNORE_IN_GAME_MODE();
|
||||||
__glutCurrentWindow->desiredMapState = NormalState;
|
__glutCurrentWindow->desiredMapState = NormalState;
|
||||||
__glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK);
|
__glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLUTAPIENTRY
|
void GLUTAPIENTRY
|
||||||
glutHideWindow(void)
|
glutHideWindow(void)
|
||||||
{
|
{
|
||||||
IGNORE_IN_GAME_MODE();
|
IGNORE_IN_GAME_MODE();
|
||||||
__glutCurrentWindow->desiredMapState = WithdrawnState;
|
__glutCurrentWindow->desiredMapState = WithdrawnState;
|
||||||
__glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK);
|
__glutPutOnWorkList(__glutCurrentWindow, GLUT_MAP_WORK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ENDCENTRY */
|
/* ENDCENTRY */
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user