Compare commits
694 Commits
texmem_0_3
...
mesa_6_5_2
Author | SHA1 | Date | |
---|---|---|---|
|
eb667b979b | ||
|
b98c1e4a4b | ||
|
f10acf8b78 | ||
|
50a81669ba | ||
|
7a43a6b4ff | ||
|
e99d6746ed | ||
|
73fdecca9f | ||
|
682393944c | ||
|
40dc5902d3 | ||
|
10cbd089ae | ||
|
21cf414489 | ||
|
e731d8aafa | ||
|
ac8620f375 | ||
|
5785e328e0 | ||
|
3cd06cf8c5 | ||
|
716091a6a0 | ||
|
c058f69daa | ||
|
4a6f47c23b | ||
|
d9a8cc430d | ||
|
c0815bc01f | ||
|
744c3a367b | ||
|
3e6ef125f0 | ||
|
85365e6aa4 | ||
|
16e7ca9d72 | ||
|
e49d06e619 | ||
|
d4c4bdfa1e | ||
|
f6ed86a1a5 | ||
|
308b85f29f | ||
|
897b9c5cb2 | ||
|
c4649208f0 | ||
|
50b3f5654e | ||
|
17e97ea869 | ||
|
ba02b07c75 | ||
|
14c427573e | ||
|
d426c13e46 | ||
|
dfc98c0bec | ||
|
d98e1f3761 | ||
|
6ab6518735 | ||
|
0cb0a04eca | ||
|
46e454863e | ||
|
40c7cb7e17 | ||
|
98ea0a3f1f | ||
|
f9f4625367 | ||
|
958a8af3b0 | ||
|
982ceb6773 | ||
|
22b74ff2b7 | ||
|
b0d8b13777 | ||
|
7f9afedeb5 | ||
|
9540c9c04f | ||
|
96c0a6de25 | ||
|
b72fbcbe63 | ||
|
96228d952d | ||
|
c8238aa0ff | ||
|
49a3ea8110 | ||
|
8f008056b2 | ||
|
f332da515c | ||
|
b1c102d37b | ||
|
33d2835182 | ||
|
64920ed10a | ||
|
46c04525d2 | ||
|
f58ec215c5 | ||
|
d6f89107ba | ||
|
0570fcfd93 | ||
|
0337e5635f | ||
|
25e495d605 | ||
|
b24320bb30 | ||
|
479aca6bf1 | ||
|
7cc5522f86 | ||
|
d2fc1c8384 | ||
|
87f602dd82 | ||
|
2164cf7730 | ||
|
4d4373bb0f | ||
|
a89e063149 | ||
|
61068ba46b | ||
|
63c119f771 | ||
|
c478f0d25b | ||
|
bdb1c3882f | ||
|
1e04ff1741 | ||
|
6c9cc81601 | ||
|
0f614df797 | ||
|
08d64dfbf6 | ||
|
83f52ffc52 | ||
|
c15f6a991d | ||
|
8f28453987 | ||
|
a4806c994e | ||
|
7984c70070 | ||
|
523f5cfeb5 | ||
|
1f0c86ee35 | ||
|
01a5a9afd8 | ||
|
3dedeaa055 | ||
|
fa941e4267 | ||
|
cba90c17ad | ||
|
f7436f4c8a | ||
|
bb69d3af36 | ||
|
7438a78cf4 | ||
|
ebe4c893f8 | ||
|
b979479721 | ||
|
82eeb62a31 | ||
|
0c6723aee5 | ||
|
699a33ea77 | ||
|
408e01b939 | ||
|
4a12160e8f | ||
|
adbbf94fa4 | ||
|
2d376a61f0 | ||
|
82a9ba92b4 | ||
|
7c279f4dd7 | ||
|
11a54c38f7 | ||
|
12e710c850 | ||
|
8f6a50a49c | ||
|
222930461f | ||
|
6cc5a82206 | ||
|
efa91b9a8f | ||
|
0b69e4837e | ||
|
37ce9b30e9 | ||
|
ce526de6ff | ||
|
038bd400e2 | ||
|
7fbe6a5c51 | ||
|
e7ad10587a | ||
|
466d4a1dd0 | ||
|
ded5517bd5 | ||
|
5c38472152 | ||
|
6e2c952537 | ||
|
0a3a1c6ae9 | ||
|
2862316309 | ||
|
d7815f5913 | ||
|
3ce4adaa8f | ||
|
c6f1d4c3a0 | ||
|
4bb39f5899 | ||
|
0ddd50c8ae | ||
|
aee30f3f9d | ||
|
831d13bc42 | ||
|
e330a69ee5 | ||
|
0056ea5417 | ||
|
120584a1e6 | ||
|
adf3a64b03 | ||
|
590b557b10 | ||
|
64d952c92c | ||
|
c9365b7ca4 | ||
|
2fbaddfa69 | ||
|
d2f80777e8 | ||
|
3bef600024 | ||
|
7e6701cef1 | ||
|
2659ee9dfb | ||
|
c64a062918 | ||
|
39cc8e8a06 | ||
|
33748aaad8 | ||
|
3c1ce571ed | ||
|
d00ef005fe | ||
|
9e4a06a482 | ||
|
07bec141ac | ||
|
bdb251bcbf | ||
|
e90e827824 | ||
|
4d5744e66d | ||
|
61fd687c74 | ||
|
029d18cd3d | ||
|
e7b71f6919 | ||
|
4b43054c4b | ||
|
24ea2c2cef | ||
|
83a5c2bf63 | ||
|
7a28779b2e | ||
|
fc69beecb6 | ||
|
ce55bbe9ef | ||
|
7941474a21 | ||
|
15193e78c9 | ||
|
071db86299 | ||
|
dd0830228b | ||
|
05267501af | ||
|
71f71c2c8a | ||
|
959571f835 | ||
|
e441427f40 | ||
|
af864bb0da | ||
|
e812081253 | ||
|
d78f65cd6c | ||
|
67a101759e | ||
|
b6c2a6a0f2 | ||
|
94249ca333 | ||
|
df5edb21f8 | ||
|
c97bc619d6 | ||
|
6f676f4871 | ||
|
51b115d5ae | ||
|
29ed894633 | ||
|
7a9c7c1133 | ||
|
abc73d9cba | ||
|
12fe1b3a58 | ||
|
f49c0d0dfb | ||
|
f961d394e3 | ||
|
e71e4c9e47 | ||
|
036173e0d8 | ||
|
467c773f79 | ||
|
faba58c447 | ||
|
92c99bc51b | ||
|
a5676795cf | ||
|
533e5a73ee | ||
|
6a92324cf0 | ||
|
d972c86876 | ||
|
7d08e3a117 | ||
|
9669804fe4 | ||
|
26b5904d70 | ||
|
4db0c89d25 | ||
|
361d137587 | ||
|
8d87196c12 | ||
|
351feae130 | ||
|
57f09b6e5e | ||
|
8665b828fe | ||
|
48e6fff3a9 | ||
|
5ac93f8621 | ||
|
232a489b41 | ||
|
6b9e31f3eb | ||
|
3c6e99ce95 | ||
|
fd60b2d536 | ||
|
d106195ad2 | ||
|
e6f47d1855 | ||
|
90fcf6ccc3 | ||
|
5050b565de | ||
|
ef987aa1d7 | ||
|
7e75f51b27 | ||
|
4e9e0aff79 | ||
|
72f49657e8 | ||
|
ecd1743a0c | ||
|
256c96136c | ||
|
b14bae8466 | ||
|
86a465412d | ||
|
5af5260f3c | ||
|
075fae5200 | ||
|
0f8405365f | ||
|
a23e668d40 | ||
|
0781339b39 | ||
|
e998c34647 | ||
|
ebcedd2d89 | ||
|
abb1430c79 | ||
|
d6272e0617 | ||
|
efd95c1084 | ||
|
a90ab5290c | ||
|
8ed319796f | ||
|
f5eea0cc7a | ||
|
db5529573f | ||
|
b55a0ab7ab | ||
|
fe457474d4 | ||
|
e9b923182e | ||
|
fc606f7db9 | ||
|
e4298b9492 | ||
|
6340d6bf22 | ||
|
59e1f3ddd8 | ||
|
759facb4d8 | ||
|
b9786cfaae | ||
|
49a5a09ada | ||
|
73dd09fdd3 | ||
|
a632128ffa | ||
|
ec9bbac7c7 | ||
|
0b26e826bd | ||
|
919cd2c3ba | ||
|
ed324db249 | ||
|
bb19e64d12 | ||
|
828d15a6e0 | ||
|
4676b6260f | ||
|
f614a61905 | ||
|
61c89be313 | ||
|
cd5a623386 | ||
|
7c76028937 | ||
|
79b5d3e539 | ||
|
464fcd0dd8 | ||
|
c351858de8 | ||
|
a79d4e75c3 | ||
|
31293910b4 | ||
|
ff07d6de4c | ||
|
fee08575cd | ||
|
3beaff1e3c | ||
|
ec99e716a2 | ||
|
446972bc27 | ||
|
ccb64bbb2a | ||
|
4e4c0bbef7 | ||
|
a1a0a29a5a | ||
|
ff893a83f1 | ||
|
c3caaa3dd4 | ||
|
32c3243e4d | ||
|
c2074645cd | ||
|
e9d7190bb2 | ||
|
b88af5b468 | ||
|
0c6c8d5f1c | ||
|
1c1c7fb361 | ||
|
42b26f688d | ||
|
544b94e156 | ||
|
55e42e5b72 | ||
|
af52ff0c99 | ||
|
1e3223c02a | ||
|
8dff54e71d | ||
|
d40f20aebc | ||
|
16345022de | ||
|
7b1ff32607 | ||
|
8c5ae80916 | ||
|
28081ae6c0 | ||
|
6ae157f9e7 | ||
|
041d64812e | ||
|
dc8a0d1936 | ||
|
80fcbca7df | ||
|
cca1a27f77 | ||
|
97f47f771a | ||
|
4d4add0972 | ||
|
606108ee4e | ||
|
694a5b81a7 | ||
|
a7a26503b6 | ||
|
a391384bad | ||
|
f0775c7fcc | ||
|
2b6d2e4dcb | ||
|
b947377add | ||
|
a20c0f293e | ||
|
07fd19f572 | ||
|
9cbe0e24ac | ||
|
d21fa9cd79 | ||
|
2b46f4b853 | ||
|
2458aba0e9 | ||
|
63f6802077 | ||
|
cb977ae5f4 | ||
|
40b88fd1f3 | ||
|
5b0edff412 | ||
|
4616513577 | ||
|
176501dfff | ||
|
8a9b5518fb | ||
|
bf8647a58b | ||
|
6b998c5584 | ||
|
c28d0f779a | ||
|
a2c50b0f4a | ||
|
fd6341e574 | ||
|
e595ce79d6 | ||
|
b236715769 | ||
|
0dceffce33 | ||
|
f06b9e4a8d | ||
|
201e6b9b75 | ||
|
e5a6fcc345 | ||
|
e392c92250 | ||
|
0bfc56d7d3 | ||
|
5bc33fe6f1 | ||
|
556c2fa3a3 | ||
|
76e778dce5 | ||
|
4bb9f4115c | ||
|
57d719afb1 | ||
|
f3f51bc844 | ||
|
8a5871a98c | ||
|
55fa6a2fdb | ||
|
f971e24cf0 | ||
|
32a966dad9 | ||
|
86f0e0b9cc | ||
|
9440868270 | ||
|
c364c57a1c | ||
|
bb252d696f | ||
|
ed52be8c3f | ||
|
d3112d36d7 | ||
|
81968ec49d | ||
|
c61ecf373e | ||
|
39c4daa6bc | ||
|
97a659337e | ||
|
fe6947002f | ||
|
d886423b3c | ||
|
fcd758868b | ||
|
5ab9dcd761 | ||
|
b8f26126e2 | ||
|
d3b257374e | ||
|
0a0cd3a8ae | ||
|
dba173077e | ||
|
fa65447d8c | ||
|
524bf7bbcf | ||
|
e18d0f82b6 | ||
|
6e138dfa36 | ||
|
fcb48e3422 | ||
|
68da677ae2 | ||
|
1eca12a7d9 | ||
|
496f9ddf35 | ||
|
e7b0ec9ae7 | ||
|
6921063520 | ||
|
491a16fb0f | ||
|
990c8a9df9 | ||
|
eaeaaf6205 | ||
|
553b8334bb | ||
|
25e441e8e9 | ||
|
5ed4e35ba5 | ||
|
9b507639ab | ||
|
da62bcecfb | ||
|
3fd5aa88ea | ||
|
346a239f01 | ||
|
cdb27e8242 | ||
|
46929c93d8 | ||
|
7fa99ed3d8 | ||
|
d92da49bae | ||
|
0ce6a2935c | ||
|
24edd90159 | ||
|
bb4b378c60 | ||
|
af866291da | ||
|
4abf2706e9 | ||
|
ebc879014c | ||
|
638ece315f | ||
|
941c866739 | ||
|
c2f1a1857e | ||
|
7585fc989d | ||
|
7539fde334 | ||
|
6a2f5c6752 | ||
|
24bb3b3998 | ||
|
1d914fe465 | ||
|
07bacc2263 | ||
|
3d7ee324ad | ||
|
b68788a1ca | ||
|
9e82552c30 | ||
|
c67d8678dd | ||
|
ea87987dda | ||
|
27f660c164 | ||
|
4303d22739 | ||
|
16647b739b | ||
|
a50b7dbc3b | ||
|
df8632ebd8 | ||
|
cbdd7e1094 | ||
|
f1945796ed | ||
|
f515c78a23 | ||
|
ba001224a1 | ||
|
0785b6052a | ||
|
f11508c29f | ||
|
e184bd861c | ||
|
1ad12874b3 | ||
|
7b803d649a | ||
|
5174e7c181 | ||
|
43715c711d | ||
|
9f819dc014 | ||
|
9c5d75e592 | ||
|
8a0fb128c3 | ||
|
7e9799ac3d | ||
|
df058298e1 | ||
|
f9bfdb1ce4 | ||
|
f118b9b40d | ||
|
424749c3d5 | ||
|
57d705d5a9 | ||
|
c7d0fe1c4b | ||
|
4af404038c | ||
|
76785cb70a | ||
|
87c5ec817c | ||
|
bb0862968e | ||
|
60955d7f96 | ||
|
2482007373 | ||
|
bad5cf056a | ||
|
184b5d8938 | ||
|
32e0efbdbe | ||
|
81e0d73780 | ||
|
b7d9b1e724 | ||
|
167ca59fe8 | ||
|
cac5974bf9 | ||
|
afd244d4e8 | ||
|
76dd385fed | ||
|
3974cc8c09 | ||
|
3aea82b396 | ||
|
62d4dfbfe3 | ||
|
46c3bd29be | ||
|
528de982f8 | ||
|
2e5c686c2b | ||
|
fce0d13b4f | ||
|
4f17378ec3 | ||
|
f1d6ad6fe2 | ||
|
b5d0f6c17f | ||
|
85b6d0c4df | ||
|
e38114a5e4 | ||
|
b35121d54d | ||
|
3a5319293c | ||
|
d41d29b8bd | ||
|
0c54e47c0e | ||
|
83c3f9658d | ||
|
187f2cfb4a | ||
|
0c9259f3b9 | ||
|
5658810660 | ||
|
cb54c056a6 | ||
|
285801a9ed | ||
|
408ce7e861 | ||
|
dc4bf43898 | ||
|
c42afefda1 | ||
|
876b41bc03 | ||
|
f7da4e687c | ||
|
3d70f9ff82 | ||
|
0321dac2cd | ||
|
a3a640171f | ||
|
8636981646 | ||
|
54d3ab4878 | ||
|
a3b99fcb56 | ||
|
eee85373c7 | ||
|
3dcf23171d | ||
|
8c9366a807 | ||
|
657f738ea2 | ||
|
6babf624b7 | ||
|
2e2a981335 | ||
|
99e0236046 | ||
|
43aa034084 | ||
|
888b1a9166 | ||
|
fd2e402359 | ||
|
bd5331f9e8 | ||
|
ac1d7370a7 | ||
|
cb08dcbbf2 | ||
|
87d6028f28 | ||
|
25d59d2962 | ||
|
323414940f | ||
|
6a65e6db3d | ||
|
b1cb39d8bd | ||
|
16a22a5f4a | ||
|
72e810db9d | ||
|
7b8c73460f | ||
|
e1ae10db2c | ||
|
bd38df11f4 | ||
|
31a66ada72 | ||
|
02aa5fba03 | ||
|
25847f2b5b | ||
|
cb53555058 | ||
|
ef8244df1a | ||
|
7998962444 | ||
|
02df36f394 | ||
|
a5e73e6887 | ||
|
3e05902d30 | ||
|
493b2ddecb | ||
|
c26f36c830 | ||
|
e48db4430f | ||
|
1456a0fff6 | ||
|
133f141680 | ||
|
c5cb8e2c6f | ||
|
28e7219b96 | ||
|
d016d4e70f | ||
|
14ec34d647 | ||
|
2216aac8ea | ||
|
bb2180dca3 | ||
|
7d767604c7 | ||
|
d9aebd8498 | ||
|
4a901667e5 | ||
|
3a55750d48 | ||
|
43cc1dc18f | ||
|
a088f160b3 | ||
|
1f03339f1c | ||
|
d5cbb49c22 | ||
|
74b2166ff8 | ||
|
f65ad97469 | ||
|
ac7ea94030 | ||
|
c78e895f09 | ||
|
e08557ad8a | ||
|
8cf3c85fd7 | ||
|
014bfda235 | ||
|
5300e8242f | ||
|
5b4e7cdca4 | ||
|
91650469ae | ||
|
6ec2d37ae8 | ||
|
db0e53af74 | ||
|
75faa1e19a | ||
|
d6c675f497 | ||
|
934a2dcf0f | ||
|
d9cb0fc44d | ||
|
b237d7fa14 | ||
|
6c44c53e06 | ||
|
c09458c133 | ||
|
761d87485e | ||
|
e2859ea6ef | ||
|
3cbfef3917 | ||
|
52e36cd8d9 | ||
|
901f83f14e | ||
|
7986cfbee0 | ||
|
3cd07d2c39 | ||
|
cdb12bd0ae | ||
|
c6f8176b3f | ||
|
b7fc1c32f8 | ||
|
f6de865e56 | ||
|
a70d56485a | ||
|
c7f571eb7e | ||
|
8a4366717a | ||
|
6c06ce281a | ||
|
12a5f812fc | ||
|
a974aaaa3e | ||
|
e6de1edaf0 | ||
|
ef3f00f67e | ||
|
8334c8a216 | ||
|
f7c4dc007f | ||
|
398471429b | ||
|
70c2d51230 | ||
|
0aab798a18 | ||
|
8d675aa637 | ||
|
dfdd0b4f30 | ||
|
fc5b57b713 | ||
|
af1dc7e487 | ||
|
b5a2fc1255 | ||
|
258751f4a0 | ||
|
0bb27c084d | ||
|
e5bc35dd97 | ||
|
e365b82be1 | ||
|
b9ac4afff7 | ||
|
a394f546a4 | ||
|
9cb82f7917 | ||
|
a38aef93ab | ||
|
7e9737b370 | ||
|
092d14be92 | ||
|
2fd72a7844 | ||
|
0c46a12365 | ||
|
6827cf4d9a | ||
|
96ee800cd4 | ||
|
4277ea4c0b | ||
|
3fea5910b9 | ||
|
58d080b025 | ||
|
473f1aca7f | ||
|
439d59926a | ||
|
a360bc31da | ||
|
4bae9a48ec | ||
|
f38ac5fbac | ||
|
3c54e8376d | ||
|
383c39e58e | ||
|
9983a27cbe | ||
|
a574c804a0 | ||
|
e53e0f47d0 | ||
|
6211a14137 | ||
|
ebf58ea3a3 | ||
|
77427a1e52 | ||
|
e6940f0a33 | ||
|
c6511ab950 | ||
|
beb32c4a59 | ||
|
94ff996cae | ||
|
a75439093c | ||
|
3b9b8de9b0 | ||
|
a5f2206077 | ||
|
bf83e652f6 | ||
|
5947f8fd63 | ||
|
ce9767f863 | ||
|
39f222a421 | ||
|
28536e6c4f | ||
|
83304326c8 | ||
|
116411d5f0 | ||
|
4169c220bd | ||
|
a95d5f0f58 | ||
|
4d12a05e6c | ||
|
261a806f9e | ||
|
d21ccb49c0 | ||
|
bd3e6ec066 | ||
|
43c9587ed4 | ||
|
cafb0617ea | ||
|
50eae3af7a | ||
|
723db7212c | ||
|
d319edff1e | ||
|
4e4b5f4008 | ||
|
6423ec9145 | ||
|
b20814fd7d | ||
|
d5299bf9a1 | ||
|
1d67cad9af | ||
|
798ef5ce33 | ||
|
bd4c8ec0ec | ||
|
c6fc823987 | ||
|
cf4d2f7109 | ||
|
92c43b110c | ||
|
7e4152f0ed | ||
|
bd87c303e9 | ||
|
c1c282f36a | ||
|
9dc90cd5f3 | ||
|
5928718475 | ||
|
6206aec90a | ||
|
a7d0256745 | ||
|
ab6cf9dd62 | ||
|
8c41c757fe | ||
|
5208d93a41 | ||
|
daea717634 | ||
|
37b5b01217 | ||
|
061a3fe340 | ||
|
24cd8e22f5 | ||
|
357addfc45 | ||
|
32a9e9be0c | ||
|
8fbe16d4dd | ||
|
56f349515c | ||
|
8ff5e37f58 | ||
|
2332812644 | ||
|
3775b566fa | ||
|
be85fde82b | ||
|
b7a661cf8c | ||
|
795e83f809 | ||
|
a89b099c74 | ||
|
8d97265711 | ||
|
7196cddb3a | ||
|
54e15d6585 | ||
|
7ba08ac45a | ||
|
edefc658e4 | ||
|
9f344b3e7d | ||
|
7b52bed987 | ||
|
46f20579a2 | ||
|
4b1e6a4b58 | ||
|
6545ebbd8d | ||
|
288d4b6ebe | ||
|
0606ad45f6 | ||
|
4818b0bea1 | ||
|
5c488dcab2 | ||
|
21dc092324 | ||
|
3ab2dd9f91 | ||
|
0a4be70368 | ||
|
2eb00b4388 | ||
|
3163542841 | ||
|
9c3876d7d8 | ||
|
6c071592ab | ||
|
8d214bc804 | ||
|
35fe7cfae4 | ||
|
b60a3da43f | ||
|
1616f5b621 | ||
|
7a70391575 | ||
|
3b5e02cc7c | ||
|
60ba2d88b3 |
32
Makefile
32
Makefile
@@ -144,34 +144,36 @@ sunos5-v8-static \
|
||||
sunos5-v9 \
|
||||
sunos5-v9-static \
|
||||
ultrix-gcc:
|
||||
@ if [ -e configs/current ] ; then \
|
||||
echo "Please run 'make realclean' before changing configs" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
(cd configs && rm -f current && ln -s $@ current)
|
||||
$(MAKE) default
|
||||
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
DIRECTORY = Mesa-6.5.1
|
||||
LIB_NAME = MesaLib-6.5.1
|
||||
DEMO_NAME = MesaDemos-6.5.1
|
||||
GLUT_NAME = MesaGLUT-6.5.1
|
||||
DIRECTORY = Mesa-6.5.2
|
||||
LIB_NAME = MesaLib-6.5.2
|
||||
DEMO_NAME = MesaDemos-6.5.2
|
||||
GLUT_NAME = MesaGLUT-6.5.2
|
||||
|
||||
MAIN_FILES = \
|
||||
$(DIRECTORY)/Makefile* \
|
||||
$(DIRECTORY)/descrip.mms \
|
||||
$(DIRECTORY)/mms-config. \
|
||||
$(DIRECTORY)/bin/mklib \
|
||||
$(DIRECTORY)/bin/installmesa \
|
||||
$(DIRECTORY)/bin/minstall \
|
||||
$(DIRECTORY)/configs/[a-z]* \
|
||||
$(DIRECTORY)/docs/*.html \
|
||||
$(DIRECTORY)/docs/COPYING \
|
||||
$(DIRECTORY)/docs/README.* \
|
||||
$(DIRECTORY)/docs/RELNOTES* \
|
||||
$(DIRECTORY)/docs/VERSIONS \
|
||||
$(DIRECTORY)/docs/*.spec \
|
||||
$(DIRECTORY)/include/GL/internal/glcore.h \
|
||||
$(DIRECTORY)/include/GL/amesa.h \
|
||||
$(DIRECTORY)/include/GL/dmesa.h \
|
||||
$(DIRECTORY)/include/GL/directfbgl.h \
|
||||
$(DIRECTORY)/include/GL/fxmesa.h \
|
||||
$(DIRECTORY)/include/GL/ggimesa.h \
|
||||
$(DIRECTORY)/include/GL/gl.h \
|
||||
@@ -202,25 +204,35 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/src/mesa/depend \
|
||||
$(DIRECTORY)/src/mesa/main/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/main/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/main/sources \
|
||||
$(DIRECTORY)/src/mesa/glapi/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/glapi/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/glapi/sources \
|
||||
$(DIRECTORY)/src/mesa/array_cache/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/array_cache/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/array_cache/sources \
|
||||
$(DIRECTORY)/src/mesa/math/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/math/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/math/sources \
|
||||
$(DIRECTORY)/src/mesa/shader/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/shader/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/shader/sources \
|
||||
$(DIRECTORY)/src/mesa/shader/grammar/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/shader/grammar/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/shader/grammar/sources \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/sources \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/library/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/swrast/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/swrast/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/swrast/sources \
|
||||
$(DIRECTORY)/src/mesa/swrast_setup/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/swrast_setup/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/swrast_setup/sources \
|
||||
$(DIRECTORY)/src/mesa/tnl/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/tnl/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/tnl/sources \
|
||||
$(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \
|
||||
@@ -228,6 +240,7 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/src/mesa/drivers/beos/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/common/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/common/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/drivers/common/sources \
|
||||
$(DIRECTORY)/src/mesa/drivers/directfb/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/directfb/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \
|
||||
@@ -248,6 +261,7 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
|
||||
$(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/drivers/x11/sources \
|
||||
$(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/ppc/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/sparc/*.[chS] \
|
||||
@@ -377,8 +391,8 @@ GLUT_FILES = \
|
||||
$(DIRECTORY)/src/glut/ggi/*.[ch] \
|
||||
$(DIRECTORY)/src/glut/ggi/Makefile \
|
||||
$(DIRECTORY)/src/glut/fbdev/Makefile \
|
||||
$(DIRECTORY)/src/glut/fbdev/cursors.h \
|
||||
$(DIRECTORY)/src/glut/fbdev/glut_fbdev.c \
|
||||
$(DIRECTORY)/src/glut/fbdev/*[ch] \
|
||||
$(DIRECTORY)/src/glut/mini/*[ch] \
|
||||
$(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \
|
||||
$(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj
|
||||
|
||||
|
@@ -62,10 +62,10 @@ fi
|
||||
|
||||
set -v
|
||||
|
||||
mkdir ${INCLUDE_DIR}
|
||||
mkdir ${INCLUDE_DIR}/GL
|
||||
# NOT YET: mkdir ${INCLUDE_DIR}/GLES
|
||||
mkdir ${LIB_DIR}
|
||||
mkdir -p ${INCLUDE_DIR}
|
||||
mkdir -p ${INCLUDE_DIR}/GL
|
||||
# NOT YET: mkdir -p ${INCLUDE_DIR}/GLES
|
||||
mkdir -p ${LIB_DIR}
|
||||
cp -f ${TOP}/include/GL/*.h ${INCLUDE_DIR}/GL
|
||||
cp -f ${TOP}/src/glw/*.h ${INCLUDE_DIR}/GL
|
||||
# NOT YET: cp -f ${TOP}/include/GLES/*.h ${INCLUDE_DIR}/GLES
|
||||
|
88
bin/minstall
Executable file
88
bin/minstall
Executable file
@@ -0,0 +1,88 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
# A minimal replacement for 'install' that supports installing symbolic links.
|
||||
# Only a limited number of options are supported:
|
||||
# -d dir Create a directory
|
||||
# -m mode Sets a file's mode when installing
|
||||
|
||||
|
||||
# If these commands aren't portable, we'll need some "if (arch)" type stuff
|
||||
SYMLINK="ln -s"
|
||||
MKDIR="mkdir -p"
|
||||
RM="rm -f"
|
||||
|
||||
MODE=""
|
||||
|
||||
if [ "$1" = "-d" ] ; then
|
||||
# make a directory path
|
||||
$MKDIR "$2"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" = "-m" ] ; then
|
||||
# set file mode
|
||||
MODE=$2
|
||||
shift 2
|
||||
fi
|
||||
|
||||
# install file(s) into destination
|
||||
if [ $# -ge 2 ] ; then
|
||||
|
||||
# Last cmd line arg is the dest dir
|
||||
for FILE in $@ ; do
|
||||
DEST="$FILE"
|
||||
done
|
||||
|
||||
# Loop over args, moving them to DEST directory
|
||||
I=1
|
||||
for FILE in $@ ; do
|
||||
if [ $I = $# ] ; then
|
||||
# stop, don't want to install $DEST into $DEST
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# determine file's type
|
||||
if [ -h "$FILE" ] ; then
|
||||
#echo $FILE is a symlink
|
||||
# Unfortunately, cp -d isn't universal so we have to
|
||||
# use a work-around.
|
||||
|
||||
# Use ls -l to find the target that the link points to
|
||||
LL=`ls -l "$FILE"`
|
||||
for L in $LL ; do
|
||||
TARGET=$L
|
||||
done
|
||||
#echo $FILE is a symlink pointing to $TARGET
|
||||
|
||||
FILE=`basename "$FILE"`
|
||||
# Go to $DEST and make the link
|
||||
PWDSAVE="$PWD"
|
||||
cd "$DEST" # pushd
|
||||
$RM "$FILE"
|
||||
$SYMLINK "$TARGET" "$FILE"
|
||||
cd "$PWDSAVE" # popd
|
||||
|
||||
elif [ -f "$FILE" ] ; then
|
||||
#echo "$FILE" is a regular file
|
||||
cp "$FILE" "$DEST"
|
||||
if [ $MODE ] ; then
|
||||
FILE=`basename "$FILE"`
|
||||
chmod $MODE "$DEST/$FILE"
|
||||
fi
|
||||
else
|
||||
echo "Unknown type of argument: " "$FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
I=`expr $I + 1`
|
||||
done
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# If we get here, we didn't find anything to do
|
||||
echo "Usage:"
|
||||
echo " install -d dir Create named directory"
|
||||
echo " install [-m mode] file [...] dest Install files in destination"
|
||||
|
15
bin/mklib
15
bin/mklib
@@ -283,7 +283,9 @@ case $ARCH in
|
||||
ar -ruv ${LIBNAME} ${OBJECTS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
else
|
||||
LIBNAME="lib${LIBNAME}.so"
|
||||
if [ $NOPREFIX = 0 ] ; then
|
||||
LIBNAME="lib${LIBNAME}.so"
|
||||
fi
|
||||
echo "mklib: Making SunOS shared library: " ${LIBNAME}
|
||||
|
||||
if [ "x$LINK" = "x" ] ; then
|
||||
@@ -333,9 +335,14 @@ case $ARCH in
|
||||
|
||||
# for debug:
|
||||
#echo "mklib: linker is" ${LINK} ${OPTS}
|
||||
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
|
||||
${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
|
||||
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
|
||||
if [ $NOPREFIX = 1 ] ; then
|
||||
rm -f ${LIBNAME}
|
||||
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||
else
|
||||
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
|
||||
${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
|
||||
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
|
||||
fi
|
||||
FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
|
||||
fi
|
||||
;;
|
||||
|
@@ -13,7 +13,6 @@ CXXFLAGS = -O -DAIXV3 -DPTHREADS
|
||||
|
||||
# Misc tools and flags
|
||||
MKLIB_OPTIONS =
|
||||
COPY_LIBS = cp -f -h
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = libGL.a
|
||||
|
@@ -10,7 +10,7 @@ CONFIG_NAME = default
|
||||
# Version info
|
||||
MESA_MAJOR=6
|
||||
MESA_MINOR=5
|
||||
MESA_TINY=1
|
||||
MESA_TINY=2
|
||||
|
||||
# external projects. This should be useless now that we use libdrm.
|
||||
DRM_SOURCE_PATH=$(TOP)/../drm
|
||||
@@ -27,8 +27,7 @@ MKLIB_OPTIONS =
|
||||
MKDEP = makedepend
|
||||
MKDEP_OPTIONS = -fdepend
|
||||
MAKE = make
|
||||
INSTALL = install
|
||||
COPY_LIBS = cp -f -d
|
||||
INSTALL = $(TOP)/bin/minstall
|
||||
|
||||
# Python and flags (generally only needed by the developers)
|
||||
PYTHON2 = python
|
||||
@@ -68,7 +67,7 @@ PROGRAM_DIRS = demos redbook samples xdemos
|
||||
|
||||
|
||||
# Library/program dependencies
|
||||
EXTRA_LIB_PATH ?=
|
||||
#EXTRA_LIB_PATH ?=
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
|
||||
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
|
||||
|
@@ -9,13 +9,11 @@ CC = cc
|
||||
CXX = c++
|
||||
MAKE = gmake
|
||||
|
||||
# cp -d not supported on FreeBSD (see bug 4435)
|
||||
COPY_LIBS = cp -f
|
||||
|
||||
OPT_FLAGS = -O2
|
||||
PIC_FLAGS = -fPIC
|
||||
|
||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DUSE_XSHM -DHZ=100
|
||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DUSE_XSHM \
|
||||
-DHZ=100 -DHAVE_POSIX_MEMALIGN
|
||||
|
||||
X11_INCLUDES = -I/usr/X11R6/include
|
||||
|
||||
|
@@ -14,22 +14,24 @@ OPT_FLAGS = -O
|
||||
EXPAT_INCLUDES = -I/usr/local/include
|
||||
X11_INCLUDES = -I/usr/X11R6/include
|
||||
DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
|
||||
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS
|
||||
-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
|
||||
-DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
|
||||
|
||||
CFLAGS = -Wmissing-prototypes -g -std=c99 -Wundef -fPIC -ffast-math \
|
||||
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) -Wmissing-prototypes -std=c99 -Wundef -ffast-math \
|
||||
$(ASM_FLAGS) $(X11_INCLUDES) $(DEFINES)
|
||||
|
||||
CXXFLAGS = $(DEFINES) -Wall -g -ansi -pedantic -fPIC
|
||||
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) -Wall -ansi -pedantic $(ASM_FLAGS) $(X11_INCLUDES)
|
||||
|
||||
ASM_SOURCES =
|
||||
|
||||
# Library/program dependencies
|
||||
LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
|
||||
LIBDRM_LIB = `pkg-config --libs libdrm`
|
||||
DRI_LIB_DEPS = -L/usr/local/lib -lm -lpthread -lexpat $(LIBDRM_LIB)
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lm -lpthread $(LIBDRM_LIB)
|
||||
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGL -lXt -lXm -lX11
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGL -lXt -lX11
|
||||
|
||||
|
||||
# Directories
|
||||
@@ -42,6 +44,6 @@ DRM_SOURCE_PATH=$(TOP)/../drm
|
||||
|
||||
# ffb and gamma are missing because they have not been converted to use the new
|
||||
# interface.
|
||||
DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon tdfx \
|
||||
DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \
|
||||
unichrome savage sis
|
||||
|
||||
|
@@ -8,7 +8,7 @@ CONFIG_NAME = hpux10
|
||||
CC = cc
|
||||
CXX = aCC
|
||||
|
||||
CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
|
||||
CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE
|
||||
CFLAGS = -O +DAportable +z -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
|
||||
CXXFLAGS = -O +DAportable +Z -Ae -D_HPUX_SOURCE
|
||||
|
||||
APP_LIB_DEPS = -$(TOP)/$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
|
||||
|
@@ -8,8 +8,8 @@ CONFIG_NAME = hpux10-static
|
||||
CC = cc
|
||||
CXX = aCC
|
||||
|
||||
CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
|
||||
CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE
|
||||
CFLAGS = -O +DAportable +z -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
|
||||
CXXFLAGS = -O +DAportable +Z -Ae -D_HPUX_SOURCE
|
||||
|
||||
MKLIB_OPTIONS = -static
|
||||
|
||||
|
@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-32
|
||||
CC = cc
|
||||
CXX = aCC
|
||||
|
||||
CFLAGS = +z -Ae +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
||||
CFLAGS = +z -Ae -O +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
||||
|
||||
CXXFLAGS = +z -Aa +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
|
||||
CXXFLAGS = +z -Ae -O +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
|
||||
|
||||
MKLIB_OPTIONS =
|
||||
|
||||
|
@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-32-static
|
||||
CC = cc
|
||||
CXX = aCC
|
||||
|
||||
CFLAGS = +O3 +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
||||
CFLAGS = -O +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
||||
|
||||
CXXFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
|
||||
CXXFLAGS = -O +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
|
||||
|
||||
MKLIB_OPTIONS = -static
|
||||
|
||||
|
@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-32-static
|
||||
CC = cc
|
||||
CXX = aCC
|
||||
|
||||
CFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
|
||||
CFLAGS = -O +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
|
||||
|
||||
CXXFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include
|
||||
CXXFLAGS = -O +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include
|
||||
|
||||
MKLIB_OPTIONS = -static
|
||||
|
||||
|
@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-64
|
||||
CC = cc
|
||||
CXX = aCC
|
||||
|
||||
CFLAGS = +z -Ae +DD64 +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
||||
CFLAGS = +z -Ae +DD64 -O +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
||||
|
||||
CXXFLAGS = +z -Aa +DD64 +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
|
||||
CXXFLAGS = +z -Ae +DD64 -O +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
|
||||
|
||||
MKLIB_OPTIONS =
|
||||
|
||||
|
@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-64-static
|
||||
CC = cc
|
||||
CXX = aCC
|
||||
|
||||
CFLAGS = +O3 +DA2.0W -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
||||
CFLAGS = -O +DA2.0W -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
||||
|
||||
CXXFLAGS = +O3 +DA2.0W -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
|
||||
CXXFLAGS = -O +DA2.0W -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
|
||||
|
||||
MKLIB_OPTIONS = -static
|
||||
|
||||
|
@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-ia64
|
||||
CC = cc
|
||||
CXX = aCC
|
||||
|
||||
CFLAGS = +z -Ae +DD64 +O3 +DSmckinley -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
||||
CFLAGS = +z -Ae +DD64 -O +DSmckinley -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
||||
|
||||
CXXFLAGS = +z -Aa +DD64 +O3 +DSmckinley -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
|
||||
CXXFLAGS = +z -Ae +DD64 -O +DSmckinley -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
|
||||
|
||||
MKLIB_OPTIONS =
|
||||
|
||||
|
@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-ia64-static
|
||||
CC = cc
|
||||
CXX = aCC
|
||||
|
||||
CFLAGS = +O3 +DD64 -Aa -D_HPUX_SOURCE +DSmckinley -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
||||
CFLAGS = -O +DD64 -Ae -D_HPUX_SOURCE +DSmckinley -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
||||
|
||||
CXXFLAGS = +O3 +DD64 -Aa -D_HPUX_SOURCE +DSmckinley -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
|
||||
CXXFLAGS = -O +DD64 -Ae -D_HPUX_SOURCE +DSmckinley -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
|
||||
|
||||
MKLIB_OPTIONS = -static
|
||||
|
||||
|
@@ -9,8 +9,8 @@ CC = cc
|
||||
# XXX fix this
|
||||
CXX = c++
|
||||
|
||||
CFLAGS = +z +O3 +Olibcalls +ESlit -Aa +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5 -DUSE_XSHM
|
||||
CXXFLAGS = +z +O3 +Olibcalls +ESlit -Aa +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5
|
||||
CFLAGS = +z -O +Olibcalls +ESlit -Ae +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5 -DUSE_XSHM
|
||||
CXXFLAGS = +z -O +Olibcalls +ESlit -Ae +Onolimit -D_HPUX_SOURCE -I/usr/include/X11R5
|
||||
|
||||
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/lib/X11R5 -s -Wl,+s,-B,nonfatal,-B,immediate -lXext -lXmu -lXi -lX11 -lm
|
||||
|
||||
|
@@ -8,7 +8,7 @@ CONFIG_NAME = hpux9-gcc
|
||||
CC = cc
|
||||
CXX = aCC
|
||||
|
||||
CFLAGS = +O3 +DAportable +z -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
|
||||
CXXFLAGS = +O3 +DAportable +Z -Aa -D_HPUX_SOURCE
|
||||
CFLAGS = -O +DAportable +z -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM
|
||||
CXXFLAGS = -O +DAportable +Z -Ae -D_HPUX_SOURCE
|
||||
|
||||
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
|
||||
|
@@ -17,7 +17,8 @@ PIC_FLAGS = -fPIC
|
||||
ARCH_FLAGS ?=
|
||||
|
||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
||||
-D_BSD_SOURCE -DPTHREADS -DUSE_XSHM
|
||||
-D_BSD_SOURCE -D_GNU_SOURCE \
|
||||
-DPTHREADS -DUSE_XSHM -DHAVE_POSIX_MEMALIGN
|
||||
|
||||
X11_INCLUDES = -I/usr/X11R6/include
|
||||
|
||||
|
@@ -22,7 +22,8 @@ ARCH_FLAGS ?=
|
||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
||||
-D_BSD_SOURCE -D_GNU_SOURCE \
|
||||
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
|
||||
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS
|
||||
-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
|
||||
-DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
|
||||
|
||||
X11_INCLUDES = -I/usr/X11R6/include
|
||||
|
||||
@@ -37,6 +38,7 @@ ASM_SOURCES =
|
||||
# Library/program dependencies
|
||||
EXTRA_LIB_PATH=-L/usr/X11R6/lib
|
||||
|
||||
LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
|
||||
LIBDRM_LIB = `pkg-config --libs libdrm`
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \
|
||||
@@ -63,5 +65,5 @@ WINDOW_SYSTEM=dri
|
||||
|
||||
# gamma are missing because they have not been converted to use the new
|
||||
# interface.
|
||||
DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon s3v \
|
||||
DRI_DIRS = i810 i915tex i915 i965 mach64 mga r128 r200 r300 radeon s3v \
|
||||
savage sis tdfx trident unichrome ffb
|
||||
|
@@ -20,5 +20,5 @@ EXTRA_LIB_PATH=-L/usr/X11R6/lib64
|
||||
# the new interface. i810 are missing because there is no x86-64
|
||||
# system where they could *ever* be used.
|
||||
#
|
||||
DRI_DIRS = i915 mach64 mga r128 r200 radeon tdfx unichrome savage r300
|
||||
DRI_DIRS = i915tex i915 i965 mach64 mga r128 r200 radeon tdfx unichrome savage r300
|
||||
|
||||
|
@@ -22,9 +22,9 @@ ARCH_FLAGS ?=
|
||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
||||
-D_BSD_SOURCE -D_GNU_SOURCE \
|
||||
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
|
||||
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DUSE_XCB
|
||||
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DUSE_XCB -DHAVE_POSIX_MEMALIGN
|
||||
|
||||
X11_INCLUDES = `pkg-config --cflags-only-I x11` `pkg-config --cflags-only-I xcb` `pkg-config --cflags-only-I xcb-glx`
|
||||
X11_INCLUDES = `pkg-config --cflags-only-I x11` `pkg-config --cflags-only-I xcb` `pkg-config --cflags-only-I x11-xcb` `pkg-config --cflags-only-I xcb-glx`
|
||||
|
||||
CFLAGS = -Wall -Wmissing-prototypes $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
|
||||
$(DEFINES) $(ASM_FLAGS) -std=c99 -ffast-math
|
||||
@@ -37,10 +37,11 @@ ASM_SOURCES =
|
||||
# Library/program dependencies
|
||||
EXTRA_LIB_PATH=`pkg-config --libs-only-L x11`
|
||||
|
||||
LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
|
||||
LIBDRM_LIB = `pkg-config --libs libdrm`
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \
|
||||
$(LIBDRM_LIB) `pkg-config --libs xcb` `pkg-config --libs xcb-glx`
|
||||
$(LIBDRM_LIB) `pkg-config --libs xcb` `pkg-config --libs x11-xcb` `pkg-config --libs xcb-glx`
|
||||
|
||||
|
||||
# This is now 0 by default since it seems to confuse the hell out of people
|
||||
|
@@ -3,8 +3,14 @@
|
||||
include $(TOP)/configs/linux
|
||||
|
||||
CONFIG_NAME = linux-fbdev
|
||||
DRIVER_DIRS = fbdev
|
||||
|
||||
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -DUSE_GLFBDEV_DRIVER
|
||||
CFLAGS = -O3 -ffast-math -ansi -pedantic -fPIC -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS -DUSE_GLFBDEV_DRIVER
|
||||
|
||||
SRC_DIRS = mesa glu glut/fbdev
|
||||
DRIVER_DIRS = fbdev osmesa
|
||||
PROGRAM_DIRS = fbdev demos redbook samples
|
||||
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread
|
||||
OSMESA_LIB_DEPS = -lm -lpthread
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lgpm -lm
|
||||
|
||||
PROGRAM_DIRS = fbdev
|
||||
|
@@ -23,7 +23,8 @@ ARCH_FLAGS ?=
|
||||
|
||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
||||
-D_BSD_SOURCE -D_GNU_SOURCE \
|
||||
-DPTHREADS -DHAVE_ALIAS
|
||||
-DGLX_INDIRECT_RENDERING \
|
||||
-DPTHREADS -DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
|
||||
|
||||
X11_INCLUDES = -I/usr/X11R6/include
|
||||
|
||||
|
@@ -16,7 +16,7 @@ PIC_FLAGS = -fPIC
|
||||
ARCH_FLAGS ?=
|
||||
|
||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
||||
-D_BSD_SOURCE -D_GNU_SOURCE \
|
||||
-D_BSD_SOURCE -D_GNU_SOURCE -DHAVE_POSIX_MEMALIGN \
|
||||
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DDRM_USE_MALLOC -DIN_DRI_DRIVER
|
||||
|
||||
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
|
@@ -1,30 +1,9 @@
|
||||
# Configuration for Linux on Sparc
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux
|
||||
|
||||
CONFIG_NAME = linux-sparc
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
|
||||
WARN_FLAGS = -Wall
|
||||
OPT_FLAGS = -O2
|
||||
PIC_FLAGS = -fPIC
|
||||
|
||||
DEFINES = -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM
|
||||
|
||||
X11_INCLUDES = -I/usr/X11R6/include
|
||||
|
||||
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
$(ASM_FLAGS) -std=c99 -ffast-math
|
||||
|
||||
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
|
||||
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
EXTRA_LIB_PATH=-L/usr/X11R6/lib
|
||||
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
|
||||
#ASM_FLAGS = -DUSE_SPARC_ASM
|
||||
#ASM_SOURCES = $(SPARC_SOURCES)
|
||||
#ASM_API = $(SPARC_API)
|
||||
|
@@ -1,17 +1,7 @@
|
||||
# Configuration for Linux on Sparc5
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux-sparc
|
||||
|
||||
CONFIG_NAME = linux-sparc5
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -mcpu=ultrasparc -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
|
||||
CXXFLAGS = -mcpu=ultrasparc -O2 -ffast-math -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
|
||||
|
||||
ARCH_FLAGS += -mcpu=ultrasparc
|
||||
|
@@ -19,3 +19,8 @@ OSMESA_LIB_DEPS =
|
||||
GLU_LIB_DEPS =
|
||||
GLUT_LIB_DEPS =
|
||||
GLW_LIB_DEPS =
|
||||
|
||||
# Need to specify all libraries we may need
|
||||
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm \
|
||||
-L/usr/X11R6/lib/ -lX11 -lXmu -lXi -lpthread
|
||||
|
||||
|
@@ -1,17 +1,7 @@
|
||||
# Configuration for Linux on UltraSparc
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux-sparc
|
||||
|
||||
CONFIG_NAME = linux-ultrasparc
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -mv8 -O2 -mtune=ultrasparc -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM
|
||||
CXXFLAGS = -mv8 -O2 -mtune=ultrasparc -ansi -pedantic -fPIC -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L/usr/X11R6/lib -lXt -lX11
|
||||
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR)-l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
||||
ARCH_FLAGS += -mv8 -mtune=ultrasparc
|
||||
|
@@ -19,4 +19,4 @@ all :
|
||||
$(MMS)$(MMSQUALIFIERS)
|
||||
set default [-.xdemos]
|
||||
$(MMS)$(MMSQUALIFIERS)
|
||||
if f$search("[-]test.DIR") .nes. "" then pipe set default [-.test] ; $(MMS)$(MMSQUALIFIERS)
|
||||
if f$search("[-]tests.DIR") .nes. "" then pipe set default [-.tests] ; $(MMS)$(MMSQUALIFIERS)
|
||||
|
@@ -6,7 +6,7 @@ Requirements
|
||||
============
|
||||
|
||||
To build Mesa with DirectFB (DirectFBGL) support you need:
|
||||
- DirectFB at least 0.9.21 (http://directfb.org)
|
||||
- DirectFB at least 1.0.0 (http://directfb.org)
|
||||
- pkg-config at least 0.9 (http://pkgconfig.sf.net)
|
||||
|
||||
|
||||
|
60
docs/RELNOTES-6.5.1
Normal file
60
docs/RELNOTES-6.5.1
Normal file
@@ -0,0 +1,60 @@
|
||||
|
||||
Mesa 6.5.1 Release Notes
|
||||
|
||||
|
||||
|
||||
Introduction
|
||||
------------
|
||||
|
||||
Mesa uses an even/odd version number scheme like the Linux kernel.
|
||||
Odd numbered versions (such as 6.5) designate new developmental releases.
|
||||
Even numbered versions (such as 6.4) designate stable releases.
|
||||
|
||||
|
||||
|
||||
Mesa 6.5.1 is a 6.5 follow-on development release mostly consisting of
|
||||
bug fixes (see the VERSIONS file).
|
||||
|
||||
|
||||
New Features
|
||||
------------
|
||||
|
||||
Intel i965 "broadwater" DRI driver
|
||||
|
||||
GL_APPLE_vertex_array_object - allows encapsulation of a set of vertex
|
||||
arrays in an object.
|
||||
|
||||
GL_EXT_texture_sRGB - non-linearly mapped texture formats
|
||||
|
||||
GL_EXT_gpu_program_parameters - addes a few new functions for setting
|
||||
multiple vertex/fragment program parameters with one call.
|
||||
|
||||
|
||||
|
||||
To Do (someday) items
|
||||
---------------------
|
||||
Switch to freeglut
|
||||
Increase MAX_DRAWBUFFERS
|
||||
Fix linux-glide target/driver.
|
||||
Fix lambda calculation for frag progs.
|
||||
|
||||
|
||||
|
||||
Driver Status
|
||||
---------------------- ----------------------
|
||||
DRI drivers varies with the driver
|
||||
XMesa/GLX (on Xlib) implements OpenGL 1.5
|
||||
OSMesa (off-screen) implements OpenGL 1.5
|
||||
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
|
||||
SVGA implements OpenGL 1.3
|
||||
Wind River UGL implements OpenGL 1.3
|
||||
Windows/Win32 implements OpenGL 1.5
|
||||
DJGPP implements OpenGL 1.5
|
||||
GGI implements OpenGL 1.3
|
||||
BeOS implements OpenGL 1.5
|
||||
Allegro needs updating
|
||||
D3D needs updating
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
$Id: RELNOTES-6.5.1,v 1.2 2006/08/18 20:24:54 brianp Exp $
|
@@ -1471,14 +1471,21 @@ Mesa Version History
|
||||
- paletted texturing was broken w/ floating point palettes (K. Schultz)
|
||||
- lots of assorted framebuffer object bug fixes
|
||||
|
||||
6.5.1 month, day, 2006
|
||||
6.5.1 August 31, 2006
|
||||
New:
|
||||
- Intel i965 DRI driver
|
||||
- GL_APPLE_vertex_array_object extension (Ian Romanick)
|
||||
- GL_EXT_texture_sRGB extension
|
||||
- GL_EXT_gpu_program_parameters (Ian Romanick)
|
||||
- "engine" demo
|
||||
- updated fbdev driver and GLUT for fbdev (Sean D'Epagnier)
|
||||
- many updates to the DRI drivers
|
||||
Changes:
|
||||
- The glVertexAttribARB functions no longer alias the conventional
|
||||
vertex attributes.
|
||||
- glxinfo program prints more info with -l option
|
||||
- GL_FRAGMENT_PROGRAM_NV and GL_FRAGMENT_PROGRAM_ARB are now
|
||||
compatible, in terms of glBindProgramARB()
|
||||
Bug fixes:
|
||||
- fixed broken texture border handling for depth textures (bug 6498)
|
||||
- removed the test for duplicated framebuffer attachments, per
|
||||
@@ -1498,3 +1505,10 @@ Mesa Version History
|
||||
- 'normalized' parameter to glVertexAttribPointerARB didn't work
|
||||
- disable bogus GLX_SGI_video_sync extension in xlib driver
|
||||
- fixed R128 driver locking bug (Martijn van Oosterhout)
|
||||
- using evaluators with vertex programs caused crashes (bug 7564)
|
||||
- fragment.position wasn't set correctly for point/line primitives
|
||||
- fixed parser bug for scalar sources for GL_NV_fragment_program
|
||||
- max fragment program length was incorrectly 128, now 1024
|
||||
- writes to result.depth in fragment programs weren't clamped to [0,1]
|
||||
- fixed potential dangling pointer bug in glBindProgram()
|
||||
- fixed some memory leaks (and potential crashes) in Xlib driver
|
||||
|
@@ -28,7 +28,6 @@ a:visited {
|
||||
<li><a href="systems.html" target="MainFrame">Platforms and Drivers</a>
|
||||
<li><a href="license.html" target="MainFrame">License & Copyright</a>
|
||||
<li><a href="faq.html" target="MainFrame">FAQ</a>
|
||||
<li><a href="VERSIONS" target="MainFrame">Version History</a>
|
||||
<li><a href="relnotes.html" target="MainFrame">Release Notes</a>
|
||||
<li><a href="thanks.html" target="MainFrame">Acknowledgements</a>
|
||||
<li><a href="conform.html" target="MainFrame">Conformance Testing</a>
|
||||
@@ -74,6 +73,7 @@ a:visited {
|
||||
<li><a href="fbdev-dri.html" target="MainFrame">fbdev/DRI Environment</a>
|
||||
<li><a href="glfbdev-driver.html" target="MainFrame">glFBDev Driver</a>
|
||||
<LI><A HREF="custom.html" target="MainFrame">Custom Development</A>
|
||||
<LI><A HREF="dispatch.html" target="MainFrame">GL Dispatch</A>
|
||||
</ul>
|
||||
|
||||
<b>Links</b>
|
||||
|
@@ -34,11 +34,15 @@ To add a new GL extension to Mesa you have to do at least the following.
|
||||
corresponding Python scripts.
|
||||
</li>
|
||||
<li>
|
||||
Find an existing extension that's similar to the new one and search
|
||||
the sources for code related to that extension.
|
||||
Implement new code as needed.
|
||||
In general, new state variables will be added to mtypes.h. If the
|
||||
extension is rather large, try to implement it in a new source file.
|
||||
Add a new entry to the <code>gl_extensions</code> struct in mtypes.h
|
||||
</li>
|
||||
<li>
|
||||
Update the <code>extensions.c</code> file.
|
||||
</li>
|
||||
<li>
|
||||
From this point, the best way to proceed is to find another extension,
|
||||
similar to the new one, that's already implemented in Mesa and use it
|
||||
as an example.
|
||||
</li>
|
||||
<li>
|
||||
If the new extension adds new GL state, the functions in get.c, enable.c
|
||||
|
274
docs/dispatch.html
Normal file
274
docs/dispatch.html
Normal file
@@ -0,0 +1,274 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>GL Dispatch in Mesa</TITLE>
|
||||
<LINK REL="stylesheet" TYPE="text/css" HREF="mesa.css">
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
<H1>GL Dispatch in Mesa</H1>
|
||||
|
||||
<p>Several factors combine to make efficient dispatch of OpenGL functions
|
||||
fairly complicated. This document attempts to explain some of the issues
|
||||
and introduce the reader to Mesa's implementation. Readers already familiar
|
||||
with the issues around GL dispatch can safely skip ahead to the <A
|
||||
HREF="#overview">overview of Mesa's implementation</A>.</p>
|
||||
|
||||
<H2>1. Complexity of GL Dispatch</H2>
|
||||
|
||||
<p>Every GL application has at least one object called a GL <em>context</em>.
|
||||
This object, which is an implicit parameter to ever GL function, stores all
|
||||
of the GL related state for the application. Every texture, every buffer
|
||||
object, every enable, and much, much more is stored in the context. Since
|
||||
an application can have more than one context, the context to be used is
|
||||
selected by a window-system dependent function such as
|
||||
<tt>glXMakeContextCurrent</tt>.</p>
|
||||
|
||||
<p>In environments that implement OpenGL with X-Windows using GLX, every GL
|
||||
function, including the pointers returned by <tt>glXGetProcAddress</tt>, are
|
||||
<em>context independent</em>. This means that no matter what context is
|
||||
currently active, the same <tt>glVertex3fv</tt> function is used.</p>
|
||||
|
||||
<p>This creates the first bit of dispatch complexity. An application can
|
||||
have two GL contexts. One context is a direct rendering context where
|
||||
function calls are routed directly to a driver loaded within the
|
||||
application's address space. The other context is an indirect rendering
|
||||
context where function calls are converted to GLX protocol and sent to a
|
||||
server. The same <tt>glVertex3fv</tt> has to do the right thing depending
|
||||
on which context is current.</p>
|
||||
|
||||
<p>Highly optimized drivers or GLX protocol implementations may want to
|
||||
change the behavior of GL functions depending on current state. For
|
||||
example, <tt>glFogCoordf</tt> may operate differently depending on whether
|
||||
or not fog is enabled.</p>
|
||||
|
||||
<p>In multi-threaded environments, it is possible for each thread to have a
|
||||
differnt GL context current. This means that poor old <tt>glVertex3fv</tt>
|
||||
has to know which GL context is current in the thread where it is being
|
||||
called.</p>
|
||||
|
||||
<A NAME="overview"/>
|
||||
<H2>2. Overview of Mesa's Implementation</H2>
|
||||
|
||||
<p>Mesa uses two per-thread pointers. The first pointer stores the address
|
||||
of the context current in the thread, and the second pointer stores the
|
||||
address of the <em>dispatch table</em> associated with that context. The
|
||||
dispatch table stores pointers to functions that actually implement
|
||||
specific GL functions. Each time a new context is made current in a thread,
|
||||
these pointers a updated.</p>
|
||||
|
||||
<p>The implementation of functions such as <tt>glVertex3fv</tt> becomes
|
||||
conceptually simple:</p>
|
||||
|
||||
<ul>
|
||||
<li>Fetch the current dispatch table pointer.</li>
|
||||
<li>Fetch the pointer to the real <tt>glVertex3fv</tt> function from the
|
||||
table.</li>
|
||||
<li>Call the real function.</li>
|
||||
</ul>
|
||||
|
||||
<p>This can be implemented in just a few lines of C code. The file
|
||||
<tt>src/mesa/glapi/glapitemp.h</tt> contains code very similar to this.</p>
|
||||
|
||||
<blockquote>
|
||||
<table border="1">
|
||||
<tr><td><pre>
|
||||
void glVertex3f(GLfloat x, GLfloat y, GLfloat z)
|
||||
{
|
||||
const struct _glapi_table * const dispatch = GET_DISPATCH();
|
||||
|
||||
(*dispatch->Vertex3f)(x, y, z);
|
||||
}</pre></td></tr>
|
||||
<tr><td>Sample dispatch function</td></tr></table>
|
||||
</blockquote>
|
||||
|
||||
<p>The problem with this simple implementation is the large amount of
|
||||
overhead that it adds to every GL function call.</p>
|
||||
|
||||
<p>In a multithreaded environment, a niave implementation of
|
||||
<tt>GET_DISPATCH</tt> involves a call to <tt>pthread_getspecific</tt> or a
|
||||
similar function. Mesa provides a wrapper function called
|
||||
<tt>_glapi_get_dispatch</tt> that is used by default.</p>
|
||||
|
||||
<H2>3. Optimizations</H2>
|
||||
|
||||
<p>A number of optimizations have been made over the years to diminish the
|
||||
performance hit imposed by GL dispatch. This section describes these
|
||||
optimizations. The benefits of each optimization and the situations where
|
||||
each can or cannot be used are listed.</p>
|
||||
|
||||
<H3>3.1. Dual dispatch table pointers</H3>
|
||||
|
||||
<p>The vast majority of OpenGL applications use the API in a single threaded
|
||||
manner. That is, the application has only one thread that makes calls into
|
||||
the GL. In these cases, not only do the calls to
|
||||
<tt>pthread_getspecific</tt> hurt performance, but they are completely
|
||||
unnecessary! It is possible to detect this common case and avoid these
|
||||
calls.</p>
|
||||
|
||||
<p>Each time a new dispatch table is set, Mesa examines and records the ID
|
||||
of the executing thread. If the same thread ID is always seen, Mesa knows
|
||||
that the application is, from OpenGL's point of view, single threaded.</p>
|
||||
|
||||
<p>As long as an application is single threaded, Mesa stores a pointer to
|
||||
the dispatch table in a global variable called <tt>_glapi_Dispatch</tt>.
|
||||
The pointer is also stored in a per-thread location via
|
||||
<tt>pthread_setspecific</tt>. When Mesa detects that an application has
|
||||
become multithreaded, <tt>NULL</tt> is stored in <tt>_glapi_Dispatch</tt>.</p>
|
||||
|
||||
<p>Using this simple mechanism the dispatch functions can detect the
|
||||
multithreaded case by comparing <tt>_glapi_Dispatch</tt> to <tt>NULL</tt>.
|
||||
The resulting implementation of <tt>GET_DISPATCH</tt> is slightly more
|
||||
complex, but it avoids the expensive <tt>pthread_getspecific</tt> call in
|
||||
the common case.</p>
|
||||
|
||||
<blockquote>
|
||||
<table border="1">
|
||||
<tr><td><pre>
|
||||
#define GET_DISPATCH() \
|
||||
(_glapi_Dispatch != NULL) \
|
||||
? _glapi_Dispatch : pthread_getspecific(&_glapi_Dispatch_key)
|
||||
</pre></td></tr>
|
||||
<tr><td>Improved <tt>GET_DISPATCH</tt> Implementation</td></tr></table>
|
||||
</blockquote>
|
||||
|
||||
<H3>3.2. ELF TLS</H3>
|
||||
|
||||
<p>Starting with the 2.4.20 Linux kernel, each thread is allocated an area
|
||||
of per-thread, global storage. Variables can be put in this area using some
|
||||
extensions to GCC. By storing the dispatch table pointer in this area, the
|
||||
expensive call to <tt>pthread_getspecific</tt> and the test of
|
||||
<tt>_glapi_Dispatch</tt> can be avoided.</p>
|
||||
|
||||
<p>The dispatch table pointer is stored in a new variable called
|
||||
<tt>_glapi_tls_Dispatch</tt>. A new variable name is used so that a single
|
||||
libGL can implement both interfaces. This allows the libGL to operate with
|
||||
direct rendering drivers that use either interface. Once the pointer is
|
||||
properly declared, <tt>GET_DISPACH</tt> becomes a simple variable
|
||||
reference.</p>
|
||||
|
||||
<blockquote>
|
||||
<table border="1">
|
||||
<tr><td><pre>
|
||||
extern __thread struct _glapi_table *_glapi_tls_Dispatch
|
||||
__attribute__((tls_model("initial-exec")));
|
||||
|
||||
#define GET_DISPATCH() _glapi_tls_Dispatch
|
||||
</pre></td></tr>
|
||||
<tr><td>TLS <tt>GET_DISPATCH</tt> Implementation</td></tr></table>
|
||||
</blockquote>
|
||||
|
||||
<p>Use of this path is controlled by the preprocessor define
|
||||
<tt>GLX_USE_TLS</tt>. Any platform capable of using TLS should use this as
|
||||
the default dispatch method.</p>
|
||||
|
||||
<H3>3.3. Assembly Language Dispatch Stubs</H3>
|
||||
|
||||
<p>Many platforms has difficulty properly optimizing the tail-call in the
|
||||
dispatch stubs. Platforms like x86 that pass parameters on the stack seem
|
||||
to have even more difficulty optimizing these routines. All of the dispatch
|
||||
routines are very short, and it is trivial to create optimal assembly
|
||||
language versions. The amount of optimization provided by using assembly
|
||||
stubs varies from platform to platform and application to application.
|
||||
However, by using the assembly stubs, many platforms can use an additional
|
||||
space optimization (see <A HREF="#fixedsize">below</A>).</p>
|
||||
|
||||
<p>The biggest hurdle to creating assembly stubs is handling the various
|
||||
ways that the dispatch table pointer can be accessed. There are four
|
||||
different methods that can be used:</p>
|
||||
|
||||
<ol>
|
||||
<li>Using <tt>_glapi_Dispatch</tt> directly in builds for non-multithreaded
|
||||
environments.</li>
|
||||
<li>Using <tt>_glapi_Dispatch</tt> and <tt>_glapi_get_dispatch</tt> in
|
||||
multithreaded environments.</li>
|
||||
<li>Using <tt>_glapi_Dispatch</tt> and <tt>pthread_getspecific</tt> in
|
||||
multithreaded environments.</li>
|
||||
<li>Using <tt>_glapi_tls_Dispatch</tt> directly in TLS enabled
|
||||
multithreaded environments.</li>
|
||||
</ol>
|
||||
|
||||
<p>People wishing to implement assembly stubs for new platforms should focus
|
||||
on #4 if the new platform supports TLS. Otherwise, implement #2 followed by
|
||||
#3. Environments that do not support multithreading are uncommon and not
|
||||
terribly relevant.</p>
|
||||
|
||||
<p>Selection of the dispatch table pointer access method is controlled by a
|
||||
few preprocessor defines.</p>
|
||||
|
||||
<ul>
|
||||
<li>If <tt>GLX_USE_TLS</tt> is defined, method #4 is used.</li>
|
||||
<li>If <tt>PTHREADS</tt> is defined, method #3 is used.</li>
|
||||
<li>If any of <tt>PTHREADS</tt>, <tt>USE_XTHREADS</tt>,
|
||||
<tt>SOLARIS_THREADS</tt>, <tt>WIN32_THREADS</tt>, or <tt>BEOS_THREADS</tt>
|
||||
is defined, method #2 is used.</li>
|
||||
<li>If none of the preceeding are defined, method #1 is used.</li>
|
||||
</ul>
|
||||
|
||||
<p>Two different techniques are used to handle the various different cases.
|
||||
On x86 and SPARC, a macro called <tt>GL_STUB</tt> is used. In the preamble
|
||||
of the assembly source file different implementations of the macro are
|
||||
selected based on the defined preprocessor variables. The assmebly code
|
||||
then consists of a series of invocations of the macros such as:
|
||||
|
||||
<blockquote>
|
||||
<table border="1">
|
||||
<tr><td><pre>
|
||||
GL_STUB(Color3fv, _gloffset_Color3fv)
|
||||
</pre></td></tr>
|
||||
<tr><td>SPARC Assembly Implementation of <tt>glColor3fv</tt></td></tr></table>
|
||||
</blockquote>
|
||||
|
||||
<p>The benefit of this technique is that changes to the calling pattern
|
||||
(i.e., addition of a new dispatch table pointer access method) require fewer
|
||||
changed lines in the assembly code.</p>
|
||||
|
||||
<p>However, this technique can only be used on platforms where the function
|
||||
implementation does not change based on the parameters passed to the
|
||||
function. For example, since x86 passes all parameters on the stack, no
|
||||
additional code is needed to save and restore function parameters around a
|
||||
call to <tt>pthread_getspecific</tt>. Since x86-64 passes parameters in
|
||||
registers, varying amounts of code needs to be inserted around the call to
|
||||
<tt>pthread_getspecific</tt> to save and restore the GL function's
|
||||
parameters.</p>
|
||||
|
||||
<p>The other technique, used by platforms like x86-64 that cannot use the
|
||||
first technique, is to insert <tt>#ifdef</tt> within the assembly
|
||||
implementation of each function. This makes the assembly file considerably
|
||||
larger (e.g., 29,332 lines for <tt>glapi_x86-64.S</tt> versus 1,155 lines for
|
||||
<tt>glapi_x86.S</tt>) and causes simple changes to the function
|
||||
implementation to generate many lines of diffs. Since the assmebly files
|
||||
are typically generated by scripts (see <A HREF="#autogen">below</A>), this
|
||||
isn't a significant problem.</p>
|
||||
|
||||
<p>Once a new assembly file is created, it must be inserted in the build
|
||||
system. There are two steps to this. The file must first be added to
|
||||
<tt>src/mesa/sources</tt>. That gets the file built and linked. The second
|
||||
step is to add the correct <tt>#ifdef</tt> magic to
|
||||
<tt>src/mesa/main/dispatch.c</tt> to prevent the C version of the dispatch
|
||||
functions from being built.</p>
|
||||
|
||||
<A NAME="fixedsize"/>
|
||||
<H3>3.4. Fixed-Length Dispatch Stubs</H3>
|
||||
|
||||
<p>To implement <tt>glXGetProcAddress</tt>, Mesa stores a table that
|
||||
associates function names with pointers to those functions. This table is
|
||||
stored in <tt>src/mesa/glapi/glprocs.h</tt>. For different reasons on
|
||||
different platforms, storing all of those pointers is inefficient. On most
|
||||
platforms, including all known platforms that support TLS, we can avoid this
|
||||
added overhead.</p>
|
||||
|
||||
<p>If the assembly stubs are all the same size, the pointer need not be
|
||||
stored for every function. The location of the function can instead be
|
||||
calculated by multiplying the size of the dispatch stub by the offset of the
|
||||
function in the table. This value is then added to the address of the first
|
||||
dispatch stub.</p>
|
||||
|
||||
<p>This path is activated by adding the correct <tt>#ifdef</tt> magic to
|
||||
<tt>src/mesa/glapi/glapi.c</tt> just before <tt>glprocs.h</tt> is
|
||||
included.</p>
|
||||
|
||||
<A NAME="autogen"/>
|
||||
<H2>4. Automatic Generation of Dispatch Stubs</H2>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
@@ -9,7 +9,7 @@
|
||||
<H1>Downloading</H1>
|
||||
|
||||
<p>
|
||||
Last development release: <b>6.5</b>
|
||||
Last development release: <b>6.5.1</b>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
<center>
|
||||
<h1>Mesa Frequently Asked Questions</h1>
|
||||
Last updated: 8 June 2006
|
||||
Last updated: 21 August 2006
|
||||
</center>
|
||||
|
||||
<br>
|
||||
@@ -46,7 +46,7 @@ Mesa 6.x supports the OpenGL 1.5 specification.
|
||||
<h2>1.2 Does Mesa support/use graphics hardware?</h2>
|
||||
<p>
|
||||
Yes. Specifically, Mesa serves as the OpenGL core for the open-source DRI
|
||||
drivers for XFree86/X.org. See the <a href="http://dri.sf.net/">DRI
|
||||
drivers for XFree86/X.org. See the <a href="http://dri.freedesktop.org/">DRI
|
||||
website</a> for more information.
|
||||
</p>
|
||||
<p>
|
||||
@@ -290,9 +290,8 @@ hardware it has detected.
|
||||
<p>
|
||||
Make sure the ratio of the far to near clipping planes isn't too great.
|
||||
Look
|
||||
<a href="http://www.sgi.com/software/opengl/advanced97/notes/node18.html"
|
||||
target="_parent">
|
||||
here</a> for details.
|
||||
<a href="http://www.opengl.org/resources/faq/technical/depthbuffer.htm#0040"
|
||||
target="_parent"> here</a> for details.
|
||||
</p>
|
||||
<p>
|
||||
Mesa uses a 16-bit depth buffer by default which is smaller and faster
|
||||
@@ -341,13 +340,14 @@ will fix the problem.
|
||||
<a name="part4">
|
||||
</a><h1><a name="part4">4. Developer Questions</a></h1>
|
||||
|
||||
<h2><a name="part4">4.1 How can I contribute?</a></h2>
|
||||
<h2>4.1 How can I contribute?</a></h2>
|
||||
<p>
|
||||
<a name="part4">First, join the Mesa3d-dev mailing list. That's where Mesa development
|
||||
is discussed.
|
||||
First, join the <a href="http://www.mesa3d.org/lists.html>Mesa3d-dev
|
||||
mailing list</a>.
|
||||
That's where Mesa development is discussed.
|
||||
</a></p>
|
||||
<p>
|
||||
<a name="part4">The </a><a href="http://www.opengl.org/developers/documentation/specs.html" target="_parent">
|
||||
The </a><a href="http://www.opengl.org/documentation" target="_parent">
|
||||
OpenGL Specification</a> is the bible for OpenGL implemention work.
|
||||
You should read it.
|
||||
</p>
|
||||
|
@@ -70,7 +70,7 @@ tty group as well
|
||||
|
||||
<h1>4. Using fbdevglut</h1>
|
||||
Almost all of the programs in the progs directory use glut, and they compile with fbdevglut.
|
||||
Currently glBlendFunc is not working with glFBDev.
|
||||
|
||||
<p>
|
||||
To compile the redbook sample programs:
|
||||
<pre>
|
||||
|
@@ -83,9 +83,14 @@ Recent /usr/include/GL/glxproto.h file.
|
||||
<p>You'll need this if you get any errors about _GLXvop_BindTexImageEXT
|
||||
being undefined.
|
||||
</p>
|
||||
<p>The latest version can be
|
||||
obtained from <A href="http://webcvs.freedesktop.org/*checkout*/xorg/proto/GL/glxproto.h?rev=1.9&content-type=text%2Fplain">freedesktop.org CVS</a>
|
||||
<p>
|
||||
Download/install the
|
||||
<a href="http://gitweb.freedesktop.org/?p=xorg/proto/glproto.git">glproto</a>
|
||||
module from X.org git, or grab the
|
||||
<A href="http://webcvs.freedesktop.org/*checkout*/xorg/proto/GL/glxproto.h?rev=1.9&content-type=text%2Fplain">glxproto.h file</a> and put it in the
|
||||
Mesa/include/GL/ directory.
|
||||
</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li>DRI-enabled X server.
|
||||
|
@@ -9,8 +9,8 @@
|
||||
<H1>Function Name Mangling</H1>
|
||||
|
||||
<p>
|
||||
If you want to use Mesa and native OpenGL in the same application at
|
||||
the same time you may find it useful to compile Mesa with
|
||||
If you want to use both Mesa and another OpenGL library in the same
|
||||
application at the same time you may find it useful to compile Mesa with
|
||||
<i>name mangling</i>.
|
||||
This results in all the Mesa functions being prefixed with
|
||||
<b>mgl</b> instead of <b>gl</b>.
|
||||
@@ -18,9 +18,11 @@ This results in all the Mesa functions being prefixed with
|
||||
|
||||
<p>
|
||||
To do this, recompile Mesa with the compiler flag -DUSE_MGL_NAMESPACE.
|
||||
Add the flag to the other compiler flags in Make-config (if using the
|
||||
old-style build system) or in src/Makefile if using GNU autoconf/
|
||||
automake to build Mesa.
|
||||
Add the flag to CFLAGS in the configuration file which you want to use.
|
||||
For example:
|
||||
<pre>
|
||||
CFLAGS += -DUSE_MGL_NAMESPACE
|
||||
</pre>
|
||||
</p>
|
||||
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<H1>Modelers, Renderers and Viewers</H1>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.aqsis.com/" target="_parent">Aqsis</a> - a RenderMan compatible renderer</li>
|
||||
<li><a href="http://www.aqsis.org/" target="_parent">Aqsis</a> - a RenderMan compatible renderer</li>
|
||||
<li><a href="http://www.ac3d.org/" target="_parent">AC3D</a> - 3-D modeler
|
||||
</li><li><a href="http://mesa3d.sourceforge.net/notfound.html">ARCAD</a> - CAD program
|
||||
</li><li><a href="http://www.mediascape.com/" target="_parent">Artstream</a> - provides
|
||||
|
194
docs/news.html
194
docs/news.html
@@ -11,179 +11,45 @@
|
||||
<H1>News</H1>
|
||||
|
||||
|
||||
<h2>December 2, 2006</h2>
|
||||
<p>
|
||||
<a href="relnotes-6.5.2.html">Mesa 6.5.2</a> has been released.
|
||||
This is a new development release.
|
||||
</p>
|
||||
|
||||
<h2>September 15, 2006</h2>
|
||||
<p>
|
||||
<a href="relnotes-6.5.1.html">Mesa 6.5.1</a> has been released.
|
||||
This is a new development release.
|
||||
</p>
|
||||
|
||||
<h2>March 31, 2006</h2>
|
||||
<p>
|
||||
Mesa 6.5 has been released. This is a new development release.
|
||||
<a href="relnotes-6.5.html">Mesa 6.5</a> has been released.
|
||||
This is a new development release.
|
||||
</p>
|
||||
<pre>
|
||||
New:
|
||||
- OpenGL Shading Language support through GL_ARB_shader_objects,
|
||||
GL_ARB_shading_language_100, GL_ARB_vertex_shader and
|
||||
GL_ARB_fragment_shader (done by Michal Krol)
|
||||
- GL_EXT_packed_depth_stencil extension
|
||||
- GL_EXT_timer_query extension
|
||||
- GL_EXT_framebuffer_blit extension
|
||||
- GL_ARB_half_float_pixel
|
||||
- GLX_MESA_copy_sub_buffer for DRI drivers (Dave Reveman)
|
||||
- reflect demo improved to support multiple windows
|
||||
- singlebuffer demo (shows no/little-flicker single-buffered rendering)
|
||||
- r200: enable GL_ARB_texture_env_crossbar, separate the texture
|
||||
sampling unit bits from the texture env combine enable bits
|
||||
- r200: add support for GL_ATI_fragment_shader
|
||||
- added fast XOR-mode line drawing optimization
|
||||
- radeon: add support for all 3 tmus, GL_ARB_texture_cube_map
|
||||
and GL_EXT_fog_coord
|
||||
- MESA_GLX_ALPHA_BITS env var for xlib driver
|
||||
- many DRI driver updates (including screen rotation support
|
||||
for the Intel DRI driver)
|
||||
Changes:
|
||||
- removed GL_HP_occlusion_test (use GL_ARB_occlusion_query instead)
|
||||
- removed GL_SGIX/SGIS_pixel_texture extensions
|
||||
Bug fixes:
|
||||
- fixed glxcontextmodes.c datatype problem (bug 5835)
|
||||
- fixed aix-gcc build/install bugs (bug 5874)
|
||||
- fixed some bugs in texture env program generation
|
||||
- glXCopyContext() didn't handle texture object bindings properly
|
||||
- glXCopyContext() didn't copy all lighting state
|
||||
- fixed FreeBSD config (Pedro Giffuni)
|
||||
- fixed some minor framebuffer object bugs
|
||||
- replaced dprintf() with _glu_printf() in GLU (bug 6244)
|
||||
- fixed a number of thread safety bugs/regressions
|
||||
- fixed a number of GLU tesselator bugs (John Shell, bug 6339)
|
||||
- paletted texturing was broken w/ floating point palettes (K. Schultz)
|
||||
- lots of assorted framebuffer object bug fixes
|
||||
</pre>
|
||||
<p>
|
||||
The MD5 checksums are:
|
||||
</p>
|
||||
<pre>
|
||||
657be3b92f6dabc78a67ed9cb8d67813 MesaLib-6.5.tar.gz
|
||||
61beda590bfc5b4a12e979d5f2d70d7a MesaLib-6.5.tar.bz2
|
||||
19d48b872d579d4f91466060804a59ac MesaLib-6.5.zip
|
||||
694ad3a7007010c7418a9c72d1cba5b7 MesaDemos-6.5.tar.gz
|
||||
ab95b590dcd640726a2d89e62068c66e MesaDemos-6.5.tar.bz2
|
||||
b792c303fefd87294488e2b7eab976e5 MesaDemos-6.5.zip
|
||||
ac1d585483617db0c91e5c15cb5ec3a3 MesaGLUT-6.5.tar.gz
|
||||
59f0bf2b2ffb67fe23ee479f9b044f31 MesaGLUT-6.5.tar.bz2
|
||||
005decb2136718e22222ac1c4805cd15 MesaGLUT-6.5.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>February 2, 2006</h2>
|
||||
<p>
|
||||
Mesa 6.4.2 has been released. This is primarily a bug-fix release.
|
||||
<a href="relnotes-6.4.2.html">Mesa 6.4.2</a> has been released.
|
||||
This is stable, bug-fix release.
|
||||
</p>
|
||||
<pre>
|
||||
New items:
|
||||
- added OSMesaColorClamp() function/feature
|
||||
- added wglGetExtensionStringARB() function
|
||||
Bug fixes:
|
||||
- fixed some problems when building on Windows
|
||||
- GLw header files weren't installed by installmesa script (bug 5396)
|
||||
- GL/glfbdev.h file was missing from tarballs
|
||||
</pre>
|
||||
<p>
|
||||
The MD5 checksums are:
|
||||
</p>
|
||||
<pre>
|
||||
cb0d745d520fa7c2bb9178058b763544 MesaLib-6.4.2.tar.gz
|
||||
7674d2c603b5834259e4e5a820cefd5b MesaLib-6.4.2.tar.bz2
|
||||
d224e1325b33ff71a0f3893fc6b4d594 MesaLib-6.4.2.zip
|
||||
d4b345d4588fc750cd3d34f3ac26673e MesaDemos-6.4.2.tar.gz
|
||||
9cae1ab874af533ce356bd7dfe2e0bb0 MesaDemos-6.4.2.tar.bz2
|
||||
2da6e1d1245e441d27813595c6ba50de MesaDemos-6.4.2.zip
|
||||
84427d18c3453f0ea52388eeba7169b5 MesaGLUT-6.4.2.tar.gz
|
||||
b157ba8ad1ea63260cf5339132e7aac6 MesaGLUT-6.4.2.tar.bz2
|
||||
fe1523744fc05edc3811dfc6a1bf4181 MesaGLUT-6.4.2.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>November 29, 2005</h2>
|
||||
<p>
|
||||
Mesa 6.4.1 has been released. This is a stable, bug-fix release.
|
||||
<a href="relnotes-6.4.1.html">Mesa 6.4.1</a> has been released.
|
||||
This is stable, bug-fix release.
|
||||
</p>
|
||||
<pre>
|
||||
Bug fixes:
|
||||
- redefining a vertex program string didn't take effect in TNL module
|
||||
- fixed occasional segfault upon vertex/fragment parsing error
|
||||
- vertex program LIT instruction didn't handle 0^0=1 correctly
|
||||
- fragment program fog option didn't work with glDrawPixels, glBitmap
|
||||
- USE_MGL_NAMESPACE didn't work for x86-64
|
||||
- OSMesa demos were missing from previous release tarballs
|
||||
- fixed problem with float->ushort conversion in glClear (bug 4992)
|
||||
- popping of GL_EYE_PLANE texgen state was broken (bug 4996)
|
||||
- popping of GL_SPOT_DIRECTION light state was broken (bug 5005)
|
||||
- fixed occasional triangle color interpolation problem on VMS
|
||||
- work around invalid free() call (bug 5131)
|
||||
- fixed BSD X server compilation problem by including stdint.h
|
||||
</pre>
|
||||
<p>
|
||||
The MD5 checksums are:
|
||||
</p>
|
||||
<pre>
|
||||
698ceb574cf882b0226761f5913c0da9 MesaLib-6.4.1.tar.gz
|
||||
ea148c828ec6f645526451db1b8556f1 MesaLib-6.4.1.tar.bz2
|
||||
42e93279468975ed2bf3111b8721e5d9 MesaLib-6.4.1.zip
|
||||
e3b0d50807fd2bdcd1a95aaddd786f13 MesaDemos-6.4.1.tar.gz
|
||||
99df1fdcb98d391666b476ca6f1dda8a MesaDemos-6.4.1.tar.bz2
|
||||
b999d2c6d92fb4b7740a3dbd889348e3 MesaDemos-6.4.1.zip
|
||||
eadfe01fe5ddfb1eb8227dd567b31635 MesaGLUT-6.4.1.tar.gz
|
||||
bd003bb4f981a4f91dee4c38644d4f3f MesaGLUT-6.4.1.tar.bz2
|
||||
71c401c037088bf688a88afdaeb3420f MesaGLUT-6.4.1.zip
|
||||
</pre>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>October 24, 2005</h2>
|
||||
<p>
|
||||
Mesa 6.4 has been released. This is a stable, bug-fix release.
|
||||
<a href="relnotes-6.4.html">Mesa 6.4</a> has been released.
|
||||
This is stable, bug-fix release.
|
||||
</p>
|
||||
<pre>
|
||||
New:
|
||||
- Added a fast XOR line drawing function in Xlib driver
|
||||
- Added support for GL_ARB_texture_mirrored_repeat to savage
|
||||
driver (supported only on Savage4 hardware).
|
||||
Changes:
|
||||
- Mesa now packaged in three parts: Library, Demos and GLUT
|
||||
Bug fixes:
|
||||
- GLX_X_RENDERABLE token wasn't accepted by glXChooseFBConfig
|
||||
- Some files were present multiple times in the 6.3.2 tarballs
|
||||
- r200_vtxtmp_x86.S file was missing from 6.3.2 tarball (bug 4207)
|
||||
- glxgears_fbconfig demo didn't work (bug 4237)
|
||||
- fixed bug when bilinear sampling 2d textures with borders
|
||||
- glXCreatePbuffer() could segfault instead of returning 0 (bug 4235)
|
||||
- fixed undefined frexp and rand in X.org libGLcore.a (bug 4242)
|
||||
- fixed a few problems with proxy color tables (bug 4270)
|
||||
- fixed precision problem in Z clearing (bug 4395)
|
||||
- glBitmap, glDraw/CopyPixels mistakenly generated selection hits
|
||||
- fixed potential segfault caused by reading pixels outside
|
||||
of renderbuffer bounds
|
||||
- glGetTexLevelParameter didn't accept GL_TEXTURE_DEPTH_SIZE_ARB
|
||||
- fixed memory corruption bug involving software alpha buffers
|
||||
- glReadPixels clipped by window bounds was sometimes broken
|
||||
- glDraw/CopyPixels of stencil data ignored the stencil write mask
|
||||
- glReadPixels from a texture bound to a framebuffer object didn't work
|
||||
- glIsRender/FramebufferEXT weren't totally correct
|
||||
- fixed a number of point size attenuation/fade bugs
|
||||
- fixed glFogCoord bug 4729
|
||||
- GLX encoding for transpose matrix functions was broken
|
||||
- fixed broken fragment program KIL and SWZ instructions
|
||||
</pre>
|
||||
<p>
|
||||
The MD5 checksums are:
|
||||
</p>
|
||||
<pre>
|
||||
1cce0c1eb4fd15e9dfe837a1ce0c9812 MesaLib-6.4.tar.gz
|
||||
85a84e47a3f718f752f306b9e0954ef6 MesaLib-6.4.tar.bz2
|
||||
b976fea4f3ee06354c53f91b6e3f2ffc MesaLib-6.4.zip
|
||||
d8734f2c69bcf7ef9f5ae454a85743ba MesaDemos-6.4.tar.gz
|
||||
1a8c4d4fc699233f5fdb902b8753099e MesaDemos-6.4.tar.bz2
|
||||
607ab7c7a7de0cc5febbdde2bfa03098 MesaDemos-6.4.zip
|
||||
3260156f66174322a092be0767962d34 MesaGLUT-6.4.tar.gz
|
||||
0465d053f83775f44a12dec4050dfd78 MesaGLUT-6.4.tar.bz2
|
||||
02abfcdcdf72ba938ae00f6e3b70fbe0 MesaGLUT-6.4.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>August 19, 2005</h2>
|
||||
@@ -191,23 +57,7 @@ d8734f2c69bcf7ef9f5ae454a85743ba MesaDemos-6.4.tar.gz
|
||||
Mesa 6.3.2 has been released.
|
||||
Note: there was no public release of version 6.3.1.
|
||||
</p>
|
||||
<pre>
|
||||
New:
|
||||
- The distribution now includes the DRI drivers and GLX code
|
||||
Changes:
|
||||
- Made the DRI "new" driver interface standard, remove old code
|
||||
Bug fixes:
|
||||
- GL_ARB_vertex/fragment_shader were mistakenly listed in the
|
||||
extensions string
|
||||
- negative relative addressing in vertex programs was broken
|
||||
- update/fix SPARC assembly code for vertex transformation
|
||||
- fixed memory leak when freeing GLX drawables/renderbuffers
|
||||
- fixed display list memory leak
|
||||
- the GL_PIXEL_MAP_I_TO_I table is now floating point, not integer
|
||||
- wglGetProcAddress() didn't handle wgl-functions
|
||||
- fixed glxext.h cross-compile issue (Colin Harrison)
|
||||
- assorted DRI driver fixes
|
||||
</pre>
|
||||
<a href="versions.html#6.3.2">Changes in version 6.3.1</a>
|
||||
<p>
|
||||
The MD5 checksums are:
|
||||
</p>
|
||||
@@ -1226,6 +1076,6 @@ source code</a>.</p>
|
||||
|
||||
|
||||
<hr>
|
||||
$Id: news.html,v 3.28 2006/04/01 02:29:40 brianp Exp $
|
||||
$Id: news.html,v 3.33 2006/12/02 18:18:41 brianp Exp $
|
||||
</body>
|
||||
</html>
|
||||
|
68
docs/relnotes-6.4.1.html
Normal file
68
docs/relnotes-6.4.1.html
Normal file
@@ -0,0 +1,68 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 6.4.1 / November 29, 2006</H1>
|
||||
|
||||
<p>
|
||||
Mesa 6.4.1 is a stable, bug-fix release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
698ceb574cf882b0226761f5913c0da9 MesaLib-6.4.1.tar.gz
|
||||
ea148c828ec6f645526451db1b8556f1 MesaLib-6.4.1.tar.bz2
|
||||
42e93279468975ed2bf3111b8721e5d9 MesaLib-6.4.1.zip
|
||||
e3b0d50807fd2bdcd1a95aaddd786f13 MesaDemos-6.4.1.tar.gz
|
||||
99df1fdcb98d391666b476ca6f1dda8a MesaDemos-6.4.1.tar.bz2
|
||||
b999d2c6d92fb4b7740a3dbd889348e3 MesaDemos-6.4.1.zip
|
||||
eadfe01fe5ddfb1eb8227dd567b31635 MesaGLUT-6.4.1.tar.gz
|
||||
bd003bb4f981a4f91dee4c38644d4f3f MesaGLUT-6.4.1.tar.bz2
|
||||
71c401c037088bf688a88afdaeb3420f MesaGLUT-6.4.1.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>redefining a vertex program string didn't take effect in TNL module
|
||||
<li>fixed occasional segfault upon vertex/fragment parsing error
|
||||
<li>vertex program LIT instruction didn't handle 0^0=1 correctly
|
||||
<li>fragment program fog option didn't work with glDrawPixels, glBitmap
|
||||
<li>USE_MGL_NAMESPACE didn't work for x86-64
|
||||
<li>OSMesa demos were missing from previous release tarballs
|
||||
<li>fixed problem with float->ushort conversion in glClear (bug 4992)
|
||||
<li>popping of GL_EYE_PLANE texgen state was broken (bug 4996)
|
||||
<li>popping of GL_SPOT_DIRECTION light state was broken (bug 5005)
|
||||
<li>fixed occasional triangle color interpolation problem on VMS
|
||||
<li>work around invalid free() call (bug 5131)
|
||||
<li>fixed BSD X server compilation problem by including stdint.h
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Driver Status</h2>
|
||||
|
||||
<pre>
|
||||
Driver Status
|
||||
---------------------- ----------------------
|
||||
DRI drivers varies with the driver
|
||||
XMesa (Xlib) implements OpenGL 1.5
|
||||
OSMesa (off-screen) implements OpenGL 1.5
|
||||
Windows/Win32 implements OpenGL 1.5
|
||||
Glide (3dfx Voodoo1/2) requires updates
|
||||
SVGA requires updates
|
||||
DJGPP requires updates
|
||||
GGI requires updates
|
||||
BeOS requires updates
|
||||
Allegro requires updates
|
||||
D3D requires updates
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
75
docs/relnotes-6.4.2.html
Normal file
75
docs/relnotes-6.4.2.html
Normal file
@@ -0,0 +1,75 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 6.4.2 / February 2, 2006</H1>
|
||||
|
||||
<p>
|
||||
Mesa 6.4.2 is a stable, bug-fix release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
cb0d745d520fa7c2bb9178058b763544 MesaLib-6.4.2.tar.gz
|
||||
7674d2c603b5834259e4e5a820cefd5b MesaLib-6.4.2.tar.bz2
|
||||
d224e1325b33ff71a0f3893fc6b4d594 MesaLib-6.4.2.zip
|
||||
d4b345d4588fc750cd3d34f3ac26673e MesaDemos-6.4.2.tar.gz
|
||||
9cae1ab874af533ce356bd7dfe2e0bb0 MesaDemos-6.4.2.tar.bz2
|
||||
2da6e1d1245e441d27813595c6ba50de MesaDemos-6.4.2.zip
|
||||
84427d18c3453f0ea52388eeba7169b5 MesaGLUT-6.4.2.tar.gz
|
||||
b157ba8ad1ea63260cf5339132e7aac6 MesaGLUT-6.4.2.tar.bz2
|
||||
fe1523744fc05edc3811dfc6a1bf4181 MesaGLUT-6.4.2.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
<li>added OSMesaColorClamp() function/feature
|
||||
<li>added wglGetExtensionStringARB() function
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>GLUT tarball
|
||||
<br>
|
||||
Starting with 6.4, the GLUT library sources are distributed in a separate
|
||||
tarball. This was done at the request of Linux distro vendors who prefer
|
||||
to use freeglut.
|
||||
</ul>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>fixed some problems when building on Windows
|
||||
<li>GLw header files weren't installed by installmesa script (bug 5396)
|
||||
<li>GL/glfbdev.h file was missing from tarballs
|
||||
<li>fixed TNL initialization bug which could lead to crash (bug 5791)
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Driver Status</h2>
|
||||
|
||||
<pre>
|
||||
Driver Status
|
||||
---------------------- ----------------------
|
||||
DRI drivers varies with the driver
|
||||
XMesa (Xlib) implements OpenGL 1.5
|
||||
OSMesa (off-screen) implements OpenGL 1.5
|
||||
Windows/Win32 implements OpenGL 1.5
|
||||
Glide (3dfx Voodoo1/2) requires updates
|
||||
SVGA requires updates
|
||||
DJGPP requires updates
|
||||
GGI requires updates
|
||||
BeOS requires updates
|
||||
Allegro requires updates
|
||||
D3D requires updates
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
90
docs/relnotes-6.4.html
Normal file
90
docs/relnotes-6.4.html
Normal file
@@ -0,0 +1,90 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 6.4 / October 24, 2005</H1>
|
||||
|
||||
<p>
|
||||
Mesa 6.4 is a stable, bug-fix release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
1cce0c1eb4fd15e9dfe837a1ce0c9812 MesaLib-6.4.tar.gz
|
||||
85a84e47a3f718f752f306b9e0954ef6 MesaLib-6.4.tar.bz2
|
||||
b976fea4f3ee06354c53f91b6e3f2ffc MesaLib-6.4.zip
|
||||
d8734f2c69bcf7ef9f5ae454a85743ba MesaDemos-6.4.tar.gz
|
||||
1a8c4d4fc699233f5fdb902b8753099e MesaDemos-6.4.tar.bz2
|
||||
607ab7c7a7de0cc5febbdde2bfa03098 MesaDemos-6.4.zip
|
||||
3260156f66174322a092be0767962d34 MesaGLUT-6.4.tar.gz
|
||||
0465d053f83775f44a12dec4050dfd78 MesaGLUT-6.4.tar.bz2
|
||||
02abfcdcdf72ba938ae00f6e3b70fbe0 MesaGLUT-6.4.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New</h2>
|
||||
<ul>
|
||||
<li>Added a fast XOR line drawing function in Xlib driver
|
||||
<li>Added support for GL_ARB_texture_mirrored_repeat to savage driver (supported only on Savage4 hardware).
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>Mesa now packaged in three parts: Library, Demos and GLUT
|
||||
</ul>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>GLX_X_RENDERABLE token wasn't accepted by glXChooseFBConfig
|
||||
<li>Some files were present multiple times in the 6.3.2 tarballs
|
||||
<li>r200_vtxtmp_x86.S file was missing from 6.3.2 tarball (bug 4207)
|
||||
<li>glxgears_fbconfig demo didn't work (bug 4237)
|
||||
<li>fixed bug when bilinear sampling 2d textures with borders
|
||||
<li>glXCreatePbuffer() could segfault instead of returning 0 (bug 4235)
|
||||
<li>fixed undefined frexp and rand in X.org libGLcore.a (bug 4242)
|
||||
<li>fixed a few problems with proxy color tables (bug 4270)
|
||||
<li>fixed precision problem in Z clearing (bug 4395)
|
||||
<li>glBitmap, glDraw/CopyPixels mistakenly generated selection hits
|
||||
<li>fixed potential segfault caused by reading pixels outside
|
||||
of renderbuffer bounds
|
||||
<li>glGetTexLevelParameter didn't accept GL_TEXTURE_DEPTH_SIZE_ARB
|
||||
<li>fixed memory corruption bug involving software alpha buffers
|
||||
<li>glReadPixels clipped by window bounds was sometimes broken
|
||||
<li>glDraw/CopyPixels of stencil data ignored the stencil write mask
|
||||
<li>glReadPixels from a texture bound to a framebuffer object didn't work
|
||||
<li>glIsRender/FramebufferEXT weren't totally correct
|
||||
<li>fixed a number of point size attenuation/fade bugs
|
||||
<li>fixed glFogCoord bug 4729
|
||||
<li>GLX encoding for transpose matrix functions was broken
|
||||
<li>fixed broken fragment program KIL and SWZ instructions
|
||||
<li>fragment programs that wrote result.depth.z didn't work
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Driver Status</h2>
|
||||
|
||||
<pre>
|
||||
Driver Status
|
||||
---------------------- ----------------------
|
||||
DRI drivers varies with the driver
|
||||
XMesa (Xlib) implements OpenGL 1.5
|
||||
OSMesa (off-screen) implements OpenGL 1.5
|
||||
Windows/Win32 implements OpenGL 1.5
|
||||
Glide (3dfx Voodoo1/2) requires updates
|
||||
SVGA requires updates
|
||||
DJGPP requires updates
|
||||
GGI requires updates
|
||||
BeOS requires updates
|
||||
Allegro requires updates
|
||||
D3D requires updates
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
139
docs/relnotes-6.5.1.html
Normal file
139
docs/relnotes-6.5.1.html
Normal file
@@ -0,0 +1,139 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 6.5.1 Release Notes / September 15, 2006</H1>
|
||||
|
||||
<p>
|
||||
Mesa 6.5.1 is a 6.5 follow-on development release mostly consisting of
|
||||
bug fixes.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
d9a555297319bb932a3192952d53d073 MesaLib-6.5.1.tar.gz
|
||||
c46f2c6646a270911b791dd8e1c2d977 MesaLib-6.5.1.tar.bz2
|
||||
939eaaff33322bfeafac784402b45f4f MesaLib-6.5.1.zip
|
||||
9e4bbe83c007bfbaa67449a81cc3d36a MesaDemos-6.5.1.tar.gz
|
||||
0f2794baf7a9d98b22caea9f78c6942d MesaDemos-6.5.1.tar.bz2
|
||||
14c77eab9cc7a265c331abf239927c1c MesaDemos-6.5.1.zip
|
||||
c5f87c23aaf4eaf1bda0d007ea98366c MesaGLUT-6.5.1.tar.gz
|
||||
2525642fe7f454e3e1a1aad01359b406 MesaGLUT-6.5.1.tar.bz2
|
||||
e33b165c22551e23b58ede8767378543 MesaGLUT-6.5.1.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New Features</h2>
|
||||
<ul>
|
||||
<li>Intel i965 "broadwater" DRI driver
|
||||
|
||||
<li>GL_APPLE_vertex_array_object - allows encapsulation of a set of vertex
|
||||
arrays in an object.
|
||||
|
||||
<li>GL_EXT_texture_sRGB - non-linearly mapped texture formats
|
||||
|
||||
<li>GL_EXT_gpu_program_parameters - addes a few new functions for setting
|
||||
multiple vertex/fragment program parameters with one call.
|
||||
<li>"engine" demo
|
||||
<li>updated fbdev driver and GLUT for fbdev (Sean D'Epagnier)
|
||||
<li>many updates to the DRI drivers
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>The glVertexAttribARB functions no longer alias the conventional
|
||||
vertex attributes.
|
||||
<li>glxinfo program prints more info with -l option
|
||||
<li>GL_FRAGMENT_PROGRAM_NV and GL_FRAGMENT_PROGRAM_ARB are now
|
||||
compatible, in terms of glBindProgramARB()
|
||||
<li>The GL_ARB_vertex_program attribute <code>vertex.weight</code> is now
|
||||
accepted by the parser, even though the GL_ARB_vertex_blend and
|
||||
GL_EXT_vertex_weighting extensions aren't supported.
|
||||
Allows Warcraft to run.
|
||||
</ul>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>fixed broken texture border handling for depth textures (bug 6498)
|
||||
<li>removed the test for duplicated framebuffer attachments, per
|
||||
version 117 of the GL_EXT_framebuffer_object specification
|
||||
<li>fixed a few render-to-texture bugs, including render to depth texture
|
||||
<li>clipping of lines against user-defined clip planes was broken (6512)
|
||||
<li>assembly language dispatch for SPARC was broken (bug 6484)
|
||||
<li>assorted compilation fixes on various Unix platforms (Dan Schikore)
|
||||
<li>glPopAttrib could restore an invalid value for GL_DRAW_BUFFER
|
||||
<li>assorted minor fixes for 16 and 32 bit/channel modes
|
||||
<li>fixed assorted bugs in texture compression paths
|
||||
<li>fixed indirect rendering vertex array crashes (bug 6863)
|
||||
<li>glDrawPixels GL_INDEX_OFFSET didn't always work
|
||||
<li>fixed convolution memory leak (bug 7077)
|
||||
<li>rectangular depth textures didn't work
|
||||
<li>invalid mode to glBegin didn't generate an error (bug 7142)
|
||||
<li>'normalized' parameter to glVertexAttribPointerARB didn't work
|
||||
<li>disable bogus GLX_SGI_video_sync extension in xlib driver
|
||||
<li>fixed R128 driver locking bug (Martijn van Oosterhout)
|
||||
<li>using evaluators with vertex programs caused crashes (bug 7564)
|
||||
<li>fragment.position wasn't set correctly for point/line primitives
|
||||
<li>fixed parser bug for scalar sources for GL_NV_fragment_program
|
||||
<li>max fragment program length was incorrectly 128, now 1024
|
||||
<li>writes to result.depth in fragment programs weren't clamped to [0,1]
|
||||
<li>fixed potential dangling pointer bug in glBindProgram()
|
||||
<li>fixed some memory leaks (and potential crashes) in Xlib driver
|
||||
<li>fixed a number of build issues on HP-UX (Christopher Bell)
|
||||
<li>accum buffer didn't work with OSMesa interface
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Internal code changes</h2>
|
||||
|
||||
<p>
|
||||
A number of Mesa program-related structs were renamed.
|
||||
For example <i>struct vertex_program</i> is now <i>struct gl_vertex_program</i>.
|
||||
All the effected drivers have been updated.
|
||||
</p>
|
||||
|
||||
<p>Ian Romanick updated the GL API dispatch code in a number of ways.
|
||||
First, many old/unused extensions were removed.
|
||||
Second, the static entrypoints for some extensions were removed.
|
||||
This means GL function pointers will have to be used more often
|
||||
(e.g. use glXGetProcAddressARB()).
|
||||
</p>
|
||||
|
||||
|
||||
<h2>To Do (someday) items</h2>
|
||||
<ul>
|
||||
<li>Switch to freeglut
|
||||
<li>Increase MAX_DRAWBUFFERS
|
||||
<li>Fix linux-glide target/driver.
|
||||
<li>Fix lambda calculation for frag progs.
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Driver Status</h2>
|
||||
|
||||
<pre>
|
||||
Driver Status
|
||||
---------------------- ----------------------
|
||||
DRI drivers varies with the driver
|
||||
XMesa/GLX (on Xlib) implements OpenGL 1.5
|
||||
OSMesa (off-screen) implements OpenGL 1.5
|
||||
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
|
||||
SVGA implements OpenGL 1.3
|
||||
Wind River UGL implements OpenGL 1.3
|
||||
Windows/Win32 implements OpenGL 1.5
|
||||
DJGPP implements OpenGL 1.5
|
||||
GGI implements OpenGL 1.3
|
||||
BeOS implements OpenGL 1.5
|
||||
Allegro needs updating
|
||||
D3D needs updating
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
118
docs/relnotes-6.5.2.html
Normal file
118
docs/relnotes-6.5.2.html
Normal file
@@ -0,0 +1,118 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 6.5.2 Release Notes / December 2, 2006</H1>
|
||||
|
||||
<p>
|
||||
Mesa 6.5.2 is a 6.5 follow-on development release with a few new features
|
||||
but mostly consisting of bug fixes.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
TBD
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
<li>New DRI memory manager system. Currently used by the i915tex driver.
|
||||
Other DRI drivers will be updated to use the new memory manager in coming
|
||||
months.
|
||||
<br>
|
||||
To use the new driver you'll need the most recent DRM library and drivers
|
||||
(version 2.2 or later) and a recent xf86-video-intel driver module from X.org.
|
||||
<br>
|
||||
New features resulting from this work include:
|
||||
<ul>
|
||||
<li>EXT_framebuffer_objects, render to texture
|
||||
<li>ARB_pixel_buffer_objects
|
||||
<li>Accelerated CopyTexSubimage, DrawPixels, ReadPixels, CopyPixels
|
||||
<li>Accelerated texture uploads from pixel buffer objects
|
||||
<li>Potentially texturing directly from the pixel buffer object (zero
|
||||
copy texturing).
|
||||
</ul>
|
||||
<li>New Intel i965 DRI driver
|
||||
<li>New <code>minstall</code> script to replace normal install program
|
||||
<li>Faster fragment program execution in software
|
||||
<li>Added (or fixed) support for <a href="http://www.opengl.org/registry/specs/SGI/make_current_read.txt">
|
||||
GLX_SGI_make_current_read</a> to the following drivers:</li>
|
||||
<ul>
|
||||
<li>radeon</li>
|
||||
<li>savage</li>
|
||||
<li>mga</li>
|
||||
<li>tdfx</li>
|
||||
</ul>
|
||||
<li>Added support for ARB_occlusion_query to the tdfx driver (Ian
|
||||
Romanick).</li>
|
||||
</ul>
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>fixed invalid memory read while rendering textured points (bug 8320)
|
||||
<li>fixed problems with freebsd-dri configuration (bug 8344)
|
||||
<li>Mesa's fake glxGetCurrentContext() wasn't thread-aware
|
||||
<li>OPTION NV_position_invariant didn't work in NV vertex programs
|
||||
<li>glDrawPixels into a user-created framebuffer object could crash Xlib driver
|
||||
<li>Line clipping was broken in some circumstances
|
||||
<li>fragment.fogcoord register didn't always contain the correct value
|
||||
<li>RGBA logicops didn't work reliably in some DRI drivers
|
||||
<li>Fixed broken RGBA LogicOps in Intel DRI drivers
|
||||
<li>Fixed some fragment program bugs in Intel i915 DRI driver
|
||||
<li>Fixed glGetVertexAttribfvARB bug 8883
|
||||
<li>Implemented glGetUniform[fi]vARB() functions
|
||||
<li>Fixed glDrawPixels(GL_COLOR_INDEX, GL_BITMAP) segfault (bug 9044)
|
||||
<li>Fixed some gluBuild2DMipmaps() bugs (Greg McGarragh)
|
||||
<li>Fixed broken "mgl" name mangling
|
||||
<li>Indirect rending was broken for glMap* functions (bug 8899)
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Internal code changes</h2>
|
||||
|
||||
<ul>
|
||||
<li>The device driver functions ResizeBuffers and GetBufferSize have been
|
||||
decprecated.
|
||||
<li>OpenGL 2.0 and 2.1 support is nearly done. We need to do quite a bit
|
||||
more testing of the shading language functions.
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>To Do (someday) items</h2>
|
||||
<ul>
|
||||
<li>Switch to freeglut
|
||||
<li>Increase MAX_DRAWBUFFERS
|
||||
<li>Fix linux-glide target/driver.
|
||||
<li>Improved lambda and derivative calculation for frag progs.
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Driver Status</h2>
|
||||
|
||||
<pre>
|
||||
Driver Status
|
||||
---------------------- ----------------------
|
||||
DRI drivers varies with the driver
|
||||
XMesa/GLX (on Xlib) implements OpenGL 1.5
|
||||
OSMesa (off-screen) implements OpenGL 1.5
|
||||
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
|
||||
SVGA implements OpenGL 1.3
|
||||
Wind River UGL implements OpenGL 1.3
|
||||
Windows/Win32 implements OpenGL 1.5
|
||||
DJGPP implements OpenGL 1.5
|
||||
GGI implements OpenGL 1.3
|
||||
BeOS implements OpenGL 1.5
|
||||
Allegro needs updating
|
||||
D3D needs updating
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
131
docs/relnotes-6.5.html
Normal file
131
docs/relnotes-6.5.html
Normal file
@@ -0,0 +1,131 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 6.5 Release Notes / March 31, 2006</H1>
|
||||
|
||||
<p>
|
||||
Mesa 6.5 is a new development release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
657be3b92f6dabc78a67ed9cb8d67813 MesaLib-6.5.tar.gz
|
||||
61beda590bfc5b4a12e979d5f2d70d7a MesaLib-6.5.tar.bz2
|
||||
19d48b872d579d4f91466060804a59ac MesaLib-6.5.zip
|
||||
694ad3a7007010c7418a9c72d1cba5b7 MesaDemos-6.5.tar.gz
|
||||
ab95b590dcd640726a2d89e62068c66e MesaDemos-6.5.tar.bz2
|
||||
b792c303fefd87294488e2b7eab976e5 MesaDemos-6.5.zip
|
||||
ac1d585483617db0c91e5c15cb5ec3a3 MesaGLUT-6.5.tar.gz
|
||||
59f0bf2b2ffb67fe23ee479f9b044f31 MesaGLUT-6.5.tar.bz2
|
||||
005decb2136718e22222ac1c4805cd15 MesaGLUT-6.5.zip
|
||||
</pre>
|
||||
|
||||
|
||||
|
||||
<h2>New Features</h2>
|
||||
<ul>
|
||||
<li>OpenGL Shading language support
|
||||
<br>
|
||||
This includes the GL_ARB_shader_objects, GL_ARB_shading_language_100,
|
||||
GL_ARB_vertex_shader and GL_ARB_fragment_shader extensions. Most of
|
||||
the work was done by Michal Krol.
|
||||
There's probably a fair number of bugs since this is a pretty large,
|
||||
complicated body of code.
|
||||
<br>
|
||||
The OpenGL 2.0 interface to these features will be implemented in a
|
||||
future version of Mesa,
|
||||
|
||||
<li>GL_EXT_timer_query
|
||||
<br>
|
||||
Used to measure the time of OpenGL operations at high precision.
|
||||
Only supported in the software/Xlib driver at this time.
|
||||
|
||||
<li>GL_EXT_packed_depth_stencil
|
||||
<br>
|
||||
Defines a new GL_DEPTH_STENCIL_EXT pixel format.
|
||||
|
||||
<li>GL_EXT_framebuffer_blit
|
||||
<br>
|
||||
A simplified glCopyPixels-like feature for copying pixel rectangles.
|
||||
|
||||
<li>GL_ARB_half_float_pixel
|
||||
<br>
|
||||
Adds a new half-precision floating point format for image transfers,
|
||||
such as for glDrawPixels, glReadPixels, glTexImage, etc.
|
||||
</ul>
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>removed GL_HP_occlusion_test (use GL_ARB_occlusion_query instead)
|
||||
<li>removed GL_SGIX/SGIS_pixel_texture extensions
|
||||
</ul>
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>fixed glxcontextmodes.c datatype problem (bug 5835)
|
||||
<li>fixed aix-gcc build/install bugs (bug 5874)
|
||||
<li>fixed some bugs in texture env program generation
|
||||
<li>glXCopyContext() didn't handle texture object bindings properly
|
||||
<li>glXCopyContext() didn't copy all lighting state
|
||||
<li>fixed FreeBSD config (Pedro Giffuni)
|
||||
<li>fixed some minor framebuffer object bugs
|
||||
<li>replaced dprintf() with _glu_printf() in GLU (bug 6244)
|
||||
<li>fixed a number of thread safety bugs/regressions
|
||||
<li>fixed a number of GLU tesselator bugs (John Shell, bug 6339)
|
||||
<li>paletted texturing was broken w/ floating point palettes (K. Schultz)
|
||||
<li>lots of assorted framebuffer object bug fixes
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Known Issues</h2>
|
||||
<ul>
|
||||
<li>Rendering to depth textures will not work. Rendering to GL_DEPTH_STENCIL
|
||||
textures should work.
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Driver Interface Changes</h2>
|
||||
<ul>
|
||||
<li>Stencil: The Driver.StencilOp/Func/Mask() functions have been replaced by
|
||||
the two-sided versions: Driver.Stencil*Separate().
|
||||
<li>Render-to-texture: The functions for rendering to textures have changed.
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>To Do (someday) items</h2>
|
||||
<ul>
|
||||
<li>Switch to freeglut
|
||||
<li>Increase MAX_DRAWBUFFERS
|
||||
<li>Fix linux-glide target/driver.
|
||||
<li>Fix lambda calculation for frag progs.
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Driver Status</h2>
|
||||
|
||||
<pre>
|
||||
Driver Status
|
||||
---------------------- ----------------------
|
||||
DRI drivers varies with the driver
|
||||
XMesa/GLX (on Xlib) implements OpenGL 1.5
|
||||
OSMesa (off-screen) implements OpenGL 1.5
|
||||
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
|
||||
SVGA implements OpenGL 1.3
|
||||
Wind River UGL implements OpenGL 1.3
|
||||
Windows/Win32 implements OpenGL 1.5
|
||||
DJGPP implements OpenGL 1.5
|
||||
GGI implements OpenGL 1.3
|
||||
BeOS implements OpenGL 1.5
|
||||
Allegro needs updating
|
||||
D3D needs updating
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -8,15 +8,32 @@
|
||||
|
||||
<H1>Release Notes</H1>
|
||||
|
||||
<p>
|
||||
Mesa uses an even/odd version number scheme like the Linux kernel.
|
||||
Odd numbered versions (such as 6.5) designate new developmental releases.
|
||||
Even numbered versions (such as 6.4) designate stable releases.
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="RELNOTES-6.5">RELNOTES-6.5</A>
|
||||
<LI><A HREF="RELNOTES-6.4.2">RELNOTES-6.4.2</A>
|
||||
<LI><A HREF="RELNOTES-6.4.1">RELNOTES-6.4.1</A>
|
||||
<LI><A HREF="RELNOTES-6.4">RELNOTES-6.4</A>
|
||||
<LI><A HREF="relnotes-6.5.2.html">6.5.2 release notes</A>
|
||||
<LI><A HREF="relnotes-6.5.1.html">6.5.1 release notes</A>
|
||||
<LI><A HREF="relnotes-6.5.html">6.5 release notes</A>
|
||||
<LI><A HREF="relnotes-6.4.2.html">6.4.2 release notes</A>
|
||||
<LI><A HREF="relnotes-6.4.1.html">6.4.1 release notes</A>
|
||||
<LI><A HREF="relnotes-6.4.html">6.4 release notes</A>
|
||||
</UL
|
||||
|
||||
<p>
|
||||
Versions of Mesa prior to 6.4 are summarized in the
|
||||
<a href="versions.html">versions file</a> and the following release notes.
|
||||
</p>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="RELNOTES-6.3.2">RELNOTES-6.3.2</A>
|
||||
<LI><A HREF="RELNOTES-6.3">RELNOTES-6.3</A>
|
||||
<LI><A HREF="RELNOTES-6.2.1">RELNOTES-6.2.1</A>
|
||||
|
@@ -11,11 +11,22 @@
|
||||
<p>
|
||||
<A HREF="http://www.doxygen.org" target="_parent">Doxygen</A>
|
||||
is used to automatically
|
||||
produce cross-referenced documentation from the Mesa sources.
|
||||
This is not included in the normal Mesa distribution.
|
||||
Download Mesa from CVS if interested.
|
||||
produce cross-referenced documentation from the Mesa source code.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The Doxygen configuration files and generated files are not included
|
||||
in the normal Mesa distribution (they're very large).
|
||||
To generate Doxygen documentation, download Mesa from CVS, change to
|
||||
the <code>doxygen</code> directory and run <code>make</code>.
|
||||
</P>
|
||||
|
||||
<p>
|
||||
For an example of Doxygen usage in Mesa, see a recent source file
|
||||
such as <a href="http://webcvs.freedesktop.org/mesa/Mesa/src/mesa/main/bufferobj.c?view=markup" target="_parent">bufferobj.c</a>.
|
||||
</p>
|
||||
|
||||
|
||||
<P>
|
||||
If you're reading this page from your local copy of Mesa, and have
|
||||
run the doxygen scripts, you can read the documentation
|
||||
|
1656
docs/versions.html
Normal file
1656
docs/versions.html
Normal file
File diff suppressed because it is too large
Load Diff
102
include/GL/gl.h
102
include/GL/gl.h
@@ -2152,35 +2152,24 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLsh
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ???. GL_MESA_trace
|
||||
* XXX obsolete
|
||||
*/
|
||||
#ifndef GL_MESA_trace
|
||||
#define GL_MESA_trace 1
|
||||
#if GL_ARB_shader_objects
|
||||
|
||||
#define GL_TRACE_ALL_BITS_MESA 0xFFFF
|
||||
#define GL_TRACE_OPERATIONS_BIT_MESA 0x0001
|
||||
#define GL_TRACE_PRIMITIVES_BIT_MESA 0x0002
|
||||
#define GL_TRACE_ARRAYS_BIT_MESA 0x0004
|
||||
#define GL_TRACE_TEXTURES_BIT_MESA 0x0008
|
||||
#define GL_TRACE_PIXELS_BIT_MESA 0x0010
|
||||
#define GL_TRACE_ERRORS_BIT_MESA 0x0020
|
||||
#define GL_TRACE_MASK_MESA 0x8755
|
||||
#define GL_TRACE_NAME_MESA 0x8756
|
||||
#ifndef GL_MESA_shader_debug
|
||||
#define GL_MESA_shader_debug 1
|
||||
|
||||
GLAPI void GLAPIENTRY glEnableTraceMESA( GLbitfield mask );
|
||||
GLAPI void GLAPIENTRY glDisableTraceMESA( GLbitfield mask );
|
||||
GLAPI void GLAPIENTRY glNewTraceMESA( GLbitfield mask, const GLubyte * traceName );
|
||||
GLAPI void GLAPIENTRY glEndTraceMESA( void );
|
||||
GLAPI void GLAPIENTRY glTraceAssertAttribMESA( GLbitfield attribMask );
|
||||
GLAPI void GLAPIENTRY glTraceCommentMESA( const GLubyte * comment );
|
||||
GLAPI void GLAPIENTRY glTraceTextureMESA( GLuint name, const GLubyte* comment );
|
||||
GLAPI void GLAPIENTRY glTraceListMESA( GLuint name, const GLubyte* comment );
|
||||
GLAPI void GLAPIENTRY glTracePointerMESA( GLvoid* pointer, const GLubyte* comment );
|
||||
GLAPI void GLAPIENTRY glTracePointerRangeMESA( const GLvoid* first, const GLvoid* last, const GLubyte* comment );
|
||||
#define GL_DEBUG_OBJECT_MESA 0x8759
|
||||
#define GL_DEBUG_PRINT_MESA 0x875A
|
||||
#define GL_DEBUG_ASSERT_MESA 0x875B
|
||||
|
||||
#endif /* GL_MESA_trace */
|
||||
GLAPI GLhandleARB APIENTRY glCreateDebugObjectMESA (void);
|
||||
GLAPI void APIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
|
||||
GLAPI void APIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
|
||||
GLsizei *length, GLcharARB *debugLog);
|
||||
GLAPI GLsizei APIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
|
||||
|
||||
#endif /* GL_MESA_shader_debug */
|
||||
|
||||
#endif /* GL_ARB_shader_objects */
|
||||
|
||||
|
||||
/*
|
||||
@@ -2232,67 +2221,6 @@ typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLen
|
||||
|
||||
|
||||
|
||||
#ifndef GL_EXT_timer_query
|
||||
#define GL_EXT_timer_query 1
|
||||
|
||||
/* Define 64-bit types */
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
typedef long long int GLint64EXT;
|
||||
typedef unsigned long long int GLuint64EXT;
|
||||
#elif defined(_WIN32)
|
||||
typedef __int64 GLint64EXT;
|
||||
typedef unsigned __int64 GLuint64EXT;
|
||||
#else
|
||||
/* this might actually be a 32-bit type */
|
||||
typedef long int GLint64EXT;
|
||||
typedef unsigned long int GLuint64EXT;
|
||||
#endif
|
||||
|
||||
#define GL_TIME_ELAPSED_EXT 0x88BF
|
||||
|
||||
GLAPI void GLAPIENTRY glGetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64EXT *params);
|
||||
GLAPI void GLAPIENTRY glGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params);
|
||||
|
||||
typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
|
||||
typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
|
||||
|
||||
#endif /* GL_EXT_timer_query */
|
||||
|
||||
|
||||
|
||||
#ifndef GL_EXT_framebuffer_blit
|
||||
#define GL_EXT_framebuffer_blit 1
|
||||
|
||||
#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
|
||||
#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
|
||||
#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6
|
||||
#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA
|
||||
|
||||
GLAPI void GLAPIENTRY
|
||||
glBlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
|
||||
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
|
||||
GLbitfield mask, GLenum filter);
|
||||
|
||||
typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC)
|
||||
(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
|
||||
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
|
||||
GLbitfield mask, GLenum filter);
|
||||
|
||||
#endif /* GL_EXT_framebuffer_blit */
|
||||
|
||||
|
||||
|
||||
#ifndef GL_EXT_packed_depth_stencil
|
||||
#define GL_EXT_packed_depth_stencil 1
|
||||
|
||||
#define GL_DEPTH_STENCIL_EXT 0x84F9
|
||||
#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
|
||||
#define GL_DEPTH24_STENCIL8_EXT 0x88F0
|
||||
#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
|
||||
|
||||
#endif /* GL_EXT_packed_depth_stencil */
|
||||
|
||||
|
||||
/**
|
||||
** NOTE!!!!! If you add new functions to this file, or update
|
||||
** glext.h be sure to regenerate the gl_mangle.h file. See comments
|
||||
|
@@ -98,6 +98,7 @@
|
||||
#define glBlendFuncSeparateEXT MANGLE(BlendFuncSeparateEXT)
|
||||
#define glBlendFuncSeparateINGR MANGLE(BlendFuncSeparateINGR)
|
||||
#define glBlendFuncSeparate MANGLE(BlendFuncSeparate)
|
||||
#define glBlitFramebufferEXT MANGLE(BlitFramebufferEXT)
|
||||
#define glBufferDataARB MANGLE(BufferDataARB)
|
||||
#define glBufferData MANGLE(BufferData)
|
||||
#define glBufferSubDataARB MANGLE(BufferSubDataARB)
|
||||
@@ -273,7 +274,6 @@
|
||||
#define glDetailTexFuncSGIS MANGLE(DetailTexFuncSGIS)
|
||||
#define glDisableClientState MANGLE(DisableClientState)
|
||||
#define glDisable MANGLE(Disable)
|
||||
#define glDisableTraceMESA MANGLE(DisableTraceMESA)
|
||||
#define glDisableVariantClientStateEXT MANGLE(DisableVariantClientStateEXT)
|
||||
#define glDisableVertexAttribArrayARB MANGLE(DisableVertexAttribArrayARB)
|
||||
#define glDisableVertexAttribArray MANGLE(DisableVertexAttribArray)
|
||||
@@ -301,7 +301,6 @@
|
||||
#define glElementPointerATI MANGLE(ElementPointerATI)
|
||||
#define glEnableClientState MANGLE(EnableClientState)
|
||||
#define glEnable MANGLE(Enable)
|
||||
#define glEnableTraceMESA MANGLE(EnableTraceMESA)
|
||||
#define glEnableVariantClientStateEXT MANGLE(EnableVariantClientStateEXT)
|
||||
#define glEnableVertexAttribArrayARB MANGLE(EnableVertexAttribArrayARB)
|
||||
#define glEnableVertexAttribArray MANGLE(EnableVertexAttribArray)
|
||||
@@ -311,7 +310,6 @@
|
||||
#define glEndOcclusionQueryNV MANGLE(EndOcclusionQueryNV)
|
||||
#define glEndQueryARB MANGLE(EndQueryARB)
|
||||
#define glEndQuery MANGLE(EndQuery)
|
||||
#define glEndTraceMESA MANGLE(EndTraceMESA)
|
||||
#define glEndVertexShaderEXT MANGLE(EndVertexShaderEXT)
|
||||
#define glEvalCoord1d MANGLE(EvalCoord1d)
|
||||
#define glEvalCoord1dv MANGLE(EvalCoord1dv)
|
||||
@@ -780,7 +778,6 @@
|
||||
#define glMultTransposeMatrixf MANGLE(MultTransposeMatrixf)
|
||||
#define glNewList MANGLE(NewList)
|
||||
#define glNewObjectBufferATI MANGLE(NewObjectBufferATI)
|
||||
#define glNewTraceMESA MANGLE(NewTraceMESA)
|
||||
#define glNormal3b MANGLE(Normal3b)
|
||||
#define glNormal3bv MANGLE(Normal3bv)
|
||||
#define glNormal3d MANGLE(Normal3d)
|
||||
@@ -864,10 +861,12 @@
|
||||
#define glProgramEnvParameter4dvARB MANGLE(ProgramEnvParameter4dvARB)
|
||||
#define glProgramEnvParameter4fARB MANGLE(ProgramEnvParameter4fARB)
|
||||
#define glProgramEnvParameter4fvARB MANGLE(ProgramEnvParameter4fvARB)
|
||||
#define glProgramEnvParameters4fvEXT MANGLE(ProgramEnvParameters4fvEXT)
|
||||
#define glProgramLocalParameter4dARB MANGLE(ProgramLocalParameter4dARB)
|
||||
#define glProgramLocalParameter4dvARB MANGLE(ProgramLocalParameter4dvARB)
|
||||
#define glProgramLocalParameter4fARB MANGLE(ProgramLocalParameter4fARB)
|
||||
#define glProgramLocalParameter4fvARB MANGLE(ProgramLocalParameter4fvARB)
|
||||
#define glProgramLocalParameters4fvEXT MANGLE(ProgramLocalParameters4fvEXT)
|
||||
#define glProgramNamedParameter4dNV MANGLE(ProgramNamedParameter4dNV)
|
||||
#define glProgramNamedParameter4dvNV MANGLE(ProgramNamedParameter4dvNV)
|
||||
#define glProgramNamedParameter4fNV MANGLE(ProgramNamedParameter4fNV)
|
||||
@@ -920,6 +919,7 @@
|
||||
#define glRectsv MANGLE(Rectsv)
|
||||
#define glReferencePlaneSGIX MANGLE(ReferencePlaneSGIX)
|
||||
#define glRenderbufferStorageEXT MANGLE(RenderbufferStorageEXT)
|
||||
#define glRenderbufferStorageMultisampleEXT MANGLE(RenderbufferStorageMultisampleEXT)
|
||||
#define glRenderMode MANGLE(RenderMode)
|
||||
#define glReplacementCodePointerSUN MANGLE(ReplacementCodePointerSUN)
|
||||
#define glReplacementCodeubSUN MANGLE(ReplacementCodeubSUN)
|
||||
@@ -1019,6 +1019,7 @@
|
||||
#define glSpriteParameteriSGIX MANGLE(SpriteParameteriSGIX)
|
||||
#define glSpriteParameterivSGIX MANGLE(SpriteParameterivSGIX)
|
||||
#define glStartInstrumentsSGIX MANGLE(StartInstrumentsSGIX)
|
||||
#define glStencilClearTagEXT MANGLE(StencilClearTagEXT)
|
||||
#define glStencilFunc MANGLE(StencilFunc)
|
||||
#define glStencilFuncSeparateATI MANGLE(StencilFuncSeparateATI)
|
||||
#define glStencilFuncSeparate MANGLE(StencilFuncSeparate)
|
||||
@@ -1137,12 +1138,6 @@
|
||||
#define glTextureLightEXT MANGLE(TextureLightEXT)
|
||||
#define glTextureMaterialEXT MANGLE(TextureMaterialEXT)
|
||||
#define glTextureNormalEXT MANGLE(TextureNormalEXT)
|
||||
#define glTraceAssertAttribMESA MANGLE(TraceAssertAttribMESA)
|
||||
#define glTraceCommentMESA MANGLE(TraceCommentMESA)
|
||||
#define glTraceListMESA MANGLE(TraceListMESA)
|
||||
#define glTracePointerMESA MANGLE(TracePointerMESA)
|
||||
#define glTracePointerRangeMESA MANGLE(TracePointerRangeMESA)
|
||||
#define glTraceTextureMESA MANGLE(TraceTextureMESA)
|
||||
#define glTrackMatrixNV MANGLE(TrackMatrixNV)
|
||||
#define glTranslated MANGLE(Translated)
|
||||
#define glTranslatef MANGLE(Translatef)
|
||||
@@ -1180,10 +1175,16 @@
|
||||
#define glUniform4iv MANGLE(Uniform4iv)
|
||||
#define glUniformMatrix2fvARB MANGLE(UniformMatrix2fvARB)
|
||||
#define glUniformMatrix2fv MANGLE(UniformMatrix2fv)
|
||||
#define glUniformMatrix2x3fv MANGLE(UniformMatrix2x3fv)
|
||||
#define glUniformMatrix2x4fv MANGLE(UniformMatrix2x4fv)
|
||||
#define glUniformMatrix3fvARB MANGLE(UniformMatrix3fvARB)
|
||||
#define glUniformMatrix3fv MANGLE(UniformMatrix3fv)
|
||||
#define glUniformMatrix3x2fv MANGLE(UniformMatrix3x2fv)
|
||||
#define glUniformMatrix3x4fv MANGLE(UniformMatrix3x4fv)
|
||||
#define glUniformMatrix4fvARB MANGLE(UniformMatrix4fvARB)
|
||||
#define glUniformMatrix4fv MANGLE(UniformMatrix4fv)
|
||||
#define glUniformMatrix4x2fv MANGLE(UniformMatrix4x2fv)
|
||||
#define glUniformMatrix4x3fv MANGLE(UniformMatrix4x3fv)
|
||||
#define glUnlockArraysEXT MANGLE(UnlockArraysEXT)
|
||||
#define glUnmapBufferARB MANGLE(UnmapBufferARB)
|
||||
#define glUnmapBuffer MANGLE(UnmapBuffer)
|
||||
@@ -1474,6 +1475,5 @@
|
||||
#define glWindowPos4sMESA MANGLE(WindowPos4sMESA)
|
||||
#define glWindowPos4svMESA MANGLE(WindowPos4svMESA)
|
||||
#define glWriteMaskEXT MANGLE(WriteMaskEXT)
|
||||
gl.h:GLAPI void GLAPIENTRY
|
||||
|
||||
#endif /* GL_MANGLE_H */
|
||||
|
@@ -52,9 +52,9 @@ extern "C" {
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number, required by OpenGL ABI for Linux */
|
||||
/* glext.h last updated 2005/06/20 */
|
||||
/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
|
||||
#define GL_GLEXT_VERSION 29
|
||||
/* glext.h last updated 2006/08/30 */
|
||||
/* Current version at http://www.opengl.org/registry/ */
|
||||
#define GL_GLEXT_VERSION 34
|
||||
|
||||
#ifndef GL_VERSION_1_2
|
||||
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
|
||||
@@ -459,6 +459,32 @@ extern "C" {
|
||||
#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
|
||||
#endif
|
||||
|
||||
#ifndef GL_VERSION_2_1
|
||||
#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F
|
||||
#define GL_PIXEL_PACK_BUFFER 0x88EB
|
||||
#define GL_PIXEL_UNPACK_BUFFER 0x88EC
|
||||
#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
|
||||
#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
|
||||
#define GL_FLOAT_MAT2x3 0x8B65
|
||||
#define GL_FLOAT_MAT2x4 0x8B66
|
||||
#define GL_FLOAT_MAT3x2 0x8B67
|
||||
#define GL_FLOAT_MAT3x4 0x8B68
|
||||
#define GL_FLOAT_MAT4x2 0x8B69
|
||||
#define GL_FLOAT_MAT4x3 0x8B6A
|
||||
#define GL_SRGB 0x8C40
|
||||
#define GL_SRGB8 0x8C41
|
||||
#define GL_SRGB_ALPHA 0x8C42
|
||||
#define GL_SRGB8_ALPHA8 0x8C43
|
||||
#define GL_SLUMINANCE_ALPHA 0x8C44
|
||||
#define GL_SLUMINANCE8_ALPHA8 0x8C45
|
||||
#define GL_SLUMINANCE 0x8C46
|
||||
#define GL_SLUMINANCE8 0x8C47
|
||||
#define GL_COMPRESSED_SRGB 0x8C48
|
||||
#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
|
||||
#define GL_COMPRESSED_SLUMINANCE 0x8C4A
|
||||
#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_multitexture
|
||||
#define GL_TEXTURE0_ARB 0x84C0
|
||||
#define GL_TEXTURE1_ARB 0x84C1
|
||||
@@ -3038,6 +3064,64 @@ extern "C" {
|
||||
#ifndef GL_GREMEDY_string_marker
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_packed_depth_stencil
|
||||
#define GL_DEPTH_STENCIL_EXT 0x84F9
|
||||
#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
|
||||
#define GL_DEPTH24_STENCIL8_EXT 0x88F0
|
||||
#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_stencil_clear_tag
|
||||
#define GL_STENCIL_TAG_BITS_EXT 0x88F2
|
||||
#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_sRGB
|
||||
#define GL_SRGB_EXT 0x8C40
|
||||
#define GL_SRGB8_EXT 0x8C41
|
||||
#define GL_SRGB_ALPHA_EXT 0x8C42
|
||||
#define GL_SRGB8_ALPHA8_EXT 0x8C43
|
||||
#define GL_SLUMINANCE_ALPHA_EXT 0x8C44
|
||||
#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45
|
||||
#define GL_SLUMINANCE_EXT 0x8C46
|
||||
#define GL_SLUMINANCE8_EXT 0x8C47
|
||||
#define GL_COMPRESSED_SRGB_EXT 0x8C48
|
||||
#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49
|
||||
#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A
|
||||
#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B
|
||||
#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
|
||||
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
|
||||
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
|
||||
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_framebuffer_blit
|
||||
#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
|
||||
#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
|
||||
#define GL_READ_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT
|
||||
#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CAA
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_framebuffer_multisample
|
||||
#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
|
||||
#endif
|
||||
|
||||
#ifndef GL_MESAX_texture_stack
|
||||
#define GL_TEXTURE_1D_STACK_MESAX 0x8759
|
||||
#define GL_TEXTURE_2D_STACK_MESAX 0x875A
|
||||
#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B
|
||||
#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C
|
||||
#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D
|
||||
#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_timer_query
|
||||
#define GL_TIME_ELAPSED_EXT 0x88BF
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_gpu_program_parameters
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
@@ -3074,6 +3158,48 @@ typedef unsigned short GLhalfARB;
|
||||
typedef unsigned short GLhalfNV;
|
||||
#endif
|
||||
|
||||
#ifndef GLEXT_64_TYPES_DEFINED
|
||||
/* This code block is duplicated in glext.h, so must be protected */
|
||||
#define GLEXT_64_TYPES_DEFINED
|
||||
/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
|
||||
/* (as used in the GLX_OML_sync_control extension). */
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#include <inttypes.h>
|
||||
#elif defined(__sun__)
|
||||
#include <inttypes.h>
|
||||
#if defined(__STDC__)
|
||||
#if defined(__arch64__)
|
||||
typedef long int int64_t;
|
||||
typedef unsigned long int uint64_t;
|
||||
#else
|
||||
typedef long long int int64_t;
|
||||
typedef unsigned long long int uint64_t;
|
||||
#endif /* __arch64__ */
|
||||
#endif /* __STDC__ */
|
||||
#elif defined( __VMS )
|
||||
#include <inttypes.h>
|
||||
#elif defined(__SCO__) || defined(__USLC__)
|
||||
#include <stdint.h>
|
||||
#elif defined(__UNIXOS2__) || defined(__SOL64__)
|
||||
typedef long int int32_t;
|
||||
typedef long long int int64_t;
|
||||
typedef unsigned long long int uint64_t;
|
||||
#elif defined(WIN32) && defined(_MSC_VER)
|
||||
typedef long int int32_t;
|
||||
typedef __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#elif defined(WIN32) && defined(__GNUC__)
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <inttypes.h> /* Fallback option */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_timer_query
|
||||
typedef int64_t GLint64EXT;
|
||||
typedef uint64_t GLuint64EXT;
|
||||
#endif
|
||||
|
||||
#ifndef GL_VERSION_1_2
|
||||
#define GL_VERSION_1_2 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
@@ -3586,6 +3712,24 @@ typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort
|
||||
typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
|
||||
#endif
|
||||
|
||||
#ifndef GL_VERSION_2_1
|
||||
#define GL_VERSION_2_1 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glUniformMatrix2x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
|
||||
GLAPI void APIENTRY glUniformMatrix3x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
|
||||
GLAPI void APIENTRY glUniformMatrix2x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
|
||||
GLAPI void APIENTRY glUniformMatrix4x2fv (GLint, GLsizei, GLboolean, const GLfloat *);
|
||||
GLAPI void APIENTRY glUniformMatrix3x4fv (GLint, GLsizei, GLboolean, const GLfloat *);
|
||||
GLAPI void APIENTRY glUniformMatrix4x3fv (GLint, GLsizei, GLboolean, const GLfloat *);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_multitexture
|
||||
#define GL_ARB_multitexture 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
@@ -4293,8 +4437,8 @@ typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum f
|
||||
typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_color_matrix
|
||||
#define GL_EXT_color_matrix 1
|
||||
#ifndef GL_SGI_color_matrix
|
||||
#define GL_SGI_color_matrix 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_SGI_color_table
|
||||
@@ -6487,6 +6631,62 @@ GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *);
|
||||
typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_packed_depth_stencil
|
||||
#define GL_EXT_packed_depth_stencil 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_stencil_clear_tag
|
||||
#define GL_EXT_stencil_clear_tag 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glStencilClearTagEXT (GLsizei, GLuint);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_sRGB
|
||||
#define GL_EXT_texture_sRGB 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_framebuffer_blit
|
||||
#define GL_EXT_framebuffer_blit 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glBlitFramebufferEXT (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_framebuffer_multisample
|
||||
#define GL_EXT_framebuffer_multisample 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
#endif
|
||||
|
||||
#ifndef GL_MESAX_texture_stack
|
||||
#define GL_MESAX_texture_stack 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_timer_query
|
||||
#define GL_EXT_timer_query 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint, GLenum, GLint64EXT *);
|
||||
GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint, GLenum, GLuint64EXT *);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
|
||||
typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_gpu_program_parameters
|
||||
#define GL_EXT_gpu_program_parameters 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
|
||||
GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum, GLuint, GLsizei, const GLfloat *);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
|
||||
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -49,6 +49,7 @@ typedef struct GLFBDevContextRec *GLFBDevContextPtr;
|
||||
#define GLFBDEV_STENCIL_SIZE 103
|
||||
#define GLFBDEV_ACCUM_SIZE 104
|
||||
#define GLFBDEV_LEVEL 105
|
||||
#define GLFBDEV_MULTISAMPLE 106
|
||||
#define GLFBDEV_NONE 0
|
||||
|
||||
/* For glFBDevGetString */
|
||||
|
@@ -1,21 +1,25 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 4.1
|
||||
* 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.
|
||||
* Version: 6.5
|
||||
*
|
||||
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
@@ -48,6 +52,28 @@
|
||||
#define glXGetVideoSyncSGI mglXGetVideoSyncSGI
|
||||
#define glXWaitVideoSyncSGI mglXWaitVideoSyncSGI
|
||||
|
||||
/* GLX 1.2 */
|
||||
#define glXGetCurrentDisplay mglXGetCurrentDisplay
|
||||
|
||||
/* GLX 1.3 */
|
||||
#define glXChooseFBConfig mglXChooseFBConfig
|
||||
#define glXGetFBConfigAttrib mglXGetFBConfigAttrib
|
||||
#define glXGetFBConfigs mglXGetFBConfigs
|
||||
#define glXGetVisualFromFBConfig mglXGetVisualFromFBConfig
|
||||
#define glXCreateWindow mglXCreateWindow
|
||||
#define glXDestroyWindow mglXDestroyWindow
|
||||
#define glXCreatePixmap mglXCreatePixmap
|
||||
#define glXDestroyPixmap mglXDestroyPixmap
|
||||
#define glXCreatePbuffer mglXCreatePbuffer
|
||||
#define glXDestroyPbuffer mglXDestroyPbuffer
|
||||
#define glXQueryDrawable mglXQueryDrawable
|
||||
#define glXCreateNewContext mglXCreateNewContext
|
||||
#define glXMakeContextCurrent mglXMakeContextCurrent
|
||||
#define glXGetCurrentReadDrawable mglXGetCurrentReadDrawable
|
||||
#define glXQueryContext mglXQueryContext
|
||||
#define glXSelectEvent mglXSelectEvent
|
||||
#define glXGetSelectedEvent mglXGetSelectedEvent
|
||||
|
||||
/* GLX 1.4 */
|
||||
#define glXGetProcAddress mglXGetProcAddress
|
||||
|
||||
|
@@ -52,9 +52,9 @@ extern "C" {
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number, required by OpenGL ABI for Linux */
|
||||
/* glxext.h last updated 2004/07/26 */
|
||||
/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
|
||||
#define GLX_GLXEXT_VERSION 6
|
||||
/* glxext.h last updated 2006/08/30 */
|
||||
/* Current version at http://www.opengl.org/registry/ */
|
||||
#define GLX_GLXEXT_VERSION 14
|
||||
|
||||
#ifndef GLX_VERSION_1_3
|
||||
#define GLX_WINDOW_BIT 0x00000001
|
||||
@@ -128,6 +128,11 @@ extern "C" {
|
||||
#define GLX_SAMPLES_ARB 100001
|
||||
#endif
|
||||
|
||||
#ifndef GLX_ARB_fbconfig_float
|
||||
#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9
|
||||
#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIS_multisample
|
||||
#define GLX_SAMPLE_BUFFERS_SGIS 100000
|
||||
#define GLX_SAMPLES_SGIS 100001
|
||||
@@ -282,7 +287,11 @@ extern "C" {
|
||||
#ifndef GLX_OML_sync_control
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_hyperpipe_group
|
||||
#ifndef GLX_NV_float_buffer
|
||||
#define GLX_FLOAT_COMPONENTS_NV 0x20B0
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_hyperpipe
|
||||
#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80
|
||||
#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91
|
||||
#define GLX_BAD_HYPERPIPE_SGIX 92
|
||||
@@ -331,24 +340,37 @@ typedef struct {
|
||||
} GLXBufferClobberEventSGIX;
|
||||
#endif
|
||||
|
||||
#if defined(__sun__) || defined(__osf__)
|
||||
#ifndef GLEXT_64_TYPES_DEFINED
|
||||
/* This code block is duplicated in glxext.h, so must be protected */
|
||||
#define GLEXT_64_TYPES_DEFINED
|
||||
/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
|
||||
/* (as used in the GLX_OML_sync_control extension). */
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#include <inttypes.h>
|
||||
#elif defined(__sun__)
|
||||
#include <inttypes.h>
|
||||
#if defined(__STDC__)
|
||||
#if defined(__arch64__)
|
||||
typedef long int int64_t;
|
||||
typedef unsigned long int uint64_t;
|
||||
#else
|
||||
typedef long long int int64_t;
|
||||
typedef long long int int64_t;
|
||||
typedef unsigned long long int uint64_t;
|
||||
#endif /* __arch64__ */
|
||||
#endif /* __STDC__ */
|
||||
#elif defined(__UNIXOS2__) || defined(__SOL64__)
|
||||
typedef long int int32_t;
|
||||
typedef long long int int64_t;
|
||||
#elif defined( __VMS )
|
||||
#include <inttypes.h>
|
||||
#elif defined(__SCO__) || defined(__USLC__)
|
||||
#include <stdint.h>
|
||||
#elif defined(__UNIXOS2__) || defined(__SOL64__)
|
||||
typedef long int int32_t;
|
||||
typedef long long int int64_t;
|
||||
typedef unsigned long long int uint64_t;
|
||||
#elif defined(WIN32) && defined(__GNUC__)
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <inttypes.h> /* Fallback option */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef GLX_VERSION_1_3
|
||||
@@ -413,6 +435,10 @@ typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procNam
|
||||
#define GLX_ARB_multisample 1
|
||||
#endif
|
||||
|
||||
#ifndef GLX_ARB_fbconfig_float
|
||||
#define GLX_ARB_fbconfig_float 1
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIS_multisample
|
||||
#define GLX_SGIS_multisample 1
|
||||
#endif
|
||||
@@ -631,8 +657,12 @@ typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, i
|
||||
typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_hyperpipe_group
|
||||
#define GLX_SGIX_hyperpipe_group 1
|
||||
#ifndef GLX_NV_float_buffer
|
||||
#define GLX_NV_float_buffer 1
|
||||
#endif
|
||||
|
||||
#ifndef GLX_SGIX_hyperpipe
|
||||
#define GLX_SGIX_hyperpipe 1
|
||||
|
||||
typedef struct {
|
||||
char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX];
|
||||
@@ -686,6 +716,7 @@ extern unsigned int glXGetAGPOffsetMESA (const void *);
|
||||
typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -1,4 +1,3 @@
|
||||
/* $XFree86: xc/lib/GL/include/GL/internal/glcore.h,v 1.7 2001/03/25 05:32:00 tsi Exp $ */
|
||||
#ifndef __gl_core_h_
|
||||
#define __gl_core_h_
|
||||
|
||||
@@ -37,9 +36,7 @@
|
||||
**
|
||||
*/
|
||||
|
||||
#ifndef XFree86LOADER
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef CAPI
|
||||
#undef CAPI
|
||||
@@ -64,12 +61,18 @@ typedef struct __GLinterfaceRec __GLinterface;
|
||||
** and used by the "operating system".
|
||||
*/
|
||||
|
||||
/*
|
||||
** Mode and limit information for a context. This information is
|
||||
** kept around in the context so that values can be used during
|
||||
** command execution, and for returning information about the
|
||||
** context to the application.
|
||||
*/
|
||||
/**
|
||||
* Mode and limit information for a context. This information is
|
||||
* kept around in the context so that values can be used during
|
||||
* command execution, and for returning information about the
|
||||
* context to the application.
|
||||
*
|
||||
* Instances of this structure are shared by the driver and the loader. To
|
||||
* maintain binary compatability, new fields \b must be added only to the
|
||||
* end of the structure.
|
||||
*
|
||||
* \sa _gl_context_modes_create
|
||||
*/
|
||||
typedef struct __GLcontextModesRec {
|
||||
struct __GLcontextModesRec * next;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -25,6 +25,7 @@ PROGS = \
|
||||
fire \
|
||||
fogcoord \
|
||||
fplight \
|
||||
fslight \
|
||||
gamma \
|
||||
gearbox \
|
||||
gears \
|
||||
@@ -47,6 +48,7 @@ PROGS = \
|
||||
renormal \
|
||||
shadowtex \
|
||||
singlebuffer \
|
||||
streaming_rect \
|
||||
spectex \
|
||||
spriteblast \
|
||||
stex3d \
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glut.h>
|
||||
#include <GL/glext.h>
|
||||
@@ -56,7 +57,16 @@ static PFNGLATTACHOBJECTARBPROC glAttachObjectARB = NULL;
|
||||
static PFNGLLINKPROGRAMARBPROC glLinkProgramARB = NULL;
|
||||
static PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB = NULL;
|
||||
static PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB = NULL;
|
||||
static PFNGLUNIFORM4FVARBPROC glUniform4fvARB = NULL;
|
||||
static PFNGLUNIFORM3FVARBPROC glUniform3fvARB = NULL;
|
||||
static PFNGLUNIFORM3FVARBPROC glUniform4fvARB = NULL;
|
||||
|
||||
static void normalize (GLfloat *dst, const GLfloat *src)
|
||||
{
|
||||
GLfloat len = sqrtf (src[0] * src[0] + src[1] * src[1] + src[2] * src[2]);
|
||||
dst[0] = src[0] / len;
|
||||
dst[1] = src[1] / len;
|
||||
dst[2] = src[2] / len;
|
||||
}
|
||||
|
||||
static void Redisplay (void)
|
||||
{
|
||||
@@ -64,8 +74,11 @@ static void Redisplay (void)
|
||||
|
||||
if (pixelLight)
|
||||
{
|
||||
GLfloat vec[3];
|
||||
|
||||
glUseProgramObjectARB (program);
|
||||
glUniform4fvARB (uLightPos, 1, lightPos);
|
||||
normalize (vec, lightPos);
|
||||
glUniform3fvARB (uLightPos, 1, vec);
|
||||
glDisable(GL_LIGHTING);
|
||||
}
|
||||
else
|
||||
@@ -186,24 +199,25 @@ static void SpecialKey (int key, int x, int y)
|
||||
|
||||
static void Init (void)
|
||||
{
|
||||
static const char *fragShaderText =
|
||||
"uniform vec4 lightPos;\n"
|
||||
"uniform vec4 diffuse;\n"
|
||||
"uniform vec4 specular;\n"
|
||||
"void main () {\n"
|
||||
" // Compute dot product of light direction and normal vector\n"
|
||||
" float dotProd;\n"
|
||||
" dotProd = clamp (dot (normalize (lightPos).xyz, normalize (gl_TexCoord[0]).xyz), 0.0, 1.0);\n"
|
||||
" // Compute diffuse and specular contributions\n"
|
||||
" gl_FragColor = diffuse * dotProd + specular * pow (dotProd, 20.0);\n"
|
||||
"}\n"
|
||||
;
|
||||
static const char *vertShaderText =
|
||||
"void main () {\n"
|
||||
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n"
|
||||
" gl_TexCoord[0] = vec4 (gl_NormalMatrix * gl_Normal, 1.0);\n"
|
||||
"}\n"
|
||||
;
|
||||
static const char *fragShaderText =
|
||||
"uniform vec3 lightPos;\n"
|
||||
"uniform vec4 diffuse;\n"
|
||||
"uniform vec4 specular;\n"
|
||||
"varying vec3 normal;\n"
|
||||
"void main () {\n"
|
||||
" // Compute dot product of light direction and normal vector\n"
|
||||
" float dotProd = max (dot (lightPos, normalize (normal)), 0.0);\n"
|
||||
" // Compute diffuse and specular contributions\n"
|
||||
" gl_FragColor = diffuse * dotProd + specular * pow (dotProd, 20.0);\n"
|
||||
"}\n"
|
||||
;
|
||||
static const char *vertShaderText =
|
||||
"varying vec3 normal;\n"
|
||||
"void main () {\n"
|
||||
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n"
|
||||
" normal = gl_NormalMatrix * gl_Normal;\n"
|
||||
"}\n"
|
||||
;
|
||||
|
||||
if (!glutExtensionSupported ("GL_ARB_fragment_shader"))
|
||||
{
|
||||
@@ -234,7 +248,8 @@ static void Init (void)
|
||||
glLinkProgramARB = (PFNGLLINKPROGRAMARBPROC) GETPROCADDRESS ("glLinkProgramARB");
|
||||
glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC) GETPROCADDRESS ("glUseProgramObjectARB");
|
||||
glGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC) GETPROCADDRESS ("glGetUniformLocationARB");
|
||||
glUniform4fvARB = (PFNGLUNIFORM4FVARBPROC) GETPROCADDRESS ("glUniform4fvARB");
|
||||
glUniform3fvARB = (PFNGLUNIFORM3FVARBPROC) GETPROCADDRESS ("glUniform3fvARB");
|
||||
glUniform4fvARB = (PFNGLUNIFORM3FVARBPROC) GETPROCADDRESS ("glUniform4fvARB");
|
||||
|
||||
fragShader = glCreateShaderObjectARB (GL_FRAGMENT_SHADER_ARB);
|
||||
glShaderSourceARB (fragShader, 1, &fragShaderText, NULL);
|
||||
@@ -254,8 +269,8 @@ static void Init (void)
|
||||
uDiffuse = glGetUniformLocationARB (program, "diffuse");
|
||||
uSpecular = glGetUniformLocationARB (program, "specular");
|
||||
|
||||
glUniform4fvARB (uDiffuse, 1, diffuse);
|
||||
glUniform4fvARB (uSpecular, 1, specular);
|
||||
glUniform4fvARB (uDiffuse, 1, diffuse);
|
||||
glUniform4fvARB (uSpecular, 1, specular);
|
||||
|
||||
glClearColor (0.3f, 0.3f, 0.3f, 0.0f);
|
||||
glEnable (GL_DEPTH_TEST);
|
||||
|
@@ -454,6 +454,7 @@ static void usage(void)
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit(&argc, argv);
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(600, 500);
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
|
||||
|
334
progs/demos/fslight.c
Normal file
334
progs/demos/fslight.c
Normal file
@@ -0,0 +1,334 @@
|
||||
/**
|
||||
* Test OpenGL 2.0 vertex/fragment shaders.
|
||||
* Brian Paul
|
||||
* 1 November 2006
|
||||
*
|
||||
* Based on ARB version by:
|
||||
* Michal Krol
|
||||
* 20 February 2006
|
||||
*
|
||||
* Based on the original demo by:
|
||||
* Brian Paul
|
||||
* 17 April 2003
|
||||
*/
|
||||
|
||||
#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>
|
||||
|
||||
static GLfloat diffuse[4] = { 0.5f, 0.5f, 1.0f, 1.0f };
|
||||
static GLfloat specular[4] = { 0.8f, 0.8f, 0.8f, 1.0f };
|
||||
static GLfloat lightPos[4] = { 0.0f, 10.0f, 20.0f, 1.0f };
|
||||
static GLfloat delta = 1.0f;
|
||||
|
||||
static GLuint fragShader;
|
||||
static GLuint vertShader;
|
||||
static GLuint program;
|
||||
|
||||
static GLint uLightPos;
|
||||
static GLint uDiffuse;
|
||||
static GLint uSpecular;
|
||||
|
||||
static GLint win = 0;
|
||||
static GLboolean anim = GL_TRUE;
|
||||
static GLboolean wire = GL_FALSE;
|
||||
static GLboolean pixelLight = GL_TRUE;
|
||||
|
||||
static GLint t0 = 0;
|
||||
static GLint frames = 0;
|
||||
|
||||
static GLfloat xRot = 0.0f, yRot = 0.0f;
|
||||
|
||||
static PFNGLCREATESHADERPROC glCreateShader_func = NULL;
|
||||
static PFNGLSHADERSOURCEPROC glShaderSource_func = NULL;
|
||||
static PFNGLGETSHADERSOURCEPROC glGetShaderSource_func = NULL;
|
||||
static PFNGLCOMPILESHADERPROC glCompileShader_func = NULL;
|
||||
static PFNGLCREATEPROGRAMPROC glCreateProgram_func = NULL;
|
||||
static PFNGLDELETEPROGRAMPROC glDeleteProgram_func = NULL;
|
||||
static PFNGLDELETESHADERPROC glDeleteShader_func = NULL;
|
||||
static PFNGLATTACHSHADERPROC glAttachShader_func = NULL;
|
||||
static PFNGLLINKPROGRAMPROC glLinkProgram_func = NULL;
|
||||
static PFNGLUSEPROGRAMPROC glUseProgram_func = NULL;
|
||||
static PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation_func = NULL;
|
||||
static PFNGLISPROGRAMPROC glIsProgram_func = NULL;
|
||||
static PFNGLISSHADERPROC glIsShader_func = NULL;
|
||||
static PFNGLUNIFORM3FVPROC glUniform3fv_func = NULL;
|
||||
static PFNGLUNIFORM3FVPROC glUniform4fv_func = NULL;
|
||||
|
||||
|
||||
|
||||
static void
|
||||
normalize(GLfloat *dst, const GLfloat *src)
|
||||
{
|
||||
GLfloat len = sqrtf(src[0] * src[0] + src[1] * src[1] + src[2] * src[2]);
|
||||
dst[0] = src[0] / len;
|
||||
dst[1] = src[1] / len;
|
||||
dst[2] = src[2] / len;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
Redisplay(void)
|
||||
{
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
if (pixelLight) {
|
||||
GLfloat vec[3];
|
||||
glUseProgram_func(program);
|
||||
normalize(vec, lightPos);
|
||||
glUniform3fv_func(uLightPos, 1, vec);
|
||||
glDisable(GL_LIGHTING);
|
||||
}
|
||||
else {
|
||||
glUseProgram_func(0);
|
||||
glLightfv(GL_LIGHT0, GL_POSITION, lightPos);
|
||||
glEnable(GL_LIGHTING);
|
||||
}
|
||||
|
||||
glPushMatrix();
|
||||
glRotatef(xRot, 1.0f, 0.0f, 0.0f);
|
||||
glRotatef(yRot, 0.0f, 1.0f, 0.0f);
|
||||
glutSolidSphere(2.0, 10, 5);
|
||||
glPopMatrix();
|
||||
|
||||
glutSwapBuffers();
|
||||
frames++;
|
||||
|
||||
if (anim) {
|
||||
GLint t = glutGet(GLUT_ELAPSED_TIME);
|
||||
if (t - t0 >= 5000) {
|
||||
GLfloat seconds =(GLfloat)(t - t0) / 1000.0f;
|
||||
GLfloat fps = frames / seconds;
|
||||
printf("%d frames in %6.3f seconds = %6.3f FPS\n",
|
||||
frames, seconds, fps);
|
||||
t0 = t;
|
||||
frames = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
Idle(void)
|
||||
{
|
||||
lightPos[0] += delta;
|
||||
if (lightPos[0] > 25.0f || lightPos[0] < -25.0f)
|
||||
delta = -delta;
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
Reshape(int width, int height)
|
||||
{
|
||||
glViewport(0, 0, width, height);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
glTranslatef(0.0f, 0.0f, -15.0f);
|
||||
}
|
||||
|
||||
|
||||
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 ' ':
|
||||
case 'a':
|
||||
anim = !anim;
|
||||
if (anim)
|
||||
glutIdleFunc(Idle);
|
||||
else
|
||||
glutIdleFunc(NULL);
|
||||
break;
|
||||
case 'x':
|
||||
lightPos[0] -= 1.0f;
|
||||
break;
|
||||
case 'X':
|
||||
lightPos[0] += 1.0f;
|
||||
break;
|
||||
case 'w':
|
||||
wire = !wire;
|
||||
if (wire)
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||
else
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
break;
|
||||
case 'p':
|
||||
pixelLight = !pixelLight;
|
||||
if (pixelLight)
|
||||
printf("Per-pixel lighting\n");
|
||||
else
|
||||
printf("Conventional lighting\n");
|
||||
break;
|
||||
case 27:
|
||||
CleanUp();
|
||||
exit(0);
|
||||
break;
|
||||
}
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
SpecialKey(int key, int x, int y)
|
||||
{
|
||||
const GLfloat step = 3.0f;
|
||||
|
||||
(void) x;
|
||||
(void) y;
|
||||
|
||||
switch(key) {
|
||||
case GLUT_KEY_UP:
|
||||
xRot -= step;
|
||||
break;
|
||||
case GLUT_KEY_DOWN:
|
||||
xRot += step;
|
||||
break;
|
||||
case GLUT_KEY_LEFT:
|
||||
yRot -= step;
|
||||
break;
|
||||
case GLUT_KEY_RIGHT:
|
||||
yRot += step;
|
||||
break;
|
||||
}
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
Init(void)
|
||||
{
|
||||
static const char *fragShaderText =
|
||||
"uniform vec3 lightPos;\n"
|
||||
"uniform vec4 diffuse;\n"
|
||||
"uniform vec4 specular;\n"
|
||||
"varying vec3 normal;\n"
|
||||
"void main() {\n"
|
||||
" // Compute dot product of light direction and normal vector\n"
|
||||
" float dotProd = max(dot(lightPos, normalize(normal)), 0.0);\n"
|
||||
" // Compute diffuse and specular contributions\n"
|
||||
" gl_FragColor = diffuse * dotProd + specular * pow(dotProd, 20.0);\n"
|
||||
"}\n";
|
||||
static const char *vertShaderText =
|
||||
"varying vec3 normal;\n"
|
||||
"void main() {\n"
|
||||
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n"
|
||||
" normal = gl_NormalMatrix * gl_Normal;\n"
|
||||
"}\n";
|
||||
|
||||
|
||||
const char *version;
|
||||
|
||||
version = (const char *) glGetString(GL_VERSION);
|
||||
if (version[0] != '2' || version[1] != '.') {
|
||||
printf("Warning: this program expects OpenGL 2.0\n");
|
||||
/*exit(1);*/
|
||||
}
|
||||
|
||||
|
||||
glCreateShader_func = (PFNGLCREATESHADERPROC) glutGetProcAddress("glCreateShader");
|
||||
glDeleteShader_func = (PFNGLDELETESHADERPROC) glutGetProcAddress("glDeleteShader");
|
||||
glDeleteProgram_func = (PFNGLDELETEPROGRAMPROC) glutGetProcAddress("glDeleteProgram");
|
||||
glShaderSource_func = (PFNGLSHADERSOURCEPROC) glutGetProcAddress("glShaderSource");
|
||||
glGetShaderSource_func = (PFNGLGETSHADERSOURCEPROC) glutGetProcAddress("glGetShaderSource");
|
||||
glCompileShader_func = (PFNGLCOMPILESHADERPROC) glutGetProcAddress("glCompileShader");
|
||||
glCreateProgram_func = (PFNGLCREATEPROGRAMPROC) glutGetProcAddress("glCreateProgram");
|
||||
glAttachShader_func = (PFNGLATTACHSHADERPROC) glutGetProcAddress("glAttachShader");
|
||||
glLinkProgram_func = (PFNGLLINKPROGRAMPROC) glutGetProcAddress("glLinkProgram");
|
||||
glUseProgram_func = (PFNGLUSEPROGRAMPROC) glutGetProcAddress("glUseProgram");
|
||||
glGetUniformLocation_func = (PFNGLGETUNIFORMLOCATIONPROC) glutGetProcAddress("glGetUniformLocation");
|
||||
glIsProgram_func = (PFNGLISPROGRAMPROC) glutGetProcAddress("glIsProgram");
|
||||
glIsShader_func = (PFNGLISSHADERPROC) glutGetProcAddress("glIsShader");
|
||||
glUniform3fv_func = (PFNGLUNIFORM3FVPROC) glutGetProcAddress("glUniform3fv");
|
||||
glUniform4fv_func = (PFNGLUNIFORM3FVPROC) glutGetProcAddress("glUniform4fv");
|
||||
|
||||
fragShader = glCreateShader_func(GL_FRAGMENT_SHADER);
|
||||
glShaderSource_func(fragShader, 1, &fragShaderText, NULL);
|
||||
glCompileShader_func(fragShader);
|
||||
|
||||
vertShader = glCreateShader_func(GL_VERTEX_SHADER);
|
||||
glShaderSource_func(vertShader, 1, &vertShaderText, NULL);
|
||||
glCompileShader_func(vertShader);
|
||||
|
||||
program = glCreateProgram_func();
|
||||
glAttachShader_func(program, fragShader);
|
||||
glAttachShader_func(program, vertShader);
|
||||
glLinkProgram_func(program);
|
||||
glUseProgram_func(program);
|
||||
|
||||
uLightPos = glGetUniformLocation_func(program, "lightPos");
|
||||
uDiffuse = glGetUniformLocation_func(program, "diffuse");
|
||||
uSpecular = glGetUniformLocation_func(program, "specular");
|
||||
|
||||
glUniform4fv_func(uDiffuse, 1, diffuse);
|
||||
glUniform4fv_func(uSpecular, 1, specular);
|
||||
|
||||
glClearColor(0.3f, 0.3f, 0.3f, 0.0f);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glEnable(GL_LIGHT0);
|
||||
glEnable(GL_LIGHTING);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, diffuse);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, specular);
|
||||
glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 20.0f);
|
||||
|
||||
printf("GL_RENDERER = %s\n",(const char *) glGetString(GL_RENDERER));
|
||||
printf("Press p to toggle between per-pixel and per-vertex lighting\n");
|
||||
|
||||
/* test glGetShaderSource() */
|
||||
{
|
||||
GLsizei len = strlen(fragShaderText) + 1;
|
||||
GLsizei lenOut;
|
||||
GLchar *src =(GLchar *) malloc(len * sizeof(GLchar));
|
||||
glGetShaderSource_func(fragShader, 0, NULL, src);
|
||||
glGetShaderSource_func(fragShader, len, &lenOut, src);
|
||||
assert(len == lenOut + 1);
|
||||
assert(strcmp(src, fragShaderText) == 0);
|
||||
free(src);
|
||||
}
|
||||
|
||||
assert(glIsProgram_func(program));
|
||||
assert(glIsShader_func(fragShader));
|
||||
assert(glIsShader_func(vertShader));
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
glutInit(&argc, argv);
|
||||
glutInitWindowPosition( 0, 0);
|
||||
glutInitWindowSize(200, 200);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||
win = glutCreateWindow(argv[0]);
|
||||
glutReshapeFunc(Reshape);
|
||||
glutKeyboardFunc(Key);
|
||||
glutSpecialFunc(SpecialKey);
|
||||
glutDisplayFunc(Redisplay);
|
||||
if (anim)
|
||||
glutIdleFunc(Idle);
|
||||
Init();
|
||||
glutMainLoop();
|
||||
return 0;
|
||||
}
|
||||
|
@@ -471,6 +471,11 @@ main(int argc, char **argv)
|
||||
glutAddMenuEntry("Quit", 666);
|
||||
glutAttachMenu(GLUT_RIGHT_BUTTON);
|
||||
|
||||
if (!glutExtensionSupported("GL_ARB_point_parameters")) {
|
||||
fprintf(stderr, "Sorry, GL_ARB_point_parameters is not supported.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
glShadeModel(GL_FLAT);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glEnable(GL_POINT_SMOOTH);
|
||||
|
@@ -29,33 +29,32 @@ static GLboolean ScaleAndBias = GL_FALSE;
|
||||
static GLboolean Benchmark = GL_FALSE;
|
||||
static GLubyte *TempImage = NULL;
|
||||
|
||||
#if 0
|
||||
#define COMBO 1
|
||||
#if COMBO == 0
|
||||
#define ReadFormat ImgFormat
|
||||
#define ReadType GL_UNSIGNED_BYTE
|
||||
#endif
|
||||
#if 1
|
||||
#elif COMBO == 1
|
||||
static GLenum ReadFormat = GL_RGBA;
|
||||
static GLenum ReadType = GL_UNSIGNED_BYTE;
|
||||
#endif
|
||||
#if 0
|
||||
#elif COMBO == 2
|
||||
static GLenum ReadFormat = GL_RGB;
|
||||
static GLenum ReadType = GL_UNSIGNED_BYTE;
|
||||
#endif
|
||||
#if 0
|
||||
#elif COMBO == 3
|
||||
static GLenum ReadFormat = GL_RGB;
|
||||
static GLenum ReadType = GL_UNSIGNED_SHORT_5_6_5;
|
||||
#endif
|
||||
#if 0
|
||||
#elif COMBO == 4
|
||||
static GLenum ReadFormat = GL_RGBA;
|
||||
static GLenum ReadType = GL_UNSIGNED_SHORT_1_5_5_5_REV;
|
||||
#endif
|
||||
#if 0
|
||||
#elif COMBO == 5
|
||||
static GLenum ReadFormat = GL_BGRA;
|
||||
static GLenum ReadType = GL_UNSIGNED_SHORT_5_5_5_1;
|
||||
#endif
|
||||
#if 0
|
||||
#elif COMBO == 6
|
||||
static GLenum ReadFormat = GL_BGRA;
|
||||
static GLenum ReadType = GL_UNSIGNED_SHORT_4_4_4_4_REV;
|
||||
#elif COMBO == 7
|
||||
static GLenum ReadFormat = GL_RGBA;
|
||||
static GLenum ReadType = GL_HALF_FLOAT_ARB;
|
||||
#undef GL_OES_read_format
|
||||
#endif
|
||||
|
||||
|
||||
@@ -313,8 +312,10 @@ Init( GLboolean ciMode )
|
||||
|
||||
Reset();
|
||||
|
||||
/* allocate an extra 1KB in case we're tinkering with pack alignment */
|
||||
TempImage = (GLubyte *) malloc(ImgWidth * ImgHeight * 4 * sizeof(GLubyte)
|
||||
/* allocate large TempImage to store and image data type, plus an
|
||||
* extra 1KB in case we're tinkering with pack alignment.
|
||||
*/
|
||||
TempImage = (GLubyte *) malloc(ImgWidth * ImgHeight * 4 * 4
|
||||
+ 1000);
|
||||
assert(TempImage);
|
||||
}
|
||||
|
@@ -537,6 +537,9 @@ main(int argc, char **argv)
|
||||
glutAddMenuEntry("Quit", 666);
|
||||
glutAttachMenu(GLUT_RIGHT_BUTTON);
|
||||
|
||||
makePointList();
|
||||
makeSprite();
|
||||
|
||||
glShadeModel(GL_FLAT);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glEnable(GL_POINT_SMOOTH);
|
||||
@@ -546,9 +549,6 @@ main(int argc, char **argv)
|
||||
glPointParameterfvARB(GL_POINT_DISTANCE_ATTENUATION_ARB, theQuad);
|
||||
#endif
|
||||
|
||||
makePointList();
|
||||
makeSprite();
|
||||
|
||||
glutMainLoop();
|
||||
return 0; /* ANSI C requires main to return int. */
|
||||
}
|
||||
|
322
progs/demos/streaming_rect.c
Normal file
322
progs/demos/streaming_rect.c
Normal file
@@ -0,0 +1,322 @@
|
||||
|
||||
/*
|
||||
* GL_ARB_multitexture demo
|
||||
*
|
||||
* Command line options:
|
||||
* -info print GL implementation information
|
||||
*
|
||||
*
|
||||
* Brian Paul November 1998 This program is in the public domain.
|
||||
* Modified on 12 Feb 2002 for > 2 texture units.
|
||||
*/
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#include "readtex.h"
|
||||
|
||||
|
||||
#define ANIMATE 10
|
||||
#define PBO 11
|
||||
#define QUIT 100
|
||||
|
||||
static GLboolean Animate = GL_TRUE;
|
||||
static GLboolean use_pbo = 1;
|
||||
static GLboolean whole_rect = 1;
|
||||
|
||||
static GLfloat Drift = 0.0;
|
||||
static GLfloat drift_increment = 1/255.0;
|
||||
static GLfloat Xrot = 20.0, Yrot = 30.0;
|
||||
|
||||
static GLuint Width = 1024;
|
||||
static GLuint Height = 512;
|
||||
|
||||
|
||||
static void Idle( void )
|
||||
{
|
||||
if (Animate) {
|
||||
|
||||
Drift += drift_increment;
|
||||
if (Drift >= 1.0)
|
||||
Drift = 0.0;
|
||||
|
||||
glutPostRedisplay();
|
||||
}
|
||||
}
|
||||
|
||||
static int max( int a, int b ) { return a > b ? a : b; }
|
||||
static int min( int a, int b ) { return a < b ? a : b; }
|
||||
|
||||
static void DrawObject()
|
||||
{
|
||||
GLint size = Width * Height * 4;
|
||||
|
||||
if (use_pbo) {
|
||||
/* XXX: This is extremely important - semantically makes the buffer
|
||||
* contents undefined, but in practice means that the driver can
|
||||
* release the old copy of the texture and allocate a new one
|
||||
* without waiting for outstanding rendering to complete.
|
||||
*/
|
||||
glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_EXT, size, NULL, GL_STREAM_DRAW_ARB);
|
||||
|
||||
{
|
||||
char *image = glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, GL_WRITE_ONLY_ARB);
|
||||
|
||||
printf("char %d\n", (unsigned char)(Drift * 255));
|
||||
|
||||
memset(image, size, (unsigned char)(Drift * 255));
|
||||
|
||||
glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT);
|
||||
}
|
||||
|
||||
|
||||
/* BGRA is required for most hardware paths:
|
||||
*/
|
||||
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, Width, Height, 0,
|
||||
GL_BGRA, GL_UNSIGNED_BYTE, NULL);
|
||||
}
|
||||
else {
|
||||
static char *image = NULL;
|
||||
|
||||
if (image == NULL)
|
||||
image = malloc(size);
|
||||
|
||||
memset(image, size, (unsigned char)(Drift * 255));
|
||||
|
||||
/* BGRA should be the fast path for regular uploads as well.
|
||||
*/
|
||||
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, Width, Height, 0,
|
||||
GL_BGRA, GL_UNSIGNED_BYTE, image);
|
||||
}
|
||||
|
||||
{
|
||||
int x,y,w,h;
|
||||
|
||||
if (whole_rect) {
|
||||
x = y = 0;
|
||||
w = Width;
|
||||
h = Height;
|
||||
}
|
||||
else {
|
||||
x = y = 0;
|
||||
w = min(10, Width);
|
||||
h = min(10, Height);
|
||||
}
|
||||
|
||||
glBegin(GL_QUADS);
|
||||
|
||||
glTexCoord2f( x, y);
|
||||
glVertex2f( x, y );
|
||||
|
||||
glTexCoord2f( x, y + h);
|
||||
glVertex2f( x, y + h);
|
||||
|
||||
glTexCoord2f( x + w + .5, y + h);
|
||||
glVertex2f( x + w, y + h );
|
||||
|
||||
glTexCoord2f( x + w, y + .5);
|
||||
glVertex2f( x + w, y );
|
||||
|
||||
glEnd();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void Display( void )
|
||||
{
|
||||
static GLint T0 = 0;
|
||||
static GLint Frames = 0;
|
||||
GLint t;
|
||||
|
||||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
|
||||
glPushMatrix();
|
||||
DrawObject();
|
||||
glPopMatrix();
|
||||
|
||||
glutSwapBuffers();
|
||||
|
||||
Frames++;
|
||||
|
||||
t = glutGet(GLUT_ELAPSED_TIME);
|
||||
if (t - T0 >= 1000) {
|
||||
GLfloat seconds = (t - T0) / 1000.0;
|
||||
|
||||
GLfloat fps = Frames / seconds;
|
||||
printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps);
|
||||
|
||||
drift_increment = 2.2 * seconds / Frames;
|
||||
T0 = t;
|
||||
Frames = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void Reshape( int width, int height )
|
||||
{
|
||||
glViewport( 0, 0, width, height );
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadIdentity();
|
||||
/* glFrustum( -1.0, 1.0, -1.0, 1.0, 10.0, 100.0 ); */
|
||||
gluOrtho2D( 0, width, height, 0 );
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glLoadIdentity();
|
||||
glTranslatef(0.375, 0.375, 0);
|
||||
}
|
||||
|
||||
|
||||
static void ModeMenu(int entry)
|
||||
{
|
||||
if (entry==ANIMATE) {
|
||||
Animate = !Animate;
|
||||
}
|
||||
else if (entry==PBO) {
|
||||
use_pbo = !use_pbo;
|
||||
}
|
||||
else if (entry==QUIT) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static void Key( unsigned char key, int x, int y )
|
||||
{
|
||||
(void) x;
|
||||
(void) y;
|
||||
switch (key) {
|
||||
case 27:
|
||||
exit(0);
|
||||
break;
|
||||
}
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static void SpecialKey( int key, int x, int y )
|
||||
{
|
||||
float step = 3.0;
|
||||
(void) x;
|
||||
(void) y;
|
||||
|
||||
switch (key) {
|
||||
case GLUT_KEY_UP:
|
||||
Xrot += step;
|
||||
break;
|
||||
case GLUT_KEY_DOWN:
|
||||
Xrot -= step;
|
||||
break;
|
||||
case GLUT_KEY_LEFT:
|
||||
Yrot += step;
|
||||
break;
|
||||
case GLUT_KEY_RIGHT:
|
||||
Yrot -= step;
|
||||
break;
|
||||
}
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static void Init( int argc, char *argv[] )
|
||||
{
|
||||
const char *exten = (const char *) glGetString(GL_EXTENSIONS);
|
||||
GLuint texObj, DrawPBO;
|
||||
GLint size;
|
||||
|
||||
|
||||
if (!strstr(exten, "GL_ARB_multitexture")) {
|
||||
printf("Sorry, GL_ARB_multitexture not supported by this renderer.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size);
|
||||
printf("%d x %d max texture size\n", size, size);
|
||||
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
||||
/* allocate two texture objects */
|
||||
glGenTextures(1, &texObj);
|
||||
|
||||
/* setup the texture objects */
|
||||
glActiveTextureARB(GL_TEXTURE0_ARB);
|
||||
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, texObj);
|
||||
|
||||
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
|
||||
glGenBuffersARB(1, &DrawPBO);
|
||||
|
||||
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, DrawPBO);
|
||||
glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_EXT,
|
||||
Width * Height * 4, NULL, GL_STREAM_DRAW);
|
||||
|
||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
|
||||
glEnable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
|
||||
glShadeModel(GL_SMOOTH);
|
||||
glClearColor(0.3, 0.3, 0.4, 1.0);
|
||||
|
||||
if (argc > 1 && strcmp(argv[1], "-info")==0) {
|
||||
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
printf("GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
|
||||
printf("GL_EXTENSIONS = %s\n", (char *) glGetString(GL_EXTENSIONS));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
GLint i;
|
||||
|
||||
glutInit( &argc, argv );
|
||||
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (strcmp(argv[i], "-w") == 0) {
|
||||
Width = atoi(argv[i+1]);
|
||||
if (Width <= 0) {
|
||||
printf("Error, bad width\n");
|
||||
exit(1);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
else if (strcmp(argv[i], "-h") == 0) {
|
||||
Height = atoi(argv[i+1]);
|
||||
if (Height <= 0) {
|
||||
printf("Error, bad height\n");
|
||||
exit(1);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
glutInitWindowSize( Width, Height );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
glutCreateWindow(argv[0] );
|
||||
|
||||
Init( argc, argv );
|
||||
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutSpecialFunc( SpecialKey );
|
||||
glutDisplayFunc( Display );
|
||||
glutIdleFunc( Idle );
|
||||
|
||||
glutCreateMenu(ModeMenu);
|
||||
glutAddMenuEntry("Toggle Animation", ANIMATE);
|
||||
glutAddMenuEntry("Toggle PBO", PBO);
|
||||
glutAddMenuEntry("Quit", QUIT);
|
||||
glutAttachMenu(GLUT_RIGHT_BUTTON);
|
||||
|
||||
glutMainLoop();
|
||||
return 0;
|
||||
}
|
@@ -38,8 +38,8 @@
|
||||
#include <GL/glut.h>
|
||||
|
||||
|
||||
static GLsizei MaxSize = 1024;
|
||||
static GLsizei TexWidth = 256, TexHeight = 256, TexBorder = 0;
|
||||
static GLsizei MaxSize = 2048;
|
||||
static GLsizei TexWidth = 1024, TexHeight = 1024, TexBorder = 0;
|
||||
static GLboolean ScaleAndBias = GL_FALSE;
|
||||
static GLboolean SubImage = GL_FALSE;
|
||||
static GLdouble DownloadRate = 0.0; /* texels/sec */
|
||||
@@ -47,6 +47,32 @@ static GLdouble DownloadRate = 0.0; /* texels/sec */
|
||||
static GLuint Mode = 0;
|
||||
|
||||
|
||||
/* Try and avoid L2 cache effects by cycling through a small number of
|
||||
* textures.
|
||||
*
|
||||
* At the initial size of 1024x1024x4 == 4mbyte, say 8 textures will
|
||||
* keep us out of most caches at 32mb total.
|
||||
*
|
||||
* This turns into a fairly interesting question of what exactly you
|
||||
* expect to be in cache in normal usage, and what you think should be
|
||||
* outside. There's no rules for this, no reason to favour one usage
|
||||
* over another except what the application you care about happens to
|
||||
* resemble most closely.
|
||||
*
|
||||
* - Should the client texture image be in L2 cache? Has it just been
|
||||
* generated or read from disk?
|
||||
* - Does the application really use >1 texture, or is it constantly
|
||||
* updating one image in-place?
|
||||
*
|
||||
* Different answers will favour different texture upload mechanisms.
|
||||
* To upload an image that is purely outside of cache, a DMA-based
|
||||
* upload will probably win, whereas for small, in-cache textures,
|
||||
* copying looks good.
|
||||
*/
|
||||
#define NR_TEXOBJ 4
|
||||
static GLuint TexObj[NR_TEXOBJ];
|
||||
|
||||
|
||||
struct FormatRec {
|
||||
GLenum Format;
|
||||
GLenum Type;
|
||||
@@ -116,25 +142,57 @@ TypeStr(GLenum type)
|
||||
}
|
||||
}
|
||||
|
||||
/* On x86, there is a performance cliff for memcpy to texture memory
|
||||
* for sources below 64 byte alignment. We do our best with this in
|
||||
* the driver, but it is better if the images are correctly aligned to
|
||||
* start with:
|
||||
*/
|
||||
#define ALIGN (1<<12)
|
||||
|
||||
static unsigned align(unsigned value, unsigned a)
|
||||
{
|
||||
return (value + a - 1) & ~(a-1);
|
||||
}
|
||||
|
||||
static int MIN2(int a, int b)
|
||||
{
|
||||
return a < b ? a : b;
|
||||
}
|
||||
|
||||
static void
|
||||
MeasureDownloadRate(void)
|
||||
{
|
||||
const int w = TexWidth + 2 * TexBorder;
|
||||
const int h = TexHeight + 2 * TexBorder;
|
||||
const int bytes = w * h * BytesPerTexel(Format);
|
||||
const int image_bytes = align(w * h * BytesPerTexel(Format), ALIGN);
|
||||
const int bytes = image_bytes * NR_TEXOBJ;
|
||||
GLubyte *orig_texImage, *orig_getImage;
|
||||
GLubyte *texImage, *getImage;
|
||||
GLdouble t0, t1, time;
|
||||
int count;
|
||||
int i;
|
||||
int offset = 0;
|
||||
GLdouble total = 0; /* ints will tend to overflow */
|
||||
|
||||
texImage = (GLubyte *) malloc(bytes);
|
||||
getImage = (GLubyte *) malloc(bytes);
|
||||
if (!texImage || !getImage) {
|
||||
printf("allocating %d bytes for %d %dx%d images\n",
|
||||
bytes, NR_TEXOBJ, w, h);
|
||||
|
||||
orig_texImage = (GLubyte *) malloc(bytes + ALIGN);
|
||||
orig_getImage = (GLubyte *) malloc(image_bytes + ALIGN);
|
||||
if (!orig_texImage || !orig_getImage) {
|
||||
DownloadRate = 0.0;
|
||||
return;
|
||||
}
|
||||
|
||||
printf("alloc %p %p\n", orig_texImage, orig_getImage);
|
||||
|
||||
texImage = (GLubyte *)align((unsigned)orig_texImage, ALIGN);
|
||||
getImage = (GLubyte *)align((unsigned)orig_getImage, ALIGN);
|
||||
|
||||
for (i = 1; !(((unsigned)texImage) & i); i<<=1)
|
||||
;
|
||||
printf("texture image alignment: %d bytes (%p)\n", i, texImage);
|
||||
|
||||
for (i = 0; i < bytes; i++) {
|
||||
texImage[i] = i & 0xff;
|
||||
}
|
||||
@@ -166,16 +224,50 @@ MeasureDownloadRate(void)
|
||||
count = 0;
|
||||
t0 = glutGet(GLUT_ELAPSED_TIME) * 0.001;
|
||||
do {
|
||||
int img = count%NR_TEXOBJ;
|
||||
GLubyte *img_ptr = texImage + img * image_bytes;
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, TexObj[img]);
|
||||
|
||||
if (SubImage && count > 0) {
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0, -TexBorder, -TexBorder, w, h,
|
||||
/* Only update a portion of the image each iteration. This
|
||||
* is presumably why you'd want to use texsubimage, otherwise
|
||||
* you may as well just call teximage again.
|
||||
*
|
||||
* A bigger question is whether to use a pointer that moves
|
||||
* with each call, ie does the incoming data come from L2
|
||||
* cache under normal circumstances, or is it pulled from
|
||||
* uncached memory?
|
||||
*
|
||||
* There's a good argument to say L2 cache, ie you'd expect
|
||||
* the data to have been recently generated. It's possible
|
||||
* that it could have come from a file read, which may or may
|
||||
* not have gone through the cpu.
|
||||
*/
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0,
|
||||
-TexBorder,
|
||||
-TexBorder + offset * h/8,
|
||||
w,
|
||||
h/8,
|
||||
FormatTable[Format].Format,
|
||||
FormatTable[Format].Type, texImage);
|
||||
FormatTable[Format].Type,
|
||||
#if 1
|
||||
texImage /* likely in L2$ */
|
||||
#else
|
||||
img_ptr + offset * bytes/8 /* unlikely in L2$ */
|
||||
#endif
|
||||
);
|
||||
offset += 1;
|
||||
offset %= 8;
|
||||
total += w * h / 8;
|
||||
}
|
||||
else {
|
||||
glTexImage2D(GL_TEXTURE_2D, 0,
|
||||
FormatTable[Format].IntFormat, w, h, TexBorder,
|
||||
FormatTable[Format].Format,
|
||||
FormatTable[Format].Type, texImage);
|
||||
FormatTable[Format].Type,
|
||||
img_ptr);
|
||||
total += w*h;
|
||||
}
|
||||
|
||||
/* draw a tiny polygon to force texture into texram */
|
||||
@@ -192,25 +284,12 @@ MeasureDownloadRate(void)
|
||||
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
|
||||
printf("w*h=%d count=%d time=%f\n", w*h, count, time);
|
||||
DownloadRate = w * h * count / time;
|
||||
printf("total texels=%f time=%f\n", total, time);
|
||||
DownloadRate = total / time;
|
||||
|
||||
#if 0
|
||||
if (!ScaleAndBias) {
|
||||
/* verify texture readback */
|
||||
glGetTexImage(GL_TEXTURE_2D, 0,
|
||||
FormatTable[Format].Format,
|
||||
FormatTable[Format].Type, getImage);
|
||||
for (i = 0; i < w * h; i++) {
|
||||
if (texImage[i] != getImage[i]) {
|
||||
printf("[%d] %d != %d\n", i, texImage[i], getImage[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
free(texImage);
|
||||
free(getImage);
|
||||
free(orig_texImage);
|
||||
free(orig_getImage);
|
||||
|
||||
{
|
||||
GLint err = glGetError();
|
||||
|
@@ -27,9 +27,9 @@
|
||||
#include <math.h>
|
||||
|
||||
#include <directfb.h>
|
||||
#include <directfbgl.h>
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/directfbgl.h>
|
||||
|
||||
|
||||
/* the super interface */
|
||||
|
@@ -159,9 +159,9 @@ So the angle is:
|
||||
#include <unistd.h>
|
||||
|
||||
#include <directfb.h>
|
||||
#include <directfbgl.h>
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/directfbgl.h>
|
||||
|
||||
|
||||
/* the super interface */
|
||||
|
@@ -27,9 +27,9 @@
|
||||
#include <math.h>
|
||||
|
||||
#include <directfb.h>
|
||||
#include <directfbgl.h>
|
||||
|
||||
#include <GL/glu.h>
|
||||
#include <GL/directfbgl.h>
|
||||
|
||||
#include "util/showbuffer.c"
|
||||
#include "util/readtex.c"
|
||||
|
@@ -46,6 +46,7 @@ SOURCES = \
|
||||
tri-tex.c \
|
||||
tri-xpd.c \
|
||||
tri-position.c \
|
||||
point-position.c \
|
||||
tri-depth.c \
|
||||
tri-depth2.c \
|
||||
tri-depthwrite.c \
|
||||
|
119
progs/fp/point-position.c
Normal file
119
progs/fp/point-position.c
Normal file
@@ -0,0 +1,119 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glut.h>
|
||||
#include "GL/gl.h"
|
||||
|
||||
|
||||
|
||||
static void Init( void )
|
||||
{
|
||||
static const char *modulate2D =
|
||||
"!!ARBfp1.0\n"
|
||||
"MUL result.color, fragment.position, {.005}.x; \n"
|
||||
"END"
|
||||
;
|
||||
GLuint modulateProg;
|
||||
|
||||
if (!glutExtensionSupported("GL_ARB_fragment_program")) {
|
||||
printf("Error: GL_ARB_fragment_program not supported!\n");
|
||||
exit(1);
|
||||
}
|
||||
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
|
||||
/* Setup the fragment program */
|
||||
glGenProgramsARB(1, &modulateProg);
|
||||
glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, modulateProg);
|
||||
glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
|
||||
strlen(modulate2D), (const GLubyte *)modulate2D);
|
||||
|
||||
printf("glGetError = 0x%x\n", (int) glGetError());
|
||||
printf("glError(GL_PROGRAM_ERROR_STRING_ARB) = %s\n",
|
||||
(char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
|
||||
|
||||
glEnable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
|
||||
glClearColor(.3, .3, .3, 0);
|
||||
}
|
||||
|
||||
static void Reshape(int width, int height)
|
||||
{
|
||||
|
||||
glViewport(0, 0, (GLint)width, (GLint)height);
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
}
|
||||
|
||||
static void Key(unsigned char key, int x, int y)
|
||||
{
|
||||
|
||||
switch (key) {
|
||||
case 27:
|
||||
exit(1);
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
static void Draw(void)
|
||||
{
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
#if 0
|
||||
glBegin(GL_QUADS);
|
||||
glTexCoord2f(1,0);
|
||||
glVertex3f( 0.9, -0.9, -30.0);
|
||||
glTexCoord2f(1,1);
|
||||
glVertex3f( 0.9, 0.9, -30.0);
|
||||
glTexCoord2f(0,1);
|
||||
glVertex3f(-0.9, 0.9, -30.0);
|
||||
glTexCoord2f(0,0);
|
||||
glVertex3f(-0.9, -0.9, -30.0);
|
||||
glEnd();
|
||||
#else
|
||||
glPointSize(100);
|
||||
glBegin(GL_POINTS);
|
||||
glColor3f(0,0,1);
|
||||
glVertex3f( 0, 0, -30.0);
|
||||
glEnd();
|
||||
#endif
|
||||
|
||||
glFlush();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
GLenum type;
|
||||
|
||||
glutInit(&argc, argv);
|
||||
|
||||
|
||||
|
||||
glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
|
||||
|
||||
type = GLUT_RGB;
|
||||
type |= GLUT_SINGLE;
|
||||
glutInitDisplayMode(type);
|
||||
|
||||
if (glutCreateWindow("First Tri") == GL_FALSE) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Init();
|
||||
|
||||
glutReshapeFunc(Reshape);
|
||||
glutKeyboardFunc(Key);
|
||||
glutDisplayFunc(Draw);
|
||||
glutMainLoop();
|
||||
return 0;
|
||||
}
|
@@ -4,7 +4,7 @@
|
||||
* See Mesa/include/GL/osmesa.h for documentation of the OSMesa functions.
|
||||
*
|
||||
* If you want to render BIG images you'll probably have to increase
|
||||
* MAX_WIDTH and MAX_HEIGHT in src/config.h.
|
||||
* MAX_WIDTH and MAX_Height in src/config.h.
|
||||
*
|
||||
* This program is in the public domain.
|
||||
*
|
||||
@@ -27,8 +27,8 @@
|
||||
|
||||
#define SAVE_TARGA
|
||||
|
||||
#define WIDTH 400
|
||||
#define HEIGHT 400
|
||||
static int Width = 400;
|
||||
static int Height = 400;
|
||||
|
||||
|
||||
static void
|
||||
@@ -175,10 +175,10 @@ write_targa(const char *filename, const GLubyte *buffer, int width, int height)
|
||||
fputc (0x00, f);
|
||||
fputc (0x00, f); /* Y-origin of Image */
|
||||
fputc (0x00, f);
|
||||
fputc (WIDTH & 0xff, f); /* Image Width */
|
||||
fputc ((WIDTH>>8) & 0xff, f);
|
||||
fputc (HEIGHT & 0xff, f); /* Image Height */
|
||||
fputc ((HEIGHT>>8) & 0xff, f);
|
||||
fputc (Width & 0xff, f); /* Image Width */
|
||||
fputc ((Width>>8) & 0xff, f);
|
||||
fputc (Height & 0xff, f); /* Image Height */
|
||||
fputc ((Height>>8) & 0xff, f);
|
||||
fputc (0x18, f); /* Pixel Depth, 0x18 => 24 Bits */
|
||||
fputc (0x20, f); /* Image Descriptor */
|
||||
fclose(f);
|
||||
@@ -248,36 +248,43 @@ write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
OSMesaContext ctx;
|
||||
void *buffer;
|
||||
int i;
|
||||
char *filename = NULL;
|
||||
|
||||
if (argc < 2) {
|
||||
fprintf(stderr, "Usage:\n");
|
||||
fprintf(stderr, " osdemo filename [width height]\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
filename = argv[1];
|
||||
if (argc == 4) {
|
||||
Width = atoi(argv[2]);
|
||||
Height = atoi(argv[3]);
|
||||
}
|
||||
|
||||
/* Create an RGBA-mode context */
|
||||
#if OSMESA_MAJOR_VERSION * 100 + OSMESA_MINOR_VERSION >= 305
|
||||
/* specify Z, stencil, accum sizes */
|
||||
OSMesaContext ctx = OSMesaCreateContextExt( OSMESA_RGBA, 16, 0, 0, NULL );
|
||||
ctx = OSMesaCreateContextExt( OSMESA_RGBA, 16, 0, 0, NULL );
|
||||
#else
|
||||
OSMesaContext ctx = OSMesaCreateContext( OSMESA_RGBA, NULL );
|
||||
ctx = OSMesaCreateContext( OSMESA_RGBA, NULL );
|
||||
#endif
|
||||
if (!ctx) {
|
||||
printf("OSMesaCreateContext failed!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (argv[i][0] != '-')
|
||||
filename = argv[i];
|
||||
}
|
||||
|
||||
/* Allocate the image buffer */
|
||||
buffer = malloc( WIDTH * HEIGHT * 4 * sizeof(GLubyte) );
|
||||
buffer = malloc( Width * Height * 4 * sizeof(GLubyte) );
|
||||
if (!buffer) {
|
||||
printf("Alloc image buffer failed!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Bind the buffer to the context and make it current */
|
||||
if (!OSMesaMakeCurrent( ctx, buffer, GL_UNSIGNED_BYTE, WIDTH, HEIGHT )) {
|
||||
if (!OSMesaMakeCurrent( ctx, buffer, GL_UNSIGNED_BYTE, Width, Height )) {
|
||||
printf("OSMesaMakeCurrent failed!\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -295,9 +302,9 @@ main(int argc, char *argv[])
|
||||
|
||||
if (filename != NULL) {
|
||||
#ifdef SAVE_TARGA
|
||||
write_targa(filename, buffer, WIDTH, HEIGHT);
|
||||
write_targa(filename, buffer, Width, Height);
|
||||
#else
|
||||
write_ppm(filename, buffer, WIDTH, HEIGHT);
|
||||
write_ppm(filename, buffer, Width, Height);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
|
@@ -31,6 +31,10 @@ $vertex
|
||||
|
||||
$code
|
||||
|
||||
#version 110
|
||||
|
||||
#extension MESA_shader_debug: require
|
||||
|
||||
void main () {
|
||||
gl_Position = gl_ModelViewMatrix * gl_Vertex;
|
||||
gl_FrontColor = vec4 (1.0);
|
||||
@@ -156,6 +160,10 @@ $vertex
|
||||
|
||||
$code
|
||||
|
||||
#version 110
|
||||
|
||||
#extension MESA_shader_debug: require
|
||||
|
||||
attribute float _Zero;
|
||||
attribute float _One;
|
||||
attribute float _Two;
|
||||
@@ -248,6 +256,10 @@ $vertex
|
||||
|
||||
$code
|
||||
|
||||
#version 110
|
||||
|
||||
#extension MESA_shader_debug: require
|
||||
|
||||
attribute vec4 _One;
|
||||
attribute vec4 _Two;
|
||||
|
||||
@@ -464,6 +476,10 @@ $vertex
|
||||
|
||||
$code
|
||||
|
||||
#version 110
|
||||
|
||||
#extension MESA_shader_debug: require
|
||||
|
||||
attribute float _Two;
|
||||
attribute float _Two2;
|
||||
attribute float _MinusThree;
|
||||
@@ -722,6 +738,10 @@ $vertex
|
||||
|
||||
$code
|
||||
|
||||
#version 110
|
||||
|
||||
#extension MESA_shader_debug: require
|
||||
|
||||
attribute float _False;
|
||||
attribute float _True;
|
||||
attribute float _False2;
|
||||
@@ -917,6 +937,10 @@ $vertex
|
||||
|
||||
$code
|
||||
|
||||
#version 110
|
||||
|
||||
#extension MESA_shader_debug: require
|
||||
|
||||
attribute float _Zero;
|
||||
attribute float _One;
|
||||
attribute float _Two;
|
||||
@@ -985,6 +1009,10 @@ $vertex
|
||||
|
||||
$code
|
||||
|
||||
#version 110
|
||||
|
||||
#extension MESA_shader_debug: require
|
||||
|
||||
attribute float _Zero;
|
||||
attribute float _One;
|
||||
attribute vec4 _Two4;
|
||||
@@ -1141,6 +1169,10 @@ $vertex
|
||||
|
||||
$code
|
||||
|
||||
#version 110
|
||||
|
||||
#extension MESA_shader_debug: require
|
||||
|
||||
attribute float _Zero;
|
||||
attribute float _One;
|
||||
attribute vec4 _Two4;
|
||||
@@ -1349,6 +1381,10 @@ $vertex
|
||||
|
||||
$code
|
||||
|
||||
#version 110
|
||||
|
||||
#extension MESA_shader_debug: require
|
||||
|
||||
attribute vec4 _Zero;
|
||||
attribute vec4 _One;
|
||||
attribute vec4 _Two;
|
||||
@@ -1400,3 +1436,180 @@ true
|
||||
2.3
|
||||
2.4
|
||||
|
||||
|
||||
$ /*
|
||||
$ --------------------------------------------------------------------------------------------------
|
||||
$ Test vec4 extension operations.
|
||||
$ */
|
||||
|
||||
$program VEC4 EXTENSION OPERATIONS
|
||||
|
||||
$attrib gl_Vertex
|
||||
0.0 0.0 0.0 1.0
|
||||
|
||||
$attrib _One
|
||||
1.1 0.0 0.0 0.0
|
||||
|
||||
$attrib _Two4
|
||||
2.1 2.2 2.3 2.4
|
||||
|
||||
$attrib _Three4
|
||||
3.1 3.2 3.3 3.4
|
||||
|
||||
$vertex
|
||||
|
||||
$code
|
||||
|
||||
#version 110
|
||||
|
||||
#extension MESA_shader_debug: require
|
||||
|
||||
attribute float _One;
|
||||
attribute vec4 _Two4;
|
||||
attribute vec4 _Three4;
|
||||
|
||||
void main () {
|
||||
gl_Position = gl_ModelViewMatrix * gl_Vertex;
|
||||
gl_FrontColor = vec4 (1.0);
|
||||
|
||||
printMESA (_One);
|
||||
printMESA (_Two4);
|
||||
printMESA (_Three4);
|
||||
|
||||
printMESA (vec4 (_One));
|
||||
|
||||
printMESA (_Two4 + _Three4);
|
||||
printMESA (_Two4 - _Three4);
|
||||
printMESA (_Two4 * _Three4);
|
||||
printMESA (_Two4 / _Three4);
|
||||
|
||||
printMESA (_Two4 + _One);
|
||||
printMESA (_Two4 - _One);
|
||||
printMESA (_Two4 * _One);
|
||||
printMESA (_Two4 / _One);
|
||||
|
||||
printMESA (_One + _Two4);
|
||||
printMESA (_One - _Two4);
|
||||
printMESA (_One * _Two4);
|
||||
printMESA (_One / _Two4);
|
||||
|
||||
printMESA (-_Three4);
|
||||
|
||||
printMESA (dot (_Two4.xyz, _Three4.xyz));
|
||||
printMESA (dot (_Two4, _Three4));
|
||||
|
||||
printMESA (length (_Two4.xyz));
|
||||
printMESA (length (_Three4));
|
||||
|
||||
printMESA (normalize (_Two4.xyz));
|
||||
printMESA (normalize (_Three4));
|
||||
|
||||
vec4 tmp = _Two4;
|
||||
printMESA (tmp);
|
||||
|
||||
printMESA (_Two4 == _Three4);
|
||||
printMESA (_Two4 != _Three4);
|
||||
printMESA (_Two4 == _Two4);
|
||||
printMESA (_Three4 != _Three4);
|
||||
printMESA (_Two4 != vec4 (_Two4.xyz, 999.0));
|
||||
printMESA (_Two4 != vec4 (999.0, _Two4.yzw));
|
||||
}
|
||||
|
||||
$output
|
||||
|
||||
1.1
|
||||
2.1
|
||||
2.2
|
||||
2.3
|
||||
2.4
|
||||
3.1
|
||||
3.2
|
||||
3.3
|
||||
3.4
|
||||
|
||||
1.1
|
||||
1.1
|
||||
1.1
|
||||
1.1
|
||||
|
||||
5.2
|
||||
5.4
|
||||
5.6
|
||||
5.8
|
||||
-1.0
|
||||
-1.0
|
||||
-1.0
|
||||
-1.0
|
||||
6.51
|
||||
7.04
|
||||
7.59
|
||||
8.16
|
||||
0.677419
|
||||
0.6875
|
||||
0.69697
|
||||
0.705882
|
||||
|
||||
3.2
|
||||
3.3
|
||||
3.4
|
||||
3.5
|
||||
1.0
|
||||
1.1
|
||||
1.2
|
||||
1.3
|
||||
2.31
|
||||
2.42
|
||||
2.53
|
||||
2.64
|
||||
1.909091
|
||||
2.0
|
||||
2.090909
|
||||
2.181818
|
||||
|
||||
3.2
|
||||
3.3
|
||||
3.4
|
||||
3.5
|
||||
-1.0
|
||||
-1.1
|
||||
-1.2
|
||||
-1.3
|
||||
2.31
|
||||
2.42
|
||||
2.53
|
||||
2.64
|
||||
0.52381
|
||||
0.5
|
||||
0.478261
|
||||
0.458333
|
||||
|
||||
-3.1
|
||||
-3.2
|
||||
-3.3
|
||||
-3.4
|
||||
|
||||
21.14
|
||||
29.3
|
||||
|
||||
3.813135
|
||||
6.503845
|
||||
|
||||
0.550728
|
||||
0.576953
|
||||
0.603178
|
||||
0.476641
|
||||
0.492017
|
||||
0.507392
|
||||
0.522768
|
||||
|
||||
2.1
|
||||
2.2
|
||||
2.3
|
||||
2.4
|
||||
|
||||
false
|
||||
true
|
||||
true
|
||||
false
|
||||
true
|
||||
true
|
||||
|
@@ -320,7 +320,7 @@ void RenderScene (void)
|
||||
break;
|
||||
}
|
||||
if (fabs (value - attribs[i].data[j]) > EPSILON)
|
||||
printf ("*** %s\n", "Values are different");
|
||||
printf ("*** %s, is %f, should be %f\n", "Values are different", value, attribs[i].data[j]);
|
||||
p = strchr (p, '\n');
|
||||
if (p != NULL)
|
||||
p++;
|
||||
|
@@ -10,7 +10,7 @@
|
||||
|
||||
#version 110
|
||||
|
||||
//#extension MESA_shader_debug: require
|
||||
#extension MESA_shader_debug: require
|
||||
|
||||
attribute vec4 Attribute1;
|
||||
attribute vec4 Attribute2;
|
||||
|
@@ -18,6 +18,7 @@ SOURCES = \
|
||||
arbfptexture.c \
|
||||
arbfptrig.c \
|
||||
arbnpot.c \
|
||||
arbnpot-mipmap.c \
|
||||
arbvptest1.c \
|
||||
arbvptest3.c \
|
||||
arbvptorus.c \
|
||||
@@ -50,6 +51,7 @@ SOURCES = \
|
||||
no_s3tc.c \
|
||||
packedpixels.c \
|
||||
pbo.c \
|
||||
prog_parameter.c \
|
||||
projtex.c \
|
||||
readrate.c \
|
||||
seccolor.c \
|
||||
|
@@ -120,7 +120,7 @@ static void Init( void )
|
||||
static const char *prog2 =
|
||||
"!!ARBfp1.0\n"
|
||||
"TEMP R0, R1, R2, R3;\n"
|
||||
"TEX R0, fragment.texcoord, texture[1], 2D; \n"
|
||||
"TEX R0, fragment.texcoord, texture[0], 2D; \n"
|
||||
"TEX R1, fragment.texcoord[1], texture[1], CUBE; \n"
|
||||
"TEX R2, fragment.texcoord[2], texture[2], 3D; \n"
|
||||
"TXP R3, fragment.texcoord[3], texture[3], RECT; \n"
|
||||
|
184
progs/tests/arbnpot-mipmap.c
Normal file
184
progs/tests/arbnpot-mipmap.c
Normal file
@@ -0,0 +1,184 @@
|
||||
|
||||
/* Copyright (c) Mark J. Kilgard, 1994. */
|
||||
|
||||
/*
|
||||
* (c) Copyright 1993, Silicon Graphics, Inc.
|
||||
* ALL RIGHTS RESERVED
|
||||
* Permission to use, copy, modify, and distribute this software for
|
||||
* any purpose and without fee is hereby granted, provided that the above
|
||||
* copyright notice appear in all copies and that both the copyright notice
|
||||
* and this permission notice appear in supporting documentation, and that
|
||||
* the name of Silicon Graphics, Inc. not be used in advertising
|
||||
* or publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission.
|
||||
*
|
||||
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
|
||||
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
|
||||
* GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
|
||||
* SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
|
||||
* KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
|
||||
* LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
|
||||
* THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
|
||||
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* US Government Users Restricted Rights
|
||||
* Use, duplication, or disclosure by the Government is subject to
|
||||
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
|
||||
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
|
||||
* clause at DFARS 252.227-7013 and/or in similar or successor
|
||||
* clauses in the FAR or the DOD or NASA FAR Supplement.
|
||||
* Unpublished-- rights reserved under the copyright laws of the
|
||||
* United States. Contractor/manufacturer is Silicon Graphics,
|
||||
* Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
|
||||
*
|
||||
* OpenGL(TM) is a trademark of Silicon Graphics, Inc.
|
||||
*/
|
||||
/* mipmap.c
|
||||
* This program demonstrates using mipmaps for texture maps.
|
||||
* To overtly show the effect of mipmaps, each mipmap reduction
|
||||
* level has a solidly colored, contrasting texture image.
|
||||
* Thus, the quadrilateral which is drawn is drawn with several
|
||||
* different colors.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
GLubyte mipmapImage32[40][46][3];
|
||||
GLubyte mipmapImage16[20][23][3];
|
||||
GLubyte mipmapImage8[10][11][3];
|
||||
GLubyte mipmapImage4[5][5][3];
|
||||
GLubyte mipmapImage2[2][2][3];
|
||||
GLubyte mipmapImage1[1][1][3];
|
||||
|
||||
static void makeImages(void)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < 40; i++) {
|
||||
for (j = 0; j < 46; j++) {
|
||||
mipmapImage32[i][j][0] = 255;
|
||||
mipmapImage32[i][j][1] = 255;
|
||||
mipmapImage32[i][j][2] = 0;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 20; i++) {
|
||||
for (j = 0; j < 23; j++) {
|
||||
mipmapImage16[i][j][0] = 255;
|
||||
mipmapImage16[i][j][1] = 0;
|
||||
mipmapImage16[i][j][2] = 255;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 10; i++) {
|
||||
for (j = 0; j < 11; j++) {
|
||||
mipmapImage8[i][j][0] = 255;
|
||||
mipmapImage8[i][j][1] = 0;
|
||||
mipmapImage8[i][j][2] = 0;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 5; i++) {
|
||||
for (j = 0; j < 5; j++) {
|
||||
mipmapImage4[i][j][0] = 0;
|
||||
mipmapImage4[i][j][1] = 255;
|
||||
mipmapImage4[i][j][2] = 0;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 2; i++) {
|
||||
for (j = 0; j < 2; j++) {
|
||||
mipmapImage2[i][j][0] = 0;
|
||||
mipmapImage2[i][j][1] = 0;
|
||||
mipmapImage2[i][j][2] = 255;
|
||||
}
|
||||
}
|
||||
mipmapImage1[0][0][0] = 255;
|
||||
mipmapImage1[0][0][1] = 255;
|
||||
mipmapImage1[0][0][2] = 255;
|
||||
}
|
||||
|
||||
static void myinit(void)
|
||||
{
|
||||
if (!glutExtensionSupported("GL_ARB_texture_non_power_of_two")) {
|
||||
printf("Sorry, this program requires GL_ARB_texture_non_power_of_two\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDepthFunc(GL_LESS);
|
||||
glShadeModel(GL_FLAT);
|
||||
|
||||
glTranslatef(0.0, 0.0, -3.6);
|
||||
makeImages();
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, 3, 40, 46, 0,
|
||||
GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage32[0][0][0]);
|
||||
glTexImage2D(GL_TEXTURE_2D, 1, 3, 20, 23, 0,
|
||||
GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage16[0][0][0]);
|
||||
glTexImage2D(GL_TEXTURE_2D, 2, 3, 10, 11, 0,
|
||||
GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage8[0][0][0]);
|
||||
glTexImage2D(GL_TEXTURE_2D, 3, 3, 5, 5, 0,
|
||||
GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage4[0][0][0]);
|
||||
glTexImage2D(GL_TEXTURE_2D, 4, 3, 2, 2, 0,
|
||||
GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage2[0][0][0]);
|
||||
glTexImage2D(GL_TEXTURE_2D, 5, 3, 1, 1, 0,
|
||||
GL_RGB, GL_UNSIGNED_BYTE, &mipmapImage1[0][0][0]);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
|
||||
GL_NEAREST_MIPMAP_NEAREST);
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
static void display(void)
|
||||
{
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
glBegin(GL_QUADS);
|
||||
glTexCoord2f(0.0, 0.0); glVertex3f(-2.0, -1.0, 0.0);
|
||||
glTexCoord2f(0.0, 8.0); glVertex3f(-2.0, 1.0, 0.0);
|
||||
glTexCoord2f(8.0, 8.0); glVertex3f(2000.0, 1.0, -6000.0);
|
||||
glTexCoord2f(8.0, 0.0); glVertex3f(2000.0, -1.0, -6000.0);
|
||||
glEnd();
|
||||
glFlush();
|
||||
}
|
||||
|
||||
static void myReshape(int w, int h)
|
||||
{
|
||||
glViewport(0, 0, w, h);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
gluPerspective(60.0, 1.0*(GLfloat)w/(GLfloat)h, 1.0, 30000.0);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
}
|
||||
|
||||
static void
|
||||
key(unsigned char k, int x, int y)
|
||||
{
|
||||
switch (k) {
|
||||
case 27: /* Escape */
|
||||
exit(0);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
glutInit(&argc, argv);
|
||||
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH);
|
||||
glutInitWindowSize (500, 500);
|
||||
glutCreateWindow (argv[0]);
|
||||
myinit();
|
||||
glutReshapeFunc (myReshape);
|
||||
glutDisplayFunc(display);
|
||||
glutKeyboardFunc(key);
|
||||
glutMainLoop();
|
||||
return 0; /* ANSI C requires main to return int. */
|
||||
}
|
@@ -28,6 +28,8 @@ struct object
|
||||
static struct object Objects[NUM_OBJECTS];
|
||||
static GLuint NumObjects;
|
||||
|
||||
static GLuint Win;
|
||||
|
||||
static GLfloat Xrot = 0, Yrot = 0, Zrot = 0;
|
||||
static GLboolean Anim = GL_TRUE;
|
||||
|
||||
@@ -118,6 +120,14 @@ static void Reshape( int width, int height )
|
||||
}
|
||||
|
||||
|
||||
static void FreeBuffers(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < NUM_OBJECTS; i++)
|
||||
glDeleteBuffersARB(1, &Objects[i].BufferID);
|
||||
}
|
||||
|
||||
|
||||
static void Key( unsigned char key, int x, int y )
|
||||
{
|
||||
const GLfloat step = 3.0;
|
||||
@@ -138,6 +148,8 @@ static void Key( unsigned char key, int x, int y )
|
||||
Zrot += step;
|
||||
break;
|
||||
case 27:
|
||||
FreeBuffers();
|
||||
glutDestroyWindow(Win);
|
||||
exit(0);
|
||||
break;
|
||||
}
|
||||
@@ -346,7 +358,7 @@ int main( int argc, char *argv[] )
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitWindowSize( 600, 300 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
glutCreateWindow(argv[0]);
|
||||
Win = glutCreateWindow(argv[0]);
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutSpecialFunc( SpecialKey );
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* $Id: cva.c,v 1.7 2003/12/08 09:03:35 joukj Exp $ */
|
||||
/* $Id: cva.c,v 1.8 2006/11/22 19:37:21 sroland Exp $ */
|
||||
|
||||
/*
|
||||
* Trivial CVA test, good for testing driver fastpaths (especially
|
||||
@@ -119,6 +119,7 @@ int main( int argc, char **argv )
|
||||
{
|
||||
GLenum type;
|
||||
char *string;
|
||||
double version;
|
||||
|
||||
glutInit( &argc, argv );
|
||||
|
||||
@@ -138,9 +139,8 @@ int main( int argc, char **argv )
|
||||
*/
|
||||
string = (char *) glGetString( GL_VERSION );
|
||||
|
||||
if ( !strstr(string, "1.2") &&
|
||||
!strstr(string, "1.3") &&
|
||||
!strstr(string, "1.4")) {
|
||||
version = atof(string);
|
||||
if ( version < 1.2 ) {
|
||||
fprintf( stderr, "This program requires OpenGL 1.2 vertex arrays.\n" );
|
||||
exit( -1 );
|
||||
}
|
||||
|
@@ -268,6 +268,75 @@ test_VertexAttrib4dvNV(generic_func func)
|
||||
}
|
||||
|
||||
|
||||
static GLboolean
|
||||
test_StencilFuncSeparate(generic_func func)
|
||||
{
|
||||
#ifdef GL_VERSION_2_0
|
||||
PFNGLSTENCILFUNCSEPARATEPROC stencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC) func;
|
||||
GLint frontFunc, backFunc;
|
||||
GLint frontRef, backRef;
|
||||
GLint frontMask, backMask;
|
||||
(*stencilFuncSeparate)(GL_BACK, GL_GREATER, 2, 0xa);
|
||||
glGetIntegerv(GL_STENCIL_FUNC, &frontFunc);
|
||||
glGetIntegerv(GL_STENCIL_BACK_FUNC, &backFunc);
|
||||
glGetIntegerv(GL_STENCIL_REF, &frontRef);
|
||||
glGetIntegerv(GL_STENCIL_BACK_REF, &backRef);
|
||||
glGetIntegerv(GL_STENCIL_VALUE_MASK, &frontMask);
|
||||
glGetIntegerv(GL_STENCIL_BACK_VALUE_MASK, &backMask);
|
||||
if (frontFunc != GL_ALWAYS ||
|
||||
backFunc != GL_GREATER ||
|
||||
frontRef != 0 ||
|
||||
backRef != 2 ||
|
||||
frontMask == 0xa || /* might be 0xff or ~0 */
|
||||
backMask != 0xa)
|
||||
return GL_FALSE;
|
||||
#endif
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
static GLboolean
|
||||
test_StencilOpSeparate(generic_func func)
|
||||
{
|
||||
#ifdef GL_VERSION_2_0
|
||||
PFNGLSTENCILOPSEPARATEPROC stencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC) func;
|
||||
GLint frontFail, backFail;
|
||||
GLint frontZFail, backZFail;
|
||||
GLint frontZPass, backZPass;
|
||||
(*stencilOpSeparate)(GL_BACK, GL_INCR, GL_DECR, GL_INVERT);
|
||||
glGetIntegerv(GL_STENCIL_FAIL, &frontFail);
|
||||
glGetIntegerv(GL_STENCIL_BACK_FAIL, &backFail);
|
||||
glGetIntegerv(GL_STENCIL_PASS_DEPTH_FAIL, &frontZFail);
|
||||
glGetIntegerv(GL_STENCIL_BACK_PASS_DEPTH_FAIL, &backZFail);
|
||||
glGetIntegerv(GL_STENCIL_PASS_DEPTH_PASS, &frontZPass);
|
||||
glGetIntegerv(GL_STENCIL_BACK_PASS_DEPTH_PASS, &backZPass);
|
||||
if (frontFail != GL_KEEP ||
|
||||
backFail != GL_INCR ||
|
||||
frontZFail != GL_KEEP ||
|
||||
backZFail != GL_DECR ||
|
||||
frontZPass != GL_KEEP ||
|
||||
backZPass != GL_INVERT)
|
||||
return GL_FALSE;
|
||||
#endif
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
static GLboolean
|
||||
test_StencilMaskSeparate(generic_func func)
|
||||
{
|
||||
#ifdef GL_VERSION_2_0
|
||||
PFNGLSTENCILMASKSEPARATEPROC stencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC) func;
|
||||
GLint frontMask, backMask;
|
||||
(*stencilMaskSeparate)(GL_BACK, 0x1b);
|
||||
glGetIntegerv(GL_STENCIL_WRITEMASK, &frontMask);
|
||||
glGetIntegerv(GL_STENCIL_BACK_WRITEMASK, &backMask);
|
||||
if (frontMask == 0x1b ||
|
||||
backMask != 0x1b)
|
||||
return GL_FALSE;
|
||||
#endif
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* The following file is auto-generated with Python.
|
||||
*/
|
||||
@@ -302,12 +371,19 @@ check_functions( const char *extensions )
|
||||
|
||||
for (entry = functions; entry->name; entry++) {
|
||||
if (entry->name[0] == '-') {
|
||||
/* XXX update for OpenGL 2.0 */
|
||||
const char *version = (const char *) glGetString(GL_VERSION);
|
||||
if (entry->name[1] == '1') {
|
||||
/* check GL version X.Y */
|
||||
const char *version = (const char *) glGetString(GL_VERSION);
|
||||
if (version[0] == entry->name[1] &&
|
||||
version[1] == entry->name[2] &&
|
||||
/* check GL version 1.x */
|
||||
if (version[0] == '1' &&
|
||||
version[1] == '.' &&
|
||||
version[2] >= entry->name[3])
|
||||
doTests = 1;
|
||||
else
|
||||
doTests = 0;
|
||||
}
|
||||
else if (entry->name[1] == '2') {
|
||||
if (version[0] == '2' &&
|
||||
version[1] == '.' &&
|
||||
version[2] >= entry->name[3])
|
||||
doTests = 1;
|
||||
else
|
||||
@@ -377,12 +453,14 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect)
|
||||
GLX_RED_SIZE, 1,
|
||||
GLX_GREEN_SIZE, 1,
|
||||
GLX_BLUE_SIZE, 1,
|
||||
GLX_STENCIL_SIZE, 1,
|
||||
None };
|
||||
int attribDouble[] = {
|
||||
GLX_RGBA,
|
||||
GLX_RED_SIZE, 1,
|
||||
GLX_GREEN_SIZE, 1,
|
||||
GLX_BLUE_SIZE, 1,
|
||||
GLX_STENCIL_SIZE, 1,
|
||||
GLX_DOUBLEBUFFER,
|
||||
None };
|
||||
|
||||
|
285
progs/tests/prog_parameter.c
Normal file
285
progs/tests/prog_parameter.c
Normal file
@@ -0,0 +1,285 @@
|
||||
/*
|
||||
* (C) Copyright IBM Corporation 2006
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* on the rights to use, copy, modify, merge, publish, distribute, sub
|
||||
* license, and/or sell copies of the Software, and to permit persons to whom
|
||||
* the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file prog_parameter.c
|
||||
*
|
||||
* Test various aspects of setting (and getting) low-level program parameters.
|
||||
* This is primarilly intended as a test for GL_EXT_gpu_program_parameters,
|
||||
* but it turns out that it hits some other functionality along the way.
|
||||
*
|
||||
* \author Ian Romanick <idr@us.ibm.com>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#ifndef GL_EXT_gpu_program_parameters
|
||||
typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC)(GLenum,
|
||||
GLuint, GLsizei, const GLfloat *);
|
||||
typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC)(GLenum,
|
||||
GLuint, GLsizei, const GLfloat *);
|
||||
#endif
|
||||
|
||||
static PFNGLPROGRAMLOCALPARAMETER4FVARBPROC program_local_parameter4fv = NULL;
|
||||
static PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC get_program_local_parameterfv = NULL;
|
||||
static PFNGLPROGRAMENVPARAMETER4FVARBPROC program_env_parameter4fv = NULL;
|
||||
static PFNGLGETPROGRAMENVPARAMETERFVARBPROC get_program_env_parameterfv = NULL;
|
||||
static PFNGLBINDPROGRAMARBPROC bind_program = NULL;
|
||||
static PFNGLGETPROGRAMIVARBPROC get_program = NULL;
|
||||
|
||||
static PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC program_local_parameters4fv = NULL;
|
||||
static PFNGLPROGRAMENVPARAMETERS4FVEXTPROC program_env_parameters4fv = NULL;
|
||||
|
||||
static int Width = 400;
|
||||
static int Height = 200;
|
||||
static const GLfloat Near = 5.0, Far = 25.0;
|
||||
|
||||
|
||||
static void Display( void )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static void Idle( void )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static void Visible( int vis )
|
||||
{
|
||||
if ( vis == GLUT_VISIBLE ) {
|
||||
glutIdleFunc( Idle );
|
||||
}
|
||||
else {
|
||||
glutIdleFunc( NULL );
|
||||
}
|
||||
}
|
||||
static void Reshape( int width, int height )
|
||||
{
|
||||
GLfloat ar = (float) width / (float) height;
|
||||
Width = width;
|
||||
Height = height;
|
||||
glViewport( 0, 0, width, height );
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadIdentity();
|
||||
glFrustum( -ar, ar, -1.0, 1.0, Near, Far );
|
||||
}
|
||||
|
||||
|
||||
static void Key( unsigned char key, int x, int y )
|
||||
{
|
||||
(void) x;
|
||||
(void) y;
|
||||
switch (key) {
|
||||
case 27:
|
||||
exit(0);
|
||||
break;
|
||||
}
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static int set_parameter_batch( GLsizei count, GLfloat * param,
|
||||
const char * name,
|
||||
PFNGLPROGRAMLOCALPARAMETER4FVARBPROC set_parameter,
|
||||
PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC set_parameters,
|
||||
PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC get_parameter
|
||||
)
|
||||
{
|
||||
unsigned i;
|
||||
int pass = 1;
|
||||
|
||||
|
||||
for ( i = 0 ; i < (4 * count) ; i++ ) {
|
||||
param[i] = (GLfloat) random() / (GLfloat) random();
|
||||
}
|
||||
|
||||
/* Try using the "classic" interface.
|
||||
*/
|
||||
printf("Testing glProgram%sParameter4fvARB (count = %u)...\n", name, count);
|
||||
for ( i = 0 ; i < count ; i++ ) {
|
||||
(*set_parameter)(GL_VERTEX_PROGRAM_ARB, i, & param[i * 4]);
|
||||
}
|
||||
|
||||
for ( i = 0 ; i < count ; i++ ) {
|
||||
GLfloat temp[4];
|
||||
|
||||
(*get_parameter)(GL_VERTEX_PROGRAM_ARB, i, temp);
|
||||
|
||||
if ( (temp[0] != param[(i * 4) + 0])
|
||||
|| (temp[1] != param[(i * 4) + 1])
|
||||
|| (temp[2] != param[(i * 4) + 2])
|
||||
|| (temp[3] != param[(i * 4) + 3]) ) {
|
||||
printf("Mismatch in glProgram%sParameter4fvARB index %u!\n", name, i);
|
||||
printf("Got { %f, %f, %f, %f }, expected { %f, %f, %f, %f }!\n",
|
||||
temp[0], temp[1],
|
||||
temp[2], temp[3],
|
||||
param[(i * 4) + 0], param[(i * 4) + 1],
|
||||
param[(i * 4) + 2], param[(i * 4) + 3]);
|
||||
pass = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( set_parameters == NULL ) {
|
||||
return pass;
|
||||
}
|
||||
|
||||
|
||||
for ( i = 0 ; i < (4 * count) ; i++ ) {
|
||||
param[i] = (GLfloat) random() / (GLfloat) random();
|
||||
}
|
||||
|
||||
printf("Testing glProgram%sParameters4fvEXT (count = %u)...\n", name, count);
|
||||
(*set_parameters)(GL_VERTEX_PROGRAM_ARB, 0, count, param);
|
||||
|
||||
for ( i = 0 ; i < count ; i++ ) {
|
||||
GLfloat temp[4];
|
||||
|
||||
(*get_parameter)(GL_VERTEX_PROGRAM_ARB, i, temp);
|
||||
|
||||
if ( (temp[0] != param[(i * 4) + 0])
|
||||
|| (temp[1] != param[(i * 4) + 1])
|
||||
|| (temp[2] != param[(i * 4) + 2])
|
||||
|| (temp[3] != param[(i * 4) + 3]) ) {
|
||||
printf("Mismatch in glProgram%sParameters4fvEXT index %u!\n", name, i);
|
||||
printf("Got { %f, %f, %f, %f }, expected { %f, %f, %f, %f }!\n",
|
||||
temp[0], temp[1],
|
||||
temp[2], temp[3],
|
||||
param[(i * 4) + 0], param[(i * 4) + 1],
|
||||
param[(i * 4) + 2], param[(i * 4) + 3]);
|
||||
pass = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return pass;
|
||||
}
|
||||
|
||||
|
||||
static void Init( void )
|
||||
{
|
||||
const char * const ver_string = (const char * const)
|
||||
glGetString( GL_VERSION );
|
||||
int pass = 1;
|
||||
GLfloat * params;
|
||||
GLint max_program_env_parameters;
|
||||
GLint max_program_local_parameters;
|
||||
|
||||
|
||||
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
printf("GL_VERSION = %s\n\n", ver_string);
|
||||
|
||||
if ( !glutExtensionSupported("GL_ARB_vertex_program") ) {
|
||||
printf("Sorry, this program requires GL_ARB_vertex_program\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
|
||||
program_local_parameter4fv = glutGetProcAddress( "glProgramLocalParameter4fvARB" );
|
||||
program_env_parameter4fv = glutGetProcAddress( "glProgramEnvParameter4fvARB" );
|
||||
|
||||
get_program_local_parameterfv = glutGetProcAddress( "glGetProgramLocalParameterfvARB" );
|
||||
get_program_env_parameterfv = glutGetProcAddress( "glGetProgramEnvParameterfvARB" );
|
||||
|
||||
bind_program = glutGetProcAddress( "glBindProgramARB" );
|
||||
get_program = glutGetProcAddress( "glGetProgramivARB" );
|
||||
|
||||
if ( glutExtensionSupported("GL_EXT_gpu_program_parameters") ) {
|
||||
printf("GL_EXT_gpu_program_parameters available, testing that path.\n");
|
||||
|
||||
program_local_parameters4fv = glutGetProcAddress( "glProgramLocalParameters4fvEXT" );
|
||||
program_env_parameters4fv = glutGetProcAddress( "glProgramEnvParameters4fvEXT" );
|
||||
}
|
||||
else {
|
||||
printf("GL_EXT_gpu_program_parameters not available.\n");
|
||||
|
||||
program_local_parameters4fv = NULL;
|
||||
program_env_parameters4fv = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Since the test sets program local parameters, a program must be bound.
|
||||
* Program source, however, is not needed.
|
||||
*/
|
||||
(*bind_program)(GL_VERTEX_PROGRAM_ARB, 1);
|
||||
|
||||
|
||||
(*get_program)(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_ENV_PARAMETERS_ARB,
|
||||
& max_program_env_parameters);
|
||||
|
||||
params = malloc(max_program_env_parameters * 4 * sizeof(GLfloat));
|
||||
|
||||
pass &= set_parameter_batch(max_program_env_parameters, params, "Env",
|
||||
program_env_parameter4fv,
|
||||
program_env_parameters4fv,
|
||||
get_program_env_parameterfv);
|
||||
|
||||
|
||||
(*get_program)(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB,
|
||||
& max_program_local_parameters);
|
||||
|
||||
if (max_program_local_parameters > max_program_env_parameters) {
|
||||
params = realloc(params,
|
||||
max_program_local_parameters * 4 * sizeof(GLfloat));
|
||||
}
|
||||
|
||||
pass &= set_parameter_batch(max_program_local_parameters, params, "Local",
|
||||
program_local_parameter4fv,
|
||||
program_local_parameters4fv,
|
||||
get_program_local_parameterfv);
|
||||
|
||||
free(params);
|
||||
|
||||
if (! pass) {
|
||||
printf("FAIL!\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
printf("PASS!\n");
|
||||
}
|
||||
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitWindowSize( Width, Height );
|
||||
glutInitDisplayMode( GLUT_RGB );
|
||||
glutCreateWindow( "Program Parameters Test" );
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
glutVisibilityFunc( Visible );
|
||||
|
||||
Init();
|
||||
|
||||
return 0;
|
||||
}
|
@@ -38,7 +38,9 @@ SOURCES = \
|
||||
quad-offset-unfilled.c \
|
||||
quad-unfilled.c \
|
||||
quad-tex-2d.c \
|
||||
quad-tex-pbo.c \
|
||||
quad-tex-3d.c \
|
||||
quad-tex-dep.c \
|
||||
quad.c \
|
||||
quads.c \
|
||||
quadstrip.c \
|
||||
|
181
progs/trivial/quad-tex-pbo.c
Normal file
181
progs/trivial/quad-tex-pbo.c
Normal file
@@ -0,0 +1,181 @@
|
||||
/*
|
||||
* Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and
|
||||
* its documentation for any purpose is hereby granted without fee, provided
|
||||
* that (i) the above copyright notices and this permission notice appear in
|
||||
* all copies of the software and related documentation, and (ii) the name of
|
||||
* Silicon Graphics may not be used in any advertising or
|
||||
* publicity relating to the software without the specific, prior written
|
||||
* permission of Silicon Graphics.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
|
||||
* ANY KIND,
|
||||
* EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
|
||||
* WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
|
||||
* ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
|
||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||
* WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
|
||||
* LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
||||
* OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
|
||||
#define CI_OFFSET_1 16
|
||||
#define CI_OFFSET_2 32
|
||||
|
||||
GLenum doubleBuffer;
|
||||
|
||||
static GLuint DrawPBO;
|
||||
|
||||
static void Init(void)
|
||||
{
|
||||
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));
|
||||
|
||||
glClearColor(0.0, 0.0, 1.0, 0.0);
|
||||
|
||||
#define SIZE 16
|
||||
{
|
||||
GLubyte tex2d[SIZE][SIZE][4];
|
||||
GLint s, t;
|
||||
|
||||
for (s = 0; s < SIZE; s++) {
|
||||
for (t = 0; t < SIZE; t++) {
|
||||
/* bgra:
|
||||
*/
|
||||
tex2d[t][s][0] = 0x30;
|
||||
tex2d[t][s][1] = t*255/(SIZE-1);
|
||||
tex2d[t][s][2] = s*255/(SIZE-1);
|
||||
tex2d[t][s][3] = 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* put image into DrawPBO */
|
||||
glGenBuffersARB(1, &DrawPBO);
|
||||
glBindBufferARB(GL_PIXEL_PACK_BUFFER_EXT, DrawPBO);
|
||||
glBufferDataARB(GL_PIXEL_PACK_BUFFER_EXT,
|
||||
SIZE * SIZE * 4, tex2d, GL_STATIC_DRAW);
|
||||
glBindBufferARB(GL_PIXEL_PACK_BUFFER_EXT, 0);
|
||||
|
||||
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_REPEAT);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, DrawPBO);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, SIZE, SIZE, 0,
|
||||
GL_BGRA, GL_UNSIGNED_BYTE, NULL);
|
||||
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, 0);
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void Reshape(int width, int height)
|
||||
{
|
||||
|
||||
glViewport(0, 0, (GLint)width, (GLint)height);
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
}
|
||||
|
||||
static void Key(unsigned char key, int x, int y)
|
||||
{
|
||||
|
||||
switch (key) {
|
||||
case 27:
|
||||
exit(1);
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
static void Draw(void)
|
||||
{
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
glBegin(GL_QUADS);
|
||||
glTexCoord2f(1,0);
|
||||
glVertex3f( 0.9, -0.9, -30.0);
|
||||
glTexCoord2f(1,1);
|
||||
glVertex3f( 0.9, 0.9, -30.0);
|
||||
glTexCoord2f(0,1);
|
||||
glVertex3f(-0.9, 0.9, -30.0);
|
||||
glTexCoord2f(0,0);
|
||||
glVertex3f(-0.9, -0.9, -30.0);
|
||||
glEnd();
|
||||
|
||||
glFlush();
|
||||
|
||||
if (doubleBuffer) {
|
||||
glutSwapBuffers();
|
||||
}
|
||||
}
|
||||
|
||||
static GLenum Args(int argc, char **argv)
|
||||
{
|
||||
GLint i;
|
||||
|
||||
doubleBuffer = GL_FALSE;
|
||||
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (strcmp(argv[i], "-sb") == 0) {
|
||||
doubleBuffer = GL_FALSE;
|
||||
} else if (strcmp(argv[i], "-db") == 0) {
|
||||
doubleBuffer = GL_TRUE;
|
||||
} else {
|
||||
fprintf(stderr, "%s (Bad option).\n", argv[i]);
|
||||
return GL_FALSE;
|
||||
}
|
||||
}
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
GLenum type;
|
||||
|
||||
glutInit(&argc, argv);
|
||||
|
||||
if (Args(argc, argv) == GL_FALSE) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
|
||||
|
||||
type = GLUT_RGB;
|
||||
type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
|
||||
glutInitDisplayMode(type);
|
||||
|
||||
if (glutCreateWindow("First Tri") == GL_FALSE) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Init();
|
||||
|
||||
glutReshapeFunc(Reshape);
|
||||
glutKeyboardFunc(Key);
|
||||
glutDisplayFunc(Draw);
|
||||
glutMainLoop();
|
||||
return 0;
|
||||
}
|
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.1
|
||||
* Version: 6.5.2
|
||||
*
|
||||
* Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -32,6 +32,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#define GLX_GLXEXT_PROTOTYPES
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
@@ -50,7 +51,7 @@ static int ScrNum;
|
||||
static GLXContext Context;
|
||||
static Window Win[2]; /* Win[0] = source, Win[1] = dest */
|
||||
static GLint Width[2], Height[2];
|
||||
|
||||
static GLboolean TestClipping = GL_FALSE;
|
||||
static GLfloat Angle = 0.0;
|
||||
|
||||
static GLboolean DrawFront = GL_FALSE;
|
||||
@@ -123,7 +124,7 @@ Redraw(void)
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
|
||||
glShadeModel(GL_FLAT);
|
||||
glClearColor(0.5, 0.5, 0.5, 1.0);
|
||||
glClearColor(0.5, 0.5, 0.5, 0.0);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
/* draw blue quad */
|
||||
@@ -150,22 +151,18 @@ Redraw(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/* raster pos setup */
|
||||
glViewport(0, 0, Width[1], Height[1]);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glOrtho(-1, 1, -1, 1, -1, 1);
|
||||
glRasterPos2f(-1, -1);
|
||||
|
||||
/* copy the image between windows */
|
||||
glCopyPixels(0, 0, Width[0], Height[0], GL_COLOR);
|
||||
glClearColor(0.0, 0.0, 0.0, 0.0);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
glPopMatrix();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPopMatrix();
|
||||
if (TestClipping) {
|
||||
glWindowPos2iARB(-2, -2);
|
||||
glCopyPixels(-2, -2, Width[0] + 4, Height[0] + 4, GL_COLOR);
|
||||
}
|
||||
else {
|
||||
glWindowPos2iARB(0, 0);
|
||||
glCopyPixels(0, 0, Width[0], Height[0], GL_COLOR);
|
||||
}
|
||||
|
||||
if (DrawFront)
|
||||
glFinish();
|
||||
@@ -309,6 +306,8 @@ Init(void)
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
if (argc > 1 && strcmp(argv[1], "-clip") == 0)
|
||||
TestClipping = GL_TRUE;
|
||||
Init();
|
||||
EventLoop();
|
||||
return 0;
|
||||
|
@@ -15,7 +15,7 @@ default: $(TOP)/configs/current
|
||||
|
||||
install:
|
||||
$(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
|
||||
$(COPY_LIBS) $(TOP)/$(LIB_DIR)/libGLU.* $(INSTALL_DIR)/$(LIB_DIR)
|
||||
$(INSTALL) $(TOP)/$(LIB_DIR)/libGLU.* $(INSTALL_DIR)/$(LIB_DIR)
|
||||
|
||||
clean:
|
||||
@for dir in $(SUBDIRS) ; do \
|
||||
|
@@ -31,10 +31,10 @@
|
||||
** published by SGI, but has not been independently verified as being
|
||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
|
||||
**
|
||||
** $Date: 2005/10/28 13:09:23 $ $Revision: 1.3 $
|
||||
** $Date: 2006/08/30 19:02:45 $ $Revision: 1.4 $
|
||||
*/
|
||||
/*
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc,v 1.3 2005/10/28 13:09:23 brianp Exp $
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc,v 1.4 2006/08/30 19:02:45 brianp Exp $
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -72,7 +72,7 @@ void sampleCompRight(Real* topVertex, Real* botVertex,
|
||||
*/
|
||||
Int midIndex1;
|
||||
Int midIndex2;
|
||||
Int gridMidIndex1, gridMidIndex2 = 0;
|
||||
Int gridMidIndex1 = 0, gridMidIndex2 = 0;
|
||||
//midIndex1: array[i] <= v, array[i+1] > v
|
||||
//midIndex2: array[i] >= v, array[i+1] < v
|
||||
midIndex1 = rightChain->findIndexBelowGen(rightGridChain->get_v_value(gridIndex1),
|
||||
|
@@ -377,6 +377,7 @@ static void halveImage_ubyte(GLint components, GLuint width, GLuint height,
|
||||
{
|
||||
int i, j, k;
|
||||
int newwidth, newheight;
|
||||
int padBytes;
|
||||
GLubyte *s;
|
||||
const char *t;
|
||||
|
||||
@@ -390,6 +391,7 @@ static void halveImage_ubyte(GLint components, GLuint width, GLuint height,
|
||||
|
||||
newwidth = width / 2;
|
||||
newheight = height / 2;
|
||||
padBytes = ysize - (width*group_size);
|
||||
s = dataout;
|
||||
t = (const char *)datain;
|
||||
|
||||
@@ -405,6 +407,7 @@ static void halveImage_ubyte(GLint components, GLuint width, GLuint height,
|
||||
}
|
||||
t += group_size;
|
||||
}
|
||||
t += padBytes;
|
||||
t += ysize;
|
||||
}
|
||||
}
|
||||
@@ -476,6 +479,7 @@ static void halveImage_byte(GLint components, GLuint width, GLuint height,
|
||||
{
|
||||
int i, j, k;
|
||||
int newwidth, newheight;
|
||||
int padBytes;
|
||||
GLbyte *s;
|
||||
const char *t;
|
||||
|
||||
@@ -489,6 +493,7 @@ static void halveImage_byte(GLint components, GLuint width, GLuint height,
|
||||
|
||||
newwidth = width / 2;
|
||||
newheight = height / 2;
|
||||
padBytes = ysize - (width*group_size);
|
||||
s = dataout;
|
||||
t = (const char *)datain;
|
||||
|
||||
@@ -504,6 +509,7 @@ static void halveImage_byte(GLint components, GLuint width, GLuint height,
|
||||
}
|
||||
t += group_size;
|
||||
}
|
||||
t += padBytes;
|
||||
t += ysize;
|
||||
}
|
||||
}
|
||||
@@ -573,6 +579,7 @@ static void halveImage_ushort(GLint components, GLuint width, GLuint height,
|
||||
{
|
||||
int i, j, k;
|
||||
int newwidth, newheight;
|
||||
int padBytes;
|
||||
GLushort *s;
|
||||
const char *t;
|
||||
|
||||
@@ -586,6 +593,7 @@ static void halveImage_ushort(GLint components, GLuint width, GLuint height,
|
||||
|
||||
newwidth = width / 2;
|
||||
newheight = height / 2;
|
||||
padBytes = ysize - (width*group_size);
|
||||
s = dataout;
|
||||
t = (const char *)datain;
|
||||
|
||||
@@ -602,6 +610,7 @@ static void halveImage_ushort(GLint components, GLuint width, GLuint height,
|
||||
}
|
||||
t += group_size;
|
||||
}
|
||||
t += padBytes;
|
||||
t += ysize;
|
||||
}
|
||||
else
|
||||
@@ -616,6 +625,7 @@ static void halveImage_ushort(GLint components, GLuint width, GLuint height,
|
||||
}
|
||||
t += group_size;
|
||||
}
|
||||
t += padBytes;
|
||||
t += ysize;
|
||||
}
|
||||
}
|
||||
@@ -708,6 +718,7 @@ static void halveImage_short(GLint components, GLuint width, GLuint height,
|
||||
{
|
||||
int i, j, k;
|
||||
int newwidth, newheight;
|
||||
int padBytes;
|
||||
GLshort *s;
|
||||
const char *t;
|
||||
|
||||
@@ -721,6 +732,7 @@ static void halveImage_short(GLint components, GLuint width, GLuint height,
|
||||
|
||||
newwidth = width / 2;
|
||||
newheight = height / 2;
|
||||
padBytes = ysize - (width*group_size);
|
||||
s = dataout;
|
||||
t = (const char *)datain;
|
||||
|
||||
@@ -737,6 +749,7 @@ static void halveImage_short(GLint components, GLuint width, GLuint height,
|
||||
}
|
||||
t += group_size;
|
||||
}
|
||||
t += padBytes;
|
||||
t += ysize;
|
||||
}
|
||||
else
|
||||
@@ -758,6 +771,7 @@ static void halveImage_short(GLint components, GLuint width, GLuint height,
|
||||
}
|
||||
t += group_size;
|
||||
}
|
||||
t += padBytes;
|
||||
t += ysize;
|
||||
}
|
||||
}
|
||||
@@ -850,6 +864,7 @@ static void halveImage_uint(GLint components, GLuint width, GLuint height,
|
||||
{
|
||||
int i, j, k;
|
||||
int newwidth, newheight;
|
||||
int padBytes;
|
||||
GLuint *s;
|
||||
const char *t;
|
||||
|
||||
@@ -863,6 +878,7 @@ static void halveImage_uint(GLint components, GLuint width, GLuint height,
|
||||
|
||||
newwidth = width / 2;
|
||||
newheight = height / 2;
|
||||
padBytes = ysize - (width*group_size);
|
||||
s = dataout;
|
||||
t = (const char *)datain;
|
||||
|
||||
@@ -881,6 +897,7 @@ static void halveImage_uint(GLint components, GLuint width, GLuint height,
|
||||
}
|
||||
t += group_size;
|
||||
}
|
||||
t += padBytes;
|
||||
t += ysize;
|
||||
}
|
||||
else
|
||||
@@ -899,6 +916,7 @@ static void halveImage_uint(GLint components, GLuint width, GLuint height,
|
||||
}
|
||||
t += group_size;
|
||||
}
|
||||
t += padBytes;
|
||||
t += ysize;
|
||||
}
|
||||
}
|
||||
@@ -990,6 +1008,7 @@ static void halveImage_int(GLint components, GLuint width, GLuint height,
|
||||
{
|
||||
int i, j, k;
|
||||
int newwidth, newheight;
|
||||
int padBytes;
|
||||
GLint *s;
|
||||
const char *t;
|
||||
|
||||
@@ -1003,6 +1022,7 @@ static void halveImage_int(GLint components, GLuint width, GLuint height,
|
||||
|
||||
newwidth = width / 2;
|
||||
newheight = height / 2;
|
||||
padBytes = ysize - (width*group_size);
|
||||
s = dataout;
|
||||
t = (const char *)datain;
|
||||
|
||||
@@ -1019,6 +1039,7 @@ static void halveImage_int(GLint components, GLuint width, GLuint height,
|
||||
}
|
||||
t += group_size;
|
||||
}
|
||||
t += padBytes;
|
||||
t += ysize;
|
||||
}
|
||||
else
|
||||
@@ -1041,6 +1062,7 @@ static void halveImage_int(GLint components, GLuint width, GLuint height,
|
||||
}
|
||||
t += group_size;
|
||||
}
|
||||
t += padBytes;
|
||||
t += ysize;
|
||||
}
|
||||
}
|
||||
@@ -1134,6 +1156,7 @@ static void halveImage_float(GLint components, GLuint width, GLuint height,
|
||||
{
|
||||
int i, j, k;
|
||||
int newwidth, newheight;
|
||||
int padBytes;
|
||||
GLfloat *s;
|
||||
const char *t;
|
||||
|
||||
@@ -1147,6 +1170,7 @@ static void halveImage_float(GLint components, GLuint width, GLuint height,
|
||||
|
||||
newwidth = width / 2;
|
||||
newheight = height / 2;
|
||||
padBytes = ysize - (width*group_size);
|
||||
s = dataout;
|
||||
t = (const char *)datain;
|
||||
|
||||
@@ -1163,6 +1187,7 @@ static void halveImage_float(GLint components, GLuint width, GLuint height,
|
||||
}
|
||||
t += group_size;
|
||||
}
|
||||
t += padBytes;
|
||||
t += ysize;
|
||||
}
|
||||
else
|
||||
@@ -1183,6 +1208,7 @@ static void halveImage_float(GLint components, GLuint width, GLuint height,
|
||||
}
|
||||
t += group_size;
|
||||
}
|
||||
t += padBytes;
|
||||
t += ysize;
|
||||
}
|
||||
}
|
||||
@@ -3845,10 +3871,12 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat,
|
||||
if (width == newwidth && height == newheight) {
|
||||
/* Use usersImage for level userLevel */
|
||||
if (baseLevel <= level && level <= maxLevel) {
|
||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length);
|
||||
glTexImage2D(target, level, internalFormat, width,
|
||||
height, 0, format, type,
|
||||
usersImage);
|
||||
}
|
||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
|
||||
if(levels == 0) { /* we're done. clean up and return */
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
|
||||
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
|
||||
@@ -6590,16 +6618,16 @@ static void halve1DimagePackedPixel(int components,
|
||||
* Contributed by Gerk Huisma <gerk@five-d.demon.nl>.
|
||||
*/
|
||||
|
||||
typedef GLAPI void (GLAPIENTRY *TexImage3Dproc)( GLenum target, GLint level,
|
||||
typedef void (GLAPIENTRY *TexImage3Dproc)( GLenum target, GLint level,
|
||||
GLenum internalFormat,
|
||||
GLsizei width, GLsizei height,
|
||||
GLsizei depth, GLint border,
|
||||
GLenum format, GLenum type,
|
||||
const GLvoid *pixels );
|
||||
|
||||
static TexImage3Dproc pTexImage3D;
|
||||
static TexImage3Dproc pTexImage3D = 0;
|
||||
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
# include <dlfcn.h>
|
||||
# include <sys/types.h>
|
||||
#else
|
||||
@@ -6614,7 +6642,7 @@ static void gluTexImage3D( GLenum target, GLint level,
|
||||
const GLvoid *pixels )
|
||||
{
|
||||
if (!pTexImage3D) {
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
pTexImage3D = (TexImage3Dproc) wglGetProcAddress("glTexImage3D");
|
||||
if (!pTexImage3D)
|
||||
pTexImage3D = (TexImage3Dproc) wglGetProcAddress("glTexImage3DEXT");
|
||||
@@ -8643,7 +8671,8 @@ static void halveImageSlice(int components,
|
||||
int halfHeight= height / 2;
|
||||
int halfDepth= depth / 2;
|
||||
const char *src= (const char *)dataIn;
|
||||
int padBytes= rowSizeInBytes - (width * groupSizeInBytes);
|
||||
int rowPadBytes= rowSizeInBytes - (width * groupSizeInBytes);
|
||||
int imagePadBytes= imageSizeInBytes - (width*height*groupSizeInBytes);
|
||||
int outIndex= 0;
|
||||
|
||||
assert((width == 1 || height == 1) && depth >= 2);
|
||||
@@ -8727,7 +8756,7 @@ static void halveImageSlice(int components,
|
||||
/* skip over to next horizontal square of 4 */
|
||||
src+= groupSizeInBytes;
|
||||
} /* for jj */
|
||||
src+= padBytes;
|
||||
src+= rowPadBytes;
|
||||
|
||||
src+= rowSizeInBytes;
|
||||
} /* for ii */
|
||||
@@ -8772,11 +8801,12 @@ static void halveImageSlice(int components,
|
||||
|
||||
src+= elementSizeInBytes;
|
||||
} /* for cc */
|
||||
src+= padBytes;
|
||||
src+= rowPadBytes;
|
||||
|
||||
/* skip over to next vertical square of 4 */
|
||||
src+= rowSizeInBytes;
|
||||
} /* for jj */
|
||||
src+= imagePadBytes;
|
||||
|
||||
src+= imageSizeInBytes;
|
||||
} /* for ii */
|
||||
@@ -8816,7 +8846,8 @@ static void halveImage3D(int components,
|
||||
int halfHeight= height / 2;
|
||||
int halfDepth= depth / 2;
|
||||
const char *src= (const char *) dataIn;
|
||||
int padBytes= rowSizeInBytes - (width*groupSizeInBytes);
|
||||
int rowPadBytes= rowSizeInBytes - (width*groupSizeInBytes);
|
||||
int imagePadBytes= imageSizeInBytes - (width*height*groupSizeInBytes);
|
||||
int outIndex= 0;
|
||||
|
||||
for (dd= 0; dd < halfDepth; dd++) {
|
||||
@@ -8872,7 +8903,7 @@ static void halveImage3D(int components,
|
||||
src+= groupSizeInBytes;
|
||||
} /* for jj */
|
||||
/* skip past pad bytes, if any, to get to next row */
|
||||
src+= padBytes;
|
||||
src+= rowPadBytes;
|
||||
|
||||
/* src is at beginning of a row here, but it's the second row of
|
||||
* the square block of 4 pixels that we just worked on so we
|
||||
@@ -8887,6 +8918,9 @@ static void halveImage3D(int components,
|
||||
src+= rowSizeInBytes;
|
||||
} /* for ii */
|
||||
|
||||
/* skip past pad bytes, if any, to get to next image */
|
||||
src+= imagePadBytes;
|
||||
|
||||
src+= imageSizeInBytes;
|
||||
} /* for dd */
|
||||
|
||||
|
@@ -24,6 +24,62 @@
|
||||
#include "internal.h"
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static int g_ignore_key_repeat = 0;
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
int GLUTAPIENTRY
|
||||
glutDeviceGet( GLenum type )
|
||||
{
|
||||
switch (type) {
|
||||
case GLUT_HAS_KEYBOARD:
|
||||
return (keyboard != NULL);
|
||||
case GLUT_HAS_MOUSE:
|
||||
return (mouse != NULL);
|
||||
case GLUT_NUM_MOUSE_BUTTONS:
|
||||
if (mouse) {
|
||||
DFBInputDeviceDescription dsc;
|
||||
mouse->GetDescription( mouse, &dsc );
|
||||
return dsc.max_button+1;
|
||||
}
|
||||
break;
|
||||
case GLUT_DEVICE_IGNORE_KEY_REPEAT:
|
||||
return g_ignore_key_repeat;
|
||||
case GLUT_DEVICE_KEY_REPEAT:
|
||||
return (g_ignore_key_repeat) ? GLUT_KEY_REPEAT_OFF
|
||||
: GLUT_KEY_REPEAT_ON;
|
||||
case GLUT_HAS_JOYSTICK:
|
||||
case GLUT_OWNS_JOYSTICK:
|
||||
return (g_game && joystick); /* only available in game mode */
|
||||
case GLUT_JOYSTICK_BUTTONS:
|
||||
if (joystick) {
|
||||
DFBInputDeviceDescription dsc;
|
||||
joystick->GetDescription( joystick, &dsc );
|
||||
return dsc.max_button+1;
|
||||
}
|
||||
break;
|
||||
case GLUT_JOYSTICK_AXES:
|
||||
if (joystick) {
|
||||
DFBInputDeviceDescription dsc;
|
||||
joystick->GetDescription( joystick, &dsc );
|
||||
return dsc.max_axis+1;
|
||||
}
|
||||
break;
|
||||
case GLUT_JOYSTICK_POLL_RATE:
|
||||
if (joystick)
|
||||
return 1; /* hack */
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int GLUTAPIENTRY
|
||||
glutGetModifiers( void )
|
||||
{
|
||||
@@ -36,12 +92,14 @@ glutGetModifiers( void )
|
||||
void GLUTAPIENTRY
|
||||
glutIgnoreKeyRepeat( int ignore )
|
||||
{
|
||||
g_ignore_key_repeat = ignore;
|
||||
}
|
||||
|
||||
|
||||
void GLUTAPIENTRY
|
||||
glutSetKeyRepeat( int mode )
|
||||
{
|
||||
g_ignore_key_repeat = (mode == GLUT_KEY_REPEAT_OFF);
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +195,7 @@ __glutModifiers( DFBInputDeviceModifierMask mask )
|
||||
|
||||
|
||||
static void
|
||||
__glutWindowEvent( DFBWindowEvent *e )
|
||||
__glutWindowEvent( DFBWindowEvent *e, DFBWindowEvent *p )
|
||||
{
|
||||
__GlutWindow *window;
|
||||
|
||||
@@ -148,6 +206,12 @@ __glutWindowEvent( DFBWindowEvent *e )
|
||||
switch (e->type) {
|
||||
case DWET_KEYDOWN:
|
||||
window->modifiers = __glutModifiers( e->modifiers );
|
||||
if (g_ignore_key_repeat && p) {
|
||||
if (p->type == DWET_KEYDOWN &&
|
||||
p->window_id == e->window_id &&
|
||||
p->key_symbol == e->key_symbol)
|
||||
break;
|
||||
}
|
||||
if (DFB_KEY_IS_ASCII( e->key_symbol )) {
|
||||
if (keyboard_func) {
|
||||
__glutSetWindow( window );
|
||||
@@ -227,13 +291,18 @@ __glutWindowEvent( DFBWindowEvent *e )
|
||||
|
||||
|
||||
static void
|
||||
__glutInputEvent( DFBInputEvent *e )
|
||||
__glutInputEvent( DFBInputEvent *e, DFBInputEvent *p )
|
||||
{
|
||||
__glutAssert( g_game != NULL );
|
||||
|
||||
switch (e->type) {
|
||||
case DIET_KEYPRESS:
|
||||
g_game->modifiers = __glutModifiers( e->modifiers );
|
||||
g_game->modifiers = __glutModifiers( e->modifiers );
|
||||
if (g_ignore_key_repeat && p) {
|
||||
if (p->type == DIET_KEYPRESS &&
|
||||
p->key_symbol == e->key_symbol)
|
||||
break;
|
||||
}
|
||||
if (DFB_KEY_IS_ASCII( e->key_symbol )) {
|
||||
if (keyboard_func) {
|
||||
__glutSetWindow( g_game );
|
||||
@@ -367,20 +436,37 @@ glutMainLoop( void )
|
||||
__glutAssert( events != NULL );
|
||||
|
||||
while (GL_TRUE) {
|
||||
DFBEvent evt;
|
||||
DFBEvent evt, prev;
|
||||
|
||||
g_idle = GL_TRUE;
|
||||
|
||||
__glutHandleTimers();
|
||||
__glutHandleWindows();
|
||||
|
||||
prev.clazz = DFEC_NONE;
|
||||
|
||||
while (events->GetEvent( events, &evt ) == DFB_OK) {
|
||||
g_idle = GL_FALSE;
|
||||
|
||||
if (evt.clazz == DFEC_WINDOW)
|
||||
__glutWindowEvent( &evt.window );
|
||||
else
|
||||
__glutInputEvent( &evt.input );
|
||||
switch (evt.clazz) {
|
||||
case DFEC_WINDOW:
|
||||
if (prev.clazz == DFEC_WINDOW)
|
||||
__glutWindowEvent( &evt.window, &prev.window );
|
||||
else
|
||||
__glutWindowEvent( &evt.window, NULL );
|
||||
break;
|
||||
case DFEC_INPUT:
|
||||
if (prev.clazz == DFEC_INPUT)
|
||||
__glutInputEvent( &evt.input, &prev.input );
|
||||
else
|
||||
__glutInputEvent( &evt.input, NULL );
|
||||
break;
|
||||
default:
|
||||
__glutWarning( "unexpected event class %d!\n", evt.clazz );
|
||||
break;
|
||||
}
|
||||
|
||||
prev = evt;
|
||||
|
||||
__glutHandleTimers();
|
||||
}
|
||||
|
@@ -156,6 +156,13 @@ glutGetProcAddress( const char *name )
|
||||
return glut_functions[i].address;
|
||||
}
|
||||
|
||||
#if DIRECTFBGL_INTERFACE_VERSION >= 1
|
||||
if (g_current) {
|
||||
void *address = NULL;
|
||||
g_current->gl->GetProcAddress( g_current->gl, name, &address );
|
||||
return address;
|
||||
}
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@@ -26,8 +26,9 @@
|
||||
#include <directfb.h>
|
||||
#include <directfb_version.h>
|
||||
|
||||
#include <directfbgl.h>
|
||||
|
||||
#include "GL/glut.h"
|
||||
#include "GL/directfbgl.h"
|
||||
|
||||
|
||||
#define VERSION_CODE( M, m, r ) (((M) << 16) | ((m) << 8) | ((r)))
|
||||
|
@@ -207,45 +207,6 @@ glutLayerGet( GLenum type )
|
||||
return 0;
|
||||
}
|
||||
|
||||
int GLUTAPIENTRY
|
||||
glutDeviceGet( GLenum type )
|
||||
{
|
||||
switch (type) {
|
||||
case GLUT_HAS_KEYBOARD:
|
||||
return (keyboard != NULL);
|
||||
case GLUT_HAS_MOUSE:
|
||||
return (mouse != NULL);
|
||||
case GLUT_NUM_MOUSE_BUTTONS:
|
||||
if (mouse) {
|
||||
DFBInputDeviceDescription dsc;
|
||||
mouse->GetDescription( mouse, &dsc );
|
||||
return dsc.max_button+1;
|
||||
}
|
||||
break;
|
||||
case GLUT_HAS_JOYSTICK:
|
||||
return (g_game && joystick); /* only available in game mode */
|
||||
case GLUT_JOYSTICK_BUTTONS:
|
||||
if (joystick) {
|
||||
DFBInputDeviceDescription dsc;
|
||||
joystick->GetDescription( joystick, &dsc );
|
||||
return dsc.max_button+1;
|
||||
}
|
||||
break;
|
||||
case GLUT_JOYSTICK_AXES:
|
||||
if (joystick) {
|
||||
DFBInputDeviceDescription dsc;
|
||||
joystick->GetDescription( joystick, &dsc );
|
||||
return dsc.max_axis+1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void GLUTAPIENTRY
|
||||
glutReportErrors( void )
|
||||
{
|
||||
|
@@ -4,7 +4,7 @@ TOP = ../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
GLX_SHARED = $(TOP)/src/glut/glx
|
||||
SHAPES = $(TOP)/src/glut/mini
|
||||
MINI_SHARED = $(TOP)/src/glut/mini
|
||||
|
||||
GLUT_MAJOR = 3
|
||||
GLUT_MINOR = 7
|
||||
@@ -13,13 +13,23 @@ GLUT_TINY = 1
|
||||
INCLUDES = -I$(TOP)/include -I$(GLX_SHARED)
|
||||
|
||||
CORE_SOURCES = \
|
||||
glut_fbdev.c
|
||||
fbdev.c \
|
||||
colormap.c \
|
||||
cursor.c \
|
||||
menu.c \
|
||||
overlay.c \
|
||||
ext.c \
|
||||
state.c \
|
||||
input.c \
|
||||
callback.c \
|
||||
gamemode.c \
|
||||
vidresize.c \
|
||||
bitmap.c \
|
||||
stroke.c
|
||||
|
||||
GLX_SHARED_SOURCES = \
|
||||
$(GLX_SHARED)/glut_8x13.c \
|
||||
$(GLX_SHARED)/glut_9x15.c \
|
||||
$(GLX_SHARED)/glut_bwidth.c \
|
||||
$(GLX_SHARED)/glut_bitmap.c \
|
||||
$(GLX_SHARED)/glut_hel10.c \
|
||||
$(GLX_SHARED)/glut_hel12.c \
|
||||
$(GLX_SHARED)/glut_hel18.c \
|
||||
@@ -27,12 +37,12 @@ GLX_SHARED_SOURCES = \
|
||||
$(GLX_SHARED)/glut_tr24.c \
|
||||
$(GLX_SHARED)/glut_mroman.c \
|
||||
$(GLX_SHARED)/glut_roman.c \
|
||||
$(GLX_SHARED)/glut_swidth.c \
|
||||
$(GLX_SHARED)/glut_stroke.c \
|
||||
$(TOP)/src/glut/mini/models.c \
|
||||
$(GLX_SHARED)/glut_teapot.c
|
||||
|
||||
SOURCES = $(CORE_SOURCES) $(GLX_SHARED_SOURCES)
|
||||
MINI_SHARED_SOURCES = \
|
||||
$(MINI_SHARED)/models.c \
|
||||
$(MINI_SHARED)/teapot.c
|
||||
|
||||
SOURCES = $(CORE_SOURCES) $(GLX_SHARED_SOURCES) $(MINI_SHARED_SOURCES)
|
||||
|
||||
OBJECTS = $(SOURCES:.c=.o)
|
||||
|
||||
@@ -40,7 +50,7 @@ OBJECTS = $(SOURCES:.c=.o)
|
||||
##### RULES #####
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
||||
|
||||
.S.o:
|
||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
||||
@@ -58,6 +68,11 @@ $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
|
||||
$(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
|
||||
$(MKLIB_OPTIONS) $(OBJECTS)
|
||||
|
||||
install:
|
||||
$(INSTALL) -d $(INSTALL_DIR)/include/GL
|
||||
$(INSTALL) -d $(INSTALL_DIR)/$(LIB_DIR)
|
||||
$(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(INSTALL_DIR)/include/GL
|
||||
$(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(INSTALL_DIR)/$(LIB_DIR)
|
||||
|
||||
# Run 'make -f Makefile.solo dep' to update the dependencies if you change
|
||||
# what's included by any source file.
|
||||
|
78
src/glut/fbdev/bitmap.c
Normal file
78
src/glut/fbdev/bitmap.c
Normal file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.5
|
||||
* Copyright (C) 1995-2006 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Library for glut using mesa fbdev driver
|
||||
*
|
||||
* Written by Sean D'Epagnier (c) 2006
|
||||
*
|
||||
* To improve on this library, maybe support subwindows or overlays,
|
||||
* I (sean at depagnier dot com) will do my best to help.
|
||||
*/
|
||||
|
||||
|
||||
#include "glutbitmap.h"
|
||||
|
||||
void glutBitmapCharacter(GLUTbitmapFont font, int c)
|
||||
{
|
||||
const BitmapCharRec *ch;
|
||||
BitmapFontPtr fi = (BitmapFontPtr) font;
|
||||
|
||||
if (c < fi->first ||
|
||||
c >= fi->first + fi->num_chars)
|
||||
return;
|
||||
ch = fi->ch[c - fi->first];
|
||||
if (!ch)
|
||||
return;
|
||||
|
||||
glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
|
||||
|
||||
glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);
|
||||
glPixelStorei(GL_UNPACK_LSB_FIRST, GL_FALSE);
|
||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
|
||||
glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
|
||||
glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
glBitmap(ch->width, ch->height, ch->xorig, ch->yorig,
|
||||
ch->advance, 0, ch->bitmap);
|
||||
glPopClientAttrib();
|
||||
}
|
||||
|
||||
int glutBitmapWidth (GLUTbitmapFont font, int c)
|
||||
{
|
||||
const BitmapCharRec *ch;
|
||||
BitmapFontPtr fi = (BitmapFontPtr) font;
|
||||
|
||||
if (c < fi->first || c >= fi->first + fi->num_chars)
|
||||
return 0;
|
||||
ch = fi->ch[c - fi->first];
|
||||
if (ch)
|
||||
return ch->advance;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int glutBitmapLength(GLUTbitmapFont font, const unsigned char *string)
|
||||
{
|
||||
int length = 0;
|
||||
|
||||
for (; *string; string++)
|
||||
length += glutBitmapWidth(font, *string);
|
||||
return length;
|
||||
}
|
171
src/glut/fbdev/callback.c
Normal file
171
src/glut/fbdev/callback.c
Normal file
@@ -0,0 +1,171 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.5
|
||||
* Copyright (C) 1995-2006 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Library for glut using mesa fbdev driver
|
||||
*
|
||||
* Written by Sean D'Epagnier (c) 2006
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <GL/glut.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
void (*DisplayFunc)(void) = NULL;
|
||||
void (*ReshapeFunc)(int width, int height) = NULL;
|
||||
void (*KeyboardFunc)(unsigned char key, int x, int y) = NULL;
|
||||
void (*KeyboardUpFunc)(unsigned char key, int x, int y) = NULL;
|
||||
void (*MouseFunc)(int key, int state, int x, int y) = NULL;
|
||||
void (*MotionFunc)(int x, int y) = NULL;
|
||||
void (*PassiveMotionFunc)(int x, int y) = NULL;
|
||||
void (*VisibilityFunc)(int state) = NULL;
|
||||
void (*SpecialFunc)(int key, int x, int y) = NULL;
|
||||
void (*SpecialUpFunc)(int key, int x, int y) = NULL;
|
||||
void (*IdleFunc)(void) = NULL;
|
||||
void (*MenuStatusFunc)(int state, int x, int y) = NULL;
|
||||
void (*MenuStateFunc)(int state) = NULL;
|
||||
|
||||
void glutDisplayFunc(void (*func)(void))
|
||||
{
|
||||
DisplayFunc = func;
|
||||
}
|
||||
|
||||
void glutOverlayDisplayFunc(void (*func)(void))
|
||||
{
|
||||
}
|
||||
|
||||
void glutWindowStatusFunc(void (*func)(int state))
|
||||
{
|
||||
}
|
||||
|
||||
void glutReshapeFunc(void (*func)(int width, int height))
|
||||
{
|
||||
ReshapeFunc = func;
|
||||
}
|
||||
|
||||
void glutKeyboardFunc(void (*func)(unsigned char key, int x, int y))
|
||||
{
|
||||
KeyboardFunc = func;
|
||||
}
|
||||
|
||||
void glutKeyboardUpFunc(void (*func)(unsigned char key, int x, int y))
|
||||
{
|
||||
KeyboardUpFunc = func;
|
||||
}
|
||||
|
||||
void glutMouseFunc(void (*func)(int button, int state, int x, int y))
|
||||
{
|
||||
MouseFunc = func;
|
||||
}
|
||||
|
||||
void glutMotionFunc(void (*func)(int x, int y))
|
||||
{
|
||||
MotionFunc = func;
|
||||
}
|
||||
|
||||
void glutPassiveMotionFunc(void (*func)(int x, int y))
|
||||
{
|
||||
PassiveMotionFunc = func;
|
||||
}
|
||||
|
||||
void glutJoystickFunc(void (*func)(unsigned int buttonMask,
|
||||
int x, int y, int z), int pollInterval)
|
||||
{
|
||||
}
|
||||
|
||||
void glutVisibilityFunc(void (*func)(int state))
|
||||
{
|
||||
VisibilityFunc = func;
|
||||
}
|
||||
|
||||
void glutEntryFunc(void (*func)(int state))
|
||||
{
|
||||
}
|
||||
|
||||
void glutSpecialFunc(void (*func)(int key, int x, int y))
|
||||
{
|
||||
SpecialFunc = func;
|
||||
}
|
||||
|
||||
void glutSpecialUpFunc(void (*func)(int key, int x, int y))
|
||||
{
|
||||
SpecialUpFunc = func;
|
||||
}
|
||||
|
||||
void glutSpaceballMotionFunc(void (*func)(int x, int y, int z))
|
||||
{
|
||||
}
|
||||
|
||||
void glutSpaceballRotateFunc(void (*func)(int x, int y, int z))
|
||||
{
|
||||
}
|
||||
|
||||
void glutSpaceballButtonFunc(void (*func)(int button, int state))
|
||||
{
|
||||
}
|
||||
|
||||
void glutButtonBoxFunc(void (*func)(int button, int state))
|
||||
{
|
||||
}
|
||||
|
||||
void glutDialsFunc(void (*func)(int dial, int value))
|
||||
{
|
||||
}
|
||||
|
||||
void glutTabletMotionFunc(void (*func)(int x, int y))
|
||||
{
|
||||
}
|
||||
|
||||
void glutTabletButtonFunc(void (*func)(int button, int state,
|
||||
int x, int y))
|
||||
{
|
||||
}
|
||||
|
||||
void glutMenuStatusFunc(void (*func)(int status, int x, int y))
|
||||
{
|
||||
MenuStatusFunc = func;
|
||||
}
|
||||
|
||||
void glutMenuStateFunc(void (*func)(int status))
|
||||
{
|
||||
MenuStateFunc = func;
|
||||
}
|
||||
|
||||
void glutIdleFunc(void (*func)(void))
|
||||
{
|
||||
IdleFunc = func;
|
||||
}
|
||||
|
||||
void glutTimerFunc(unsigned int msecs,
|
||||
void (*func)(int value), int value)
|
||||
{
|
||||
struct GlutTimer **head = &GlutTimers, *timer = malloc(sizeof *timer);
|
||||
timer->time = glutGet(GLUT_ELAPSED_TIME) + msecs;
|
||||
timer->func = func;
|
||||
timer->value = value;
|
||||
|
||||
while(*head && (*head)->time < timer->time)
|
||||
head = &(*head)->next;
|
||||
|
||||
timer->next = *head;
|
||||
*head = timer;
|
||||
}
|
177
src/glut/fbdev/colormap.c
Normal file
177
src/glut/fbdev/colormap.c
Normal file
@@ -0,0 +1,177 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.5
|
||||
* Copyright (C) 1995-2006 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Library for glut using mesa fbdev driver
|
||||
*
|
||||
* Written by Sean D'Epagnier (c) 2006
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <linux/fb.h>
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
#define TOCMAP(x)(unsigned short)((x<0?0:x>1?1:x)*(GLfloat) ((1<<16) - 1))
|
||||
#define TORMAP(x)(unsigned short)((x<0?0:x>1?1:x)*(GLfloat)(REVERSECMAPSIZE-1))
|
||||
#define FROMCMAP(x) (GLfloat)x / (GLfloat)((1<<16) - 1)
|
||||
|
||||
static struct fb_cmap ColorMap, OriginalColorMap;
|
||||
|
||||
unsigned short RedColorMap[256], GreenColorMap[256], BlueColorMap[256];
|
||||
|
||||
unsigned char ReverseColorMap[REVERSECMAPSIZE]
|
||||
[REVERSECMAPSIZE]
|
||||
[REVERSECMAPSIZE];
|
||||
|
||||
static void FindReverseMap(int r, int g, int b)
|
||||
{
|
||||
static int count;
|
||||
int i, shift = 16 - REVERSECMAPSIZELOG;
|
||||
unsigned int minv = -1, mini = 0;
|
||||
for(i=0; i<256; i++) {
|
||||
int val = 0;
|
||||
val += abs(r-(RedColorMap[i]>>shift));
|
||||
val += abs(g-(GreenColorMap[i]>>shift));
|
||||
val += abs(b-(BlueColorMap[i]>>shift));
|
||||
if(val < minv) {
|
||||
minv = val;
|
||||
mini = i;
|
||||
}
|
||||
}
|
||||
ReverseColorMap[r][g][b] = mini;
|
||||
}
|
||||
|
||||
static void FillItemReverseColorMap(int r, int g, int b)
|
||||
{
|
||||
FindReverseMap(r, g, b);
|
||||
if(r > 0)
|
||||
FindReverseMap(r-1, g, b);
|
||||
if(r < REVERSECMAPSIZE - 1)
|
||||
FindReverseMap(r+1, g, b);
|
||||
if(g > 0)
|
||||
FindReverseMap(r, g-1, b);
|
||||
if(g < REVERSECMAPSIZE - 1)
|
||||
FindReverseMap(r, g+1, b);
|
||||
if(b > 0)
|
||||
FindReverseMap(r, g, b-1);
|
||||
if(b < REVERSECMAPSIZE - 1)
|
||||
FindReverseMap(r, g, b+1);
|
||||
}
|
||||
|
||||
static void FillReverseColorMap(void)
|
||||
{
|
||||
int r, g, b;
|
||||
for(r = 0; r < REVERSECMAPSIZE; r++)
|
||||
for(g = 0; g < REVERSECMAPSIZE; g++)
|
||||
for(b = 0; b < REVERSECMAPSIZE; b++)
|
||||
FindReverseMap(r, g, b);
|
||||
}
|
||||
|
||||
void RestoreColorMap(void)
|
||||
{
|
||||
if(FixedInfo.visual == FB_VISUAL_TRUECOLOR)
|
||||
return;
|
||||
|
||||
if (ioctl(FrameBufferFD, FBIOPUTCMAP, (void *) &ColorMap) < 0)
|
||||
sprintf(exiterror, "ioctl(FBIOPUTCMAP) failed!\n");
|
||||
}
|
||||
|
||||
void LoadColorMap(void)
|
||||
{
|
||||
if(FixedInfo.visual == FB_VISUAL_TRUECOLOR)
|
||||
return;
|
||||
|
||||
ColorMap.start = 0;
|
||||
ColorMap.red = RedColorMap;
|
||||
ColorMap.green = GreenColorMap;
|
||||
ColorMap.blue = BlueColorMap;
|
||||
ColorMap.transp = NULL;
|
||||
|
||||
if(DisplayMode & GLUT_INDEX) {
|
||||
ColorMap.len = 256;
|
||||
|
||||
if (ioctl(FrameBufferFD, FBIOGETCMAP, (void *) &ColorMap) < 0)
|
||||
sprintf(exiterror, "ioctl(FBIOGETCMAP) failed!\n");
|
||||
|
||||
FillReverseColorMap();
|
||||
} else {
|
||||
int rcols = 1 << VarInfo.red.length;
|
||||
int gcols = 1 << VarInfo.green.length;
|
||||
int bcols = 1 << VarInfo.blue.length;
|
||||
|
||||
int i;
|
||||
|
||||
ColorMap.len = gcols;
|
||||
|
||||
for (i = 0; i < rcols ; i++)
|
||||
RedColorMap[i] = (65536/(rcols-1)) * i;
|
||||
|
||||
for (i = 0; i < gcols ; i++)
|
||||
GreenColorMap[i] = (65536/(gcols-1)) * i;
|
||||
|
||||
for (i = 0; i < bcols ; i++)
|
||||
BlueColorMap[i] = (65536/(bcols-1)) * i;
|
||||
|
||||
RestoreColorMap();
|
||||
}
|
||||
}
|
||||
|
||||
void glutSetColor(int cell, GLfloat red, GLfloat green, GLfloat blue)
|
||||
{
|
||||
if(cell < 0 || cell >= 256)
|
||||
return;
|
||||
|
||||
RedColorMap[cell] = TOCMAP(red);
|
||||
GreenColorMap[cell] = TOCMAP(green);
|
||||
BlueColorMap[cell] = TOCMAP(blue);
|
||||
|
||||
RestoreColorMap();
|
||||
|
||||
FillItemReverseColorMap(TORMAP(red), TORMAP(green), TORMAP(blue));
|
||||
}
|
||||
|
||||
GLfloat glutGetColor(int cell, int component)
|
||||
{
|
||||
if(!(DisplayMode & GLUT_INDEX))
|
||||
return -1.0;
|
||||
|
||||
if(cell < 0 || cell > 256)
|
||||
return -1.0;
|
||||
|
||||
switch(component) {
|
||||
case GLUT_RED:
|
||||
return FROMCMAP(RedColorMap[cell]);
|
||||
case GLUT_GREEN:
|
||||
return FROMCMAP(GreenColorMap[cell]);
|
||||
case GLUT_BLUE:
|
||||
return FROMCMAP(BlueColorMap[cell]);
|
||||
}
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
void glutCopyColormap(int win)
|
||||
{
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user