Compare commits
2403 Commits
OpenSceneG
...
OpenSceneG
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb40a0d1db | ||
|
|
975b62c735 | ||
|
|
dff2faa63b | ||
|
|
500d3947ef | ||
|
|
2b7b051421 | ||
|
|
8a05850048 | ||
|
|
469d743bec | ||
|
|
c1dfc39706 | ||
|
|
aa5e25db8d | ||
|
|
33cb2e6f70 | ||
|
|
11e4a995c4 | ||
|
|
27fc282bb5 | ||
|
|
9d897c2555 | ||
|
|
cbcf7015bb | ||
|
|
4d5c1ff14e | ||
|
|
d01edcb540 | ||
|
|
bfa8d157c1 | ||
|
|
44b3bcc3fc | ||
|
|
89e186014e | ||
|
|
40bde873bc | ||
|
|
12db2f8011 | ||
|
|
e18a03abc3 | ||
|
|
2205506aa3 | ||
|
|
15c6b7a196 | ||
|
|
9171f12069 | ||
|
|
acf359777e | ||
|
|
a9f91a875b | ||
|
|
4665a2f033 | ||
|
|
673292b995 | ||
|
|
b1d64ee476 | ||
|
|
5fb1e9c120 | ||
|
|
801069d4cc | ||
|
|
d3706a24e4 | ||
|
|
0a4a31d17b | ||
|
|
3838267770 | ||
|
|
2c39714dff | ||
|
|
4291636619 | ||
|
|
189e4e3a64 | ||
|
|
a6ef1cd66b | ||
|
|
f2012eeeb8 | ||
|
|
e2aeab2b60 | ||
|
|
dce4b81728 | ||
|
|
e4adb509e0 | ||
|
|
eae5f9b958 | ||
|
|
9c6951e4ba | ||
|
|
dce6684c59 | ||
|
|
43058ac1d5 | ||
|
|
55c0afbe3a | ||
|
|
b34461febe | ||
|
|
e3c47b60e0 | ||
|
|
7602b868f4 | ||
|
|
880a100a60 | ||
|
|
3b563ab21b | ||
|
|
a86c6dc2c6 | ||
|
|
1476f829c4 | ||
|
|
26acc9a6b1 | ||
|
|
510a231e14 | ||
|
|
3bbbbd07ea | ||
|
|
640b03b671 | ||
|
|
7a3e0445ba | ||
|
|
00a946bc2e | ||
|
|
66251abd38 | ||
|
|
312ce9ad05 | ||
|
|
362e355db2 | ||
|
|
cf2e3227cc | ||
|
|
01f69e6b10 | ||
|
|
a211ea4e68 | ||
|
|
fcde92ad89 | ||
|
|
0fc7aa8cc0 | ||
|
|
be363ef8d4 | ||
|
|
b1daa6a693 | ||
|
|
05793cb104 | ||
|
|
a5c421863e | ||
|
|
e79edabf98 | ||
|
|
d95993554e | ||
|
|
f49e1d32c9 | ||
|
|
a15d4532fa | ||
|
|
27955ae8e9 | ||
|
|
c078968f66 | ||
|
|
f90edd0d9f | ||
|
|
62a9f87f45 | ||
|
|
f510613d55 | ||
|
|
645704dfd3 | ||
|
|
13d56b8b37 | ||
|
|
c5990c4f65 | ||
|
|
94c4baccad | ||
|
|
bb1e208d30 | ||
|
|
fce55993bc | ||
|
|
31c9dbc881 | ||
|
|
c9b0fcaa32 | ||
|
|
37a63d37e2 | ||
|
|
1daacced5a | ||
|
|
cea33e40df | ||
|
|
2b3ac015bb | ||
|
|
1aa0a80de7 | ||
|
|
4dd1156444 | ||
|
|
c10f298dc6 | ||
|
|
e8c0033f5f | ||
|
|
31c29f4318 | ||
|
|
e0be94389e | ||
|
|
d660b29ef0 | ||
|
|
490d3a8f21 | ||
|
|
02c310982e | ||
|
|
c3008512f1 | ||
|
|
22d2fae30c | ||
|
|
dac9ed17f1 | ||
|
|
709194c88c | ||
|
|
8de8af6850 | ||
|
|
7bda8083fb | ||
|
|
a082b57c3f | ||
|
|
547340659f | ||
|
|
29d12ddcbc | ||
|
|
f95fdd4d4e | ||
|
|
bf6db4eee7 | ||
|
|
fe39589771 | ||
|
|
d88f0c4cd1 | ||
|
|
a2a026e116 | ||
|
|
38ad6ed3b3 | ||
|
|
9d72bf4712 | ||
|
|
15429198b8 | ||
|
|
3da4a5e503 | ||
|
|
7ab1208c65 | ||
|
|
7c7a904315 | ||
|
|
d3c0a90a3c | ||
|
|
6bfca1582e | ||
|
|
ba4624c437 | ||
|
|
c9cce01868 | ||
|
|
1866b5ca44 | ||
|
|
1145b84f8b | ||
|
|
36f891c6cd | ||
|
|
d1c54223cb | ||
|
|
0ce3131ffd | ||
|
|
3d8cc71601 | ||
|
|
914e60a872 | ||
|
|
4cb697205e | ||
|
|
5d54697c29 | ||
|
|
edbca390ed | ||
|
|
d468cae86b | ||
|
|
4136621e93 | ||
|
|
9168b6e5de | ||
|
|
74e74d76d9 | ||
|
|
b8b105b54e | ||
|
|
3be15a310e | ||
|
|
ceed09afea | ||
|
|
7541bc9d48 | ||
|
|
23c3ea4ecc | ||
|
|
419c351862 | ||
|
|
2746f50a7c | ||
|
|
7c57dd04de | ||
|
|
59eae3260d | ||
|
|
f9f475d76d | ||
|
|
e888e9621c | ||
|
|
3450b9fee8 | ||
|
|
d0f891ca31 | ||
|
|
41f5157c1e | ||
|
|
f71513cab5 | ||
|
|
6c055e3400 | ||
|
|
7ed0389051 | ||
|
|
2946ea0759 | ||
|
|
589905fc38 | ||
|
|
4cdca85699 | ||
|
|
363a933f25 | ||
|
|
d0f7b85ae0 | ||
|
|
9d5a22a0aa | ||
|
|
88e8b1ede0 | ||
|
|
f54403284f | ||
|
|
79b181f9c9 | ||
|
|
9526a3c35d | ||
|
|
86b57d552f | ||
|
|
aae5f87d13 | ||
|
|
0d386ff3f1 | ||
|
|
fb39450067 | ||
|
|
00e2466bc7 | ||
|
|
37fabbeecd | ||
|
|
a846c0160c | ||
|
|
cbb9fd4218 | ||
|
|
1a86ed4e7a | ||
|
|
80a2dd924f | ||
|
|
aebdefbbf7 | ||
|
|
a399e9ccb2 | ||
|
|
862c36a08b | ||
|
|
6b037372b6 | ||
|
|
ef94f2e391 | ||
|
|
6c6ae2db60 | ||
|
|
1930d9c345 | ||
|
|
640e7bc06c | ||
|
|
46850214df | ||
|
|
647b578ce6 | ||
|
|
1d5ae1362a | ||
|
|
9634688559 | ||
|
|
96b586c165 | ||
|
|
b1be6c6def | ||
|
|
b1170621c8 | ||
|
|
3c1e29db9f | ||
|
|
ffb3ed8ef7 | ||
|
|
d18f61688d | ||
|
|
7d290daa73 | ||
|
|
383161c14c | ||
|
|
ba4791a15d | ||
|
|
950823fac9 | ||
|
|
b563f1bd78 | ||
|
|
b38a37c3bb | ||
|
|
b7147ff532 | ||
|
|
e5b67a6795 | ||
|
|
add6b3edee | ||
|
|
0308dfecf5 | ||
|
|
d365a6a347 | ||
|
|
8229d19f21 | ||
|
|
bcd2adf977 | ||
|
|
79fde49084 | ||
|
|
57f2b1fa27 | ||
|
|
4447190dd6 | ||
|
|
5fcaf18025 | ||
|
|
009580676f | ||
|
|
23b94c2468 | ||
|
|
f8199935fa | ||
|
|
5c8a5307d6 | ||
|
|
3f686d8719 | ||
|
|
7ce1938543 | ||
|
|
556089e6a1 | ||
|
|
957bd4b886 | ||
|
|
125263f216 | ||
|
|
9010fd8035 | ||
|
|
e17f1c4e31 | ||
|
|
1020bddb15 | ||
|
|
4e6e0f53be | ||
|
|
4dac60540a | ||
|
|
178cba7cf0 | ||
|
|
98cdeac9f6 | ||
|
|
f8eabd38ba | ||
|
|
731065a32e | ||
|
|
b03e76bdb9 | ||
|
|
64341cfb72 | ||
|
|
ee3235e7e0 | ||
|
|
5b80ee91c6 | ||
|
|
28544a4e29 | ||
|
|
b4cf315d6f | ||
|
|
1b8567e11e | ||
|
|
31d78b7bb3 | ||
|
|
b7c429a72a | ||
|
|
eafab0fc35 | ||
|
|
c81317b5b0 | ||
|
|
be723811c8 | ||
|
|
99bcd95756 | ||
|
|
3dec244d5b | ||
|
|
6a4609c28f | ||
|
|
7b6eedbdf4 | ||
|
|
39881b5576 | ||
|
|
2b13166c8d | ||
|
|
ebf0e8f435 | ||
|
|
e3df1e954d | ||
|
|
ffc8e54cdc | ||
|
|
819fb2b14c | ||
|
|
56baa7bf04 | ||
|
|
f5021e8bc0 | ||
|
|
2378b41e9f | ||
|
|
c52ae4f99f | ||
|
|
7200b21203 | ||
|
|
4a025cafb4 | ||
|
|
b4a2114fd4 | ||
|
|
f01383c02a | ||
|
|
21539466fd | ||
|
|
73a36679df | ||
|
|
b79d680580 | ||
|
|
486cd48daf | ||
|
|
03ef16a4fa | ||
|
|
da31fc9c76 | ||
|
|
ac00b8537f | ||
|
|
01eff6bc6b | ||
|
|
ec4881da5a | ||
|
|
68bb67312e | ||
|
|
e491c61fa5 | ||
|
|
b8e5f22cb7 | ||
|
|
f9e2fb9d74 | ||
|
|
59500d78d0 | ||
|
|
22d6ce826f | ||
|
|
a7839d77cd | ||
|
|
79f9cfae80 | ||
|
|
f767ab0cc9 | ||
|
|
55a45e3c0e | ||
|
|
a1132442ff | ||
|
|
6d1d1bb000 | ||
|
|
db5e803439 | ||
|
|
92b45581af | ||
|
|
8046ef5b6b | ||
|
|
03977b5619 | ||
|
|
28245e252c | ||
|
|
13d88c7fec | ||
|
|
f4663b0e32 | ||
|
|
3cd5e43fdf | ||
|
|
753d86d6d8 | ||
|
|
e49aaa9f2c | ||
|
|
022d1df97d | ||
|
|
3b2b2d762c | ||
|
|
afc533283a | ||
|
|
dcbaa3e64a | ||
|
|
5810d2ba18 | ||
|
|
b36b5fa8da | ||
|
|
18d5a9159f | ||
|
|
588a9ae10d | ||
|
|
0aa8008f0a | ||
|
|
9cc2bab737 | ||
|
|
c7f5d13e19 | ||
|
|
b0b28d21d9 | ||
|
|
9ef68841c0 | ||
|
|
ee7e7a7019 | ||
|
|
fb4d14d49f | ||
|
|
6b9235f185 | ||
|
|
5ad1a652a0 | ||
|
|
33f99e9c70 | ||
|
|
4f7fcb19d5 | ||
|
|
df6194de5f | ||
|
|
bf6aaed5e0 | ||
|
|
1946ff652d | ||
|
|
a6a72755b8 | ||
|
|
480b452e38 | ||
|
|
4c0a861f91 | ||
|
|
8894939577 | ||
|
|
020bff3ab1 | ||
|
|
d2b8468bf4 | ||
|
|
3e6d118d10 | ||
|
|
561b49fb78 | ||
|
|
bb84f1ea3c | ||
|
|
ae57f3cd46 | ||
|
|
6a3d9b2aa2 | ||
|
|
a7cc9664c0 | ||
|
|
bfbae8ad12 | ||
|
|
e84c93dfce | ||
|
|
7d311915e7 | ||
|
|
0cee5f5d27 | ||
|
|
6bd2d9054e | ||
|
|
3e12972a03 | ||
|
|
0eacd8161a | ||
|
|
df280811a1 | ||
|
|
0fafb385f9 | ||
|
|
f866836d60 | ||
|
|
818dee31d8 | ||
|
|
b45803898d | ||
|
|
9944d949fc | ||
|
|
2108141b4e | ||
|
|
bdff0955dc | ||
|
|
3e676f67ff | ||
|
|
230ee49428 | ||
|
|
6a3c88fb5b | ||
|
|
4d4b02848b | ||
|
|
518048bc64 | ||
|
|
4abc97f44b | ||
|
|
741db16916 | ||
|
|
647fc75add | ||
|
|
eca7831281 | ||
|
|
f5108459be | ||
|
|
6ef90054bc | ||
|
|
e33a407aaf | ||
|
|
73689caa5f | ||
|
|
70488271bd | ||
|
|
196256fdcd | ||
|
|
0e76dc169e | ||
|
|
61548dc5a8 | ||
|
|
662bea239c | ||
|
|
6492ec8c6b | ||
|
|
c605b24432 | ||
|
|
f9b1c614bc | ||
|
|
8a84ee7660 | ||
|
|
b4c62bd32b | ||
|
|
eb72f3ed30 | ||
|
|
1f4ae0425c | ||
|
|
f0bb9da9c6 | ||
|
|
e27148240a | ||
|
|
9d4ee0d766 | ||
|
|
7a351d3407 | ||
|
|
ce4d76ef21 | ||
|
|
407402df14 | ||
|
|
91aec8107a | ||
|
|
dd1f95d24d | ||
|
|
94a1a84a59 | ||
|
|
2f8a262a0e | ||
|
|
958e954b93 | ||
|
|
08e1a06fcd | ||
|
|
ef8891351f | ||
|
|
5afd32b2d9 | ||
|
|
d2bfde30f0 | ||
|
|
3bb327e93f | ||
|
|
24813331c6 | ||
|
|
dd1c0edd4b | ||
|
|
1d46178d72 | ||
|
|
df8dc83fc7 | ||
|
|
23ed49b330 | ||
|
|
2d3ed2a3c7 | ||
|
|
7e0163383f | ||
|
|
854beb39ce | ||
|
|
588cad24e2 | ||
|
|
9bf3d2b7ce | ||
|
|
90748f8b74 | ||
|
|
6ef0e667d2 | ||
|
|
5de9c97ff5 | ||
|
|
53d8032656 | ||
|
|
25f5605ad8 | ||
|
|
b8fd3abdd5 | ||
|
|
7f2481e976 | ||
|
|
37dbb04608 | ||
|
|
d313184cd0 | ||
|
|
d82a7e7c0b | ||
|
|
4501320793 | ||
|
|
a8924a7b36 | ||
|
|
551e9ba17c | ||
|
|
7f0baaab61 | ||
|
|
56681c89cd | ||
|
|
279df6d57e | ||
|
|
1810c9e7e3 | ||
|
|
aa26f99367 | ||
|
|
9ef79c2f44 | ||
|
|
92cccff866 | ||
|
|
200537ed6f | ||
|
|
5ff16798a3 | ||
|
|
9a96e211f9 | ||
|
|
3870edf376 | ||
|
|
ef5410aaf0 | ||
|
|
6ca3cab0d5 | ||
|
|
24d32e89a1 | ||
|
|
bd716b38c7 | ||
|
|
24c3b40b56 | ||
|
|
c913c0e6f7 | ||
|
|
d7f5357059 | ||
|
|
4fc3c8ef26 | ||
|
|
c85e56940e | ||
|
|
847e472130 | ||
|
|
e44fb08f6a | ||
|
|
490b9b0e0e | ||
|
|
302f625ec7 | ||
|
|
82f0a2d849 | ||
|
|
da68d32482 | ||
|
|
59f841bc20 | ||
|
|
75af025c55 | ||
|
|
2366305e83 | ||
|
|
b909ac2d95 | ||
|
|
05b0f142c8 | ||
|
|
9fac39c5e0 | ||
|
|
09eefd7973 | ||
|
|
e8f7eeb5dc | ||
|
|
a16702627a | ||
|
|
4af66f6897 | ||
|
|
85a79f53d7 | ||
|
|
d3815759a9 | ||
|
|
a6069c3226 | ||
|
|
03434b20cf | ||
|
|
306275d230 | ||
|
|
28af946c4b | ||
|
|
27e5041d97 | ||
|
|
0c7972b3f1 | ||
|
|
c0a276e850 | ||
|
|
cf05cd5bf3 | ||
|
|
9f6eb74d28 | ||
|
|
cd0744ddfa | ||
|
|
021dca0072 | ||
|
|
fc1d19b6e5 | ||
|
|
739303b3d9 | ||
|
|
994c38c0c7 | ||
|
|
2acddf66b1 | ||
|
|
1152da8bbd | ||
|
|
85917ea4d4 | ||
|
|
5ad22dc4af | ||
|
|
195df4f811 | ||
|
|
bf1b4ec2bb | ||
|
|
117045170d | ||
|
|
284f91b3e0 | ||
|
|
5f13a3aa11 | ||
|
|
34336931fa | ||
|
|
f81a46da5b | ||
|
|
6abb9b27f9 | ||
|
|
bc4a9d9dd0 | ||
|
|
06302a1082 | ||
|
|
cb2c48d015 | ||
|
|
66eeabd7d0 | ||
|
|
9fc63d7613 | ||
|
|
a72a929d12 | ||
|
|
93a5213b99 | ||
|
|
80d1de7832 | ||
|
|
a5eb5c7bb0 | ||
|
|
13c593ce0e | ||
|
|
7f97b9f999 | ||
|
|
e0eb4fbda8 | ||
|
|
d60b9714fe | ||
|
|
c95a5486b1 | ||
|
|
41dda781ee | ||
|
|
49a5fdbd1f | ||
|
|
9c605ba9be | ||
|
|
d98d9c9e72 | ||
|
|
a811de2ba7 | ||
|
|
cba8559137 | ||
|
|
8d36049dcd | ||
|
|
8d5a9e84fc | ||
|
|
729680714c | ||
|
|
3567e31009 | ||
|
|
8694fd61ba | ||
|
|
4977939c05 | ||
|
|
8e55ed5923 | ||
|
|
f59efe0bfe | ||
|
|
a5f6e4b0c4 | ||
|
|
8ee8550aac | ||
|
|
b23cc72037 | ||
|
|
ca5ce00783 | ||
|
|
252c28d516 | ||
|
|
4753b8b2b9 | ||
|
|
ee118c872f | ||
|
|
eb061d9acc | ||
|
|
dfec052eb9 | ||
|
|
054727cb00 | ||
|
|
821ca4e5cd | ||
|
|
9b6fa79e32 | ||
|
|
860df3e10e | ||
|
|
826c139ef3 | ||
|
|
79afe82774 | ||
|
|
baf6945a7a | ||
|
|
74226e5904 | ||
|
|
01c68ba5e5 | ||
|
|
f7f76a1029 | ||
|
|
24f8a01f17 | ||
|
|
6d65768dab | ||
|
|
7dd0320236 | ||
|
|
6f924f84ba | ||
|
|
a07105d6c5 | ||
|
|
281aae8eea | ||
|
|
1bf2db24f2 | ||
|
|
9dc6c454f4 | ||
|
|
ce69f18ec7 | ||
|
|
aa744edacc | ||
|
|
239b0faa4c | ||
|
|
338b0e2b7b | ||
|
|
0e7e06349e | ||
|
|
3b85aa35df | ||
|
|
e59ad87044 | ||
|
|
fbb7270e55 | ||
|
|
51a9c66856 | ||
|
|
fb175eed14 | ||
|
|
cca35390ad | ||
|
|
c242ad4497 | ||
|
|
6a2bd1f898 | ||
|
|
14f50ab31c | ||
|
|
061e52b89f | ||
|
|
47c4ef510d | ||
|
|
95eb5e2ad6 | ||
|
|
3459e8f4fd | ||
|
|
42c7d7ece1 | ||
|
|
6a8fe45543 | ||
|
|
89708ae277 | ||
|
|
17380a7191 | ||
|
|
7e86438871 | ||
|
|
e196b23723 | ||
|
|
4f2328bc09 | ||
|
|
bd3262e07f | ||
|
|
45f1f23064 | ||
|
|
45e520663d | ||
|
|
053ba83be6 | ||
|
|
af3a0bd7d1 | ||
|
|
6e79ce348d | ||
|
|
6530b16fc7 | ||
|
|
d664c09a79 | ||
|
|
faa254dd61 | ||
|
|
671847387f | ||
|
|
c61e4fb15c | ||
|
|
2b6ffad99a | ||
|
|
b3515d0e09 | ||
|
|
1f913ec130 | ||
|
|
5d9dcfccbf | ||
|
|
11f9bbf6ea | ||
|
|
c2520a8533 | ||
|
|
93ef9d1dc9 | ||
|
|
1126812f8f | ||
|
|
1e896777d1 | ||
|
|
5918735ebc | ||
|
|
671ea7ae74 | ||
|
|
fa58d01644 | ||
|
|
248805fedd | ||
|
|
c8bd6fd100 | ||
|
|
8f658fbc32 | ||
|
|
9c9439ef73 | ||
|
|
1ecae6d33a | ||
|
|
c162a091fe | ||
|
|
1cd0a5fe03 | ||
|
|
55a1764712 | ||
|
|
4b295c46d1 | ||
|
|
cfca536583 | ||
|
|
8347027e17 | ||
|
|
2fc3387429 | ||
|
|
41e9cd3157 | ||
|
|
abb7f46371 | ||
|
|
727653695d | ||
|
|
ade97dcd95 | ||
|
|
817b6601d2 | ||
|
|
97aeb16551 | ||
|
|
6b75439ae4 | ||
|
|
38e5fdadf0 | ||
|
|
a2ad1c9606 | ||
|
|
4645cc789e | ||
|
|
24c2a0ca60 | ||
|
|
8965c9369e | ||
|
|
4791e5f6b5 | ||
|
|
068f47d91f | ||
|
|
3c6f569360 | ||
|
|
6496c304f9 | ||
|
|
cc8a34cd14 | ||
|
|
ad45bf1d61 | ||
|
|
879b54f6e9 | ||
|
|
639ced08fc | ||
|
|
7b9f44cb17 | ||
|
|
ea379e64e7 | ||
|
|
5067db39f8 | ||
|
|
bfca9998ea | ||
|
|
1604b81919 | ||
|
|
a9ef5a90eb | ||
|
|
bd28b48be1 | ||
|
|
0e39c129b7 | ||
|
|
0a5c6d3fd6 | ||
|
|
2303d6afc4 | ||
|
|
274cea19bf | ||
|
|
24bec09b9e | ||
|
|
8b12d2d71a | ||
|
|
28561b2b77 | ||
|
|
b540ed70ba | ||
|
|
846204ed9e | ||
|
|
f07bf5be2a | ||
|
|
0fedfd2ff9 | ||
|
|
99491e46ec | ||
|
|
4d67c80350 | ||
|
|
63f12986b4 | ||
|
|
eebb679754 | ||
|
|
d6af00d9bd | ||
|
|
adb6ae849d | ||
|
|
b2603d6c93 | ||
|
|
d649334662 | ||
|
|
d74e340f32 | ||
|
|
5f985a36a2 | ||
|
|
4906844ea7 | ||
|
|
9ac2b2eb7b | ||
|
|
1e1f69febc | ||
|
|
a87e57e946 | ||
|
|
7868b42ef2 | ||
|
|
eb5f46d8dd | ||
|
|
11352bbdbb | ||
|
|
1a1fe43347 | ||
|
|
bc9f481c2b | ||
|
|
042a357278 | ||
|
|
19a48951b7 | ||
|
|
ddf8c68d26 | ||
|
|
d75564c7e3 | ||
|
|
c918916bcb | ||
|
|
95de3a460e | ||
|
|
7fb37016fd | ||
|
|
2f19cd4b87 | ||
|
|
d2162717b8 | ||
|
|
d2fa7c4317 | ||
|
|
beb5801eee | ||
|
|
1f36f5bd8d | ||
|
|
468d6d8eea | ||
|
|
726bb13e9a | ||
|
|
b3c08a8ad6 | ||
|
|
75d23b2c10 | ||
|
|
8c575c0cea | ||
|
|
6ec9f0a3d3 | ||
|
|
ca5a8a81a2 | ||
|
|
845e1d4463 | ||
|
|
6d4128324b | ||
|
|
708ae1c076 | ||
|
|
941ec1e451 | ||
|
|
cf2b5d030c | ||
|
|
8d8035a173 | ||
|
|
e2d20a337d | ||
|
|
49c336e514 | ||
|
|
b6bb0caf8d | ||
|
|
4b6722ab44 | ||
|
|
12904105f8 | ||
|
|
a1f519cbec | ||
|
|
292b892478 | ||
|
|
957a7d4e92 | ||
|
|
e72a38c8b6 | ||
|
|
e565a5e1c3 | ||
|
|
78811462f1 | ||
|
|
fb0a995d7b | ||
|
|
e8eb1ee0c7 | ||
|
|
b0829cc352 | ||
|
|
420094174e | ||
|
|
fafa468fea | ||
|
|
370ca2b8a3 | ||
|
|
72cf6734a1 | ||
|
|
cc7cf54353 | ||
|
|
5ade852172 | ||
|
|
8055ec9156 | ||
|
|
a12a43d352 | ||
|
|
70b3a3a442 | ||
|
|
1e11b89d04 | ||
|
|
0d5a42f635 | ||
|
|
7a50bdafe3 | ||
|
|
722ed6fc5e | ||
|
|
985b3a7206 | ||
|
|
f98c23d460 | ||
|
|
2b010f019f | ||
|
|
de47eb3666 | ||
|
|
77d4705182 | ||
|
|
20ee12e986 | ||
|
|
cf14587b5c | ||
|
|
4bc1320709 | ||
|
|
ce8fa14d41 | ||
|
|
0a93569b9e | ||
|
|
ca42523cd0 | ||
|
|
3503a0fefb | ||
|
|
ff6e77c874 | ||
|
|
7da072b433 | ||
|
|
041a2a6e72 | ||
|
|
6048c1fbdc | ||
|
|
381c2150d4 | ||
|
|
a73c20d7f5 | ||
|
|
9560548722 | ||
|
|
a2b29c1afd | ||
|
|
78dd81a8b4 | ||
|
|
0e5acda26e | ||
|
|
7aeb455597 | ||
|
|
0d02dfbbbd | ||
|
|
8b74b04de0 | ||
|
|
dee9dc2164 | ||
|
|
5aa96727e9 | ||
|
|
34270cdcaa | ||
|
|
b790986f37 | ||
|
|
068a032dac | ||
|
|
0926bb783d | ||
|
|
4c4f760d4a | ||
|
|
f4675a5648 | ||
|
|
1f628235d4 | ||
|
|
07a8d082e4 | ||
|
|
81f93e34b8 | ||
|
|
1289c4ee41 | ||
|
|
86ad54f671 | ||
|
|
705695b41d | ||
|
|
8fad310ce1 | ||
|
|
6d1193ee70 | ||
|
|
fd9b8f103e | ||
|
|
985d766f05 | ||
|
|
0ebf540d65 | ||
|
|
7323bb776b | ||
|
|
20ecd5c60d | ||
|
|
fe99b568a0 | ||
|
|
f3bbb686d2 | ||
|
|
5566a025b5 | ||
|
|
fae9729560 | ||
|
|
ce6a316bde | ||
|
|
186691a9db | ||
|
|
21bcd61c92 | ||
|
|
059fc70337 | ||
|
|
37487b0c0b | ||
|
|
c36e47188b | ||
|
|
5ccda08770 | ||
|
|
e2f826b8fc | ||
|
|
0c9a624026 | ||
|
|
b3402d9344 | ||
|
|
9856cecb71 | ||
|
|
4a626cea20 | ||
|
|
350756e738 | ||
|
|
5123614f89 | ||
|
|
925f1524cf | ||
|
|
28bb88a038 | ||
|
|
63e833a398 | ||
|
|
ad550acc60 | ||
|
|
8707086914 | ||
|
|
da1d2b67f7 | ||
|
|
6d55d8d341 | ||
|
|
2aab28149f | ||
|
|
7659b23f38 | ||
|
|
3efaccb298 | ||
|
|
4b56a4d3be | ||
|
|
2b5ac5b4db | ||
|
|
f899a8dde5 | ||
|
|
1d1bfa1b39 | ||
|
|
e216833286 | ||
|
|
1aeb27b54f | ||
|
|
f995c9187e | ||
|
|
66aedbb0b3 | ||
|
|
5d55ffe6ee | ||
|
|
26d0d3f424 | ||
|
|
1408c2664e | ||
|
|
6dc6bd5b92 | ||
|
|
f46fdb4d4e | ||
|
|
2b2a8f3d2e | ||
|
|
ed04e2735e | ||
|
|
cf06256997 | ||
|
|
5efdcd5655 | ||
|
|
ca224c81dd | ||
|
|
4f0256bcc3 | ||
|
|
0729e883d8 | ||
|
|
32aaeccee1 | ||
|
|
871d8c54ec | ||
|
|
1cd1ab1c60 | ||
|
|
2c6c2bde3c | ||
|
|
1d24b2dc44 | ||
|
|
a9f0793e69 | ||
|
|
2e456eeddc | ||
|
|
830133b1a8 | ||
|
|
c89b08ea1f | ||
|
|
68e0b25d32 | ||
|
|
07ea948f50 | ||
|
|
2d1aaedb9c | ||
|
|
be2f2d6595 | ||
|
|
cf91bb42f0 | ||
|
|
9ef4859f55 | ||
|
|
f99b786a6e | ||
|
|
107b7be95b | ||
|
|
b89384d810 | ||
|
|
3de1ce062c | ||
|
|
d49f0d67af | ||
|
|
3b03699fbc | ||
|
|
eefeb3bb93 | ||
|
|
3b69755117 | ||
|
|
90e27d3b7d | ||
|
|
bb3b69962a | ||
|
|
682730fbe4 | ||
|
|
e4ed8490ac | ||
|
|
59d3b1ebac | ||
|
|
1b65adeebc | ||
|
|
674c25fceb | ||
|
|
0dbcfff679 | ||
|
|
ad98bdd165 | ||
|
|
6095c4f3d5 | ||
|
|
3a50e2948b | ||
|
|
d1453a41c2 | ||
|
|
16bb0561ea | ||
|
|
f97b1626b3 | ||
|
|
af609dfb67 | ||
|
|
50cd8850f8 | ||
|
|
8926f0e9c2 | ||
|
|
70135d606e | ||
|
|
dc005a0719 | ||
|
|
fb214b62a1 | ||
|
|
6841f37ccc | ||
|
|
55f5335f18 | ||
|
|
67a0f815e4 | ||
|
|
32f895bc5f | ||
|
|
904619e219 | ||
|
|
036add8e9e | ||
|
|
bdbff4824b | ||
|
|
fa61cca6ea | ||
|
|
34b4e70015 | ||
|
|
c939f7f0fc | ||
|
|
af79ad451e | ||
|
|
f3adcda6b7 | ||
|
|
bfbaecaf49 | ||
|
|
2831fc8088 | ||
|
|
237ab29ff8 | ||
|
|
b0ef9b0c42 | ||
|
|
2cd31f65e4 | ||
|
|
7b2dbc603c | ||
|
|
f186f6b2d4 | ||
|
|
86d7a903a1 | ||
|
|
7e0a20b4ba | ||
|
|
8e8d5b2fe0 | ||
|
|
c18be2fc41 | ||
|
|
e606e0b4de | ||
|
|
b46ccd0aa5 | ||
|
|
9d1234e866 | ||
|
|
0d128c3a1a | ||
|
|
fbb5dabdd5 | ||
|
|
899a704eb7 | ||
|
|
35eb53cc95 | ||
|
|
7f292c3fb5 | ||
|
|
d4dda546d0 | ||
|
|
3965b4e66e | ||
|
|
fda30b36d1 | ||
|
|
0df8e78391 | ||
|
|
9e9d3cd249 | ||
|
|
3537460b0e | ||
|
|
aac146c7bc | ||
|
|
5b779ad410 | ||
|
|
d810d4a4c0 | ||
|
|
fc95045259 | ||
|
|
d1adb9acbc | ||
|
|
3bda71ef15 | ||
|
|
5a946e218f | ||
|
|
3076779a14 | ||
|
|
af25f14d73 | ||
|
|
a45c4c8f39 | ||
|
|
104b2dfc72 | ||
|
|
a38e46a30f | ||
|
|
7606159a78 | ||
|
|
9b53775840 | ||
|
|
8742ad8da6 | ||
|
|
b26fa74e7e | ||
|
|
f27c379b1e | ||
|
|
8145791e6f | ||
|
|
5be14bc2ba | ||
|
|
fcdd3750c2 | ||
|
|
e4b4d1aa59 | ||
|
|
9cdeabfbb6 | ||
|
|
c32d3eb926 | ||
|
|
f2176a12a7 | ||
|
|
bdd6817cee | ||
|
|
f992ec1440 | ||
|
|
0b5f45289d | ||
|
|
83d08b18f8 | ||
|
|
605b3619cd | ||
|
|
eab845a4c5 | ||
|
|
9f3533632a | ||
|
|
da7a0968be | ||
|
|
883567851c | ||
|
|
ce7593c799 | ||
|
|
9ba59eceaa | ||
|
|
eb99df894a | ||
|
|
eff73bad76 | ||
|
|
dbff652aed | ||
|
|
ca20eb2cba | ||
|
|
5812c267b1 | ||
|
|
f5bd280b51 | ||
|
|
bb804c2045 | ||
|
|
b52bc2bcd1 | ||
|
|
47efc55621 | ||
|
|
69e1df6b65 | ||
|
|
f3c4234f92 | ||
|
|
8a2f1bc056 | ||
|
|
8e6a77d216 | ||
|
|
79e764bd17 | ||
|
|
502acc19c9 | ||
|
|
2fe039e349 | ||
|
|
ccd79d9db1 | ||
|
|
badb914d46 | ||
|
|
5f446e0022 | ||
|
|
20ac472d1f | ||
|
|
8c54a49319 | ||
|
|
a60aed70b5 | ||
|
|
a201b15648 | ||
|
|
6d46a35900 | ||
|
|
55d394490a | ||
|
|
47aaca5191 | ||
|
|
90cda8ede2 | ||
|
|
17d39e3db2 | ||
|
|
d02be06df9 | ||
|
|
36f04a04ee | ||
|
|
9738d19343 | ||
|
|
36bd42b0dd | ||
|
|
a74b4b94a9 | ||
|
|
6e1866ac18 | ||
|
|
03f73d3aad | ||
|
|
1196e82587 | ||
|
|
40ca018e66 | ||
|
|
bc0a402dac | ||
|
|
9ce657f413 | ||
|
|
c9545970ac | ||
|
|
48a3fc30f3 | ||
|
|
e7e372bad2 | ||
|
|
a7d98f80dc | ||
|
|
770a52d354 | ||
|
|
e03d9f84c6 | ||
|
|
e09dfb93f1 | ||
|
|
0a651fef7c | ||
|
|
8f5493e573 | ||
|
|
265efb85a1 | ||
|
|
b77301350b | ||
|
|
728a7f2225 | ||
|
|
9f9c605422 | ||
|
|
78d232edaf | ||
|
|
0cc2e1f848 | ||
|
|
1f05290982 | ||
|
|
6df273a865 | ||
|
|
8b2f61ec2a | ||
|
|
2ce5238cf7 | ||
|
|
fe0b53d7f5 | ||
|
|
36eb0e945f | ||
|
|
a95d66a587 | ||
|
|
92092a56ae | ||
|
|
c5b22f341a | ||
|
|
3869714005 | ||
|
|
a4b0dc7426 | ||
|
|
3dc3dd3bd6 | ||
|
|
7c926db2bd | ||
|
|
c5450394b0 | ||
|
|
b26e350e72 | ||
|
|
e723c6d63b | ||
|
|
9bc93fb18e | ||
|
|
2523dee7e0 | ||
|
|
420d3065f4 | ||
|
|
d9b62b39e1 | ||
|
|
a7548794c0 | ||
|
|
004cbb4b78 | ||
|
|
36fc30d8e7 | ||
|
|
4bc855b610 | ||
|
|
f16167c3e8 | ||
|
|
43891d6cc1 | ||
|
|
0e69fe6bc6 | ||
|
|
0f04d2f032 | ||
|
|
977bd22e36 | ||
|
|
4c1634c9d7 | ||
|
|
8d40323761 | ||
|
|
0993edda11 | ||
|
|
912f9e18cb | ||
|
|
67ef816da0 | ||
|
|
79461d47d6 | ||
|
|
b76e031b30 | ||
|
|
ad0434c415 | ||
|
|
a30e5df6f2 | ||
|
|
a6baf00956 | ||
|
|
e2d4ebbe55 | ||
|
|
a292d99308 | ||
|
|
80a13f1ac7 | ||
|
|
c2684ca1f5 | ||
|
|
b843fb19fc | ||
|
|
56cbef8428 | ||
|
|
3f99ce540f | ||
|
|
1f0515ceff | ||
|
|
aeb6005f3b | ||
|
|
cb7140aa04 | ||
|
|
373204ef7f | ||
|
|
545f561d87 | ||
|
|
1292724a27 | ||
|
|
9d490bbf1c | ||
|
|
3142b682f2 | ||
|
|
fc3afbe449 | ||
|
|
0555bc4bc7 | ||
|
|
eb59590d77 | ||
|
|
9a786fd8be | ||
|
|
1691639d17 | ||
|
|
0b844bc72b | ||
|
|
58c52a4cd4 | ||
|
|
25e6fbb2ff | ||
|
|
4f6b6fc5f8 | ||
|
|
10d87c40db | ||
|
|
1668bfb3e8 | ||
|
|
fba1680d24 | ||
|
|
27c86a4d85 | ||
|
|
e8349b69ca | ||
|
|
13b5d247df | ||
|
|
76afbc9bcf | ||
|
|
70e7cb886b | ||
|
|
11b3424984 | ||
|
|
6308b497f2 | ||
|
|
96db8033f2 | ||
|
|
46a37618ef | ||
|
|
ec5cbe18d5 | ||
|
|
1beddd3d29 | ||
|
|
b4152d9634 | ||
|
|
7ccd25a4d5 | ||
|
|
9848c1d264 | ||
|
|
d70d00607f | ||
|
|
717cb182ce | ||
|
|
53a10a7bd9 | ||
|
|
e74f8f4bbe | ||
|
|
602a6beda8 | ||
|
|
422587a285 | ||
|
|
48aa852f42 | ||
|
|
429aef3b08 | ||
|
|
1778a2a6fb | ||
|
|
423e14f92f | ||
|
|
5d6322da2b | ||
|
|
a74872c6bf | ||
|
|
bd2d9a7fed | ||
|
|
630af80635 | ||
|
|
b493657c47 | ||
|
|
74abb99b0e | ||
|
|
2ec6624816 | ||
|
|
7ba2e728cd | ||
|
|
3a6e28da9c | ||
|
|
76fe572934 | ||
|
|
1bf303e566 | ||
|
|
6670a6e070 | ||
|
|
e0592b6d11 | ||
|
|
4498945b98 | ||
|
|
266b57c821 | ||
|
|
c7711fd2d4 | ||
|
|
4578b32364 | ||
|
|
279cc82a01 | ||
|
|
2ef8f00e91 | ||
|
|
943beb220d | ||
|
|
e6703e3cb0 | ||
|
|
feb0214ddc | ||
|
|
2cefcc8bfc | ||
|
|
896d9a4ee5 | ||
|
|
2841d78653 | ||
|
|
c7af72daae | ||
|
|
1deaac7508 | ||
|
|
eea3d559a7 | ||
|
|
44e303ad90 | ||
|
|
b3ccf02e06 | ||
|
|
5f407b3cc4 | ||
|
|
2c2097ce24 | ||
|
|
ce0fbabb4e | ||
|
|
c364bbb19b | ||
|
|
75e6889366 | ||
|
|
ffbc1167de | ||
|
|
a2ce0a0e0f | ||
|
|
a6453ad877 | ||
|
|
f1f6d23eeb | ||
|
|
61782d8f29 | ||
|
|
75e4d85681 | ||
|
|
8dd22d9178 | ||
|
|
58b9f5208f | ||
|
|
fea86426ed | ||
|
|
36e0fd8f5a | ||
|
|
1d8efb1a3a | ||
|
|
50649fb2a2 | ||
|
|
a4b1a4ce29 | ||
|
|
0eb0656d52 | ||
|
|
5b78e334a9 | ||
|
|
445f2bfe21 | ||
|
|
91564e36b0 | ||
|
|
7f3f995c56 | ||
|
|
2cad221d80 | ||
|
|
96760970ed | ||
|
|
7868909f43 | ||
|
|
854dac5340 | ||
|
|
9b32395772 | ||
|
|
fee826412c | ||
|
|
15a90f63b8 | ||
|
|
26878fa7ab | ||
|
|
8743c18c5a | ||
|
|
e906465dcb | ||
|
|
18826a9ebc | ||
|
|
4627821e79 | ||
|
|
a97cdebe11 | ||
|
|
c765b0b62d | ||
|
|
bb754b6f0a | ||
|
|
b88be0fbda | ||
|
|
59931d1591 | ||
|
|
1e36a12a17 | ||
|
|
a69216a79d | ||
|
|
4721651dbe | ||
|
|
cfaf72bc56 | ||
|
|
7b3fc0925c | ||
|
|
69b8d01de6 | ||
|
|
f233005988 | ||
|
|
f4966a96d4 | ||
|
|
23cad1eedd | ||
|
|
c1dd0eb348 | ||
|
|
256441906f | ||
|
|
1290f1584a | ||
|
|
138af70bd8 | ||
|
|
e5685dfca5 | ||
|
|
80c96cd54f | ||
|
|
0ec204f6e4 | ||
|
|
8adbf322a0 | ||
|
|
a84a6bd309 | ||
|
|
ef01913b9a | ||
|
|
f8ed554ddb | ||
|
|
0f899a2a1e | ||
|
|
cefecaec10 | ||
|
|
aa621e1a4a | ||
|
|
4c032723ba | ||
|
|
93f28d4eee | ||
|
|
c9621ff17a | ||
|
|
7e2436aba9 | ||
|
|
ef431eec29 | ||
|
|
e0f7d3241a | ||
|
|
a918306a99 | ||
|
|
22b8a5cc0f | ||
|
|
b5048d3b74 | ||
|
|
8ff17ddf52 | ||
|
|
7b3ecefcfc | ||
|
|
f816436771 | ||
|
|
04d23659b3 | ||
|
|
ec2cb81c65 | ||
|
|
f8dc5c4988 | ||
|
|
cd991eaa97 | ||
|
|
ad0e6a0f81 | ||
|
|
d3a925e675 | ||
|
|
378809f3a8 | ||
|
|
94061aa9fb | ||
|
|
71bf79cf6f | ||
|
|
6deefe0646 | ||
|
|
fdf6d55b9d | ||
|
|
e38c3d0303 | ||
|
|
4e1a2d3246 | ||
|
|
e48aa118b6 | ||
|
|
9403a4c949 | ||
|
|
c901694290 | ||
|
|
853418db94 | ||
|
|
a858b2a2cd | ||
|
|
09ca132102 | ||
|
|
a13b66135f | ||
|
|
5592cb427b | ||
|
|
7b67ef0c6f | ||
|
|
e6822eb1a5 | ||
|
|
f5483b0ad6 | ||
|
|
2a7d72c203 | ||
|
|
9183f275f5 | ||
|
|
23da167c27 | ||
|
|
d1e162a61f | ||
|
|
00984d0e77 | ||
|
|
f13fbff251 | ||
|
|
4a05caf4f7 | ||
|
|
833f37ea57 | ||
|
|
f229b19496 | ||
|
|
41cbf9a45e | ||
|
|
ff1a9a195a | ||
|
|
764b2f60c6 | ||
|
|
dc2689f779 | ||
|
|
4457df9a8a | ||
|
|
7611f95078 | ||
|
|
33f7500a59 | ||
|
|
e5b493289d | ||
|
|
ed596c3335 | ||
|
|
c84b667fa5 | ||
|
|
7cd7618e8c | ||
|
|
10b6f7aa47 | ||
|
|
255a86cbe2 | ||
|
|
771efca5c6 | ||
|
|
98e0b7e41c | ||
|
|
3d2f4ea404 | ||
|
|
18369bed2d | ||
|
|
fee45b7c46 | ||
|
|
1af1b4dfda | ||
|
|
5e0b3dacc6 | ||
|
|
2937268d53 | ||
|
|
7c1098c843 | ||
|
|
3cccdaddab | ||
|
|
b5c4f461bc | ||
|
|
192dcec5f9 | ||
|
|
3c482467ea | ||
|
|
d36302cb0c | ||
|
|
52fe86dcc9 | ||
|
|
a526cab590 | ||
|
|
dc13d4d5dc | ||
|
|
0052a650b8 | ||
|
|
45e1523a09 | ||
|
|
28799b1ff6 | ||
|
|
2b8bcf5475 | ||
|
|
7a39857ea7 | ||
|
|
960672d093 | ||
|
|
bf3def9303 | ||
|
|
43e506a843 | ||
|
|
b950c428a6 | ||
|
|
a9657bf5e8 | ||
|
|
f567d4702d | ||
|
|
c06c57e0db | ||
|
|
5b52f8ca67 | ||
|
|
723849c57c | ||
|
|
9478d27263 | ||
|
|
ff8b5536a5 | ||
|
|
38c515a600 | ||
|
|
ca6578026a | ||
|
|
34fb582074 | ||
|
|
d57a67e31c | ||
|
|
d0fb365e25 | ||
|
|
f16853c7bb | ||
|
|
d6c245a2f3 | ||
|
|
3432f02d5f | ||
|
|
61462dcf97 | ||
|
|
5f0f7b88cf | ||
|
|
2b1477234e | ||
|
|
811ad9c8bc | ||
|
|
a41f498e1f | ||
|
|
bb36fe7d3c | ||
|
|
98827b1d49 | ||
|
|
c829ecf08f | ||
|
|
98f6984018 | ||
|
|
b637d080d5 | ||
|
|
fab6bff310 | ||
|
|
43b051b984 | ||
|
|
a9bc508dc4 | ||
|
|
d4a4993285 | ||
|
|
5a96c1313b | ||
|
|
1fffafb13a | ||
|
|
b04271f93e | ||
|
|
e89885a076 | ||
|
|
55f4778731 | ||
|
|
1abd99f084 | ||
|
|
4ecf541cb6 | ||
|
|
2f570ca3a9 | ||
|
|
5aa897b5fd | ||
|
|
137b596943 | ||
|
|
5ff6048db0 | ||
|
|
ddbb1cb064 | ||
|
|
c560e9a1ef | ||
|
|
33e28b0971 | ||
|
|
87a3648e68 | ||
|
|
80f75bcbdd | ||
|
|
36b2ddac2d | ||
|
|
5b375124cc | ||
|
|
99cb8ebacf | ||
|
|
e6052ef4b4 | ||
|
|
d16ca33f38 | ||
|
|
1234619a48 | ||
|
|
e506bb3075 | ||
|
|
b5c071eed9 | ||
|
|
c32e6c01ed | ||
|
|
fda7c838a1 | ||
|
|
26a313d549 | ||
|
|
d461149969 | ||
|
|
e17ad60c2d | ||
|
|
16a282ccea | ||
|
|
4e5f0fc3a5 | ||
|
|
afb046a196 | ||
|
|
b10d30242d | ||
|
|
1cc53246e9 | ||
|
|
9072f9653e | ||
|
|
953af3d1d9 | ||
|
|
1a664b19de | ||
|
|
c92de93429 | ||
|
|
dbdd25742d | ||
|
|
0314fd593a | ||
|
|
b6afce773a | ||
|
|
38ff11f8c5 | ||
|
|
e14ee80282 | ||
|
|
364c838ea1 | ||
|
|
b13bbe3bdb | ||
|
|
1f562c003c | ||
|
|
66873b8c6c | ||
|
|
007a19a027 | ||
|
|
0ee65c9d2f | ||
|
|
e11e45a2e3 | ||
|
|
0f3e61146d | ||
|
|
987513d309 | ||
|
|
aa0c8fdefd | ||
|
|
53cdacd926 | ||
|
|
1914eb435b | ||
|
|
cfadbbda2b | ||
|
|
a471973eab | ||
|
|
5a4754deef | ||
|
|
cd3a5f8097 | ||
|
|
10f1d84f7e | ||
|
|
d4d32cbde7 | ||
|
|
8febae1546 | ||
|
|
a5e0398a29 | ||
|
|
96b0e42c42 | ||
|
|
ff779e58ab | ||
|
|
886b922596 | ||
|
|
611b7afb07 | ||
|
|
93b2a24b0e | ||
|
|
663024a215 | ||
|
|
9800e1c201 | ||
|
|
c15f6d3e8c | ||
|
|
56ed225f17 | ||
|
|
c637010c9d | ||
|
|
35e19b4f30 | ||
|
|
037e8f24c6 | ||
|
|
7c432fbe11 | ||
|
|
a1ab1a0ecc | ||
|
|
a87a6f0851 | ||
|
|
3d0f6d5d78 | ||
|
|
1df27e4edb | ||
|
|
e5ab4355be | ||
|
|
83b5cabac9 | ||
|
|
3be951f279 | ||
|
|
b2873132be | ||
|
|
f842750342 | ||
|
|
65884f296b | ||
|
|
16da432be3 | ||
|
|
164981f7a3 | ||
|
|
359b136b5e | ||
|
|
961bffcca4 | ||
|
|
94891778c4 | ||
|
|
d8fdf33be5 | ||
|
|
cf52b2db50 | ||
|
|
ee31921520 | ||
|
|
1d75089bf8 | ||
|
|
46c86f53ac | ||
|
|
3745b958e5 | ||
|
|
afe45f66d2 | ||
|
|
e3c663bb02 | ||
|
|
bf28e2d037 | ||
|
|
1f147f6bc6 | ||
|
|
97df15b205 | ||
|
|
98344157c0 | ||
|
|
83f73df814 | ||
|
|
a4e682bb28 | ||
|
|
4131d2da34 | ||
|
|
078598872f | ||
|
|
4b4cd13d31 | ||
|
|
7d83d735ad | ||
|
|
4d8a29b987 | ||
|
|
14d1483b06 | ||
|
|
d51036f57e | ||
|
|
d794be88e7 | ||
|
|
295742c0d7 | ||
|
|
17328d313d | ||
|
|
d92a79b876 | ||
|
|
6142ea1d46 | ||
|
|
39ed6235e8 | ||
|
|
05ed7d1336 | ||
|
|
299452cf84 | ||
|
|
fb7b5fc0f7 | ||
|
|
2764b52c02 | ||
|
|
fc7616e090 | ||
|
|
2d0ccc3b40 | ||
|
|
548c9739ed | ||
|
|
36c793c4f6 | ||
|
|
d2dd24fc89 | ||
|
|
7ba7b13aa0 | ||
|
|
268d89c426 | ||
|
|
028fefe6ec | ||
|
|
cbf21f7ef5 | ||
|
|
10d8ac7f65 | ||
|
|
dc6b55a5e9 | ||
|
|
91538d90f8 | ||
|
|
ee97db3488 | ||
|
|
77c5e96ccb | ||
|
|
171e4f0f29 | ||
|
|
00aac43cdb | ||
|
|
b9869e137d | ||
|
|
bc44da49e6 | ||
|
|
0f8a5a86e2 | ||
|
|
cd56639e67 | ||
|
|
8de4c76582 | ||
|
|
96b180ddad | ||
|
|
0a3b2402c8 | ||
|
|
6ad0f9badc | ||
|
|
d13c2bf4cb | ||
|
|
bd85bc0cf3 | ||
|
|
f1e6ac709c | ||
|
|
197b4a0d30 | ||
|
|
cba84f74aa | ||
|
|
7f3c92f492 | ||
|
|
48dbd61632 | ||
|
|
0fab759c1b | ||
|
|
70e931fda2 | ||
|
|
c03414ac57 | ||
|
|
f705e39eb9 | ||
|
|
0619fe1cfa | ||
|
|
0ee744f7a0 | ||
|
|
1bdd2aceab | ||
|
|
56a7208891 | ||
|
|
13fa75fc12 | ||
|
|
05f37bec53 | ||
|
|
2c39fa52b8 | ||
|
|
3a4a7ef5fd | ||
|
|
01c712e851 | ||
|
|
3f91c5d970 | ||
|
|
db10e80b7f | ||
|
|
c6813cf8e2 | ||
|
|
ba3ab1a7c1 | ||
|
|
c31af086eb | ||
|
|
7e0c30b884 | ||
|
|
b0df75e674 | ||
|
|
c0fc66d6a0 | ||
|
|
3b029f5d3e | ||
|
|
65567fdeac | ||
|
|
57f9257f32 | ||
|
|
37bd1c6b93 | ||
|
|
c757fdb779 | ||
|
|
dd0cd8f2db | ||
|
|
b75546acaf | ||
|
|
e367792f6d | ||
|
|
cf3c2b18e3 | ||
|
|
3b1212fed5 | ||
|
|
22f96935fb | ||
|
|
55b8c380d8 | ||
|
|
743ecf3706 | ||
|
|
489860fb87 | ||
|
|
aae78b8a8b | ||
|
|
beb617ad90 | ||
|
|
cb6e6ff2be | ||
|
|
ec344a85b4 | ||
|
|
2c4a5319bf | ||
|
|
a494cd71e8 | ||
|
|
4a6fb5a49a | ||
|
|
fb4f7a025b | ||
|
|
19270d0833 | ||
|
|
f4fbe6625a | ||
|
|
79ff8ba273 | ||
|
|
c19b271586 | ||
|
|
14bdadaf86 | ||
|
|
8d827ced1b | ||
|
|
def6508308 | ||
|
|
0873a69ff5 | ||
|
|
92ca556243 | ||
|
|
1da43a5960 | ||
|
|
628f8fd9dc | ||
|
|
d0020b7dfc | ||
|
|
0433d29d11 | ||
|
|
ca877a8424 | ||
|
|
dd223002dd | ||
|
|
2e6f0d7aab | ||
|
|
0ad09d6dad | ||
|
|
322adc266c | ||
|
|
11ddd53eb4 | ||
|
|
5c66ecfc99 | ||
|
|
2bdf56cb4b | ||
|
|
15ec7e2ae7 | ||
|
|
ea9f479674 | ||
|
|
8f68da89d7 | ||
|
|
9d9025a6b4 | ||
|
|
06cb31a3d2 | ||
|
|
0b450a5113 | ||
|
|
e9d6737ec4 | ||
|
|
2b9dfab1fc | ||
|
|
e6d4d99edb | ||
|
|
26bce07f2b | ||
|
|
f8c090ff7f | ||
|
|
0c938cab8a | ||
|
|
c77a7ecae9 | ||
|
|
a54dc34752 | ||
|
|
b3c242e270 | ||
|
|
2550c95c32 | ||
|
|
02cb58d3d9 | ||
|
|
46fb6bd299 | ||
|
|
5b70f208e3 | ||
|
|
2578fce085 | ||
|
|
1794374c78 | ||
|
|
953b150c17 | ||
|
|
e1c0b74454 | ||
|
|
5e4543513b | ||
|
|
f9172a000e | ||
|
|
0faebbef33 | ||
|
|
a44057b0df | ||
|
|
fd0af1d9df | ||
|
|
51f85f4c94 | ||
|
|
483982de3a | ||
|
|
f62a07beba | ||
|
|
5ab9a1b420 | ||
|
|
6d85404cf0 | ||
|
|
c820b611ed | ||
|
|
f99408f254 | ||
|
|
e5e89a3ac9 | ||
|
|
8b3944f51c | ||
|
|
0ef196b84c | ||
|
|
b907a6e1a6 | ||
|
|
84eca67498 | ||
|
|
666a5def96 | ||
|
|
5c5cdbabf7 | ||
|
|
a898f2a7e1 | ||
|
|
74f1cc1ec4 | ||
|
|
c753a99a38 | ||
|
|
dba3fa00b9 | ||
|
|
d8bac1d363 | ||
|
|
8066a1da04 | ||
|
|
bb509879ca | ||
|
|
ca4355974f | ||
|
|
9cd52fc54e | ||
|
|
e4c31cdcbf | ||
|
|
f4d0131967 | ||
|
|
67c301c236 | ||
|
|
67b17fa801 | ||
|
|
6fd972fa42 | ||
|
|
ab69edb506 | ||
|
|
dce1473a53 | ||
|
|
16d497ef80 | ||
|
|
076503f247 | ||
|
|
7635f1774f | ||
|
|
22d53357d3 | ||
|
|
e23a30652d | ||
|
|
935a5c4e22 | ||
|
|
36930dcd18 | ||
|
|
1fe2d6d31f | ||
|
|
82ab389fd6 | ||
|
|
2ebe4813d6 | ||
|
|
6870c195d0 | ||
|
|
55e4d567c4 | ||
|
|
9e0c46d55f | ||
|
|
bc7bd7da9d | ||
|
|
50f6cf6a69 | ||
|
|
1f3559e0b2 | ||
|
|
89b9de8ab4 | ||
|
|
b7bf94b4c6 | ||
|
|
0f95ad5f9f | ||
|
|
e698ddb719 | ||
|
|
143d423d1f | ||
|
|
5beb15fa77 | ||
|
|
922c860814 | ||
|
|
39d439cea4 | ||
|
|
5128461c67 | ||
|
|
8250bdce15 | ||
|
|
5bfc7b9908 | ||
|
|
40d5d1712d | ||
|
|
7a63538fb9 | ||
|
|
2122980d0a | ||
|
|
9ae4a4fc27 | ||
|
|
d0b755e6cc | ||
|
|
3c86aa8e01 | ||
|
|
da47f8a156 | ||
|
|
9fbdaaae65 | ||
|
|
43443928d0 | ||
|
|
7c0c98b504 | ||
|
|
ff50edfc57 | ||
|
|
9007ab7e1d | ||
|
|
96a442f3bc | ||
|
|
3b5dc50e30 | ||
|
|
243420c5d9 | ||
|
|
562619f794 | ||
|
|
466337c148 | ||
|
|
d9dc8ca3b2 | ||
|
|
ca77f5223e | ||
|
|
2842adeb98 | ||
|
|
ddb4a02098 | ||
|
|
7584fe0ba2 | ||
|
|
0f05a4ceaa | ||
|
|
64c4a35e9a | ||
|
|
ff5095e8d1 | ||
|
|
68b69b8021 | ||
|
|
8edbe1dc0d | ||
|
|
eff07fe61e | ||
|
|
22cb243bd9 | ||
|
|
9f259731f8 | ||
|
|
c13ba702ee | ||
|
|
eab111a5f5 | ||
|
|
d3362f9a23 | ||
|
|
4668511c93 | ||
|
|
e81c48f974 | ||
|
|
82fabc94f9 | ||
|
|
91d60de028 | ||
|
|
3c70d03d30 | ||
|
|
e9c4cbce5c | ||
|
|
a7a8284786 | ||
|
|
c919d64d25 | ||
|
|
ed7d49c5d2 | ||
|
|
2ddcd14395 | ||
|
|
4d2bc269d9 | ||
|
|
3ae57e247f | ||
|
|
99458d061d | ||
|
|
ca721a8d05 | ||
|
|
b3765ac3cf | ||
|
|
9e7d361a50 | ||
|
|
6cd944e9c3 | ||
|
|
d2579c0702 | ||
|
|
4ed8558178 | ||
|
|
75183eb3dd | ||
|
|
1b409fff8b | ||
|
|
cd4a51cf67 | ||
|
|
d4475e5b19 | ||
|
|
509c0380fa | ||
|
|
8f071e055f | ||
|
|
e5c0297167 | ||
|
|
876c4882a3 | ||
|
|
72a80ee8cd | ||
|
|
ba3eaa83e0 | ||
|
|
e2730d0b5c | ||
|
|
2a5098eacb | ||
|
|
be26725867 | ||
|
|
a469d60ed2 | ||
|
|
576a265095 | ||
|
|
cbba625b07 | ||
|
|
314deedcf5 | ||
|
|
9e8d09bffc | ||
|
|
6df325f651 | ||
|
|
05d97aad28 | ||
|
|
9b1107eb64 | ||
|
|
fec64f6d8c | ||
|
|
7f335fd528 | ||
|
|
1a10795198 | ||
|
|
77812b32e0 | ||
|
|
1c2aeb3138 | ||
|
|
73cdc67367 | ||
|
|
de6eb1d97e | ||
|
|
ac136d92e7 | ||
|
|
1e0a187613 | ||
|
|
99a426d47d | ||
|
|
fa14b5263e | ||
|
|
a24cdb59de | ||
|
|
fb537e089b | ||
|
|
274a197a82 | ||
|
|
d0bf7e8ce7 | ||
|
|
467054ba44 | ||
|
|
625c559e8d | ||
|
|
8589d59520 | ||
|
|
47842987c5 | ||
|
|
9fe0c23af4 | ||
|
|
3c1d3b981c | ||
|
|
e3c48d9f45 | ||
|
|
0876677fb2 | ||
|
|
98b81821fb | ||
|
|
990c04d4b9 | ||
|
|
48c1d0e8da | ||
|
|
00b1173e70 | ||
|
|
412e9fc3dd | ||
|
|
af28adc01d | ||
|
|
54dbf438cc | ||
|
|
e932c8e5e8 | ||
|
|
e30b570b1f | ||
|
|
8d7d5d12a1 | ||
|
|
2897ab13cb | ||
|
|
ec74518868 | ||
|
|
1df3cb9144 | ||
|
|
4223028ec1 | ||
|
|
b2e5e5b388 | ||
|
|
f4eb37ee08 | ||
|
|
418aa45a1b | ||
|
|
049d64dd20 | ||
|
|
56f6376de8 | ||
|
|
c6cd232f77 | ||
|
|
70f47cedc7 | ||
|
|
847eea5b5d | ||
|
|
96d3bd203f | ||
|
|
21354e62d4 | ||
|
|
55d6113375 | ||
|
|
dc3d4cac53 | ||
|
|
b5f880ba1d | ||
|
|
7f1ba5f7df | ||
|
|
26da8fc9ce | ||
|
|
4f276d9d8e | ||
|
|
07a0b52e6c | ||
|
|
9aa8497fbf | ||
|
|
44255995e3 | ||
|
|
4e48fead44 | ||
|
|
f7bbb4821b | ||
|
|
6937a8fcd3 | ||
|
|
9253ea845b | ||
|
|
e062ddde20 | ||
|
|
931e3277b9 | ||
|
|
89c6fac40a | ||
|
|
7778894767 | ||
|
|
055ec56068 | ||
|
|
a73b3ceb45 | ||
|
|
56955eea39 | ||
|
|
aa0523f60a | ||
|
|
63cb4b81a8 | ||
|
|
194f3ac360 | ||
|
|
8e2b3291fb | ||
|
|
207cb1436d | ||
|
|
a5fde3a369 | ||
|
|
9f67436b32 | ||
|
|
ec2d9ce67c | ||
|
|
0c80829bb8 | ||
|
|
6467e1ad08 | ||
|
|
4f7f94092c | ||
|
|
969deea75f | ||
|
|
ae53e0a212 | ||
|
|
41ee3104ee | ||
|
|
d28e7588fa | ||
|
|
20866b8faa | ||
|
|
fbb42e0388 | ||
|
|
3999a16a1a | ||
|
|
5c25a3a0ea | ||
|
|
27595e9f02 | ||
|
|
c8a7ce4e52 | ||
|
|
4c149bd2e7 | ||
|
|
73e4d6c176 | ||
|
|
62d1e7ac64 | ||
|
|
f749de1236 | ||
|
|
27aeded9d9 | ||
|
|
eff60decc0 | ||
|
|
4b3a719517 | ||
|
|
760794eff3 | ||
|
|
f65048410c | ||
|
|
29269ff15e | ||
|
|
f4149bd61e | ||
|
|
8fbf23f8c5 | ||
|
|
ce28b2e43e | ||
|
|
40ccf503e4 | ||
|
|
45555c895d | ||
|
|
ca0fff8313 | ||
|
|
1204c32430 | ||
|
|
94266eee50 | ||
|
|
ed59753741 | ||
|
|
6d7d58fa12 | ||
|
|
bc6a8948cc | ||
|
|
3376bfbfc8 | ||
|
|
3609d84cef | ||
|
|
3b54568e4b | ||
|
|
025d58f32d | ||
|
|
5f920b21ca | ||
|
|
aee1423e55 | ||
|
|
269eaff44e | ||
|
|
c882985fc5 | ||
|
|
39317acd42 | ||
|
|
949aca196d | ||
|
|
f74eaae665 | ||
|
|
26d2ed94f9 | ||
|
|
5a8100a7f9 | ||
|
|
ed0c9e2436 | ||
|
|
0ecb52ff82 | ||
|
|
295da33cdf | ||
|
|
9dffcaf36a | ||
|
|
23846f6478 | ||
|
|
013857368e | ||
|
|
803fd8ac5d | ||
|
|
a1ac4dc906 | ||
|
|
70ff5f9ae4 | ||
|
|
8b527ac378 | ||
|
|
c05b7cffbb | ||
|
|
cda61d92b7 | ||
|
|
90f8c7c51b | ||
|
|
6db7d9e5d7 | ||
|
|
6bbd5299b6 | ||
|
|
b9c3377d88 | ||
|
|
fe28b26171 | ||
|
|
0b55a21b97 | ||
|
|
688390113d | ||
|
|
601884131e | ||
|
|
0d427ed157 | ||
|
|
cdd1e3bf4c | ||
|
|
f8dd3bc4c5 | ||
|
|
f42f6e4fb9 | ||
|
|
59bbb6ac77 | ||
|
|
8d4ab16f2b | ||
|
|
ef93e42136 | ||
|
|
18fc7c28b0 | ||
|
|
c2c532d2bb | ||
|
|
5fae9a8b06 | ||
|
|
09f46f33da | ||
|
|
3d478670db | ||
|
|
91ea043209 | ||
|
|
9639b10829 | ||
|
|
09ddc022d6 | ||
|
|
f55c7343e2 | ||
|
|
2ef68be262 | ||
|
|
29372d17cb | ||
|
|
3bf7893665 | ||
|
|
6e7e286fa0 | ||
|
|
9cdb65d5c7 | ||
|
|
bde5776a47 | ||
|
|
92baebe6c7 | ||
|
|
e696d1a0a3 | ||
|
|
fb9591d6bc | ||
|
|
f47be656b4 | ||
|
|
c8d668b298 | ||
|
|
0e21058d10 | ||
|
|
f3fbabd8b3 | ||
|
|
1c787588ed | ||
|
|
07927084f2 | ||
|
|
4c49d78166 | ||
|
|
91b029e81f | ||
|
|
96ded6e6bb | ||
|
|
e06253cf21 | ||
|
|
e9faa8890d | ||
|
|
39860cfb71 | ||
|
|
b8d1e4d2f6 | ||
|
|
148d5e799e | ||
|
|
97c95ab491 | ||
|
|
130c02eb2e | ||
|
|
72a4bc6394 | ||
|
|
79554fedf8 | ||
|
|
4c38068eb8 | ||
|
|
eb4dcba21a | ||
|
|
b0285b0022 | ||
|
|
07137f4111 | ||
|
|
5c9b66a48d | ||
|
|
1298ede4d5 | ||
|
|
ff38f84d04 | ||
|
|
8f7f6141e7 | ||
|
|
9c80078c07 | ||
|
|
e0d26ba1f5 | ||
|
|
1f73376476 | ||
|
|
bc8452512f | ||
|
|
79f174aee4 | ||
|
|
55b3becb7c | ||
|
|
5e73f0bb35 | ||
|
|
46750d6b17 | ||
|
|
e044fa0d70 | ||
|
|
57b999b310 | ||
|
|
07b6016c61 | ||
|
|
818843a6b6 | ||
|
|
1e4ea646ce | ||
|
|
552c9b037f | ||
|
|
ff3570bfa5 | ||
|
|
55d0e6918d | ||
|
|
954f782807 | ||
|
|
f197dd22cd | ||
|
|
12a81b656b | ||
|
|
5fdf9829bb | ||
|
|
14805dc8b9 | ||
|
|
20d1e4c9c5 | ||
|
|
1b6cc8e6b6 | ||
|
|
25e04b8463 | ||
|
|
55270779bf | ||
|
|
2e65d37ddb | ||
|
|
c6378de489 | ||
|
|
5955d362a6 | ||
|
|
a5ec8b7eda | ||
|
|
1d7f75c490 | ||
|
|
f2704e0bf3 | ||
|
|
f7afd3bab2 | ||
|
|
acaf9fd720 | ||
|
|
97acecdf66 | ||
|
|
8a83bd73bb | ||
|
|
471e556e91 | ||
|
|
67cc776696 | ||
|
|
d5f18590fd | ||
|
|
9bebe4c607 | ||
|
|
0f8e09bde2 | ||
|
|
9f4d123fff | ||
|
|
03b6cb024e | ||
|
|
011d60ec03 | ||
|
|
17bd80329a | ||
|
|
e64e70870d | ||
|
|
bbbcdaf49a | ||
|
|
072eace1bf | ||
|
|
7fedcad075 | ||
|
|
51b246d63a | ||
|
|
a185c2778f | ||
|
|
04d387eecf | ||
|
|
26aa519803 | ||
|
|
5e3c5a18c6 | ||
|
|
3d43b775d2 | ||
|
|
438332d39b | ||
|
|
87b963fb50 | ||
|
|
74cb7df3c0 | ||
|
|
1573140165 | ||
|
|
ce7c37851b | ||
|
|
7f99182c04 | ||
|
|
949d71f2b6 | ||
|
|
f2297fd100 | ||
|
|
8f43268432 | ||
|
|
e09403a80c | ||
|
|
67e6f675e6 | ||
|
|
7876c7915b | ||
|
|
69929f596f | ||
|
|
5f38374b7a | ||
|
|
fff9cd7d38 | ||
|
|
e499333036 | ||
|
|
7a1324800f | ||
|
|
5dcea9eb21 | ||
|
|
a8e4df5611 | ||
|
|
b65be226b0 | ||
|
|
f22a39fbf0 | ||
|
|
7d34e8f441 | ||
|
|
62fd0ef368 | ||
|
|
8e26ebd23e | ||
|
|
5c89ae5a15 | ||
|
|
9f656212d5 | ||
|
|
e236acfed5 | ||
|
|
0836421a66 | ||
|
|
aea83494c1 | ||
|
|
951c41cf9e | ||
|
|
09df93813d | ||
|
|
83330fe9fb | ||
|
|
234d6cf431 | ||
|
|
f5465e82a1 | ||
|
|
0696e49f2d | ||
|
|
79c6ac38df | ||
|
|
c85c006557 | ||
|
|
44609e903c | ||
|
|
dcc9b9f9be | ||
|
|
78b99c7143 | ||
|
|
5a8d976356 | ||
|
|
7d66a57bc0 | ||
|
|
3cc6648938 | ||
|
|
b61f29c7ef | ||
|
|
819ce6c0d1 | ||
|
|
99bb4b8d17 | ||
|
|
761dea8591 | ||
|
|
6471e760c8 | ||
|
|
9139e8acb8 | ||
|
|
8457990bb1 | ||
|
|
23513b5ab6 | ||
|
|
4115cfc8f9 | ||
|
|
dfb8b71526 | ||
|
|
85cd1c456f | ||
|
|
3816e4c76e | ||
|
|
2ac8379cfc | ||
|
|
dcac0c1611 | ||
|
|
2db7694f57 | ||
|
|
a236f18b17 | ||
|
|
69cc48b8f0 | ||
|
|
ba1dd7c3cf | ||
|
|
4c5ca932c8 | ||
|
|
3d9aa3ef29 | ||
|
|
3bf6fb1778 | ||
|
|
bc1185c41a | ||
|
|
9f456a2722 | ||
|
|
861b96e154 | ||
|
|
dfc9eec3c3 | ||
|
|
37ef07ce7e | ||
|
|
157ee3dd7d | ||
|
|
732e770f87 | ||
|
|
34e65f15d0 | ||
|
|
12d4580ee5 | ||
|
|
8fe37bdf63 | ||
|
|
358a882031 | ||
|
|
07afdcd46c | ||
|
|
e2fcc32d7c | ||
|
|
afb6f3b62a | ||
|
|
d221066d9a | ||
|
|
d833a5be92 | ||
|
|
df90ed5ed0 | ||
|
|
dc7cefb6f2 | ||
|
|
917d065292 | ||
|
|
813c103232 | ||
|
|
5a6d4f69e1 | ||
|
|
4b3c7e47a5 | ||
|
|
79dd8111a5 | ||
|
|
615114c900 | ||
|
|
40725ad707 | ||
|
|
6d18b3d74e | ||
|
|
05a505fb1f | ||
|
|
73f321c472 | ||
|
|
38d91ca3fe | ||
|
|
6a65b935fa | ||
|
|
9206d2a962 | ||
|
|
9e5817c387 | ||
|
|
bdf3600011 | ||
|
|
fc1b963107 | ||
|
|
12635b6571 | ||
|
|
af11e35fcb | ||
|
|
69046511de | ||
|
|
721e079211 | ||
|
|
9ec4da47f5 | ||
|
|
1f240051c5 | ||
|
|
575f6f0cf3 | ||
|
|
cef3db6e64 | ||
|
|
aea8c2761c | ||
|
|
ac26ba7e5b | ||
|
|
7ccf16b83d | ||
|
|
6db4ec5c08 | ||
|
|
01ae93619a | ||
|
|
c18d344e09 | ||
|
|
09badeb19c | ||
|
|
121cbf09c5 | ||
|
|
656649084d | ||
|
|
9290aaad0f | ||
|
|
018022fd9b | ||
|
|
d55b64061b | ||
|
|
4e04265212 | ||
|
|
dbb88b5456 | ||
|
|
69a0a7331c | ||
|
|
ec0e30017c | ||
|
|
d2129d4b9a | ||
|
|
67361b8947 | ||
|
|
4e39f98854 | ||
|
|
1eaaaac340 | ||
|
|
d022da5906 | ||
|
|
075de21af1 | ||
|
|
b72929d84b | ||
|
|
0cb00424ee | ||
|
|
59a1d79713 | ||
|
|
94881d45a6 | ||
|
|
8653c83342 | ||
|
|
c7c1f6a27e | ||
|
|
b67a331627 | ||
|
|
6c8bcc5009 | ||
|
|
d9ddf7c5be | ||
|
|
6fab8cadd3 | ||
|
|
0acb419cf5 | ||
|
|
e6252256e0 | ||
|
|
0223fff99c | ||
|
|
832fc29fc1 | ||
|
|
744421631e | ||
|
|
c8d14a1745 | ||
|
|
8a3b56cc59 | ||
|
|
82cd2d4515 | ||
|
|
34ef8e5f46 | ||
|
|
5f34cddc31 | ||
|
|
34dc153ff2 | ||
|
|
77289a1396 | ||
|
|
fe2b4f92a1 | ||
|
|
93a8b916cc | ||
|
|
772368ed1f | ||
|
|
54aa65f496 | ||
|
|
43f8a13d03 | ||
|
|
20148c5b8d | ||
|
|
2052b2741e | ||
|
|
fff4b4ae65 | ||
|
|
ae98593403 | ||
|
|
7b7899154c | ||
|
|
801d41c47a | ||
|
|
8bfe67b37b | ||
|
|
f774a38cf2 | ||
|
|
19ec9bbef6 | ||
|
|
4e442f483f | ||
|
|
bc866c51de | ||
|
|
e23798d630 | ||
|
|
1d37501262 | ||
|
|
782e867a7c | ||
|
|
16645b1e25 | ||
|
|
62f97923e0 | ||
|
|
de80cac99f | ||
|
|
5bdd65c300 | ||
|
|
883e195bba | ||
|
|
eae28e4d91 | ||
|
|
4dfd655b0c | ||
|
|
b4900811a7 | ||
|
|
37e83f7c62 | ||
|
|
39a2d755db | ||
|
|
8d4a976477 | ||
|
|
3783061c2a | ||
|
|
f4078251be | ||
|
|
4d3a549727 | ||
|
|
1778b15a4d | ||
|
|
322cf0c39e | ||
|
|
e9b8069204 | ||
|
|
bc7156cd26 | ||
|
|
85a77f42a4 | ||
|
|
bfd1d7c55b | ||
|
|
118411ba23 | ||
|
|
1a093ca98d | ||
|
|
2acca80be8 | ||
|
|
c7b64cb9a7 | ||
|
|
0be6502711 | ||
|
|
b1539418b3 | ||
|
|
aef2574b8d | ||
|
|
7bb0f437c1 | ||
|
|
b51c8bed46 | ||
|
|
f213868673 | ||
|
|
6f68915425 | ||
|
|
2955fc8bb2 | ||
|
|
1a3a851f6e | ||
|
|
d712784177 | ||
|
|
ef73d2449e | ||
|
|
8ba7998623 | ||
|
|
a16c34208f | ||
|
|
ee30c7d0a5 | ||
|
|
b19c879485 | ||
|
|
bfff44ac9d | ||
|
|
4201191e44 | ||
|
|
ef4de11cdb | ||
|
|
fa45b3774b | ||
|
|
10e27681dd | ||
|
|
15e9484ff2 | ||
|
|
357f76ba5a | ||
|
|
ca633e8a5e | ||
|
|
b85358b38a | ||
|
|
c0efaae364 | ||
|
|
431749bd78 | ||
|
|
ff0ae07bb7 | ||
|
|
27caa9c1b1 | ||
|
|
08a823d857 | ||
|
|
0a95fd875d | ||
|
|
c3f55ad1d8 | ||
|
|
7dbb4b8c5f | ||
|
|
8d55c5b8e9 | ||
|
|
71339906c0 | ||
|
|
017ec902e2 | ||
|
|
6c842a534e | ||
|
|
abf34d2838 | ||
|
|
e8f103afc9 | ||
|
|
35705cedcf | ||
|
|
66a1e564d7 | ||
|
|
afe89e8d94 | ||
|
|
728c439e35 | ||
|
|
41ce857c93 | ||
|
|
7d7c0daa5e | ||
|
|
b1655dd17b | ||
|
|
9aef7d2954 | ||
|
|
42af2d3597 | ||
|
|
4d2221bdb3 | ||
|
|
f10e931f82 | ||
|
|
700e38ba9d | ||
|
|
9eb9186200 | ||
|
|
f16b805e0d | ||
|
|
66ee7daac3 | ||
|
|
d858195d66 | ||
|
|
9dee2ecf33 | ||
|
|
d6b6d10611 | ||
|
|
d038866649 | ||
|
|
09bad85522 | ||
|
|
203e5f7ef8 | ||
|
|
5c7e155a69 | ||
|
|
26e489f17d | ||
|
|
2b3ecb4af8 | ||
|
|
dd9bcf6013 | ||
|
|
c0b560175c | ||
|
|
b1b7d17633 | ||
|
|
88a01aa09d | ||
|
|
045fa05b0d | ||
|
|
6428c33d30 | ||
|
|
a58f50e6fd | ||
|
|
5211c782d8 | ||
|
|
853fad71ae | ||
|
|
5c5753682b | ||
|
|
d3c6dc6f34 | ||
|
|
99391a2cea | ||
|
|
58bf998442 | ||
|
|
2be4e3c4d6 | ||
|
|
ebfbc3dd78 | ||
|
|
1c78996a09 | ||
|
|
51e3b61555 | ||
|
|
e85d574334 | ||
|
|
5a4a5c3507 | ||
|
|
e6d200abfb | ||
|
|
fc3e30ef25 | ||
|
|
c31baa96de | ||
|
|
68baf15806 | ||
|
|
37258df59c | ||
|
|
1823341cce | ||
|
|
60c3998143 | ||
|
|
8336ce121e | ||
|
|
3bb8b73b8c | ||
|
|
01f1277203 | ||
|
|
1b4aa2ce51 | ||
|
|
55e5d74a1c | ||
|
|
759b537250 | ||
|
|
260cbab518 | ||
|
|
307001391f | ||
|
|
8851d548f9 | ||
|
|
31592d206b | ||
|
|
110cf56a17 | ||
|
|
8c7806eab3 | ||
|
|
7d816362e6 | ||
|
|
dbce12842e | ||
|
|
80e318ce15 | ||
|
|
304c048d84 | ||
|
|
40f4cdb1ce | ||
|
|
a41282b7be | ||
|
|
bf8e22ae63 | ||
|
|
bdad1f60c9 | ||
|
|
95d8d7d993 | ||
|
|
f268afd044 | ||
|
|
29d4a02ee7 | ||
|
|
259b70156f | ||
|
|
3a77520d22 | ||
|
|
e8aa106184 | ||
|
|
426fd3acb1 | ||
|
|
89b061e318 | ||
|
|
1cc0f31e30 | ||
|
|
9cb714cd39 | ||
|
|
13dfd34ab6 | ||
|
|
9ba599fe4c | ||
|
|
831f406d17 | ||
|
|
8f20bc9147 | ||
|
|
92ffa85917 | ||
|
|
559f138152 | ||
|
|
ff9617d210 | ||
|
|
c36c0033fd | ||
|
|
2056800017 | ||
|
|
4b61f4c95d | ||
|
|
5260e3a35e | ||
|
|
c3f2711b09 | ||
|
|
c72516ceb0 | ||
|
|
b76538d6ea | ||
|
|
ff01d9c663 | ||
|
|
04214a4288 | ||
|
|
c15dfa7ddd | ||
|
|
d4815932dc | ||
|
|
33ec90376c | ||
|
|
776fa48cd4 | ||
|
|
475948f8a2 | ||
|
|
da34da18ca | ||
|
|
ae3ba28fee | ||
|
|
580ebbdbef | ||
|
|
e900ecc4c7 | ||
|
|
bf343240e4 | ||
|
|
89a2ed7da4 | ||
|
|
a81edcfba7 | ||
|
|
3db6aa255f | ||
|
|
a5b05f77ea | ||
|
|
2ef6909d9b | ||
|
|
037de9bd20 | ||
|
|
10a89ae0c5 | ||
|
|
a0684bd058 | ||
|
|
8863e03685 | ||
|
|
fe6238d126 | ||
|
|
dd10619192 | ||
|
|
58ca08a7ca | ||
|
|
7b34ca0a39 | ||
|
|
6cfbaa61c0 | ||
|
|
cba48de3d3 | ||
|
|
eb50a15b52 | ||
|
|
84618896c2 | ||
|
|
8c10323154 | ||
|
|
91ca25d2b8 | ||
|
|
d41d92e65d | ||
|
|
893628971a | ||
|
|
e6a99b5ae5 | ||
|
|
459ae5ce64 | ||
|
|
cd3831b045 | ||
|
|
9d68e13567 | ||
|
|
cb2af961db | ||
|
|
faea95b5fb | ||
|
|
68430ee8e5 | ||
|
|
1f5b7855eb | ||
|
|
f5b5202296 | ||
|
|
92ee6de05e | ||
|
|
02625801da | ||
|
|
cd00f7b558 | ||
|
|
7c61acef40 | ||
|
|
a1aecc024e | ||
|
|
0d1c8286a2 | ||
|
|
bb79e523d4 | ||
|
|
33b838e437 | ||
|
|
707c1a32aa | ||
|
|
d055216740 | ||
|
|
5d03bb9a2b | ||
|
|
be98c884bd | ||
|
|
f73d1fb7ea | ||
|
|
370cb7bc6e | ||
|
|
31fad1476f | ||
|
|
e8ac5af41b | ||
|
|
78aaf7955e | ||
|
|
09bde307de | ||
|
|
58f940c0f1 | ||
|
|
9bdb3f55dd | ||
|
|
08a1c45605 | ||
|
|
93b10f35c1 | ||
|
|
51136204d2 | ||
|
|
c297fd18b2 | ||
|
|
4f36b553b3 | ||
|
|
f6372f2fab | ||
|
|
98ca24ff4e | ||
|
|
67202b2662 | ||
|
|
937ef73521 | ||
|
|
9bde2ef631 | ||
|
|
3e0435febd | ||
|
|
8cefa05e3a | ||
|
|
aa17f5441a | ||
|
|
e00977f3c2 | ||
|
|
e1eaeced8c | ||
|
|
dcadd69c5a | ||
|
|
f373bcf23d | ||
|
|
5ff6fe7c68 | ||
|
|
f8306f145a | ||
|
|
b4eb8d4597 | ||
|
|
d8d37e3da7 | ||
|
|
041ab29d1f | ||
|
|
90a0170d47 | ||
|
|
39b1f379dc | ||
|
|
bc33515360 | ||
|
|
e4a59bcd9d | ||
|
|
7455db439a | ||
|
|
4deca2d38b | ||
|
|
72cc10e309 | ||
|
|
4b2912e096 | ||
|
|
a83b390d55 | ||
|
|
b141c0f63e | ||
|
|
5cb486f7c5 | ||
|
|
2791d280ae | ||
|
|
4de2fc120d | ||
|
|
8fc287c1b7 | ||
|
|
1219a6d3bf | ||
|
|
2e7cfe7efa | ||
|
|
e5a7c353ae | ||
|
|
b3e0f83c07 | ||
|
|
84c202f2ab | ||
|
|
55a8f4abbc | ||
|
|
e8fd414661 | ||
|
|
30dc6a9428 | ||
|
|
baaf5712c4 | ||
|
|
3e92c1fc43 | ||
|
|
340615de55 | ||
|
|
48225171e0 | ||
|
|
7409820a8f | ||
|
|
e9179aaa4b | ||
|
|
8882fb697e | ||
|
|
9aba89c88d | ||
|
|
c7f32e11f2 | ||
|
|
a1cfb037f4 | ||
|
|
bc794e3807 | ||
|
|
ead6924a78 | ||
|
|
61885d2df0 | ||
|
|
208affb513 | ||
|
|
44130fc527 | ||
|
|
0401ab4ce7 | ||
|
|
15f866a322 | ||
|
|
a4600e46f9 | ||
|
|
1ad8ba358e | ||
|
|
2e9c4b1aed | ||
|
|
f893dc5ad1 | ||
|
|
85cdfff7a7 | ||
|
|
dd996a3289 | ||
|
|
79fb9abbbf | ||
|
|
572bb61a2d | ||
|
|
27962a73ee | ||
|
|
de4a430931 | ||
|
|
ef6f2dbcfd | ||
|
|
e878e53cab | ||
|
|
7aae720636 | ||
|
|
f626d85c2b | ||
|
|
62764a56c5 | ||
|
|
57d0538f1e | ||
|
|
80e5338194 | ||
|
|
2fe4fc38bb | ||
|
|
161246d864 | ||
|
|
cb3396b0e5 | ||
|
|
34794c5c27 | ||
|
|
8b37ff25e7 | ||
|
|
aa96046632 | ||
|
|
d7cd5b1811 | ||
|
|
0d72b85881 | ||
|
|
53a850c671 | ||
|
|
0532c93c8c | ||
|
|
051ee49098 | ||
|
|
6a41ccf537 | ||
|
|
eba1cc6e4f | ||
|
|
41f284b678 | ||
|
|
b964c53445 | ||
|
|
5194d81a89 | ||
|
|
8ebe075722 | ||
|
|
a2013caa47 | ||
|
|
aff6e112ec | ||
|
|
8ab27a20d2 | ||
|
|
7aa2c7c10f | ||
|
|
583801179e | ||
|
|
fde838b029 | ||
|
|
cd09242520 | ||
|
|
d205919881 | ||
|
|
687e77ddc9 | ||
|
|
e4697ae7fc | ||
|
|
42884e7600 | ||
|
|
55d36b544b | ||
|
|
1fe7aa056b | ||
|
|
d6828651d0 | ||
|
|
0dd625f17e | ||
|
|
435a81a905 | ||
|
|
f5ef9486bb | ||
|
|
2208303496 | ||
|
|
71c6d27b57 | ||
|
|
b90bbdaebf | ||
|
|
7e3ac0e584 | ||
|
|
cf35354bf7 | ||
|
|
e350a443d9 | ||
|
|
ec8779ca6f | ||
|
|
000c9af7c2 | ||
|
|
7c4b5febcb | ||
|
|
36352031ef | ||
|
|
492ac89613 | ||
|
|
13a5608975 | ||
|
|
0d120d208b | ||
|
|
6c83b2e3a9 | ||
|
|
afe911957c | ||
|
|
466a4a5d69 | ||
|
|
67fb0b3530 | ||
|
|
7a94ce8585 | ||
|
|
c7d4f7d2cb | ||
|
|
0f918ee5c9 | ||
|
|
b908ced20c | ||
|
|
229477c35c | ||
|
|
47fd0423ec | ||
|
|
d85d98e916 | ||
|
|
4f1504e125 | ||
|
|
423105c299 | ||
|
|
c4fdc93053 | ||
|
|
e94c3334f9 | ||
|
|
1859e27501 | ||
|
|
1477e046f6 |
11
.codedocs
Normal file
11
.codedocs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# CodeDocs.xyz Configuration File
|
||||||
|
|
||||||
|
DOXYFILE = doc/Doxyfiles/doxyfile.cmake
|
||||||
|
|
||||||
|
PROJECT_NUMBER =
|
||||||
|
PROJECT_LOGO = examples/osgAndroidExampleGLES1/res/drawable-hdpi/osg.png
|
||||||
|
INPUT = include
|
||||||
|
STRIP_FROM_PATH = include/
|
||||||
|
HTML_FOOTER =
|
||||||
|
SEARCHENGINE = YES
|
||||||
|
|
||||||
94
.gitignore
vendored
Normal file
94
.gitignore
vendored
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
doc/all_Doxyfile
|
||||||
|
doc/auto_Doxyfile
|
||||||
|
doc/core_Doxyfile
|
||||||
|
doc/openscenegraph.doxyfile
|
||||||
|
doc/openthreads.doxyfile
|
||||||
|
|
||||||
|
doc/OpenSceneGraphReferenceDocs/
|
||||||
|
doc/OpenThreadsReferenceDocs/
|
||||||
|
|
||||||
|
cmake_uninstall.cmake
|
||||||
|
|
||||||
|
include/OpenThreads/Config
|
||||||
|
include/OpenThreads/Version
|
||||||
|
include/osg/Config
|
||||||
|
include/osg/GL
|
||||||
|
include/osg/Version
|
||||||
|
include/osgQt/Version
|
||||||
|
src/osgQt/__
|
||||||
|
|
||||||
|
lib/
|
||||||
|
bin/
|
||||||
|
|
||||||
|
*.pc
|
||||||
|
*.conf
|
||||||
|
CMakeCache.txt
|
||||||
|
CMakeFiles
|
||||||
|
CMakeScripts
|
||||||
|
Makefile
|
||||||
|
cmake_install.cmake
|
||||||
|
install_manifest*.txt
|
||||||
|
|
||||||
|
|
||||||
|
# Compiled Object files
|
||||||
|
*.slo
|
||||||
|
*.lo
|
||||||
|
*.o
|
||||||
|
*.obj
|
||||||
|
|
||||||
|
# Precompiled Headers
|
||||||
|
*.gch
|
||||||
|
*.pch
|
||||||
|
|
||||||
|
# Compiled Dynamic libraries
|
||||||
|
*.so
|
||||||
|
*.dylib
|
||||||
|
*.dll
|
||||||
|
|
||||||
|
# Fortran module files
|
||||||
|
*.mod
|
||||||
|
|
||||||
|
# Compiled Static libraries
|
||||||
|
*.lai
|
||||||
|
*.la
|
||||||
|
*.a
|
||||||
|
*.lib
|
||||||
|
|
||||||
|
# Executables
|
||||||
|
*.exe
|
||||||
|
*.out
|
||||||
|
*.app
|
||||||
|
|
||||||
|
# Platform Specifics - auto generated files
|
||||||
|
PlatformSpecifics/Windows/*.rc
|
||||||
|
|
||||||
|
# Visual studio - project files
|
||||||
|
*.sln
|
||||||
|
*.suo
|
||||||
|
*.vcxproj
|
||||||
|
*.vcxproj.filters
|
||||||
|
*.vcxproj.user
|
||||||
|
|
||||||
|
# Visual Studio - Build Results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Rr]elease/
|
||||||
|
[Mm]in[Ss]ize[Rr]el/
|
||||||
|
[Rr]el[Ww]ith[Dd]eb[Ii]nfo/
|
||||||
|
|
||||||
|
# Visual Studio - Browsing Database File
|
||||||
|
*.sdf
|
||||||
|
*.opensdf
|
||||||
|
|
||||||
|
#osx xcode
|
||||||
|
DerivedData/
|
||||||
|
*.DS_Store
|
||||||
|
*.build
|
||||||
|
*.xcodeproj
|
||||||
|
|
||||||
|
#CPACK related files
|
||||||
|
CPackConfig-*.cmake
|
||||||
|
_CPack_Packages/
|
||||||
|
|
||||||
|
#packages
|
||||||
|
*.tar.gz
|
||||||
|
*.zip
|
||||||
68
.travis.yml
Normal file
68
.travis.yml
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
env:
|
||||||
|
global:
|
||||||
|
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
|
||||||
|
# via the "travis encrypt" command using the project repo's public key
|
||||||
|
- secure: "0ROQiFbsZo33ce2v5VjBxNljemh/HU70ntSSPygYwaDFymubts/62SixXVkbKNIFdrs3uYD6qeA/eMmpqXxLcs+PXNq5NrH7eSWw9oDIKMhq3NQH/IZLdRfXwihHimZ1qEs/TXyWlT2aC4rpBi1py3cJeTh1aBMlz4V/nm16iRAgc596ThNTuPDHa0F9/gZnwccI/Rr9VpiYn7vEBbuY9lYr43D0G3NuuQyvvlHShroH09fh6KyFOWIY38AQtnuVGNC1fIiAUk7TUqDqSBwhIrUV5saHbP0kca6DP32REkv//h4JwM76UHv+ntVEoK/UiztJHMkrw71gXYTyvIvlDBpT+IDoeIwUW2QFNQ5zJZI7FM8k0+oeK+F7k/mkffDzr1zww/PQoxqFBF0PoxAni/L9qkA4X2o1A6mRDbe9besp2LQG6Vniwj3bHpCId2QiiMrANVg0EAqkcL2mVFEaqZsh90qCkr1UDq4WQoYbXh0Fy3UnQpbuxDvCME8u03lwuv6ds/SBxc5cgKv7oWXgezaDg7/OCR+0lIAGuLqmNRD8Xw7a0WZGmSbYCHIZmeyFja2KuUvMiVCt8+QsyZr3e523DwBwnSj1BIYFRstMaSEJgu9B8rfTRRllOOKJXCQtdFVuGu8VI6PniSAkI6c535yOWzsuS8HwIkN2ll+Wn7E="
|
||||||
|
|
||||||
|
language: cpp
|
||||||
|
cache: ccache
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
fast_finish: true
|
||||||
|
include:
|
||||||
|
#Linux build
|
||||||
|
- os: linux
|
||||||
|
dist: trusty
|
||||||
|
language: cpp
|
||||||
|
env:
|
||||||
|
- CMAKECMD_ARGS="-DBUILD_OSG_EXAMPLES=ON -DBUILD_OSG_PLUGINS_BY_DEFAULT=ON -DBUILD_OSG_APPLICATIONS=ON"
|
||||||
|
# - CMAKECMD_ARGS="-DBUILD_OSG_EXAMPLES=OFF -DBUILD_OSG_PLUGINS_BY_DEFAULT=ON -DBUILD_OSG_APPLICATIONS=ON"
|
||||||
|
#- LLVM_VERSION=3.8
|
||||||
|
sudo: false
|
||||||
|
cache:
|
||||||
|
apt: true
|
||||||
|
ccache: true
|
||||||
|
compiler:
|
||||||
|
#- clang
|
||||||
|
- gcc
|
||||||
|
addons:
|
||||||
|
coverity_scan:
|
||||||
|
project:
|
||||||
|
name: "openscenegraph/OpenSceneGraph"
|
||||||
|
description: "OpenSceneGraph build"
|
||||||
|
notification_email: robert@openscenegraph.com
|
||||||
|
build_command_prepend: "cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_OSG_DEPRECATED_SERIALIZERS=OFF -DBUILD_OSG_EXAMPLES=OFF ."
|
||||||
|
build_command: "make -j 4"
|
||||||
|
branch_pattern: coverity_scan
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
#- llvm-toolchain-precise-3.8
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
packages:
|
||||||
|
#- clang-3.8
|
||||||
|
- g++
|
||||||
|
- cmake
|
||||||
|
|
||||||
|
# # OSX build
|
||||||
|
# - os: osx
|
||||||
|
# before_install:
|
||||||
|
# - brew update
|
||||||
|
# install:
|
||||||
|
# - brew install ccache
|
||||||
|
# - export PATH="/usr/local/opt/ccache/libexec:$PATH"
|
||||||
|
# env:
|
||||||
|
# - CMAKECMD_ARGS="-DBUILD_OSG_EXAMPLES=OFF -DBUILD_OSG_PLUGINS_BY_DEFAULT=ON -DBUILD_OSG_APPLICATIONS=ON"
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# - os: osx
|
||||||
|
# before_install:
|
||||||
|
# - brew update
|
||||||
|
# install:
|
||||||
|
# - brew install ccache
|
||||||
|
# - export PATH="/usr/local/opt/ccache/libexec:$PATH"
|
||||||
|
# env:
|
||||||
|
# - CMAKECMD_ARGS="-DBUILD_OSG_EXAMPLES=ON -DBUILD_OSG_PLUGINS_BY_DEFAULT=OFF -DBUILD_OSG_APPLICATIONS=OFF -DBUILD_OSG_DEPRECATED_SERIALIZERS=OFF"
|
||||||
|
|
||||||
|
script:
|
||||||
|
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then mkdir build && cd build && travis_wait 60 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../product $CMAKECMD_ARGS ../ ; fi
|
||||||
|
- if [ -f CMakeCache.txt ]; then make -j4 ; fi
|
||||||
98
AUTHORS.txt
98
AUTHORS.txt
@@ -1,6 +1,6 @@
|
|||||||
OpenSceneGraph Library 3.3.9
|
OpenSceneGraph Library 3.6.2
|
||||||
|
|
||||||
548 Contributors:
|
568 Contributors:
|
||||||
|
|
||||||
Firstname Surname
|
Firstname Surname
|
||||||
-----------------
|
-----------------
|
||||||
@@ -8,6 +8,7 @@ Robert Osfield
|
|||||||
Don Burns
|
Don Burns
|
||||||
Stephan Huber
|
Stephan Huber
|
||||||
Paul Martz
|
Paul Martz
|
||||||
|
Laurens Voerman
|
||||||
Farshid Lashkari
|
Farshid Lashkari
|
||||||
Mathias Fr<46>hlich
|
Mathias Fr<46>hlich
|
||||||
Marco Jez
|
Marco Jez
|
||||||
@@ -20,38 +21,41 @@ Eric Wing
|
|||||||
Cedric Pinson
|
Cedric Pinson
|
||||||
Brede Johansen
|
Brede Johansen
|
||||||
Bob Kuehne
|
Bob Kuehne
|
||||||
|
Wojciech Lewandowski
|
||||||
Michael Platings
|
Michael Platings
|
||||||
Geoff Michel
|
Geoff Michel
|
||||||
Wojciech Lewandowski
|
|
||||||
Eric Sokolowsky
|
Eric Sokolowsky
|
||||||
David Callu
|
David Callu
|
||||||
Laurens Voerman
|
|
||||||
Colin McDonald
|
Colin McDonald
|
||||||
Trajce Nikolov
|
Trajce Nikolov
|
||||||
Tim Moore
|
Tim Moore
|
||||||
Martin Lavery
|
Martin Lavery
|
||||||
Mattias Helsing
|
Mattias Helsing
|
||||||
Tree
|
Jannik Heller
|
||||||
Jason Beverage
|
Jason Beverage
|
||||||
Luigi Calori
|
Tree
|
||||||
Pjotr Svetachov
|
Pjotr Svetachov
|
||||||
|
Luigi Calori
|
||||||
|
Alberto Luaces
|
||||||
Mike Wittman
|
Mike Wittman
|
||||||
Jan Peciva
|
Jan Peciva
|
||||||
Chris Hanson
|
Chris Hanson
|
||||||
Alberto Luaces
|
|
||||||
Roland Smeenk
|
Roland Smeenk
|
||||||
Roger James
|
Roger James
|
||||||
Jeremy Moles
|
Jeremy Moles
|
||||||
J.P. Delport
|
J.P. Delport
|
||||||
|
Andy Skinner
|
||||||
Magnus Kessler
|
Magnus Kessler
|
||||||
David Fries
|
David Fries
|
||||||
Andy Skinner
|
|
||||||
Tom Jolley
|
Tom Jolley
|
||||||
Paul Melis
|
Paul Melis
|
||||||
|
Jordi Torres
|
||||||
Luc Frauciel
|
Luc Frauciel
|
||||||
Aurelien Albert
|
Aurelien Albert
|
||||||
|
Torben Dannhauer
|
||||||
Pavel Moloshtan
|
Pavel Moloshtan
|
||||||
Brad Christiansen
|
Brad Christiansen
|
||||||
|
Terry Welsh
|
||||||
Olaf Flebbe
|
Olaf Flebbe
|
||||||
Mathieu Marache
|
Mathieu Marache
|
||||||
Lionel Lagarde
|
Lionel Lagarde
|
||||||
@@ -61,47 +65,44 @@ Philip Lowman
|
|||||||
Per Fahlberg
|
Per Fahlberg
|
||||||
Norman Vine
|
Norman Vine
|
||||||
Chris Denham
|
Chris Denham
|
||||||
Terry Welsh
|
Sherman Wilcox
|
||||||
Serge Lages
|
Serge Lages
|
||||||
Romano Jos<6F> Magacho da Silva
|
Romano Jos<6F> Magacho da Silva
|
||||||
Jannik Heller
|
|
||||||
Alberto Farre
|
|
||||||
Torben Dannhauer
|
|
||||||
Sherman Wilcox
|
|
||||||
Robert Michael
|
|
||||||
Mourad Boufarguine
|
Mourad Boufarguine
|
||||||
|
Alberto Farre
|
||||||
|
Glenn Waldron
|
||||||
Andr<EFBFBD> Garneau
|
Andr<EFBFBD> Garneau
|
||||||
Adrian Egli
|
Adrian Egli
|
||||||
Ruben Lopez
|
|
||||||
Randall Hopper
|
|
||||||
Jan Ciger
|
|
||||||
Glenn Waldron
|
|
||||||
Sebastian Messerschmidt
|
Sebastian Messerschmidt
|
||||||
|
Randall Hopper
|
||||||
|
Kristofer Tingdahl
|
||||||
|
Jan Ciger
|
||||||
|
Ruben Lopez
|
||||||
|
Robert Michael
|
||||||
Gideon May
|
Gideon May
|
||||||
Don Tidrow
|
Don Tidrow
|
||||||
Stephane Lamoliatte
|
Stephane Lamoliatte
|
||||||
Michael Gronager
|
Michael Gronager
|
||||||
Martin Naylor
|
Martin Naylor
|
||||||
Kristofer Tingdahl
|
|
||||||
Joakim Simonsson
|
Joakim Simonsson
|
||||||
David Spilling
|
David Spilling
|
||||||
Daniel Sj<53>lie
|
Daniel Sj<53>lie
|
||||||
Bryan Thrall
|
Bryan Thrall
|
||||||
|
Andreas Ekstrand
|
||||||
Rafa Gaitan
|
Rafa Gaitan
|
||||||
Mike Connell
|
Mike Connell
|
||||||
|
Konstantin Matveyev
|
||||||
Fabien Lavignotte
|
Fabien Lavignotte
|
||||||
Andreas Ekstrand
|
|
||||||
Thomas Hogarth
|
Thomas Hogarth
|
||||||
Riccardo Corsi
|
Riccardo Corsi
|
||||||
Melchior Franz
|
Melchior Franz
|
||||||
Konstantin Matveyev
|
|
||||||
Johannes Baeuerle
|
Johannes Baeuerle
|
||||||
|
Ravi Mathur
|
||||||
Neil Hughes
|
Neil Hughes
|
||||||
Martin Beckett
|
Martin Beckett
|
||||||
Marc Helbling
|
Marc Helbling
|
||||||
Joran Jessurun
|
Joran Jessurun
|
||||||
Gino van den Bergen
|
Gino van den Bergen
|
||||||
Frederic Marmond
|
|
||||||
David Guthrie
|
David Guthrie
|
||||||
Csaba Halasz
|
Csaba Halasz
|
||||||
Cory Riddell
|
Cory Riddell
|
||||||
@@ -111,30 +112,32 @@ Yefei He
|
|||||||
Sondra Iverson
|
Sondra Iverson
|
||||||
Simon Julier
|
Simon Julier
|
||||||
Rune Schmidt Jensen
|
Rune Schmidt Jensen
|
||||||
|
Ralf Habacker
|
||||||
Rainer Oder
|
Rainer Oder
|
||||||
Nico Kruithof
|
Nico Kruithof
|
||||||
Martin Aumueller
|
Martin Aumueller
|
||||||
Mario Valle
|
Mario Valle
|
||||||
Lukasz Izdebski
|
Lukasz Izdebski
|
||||||
Jorge Izquierdo Ciges
|
Jorge Izquierdo Ciges
|
||||||
Jordi Torres
|
|
||||||
Gordon Tomlinson
|
Gordon Tomlinson
|
||||||
|
Frederic Marmond
|
||||||
Frederic Bouvier
|
Frederic Bouvier
|
||||||
Carlo Camporesi
|
Carlo Camporesi
|
||||||
Ben Discoe
|
Bj<EFBFBD>rn Blissing
|
||||||
Alexander Sinditskiy
|
Alexander Sinditskiy
|
||||||
|
Vladimir Chebaev
|
||||||
Thibault Genessay
|
Thibault Genessay
|
||||||
Sasa Bistrovic
|
Sasa Bistrovic
|
||||||
Ravi Mathur
|
Raymond de Vries
|
||||||
Ralf Habacker
|
|
||||||
Neil Groves
|
Neil Groves
|
||||||
Mikhail Izmestev
|
Mikhail Izmestev
|
||||||
Markus Trenkwalder
|
Markus Trenkwalder
|
||||||
Loic Dachary
|
Loic Dachary
|
||||||
Joseph Steel
|
Joseph Steel
|
||||||
John Shue
|
John Shue
|
||||||
|
Hartwig Wiesmann
|
||||||
Brad Colbert
|
Brad Colbert
|
||||||
Bj<EFBFBD>rn Blissing
|
Ben Discoe
|
||||||
Vivek Rajan
|
Vivek Rajan
|
||||||
Uwe Woessner
|
Uwe Woessner
|
||||||
Tony Horrobin
|
Tony Horrobin
|
||||||
@@ -154,20 +157,20 @@ Martins Innus
|
|||||||
Maciej Krol
|
Maciej Krol
|
||||||
Lilin Xiong
|
Lilin Xiong
|
||||||
Leandro Motta Barros
|
Leandro Motta Barros
|
||||||
|
Julien Valentin
|
||||||
Johan Nouvel
|
Johan Nouvel
|
||||||
Javier Taibo
|
Javier Taibo
|
||||||
Hartwig Wiesmann
|
|
||||||
Donn Mielcarek
|
Donn Mielcarek
|
||||||
Corbin Holtz
|
Corbin Holtz
|
||||||
Blasius Czink
|
Blasius Czink
|
||||||
Alexander Irion
|
Alexander Irion
|
||||||
|
Wee See
|
||||||
Toshiyuki Takahei
|
Toshiyuki Takahei
|
||||||
Sebastien Grignard
|
Sebastien Grignard
|
||||||
Rudolf Wiedemann
|
Rudolf Wiedemann
|
||||||
Maria Ten
|
Maria Ten
|
||||||
Liang Aibin
|
Liang Aibin
|
||||||
Katharina Plugge
|
Katharina Plugge
|
||||||
Julien Valentin
|
|
||||||
John Vidar Larring
|
John Vidar Larring
|
||||||
John Kelso
|
John Kelso
|
||||||
John Ivar
|
John Ivar
|
||||||
@@ -182,10 +185,8 @@ Bradley Anderegg
|
|||||||
Andreas Goebel
|
Andreas Goebel
|
||||||
Alok Priyadarshi
|
Alok Priyadarshi
|
||||||
Ali Botorabi
|
Ali Botorabi
|
||||||
Alberto Barbati
|
|
||||||
Alan Dickinson
|
Alan Dickinson
|
||||||
Vladimir Shabanov
|
Vladimir Shabanov
|
||||||
Vladimir Chebaev
|
|
||||||
Tugkan Calapoglu
|
Tugkan Calapoglu
|
||||||
Tim Daoust
|
Tim Daoust
|
||||||
Sylvain Marie
|
Sylvain Marie
|
||||||
@@ -196,8 +197,10 @@ Ryan Pavlik
|
|||||||
Robert Milharcic
|
Robert Milharcic
|
||||||
Rene Molenaar
|
Rene Molenaar
|
||||||
Piotr Domagalski
|
Piotr Domagalski
|
||||||
|
Philippe Renon
|
||||||
Phil Atkin
|
Phil Atkin
|
||||||
Pawel Ksiezopolski
|
Pawel Ksiezopolski
|
||||||
|
Patrick Neary
|
||||||
Nathan Monteleone
|
Nathan Monteleone
|
||||||
Miha Rav<61>elj
|
Miha Rav<61>elj
|
||||||
Miguel Escriva
|
Miguel Escriva
|
||||||
@@ -239,9 +242,9 @@ Andreas Henne
|
|||||||
Anders Backman
|
Anders Backman
|
||||||
Alexander Wiebel
|
Alexander Wiebel
|
||||||
Alessandro Terenzi
|
Alessandro Terenzi
|
||||||
|
Alberto Barbati
|
||||||
Zach Deedler
|
Zach Deedler
|
||||||
Yuzhong Shen
|
Yuzhong Shen
|
||||||
Wee See
|
|
||||||
Warren Macchi
|
Warren Macchi
|
||||||
Vincent Bourdier
|
Vincent Bourdier
|
||||||
Terrex
|
Terrex
|
||||||
@@ -252,11 +255,9 @@ Stephan Eilemann
|
|||||||
Stanislav Blinov
|
Stanislav Blinov
|
||||||
Sergey Polischuk
|
Sergey Polischuk
|
||||||
Roni Zanolli
|
Roni Zanolli
|
||||||
Raymond de Vries
|
|
||||||
Ralf Kern
|
Ralf Kern
|
||||||
Piotr Gwiazdowski
|
Piotr Gwiazdowski
|
||||||
Pierre Haritchabalet
|
Pierre Haritchabalet
|
||||||
Philippe Renon
|
|
||||||
Perry Miller
|
Perry Miller
|
||||||
Paul Palumbo
|
Paul Palumbo
|
||||||
Paul Obermeier
|
Paul Obermeier
|
||||||
@@ -267,7 +268,6 @@ Morn
|
|||||||
Michael Mc Donnell
|
Michael Mc Donnell
|
||||||
Michael Henheffer
|
Michael Henheffer
|
||||||
Michael Guerrero
|
Michael Guerrero
|
||||||
Maya Leonard
|
|
||||||
Max Bandazian
|
Max Bandazian
|
||||||
Mathias Fiedler
|
Mathias Fiedler
|
||||||
Mathew May
|
Mathew May
|
||||||
@@ -301,7 +301,6 @@ Giampaolo Vigan
|
|||||||
Gerrick Bivins
|
Gerrick Bivins
|
||||||
George Tarantilis
|
George Tarantilis
|
||||||
Ferdi Smit
|
Ferdi Smit
|
||||||
Eric Buehler
|
|
||||||
Eduardo Poyart
|
Eduardo Poyart
|
||||||
Edgar Ellis
|
Edgar Ellis
|
||||||
Dmitry Marakasov
|
Dmitry Marakasov
|
||||||
@@ -317,6 +316,7 @@ Christian Kehl
|
|||||||
Bradley Baker Searles
|
Bradley Baker Searles
|
||||||
Brad Anderegg
|
Brad Anderegg
|
||||||
Aric Aumann
|
Aric Aumann
|
||||||
|
Anish Thomas
|
||||||
Andrew Sampson
|
Andrew Sampson
|
||||||
Andrew Lorino
|
Andrew Lorino
|
||||||
Alexandre Amalric
|
Alexandre Amalric
|
||||||
@@ -339,6 +339,8 @@ Valeriy Dubov
|
|||||||
Vaclav Bilek
|
Vaclav Bilek
|
||||||
Tyge L<>vset
|
Tyge L<>vset
|
||||||
Troy Yee
|
Troy Yee
|
||||||
|
Torben Dannahauer
|
||||||
|
Tony Vasile
|
||||||
Tomas Hogarth
|
Tomas Hogarth
|
||||||
Tomas Hnilica
|
Tomas Hnilica
|
||||||
Todd Furlong
|
Todd Furlong
|
||||||
@@ -360,11 +362,14 @@ Shuxing Xiao
|
|||||||
Shane Arnott
|
Shane Arnott
|
||||||
Sergey Kurdakov
|
Sergey Kurdakov
|
||||||
Sebastien Kuntz
|
Sebastien Kuntz
|
||||||
|
Sandro Mani
|
||||||
Ruth Lang
|
Ruth Lang
|
||||||
|
Ruben The
|
||||||
Ruben Smelik
|
Ruben Smelik
|
||||||
Ross Anderson
|
Ross Anderson
|
||||||
Ronny Krueger
|
Ronny Krueger
|
||||||
Ronald van Maarseveen
|
Ronald van Maarseveen
|
||||||
|
Romain Ouabdelkader
|
||||||
Romain Charbit
|
Romain Charbit
|
||||||
Rocco Martino
|
Rocco Martino
|
||||||
Robert Swain
|
Robert Swain
|
||||||
@@ -401,13 +406,16 @@ Orhun Birsoy
|
|||||||
Oren Fromberg
|
Oren Fromberg
|
||||||
Oliver Neumann
|
Oliver Neumann
|
||||||
Ole-Morten Duesund
|
Ole-Morten Duesund
|
||||||
|
Ognjen Kostic
|
||||||
Nicolas Brodu
|
Nicolas Brodu
|
||||||
|
Nick Thu
|
||||||
Nick Black
|
Nick Black
|
||||||
Mojtaba Fathi
|
Mojtaba Fathi
|
||||||
Mirko Viviani
|
Mirko Viviani
|
||||||
Mikkel Gj<47>l
|
Mikkel Gj<47>l
|
||||||
Mike Krus
|
Mike Krus
|
||||||
Mike Garrity
|
Mike Garrity
|
||||||
|
Mick Thu
|
||||||
Michal Durkovic
|
Michal Durkovic
|
||||||
Michael Schanne
|
Michael Schanne
|
||||||
Michael Polak
|
Michael Polak
|
||||||
@@ -415,6 +423,8 @@ Michael Morrison
|
|||||||
Michael Logan
|
Michael Logan
|
||||||
Michael Kapelko
|
Michael Kapelko
|
||||||
Michael Bach Jensen
|
Michael Bach Jensen
|
||||||
|
Maya Thu
|
||||||
|
Maya Leonard
|
||||||
Max Rhiener
|
Max Rhiener
|
||||||
Max Behensky
|
Max Behensky
|
||||||
Mauricio Hofmam
|
Mauricio Hofmam
|
||||||
@@ -431,9 +441,9 @@ Martin Beck
|
|||||||
Marius Kintel
|
Marius Kintel
|
||||||
Mario Guimaraes
|
Mario Guimaraes
|
||||||
Marcus Hein
|
Marcus Hein
|
||||||
|
Marco Thu
|
||||||
Marco Sciabica
|
Marco Sciabica
|
||||||
Marco Lehmann
|
Marco Lehmann
|
||||||
Maik Keller
|
|
||||||
Lukas Diduch
|
Lukas Diduch
|
||||||
Louis Hamilton
|
Louis Hamilton
|
||||||
Likasz Izebski
|
Likasz Izebski
|
||||||
@@ -455,11 +465,14 @@ Juan Hernando
|
|||||||
Josh Portway
|
Josh Portway
|
||||||
Jonathan Greig
|
Jonathan Greig
|
||||||
John Tan
|
John Tan
|
||||||
|
John Hedström
|
||||||
John Grant
|
John Grant
|
||||||
|
John Farrier
|
||||||
John Donovan
|
John Donovan
|
||||||
John Davis
|
John Davis
|
||||||
John Cummings
|
John Cummings
|
||||||
John Argentieri
|
John Argentieri
|
||||||
|
Joe Thompson
|
||||||
Joan Abadie
|
Joan Abadie
|
||||||
Jim Brooks
|
Jim Brooks
|
||||||
Jeroen den Dekker
|
Jeroen den Dekker
|
||||||
@@ -480,6 +493,7 @@ Gregory Jaegy
|
|||||||
Graeme Harkness
|
Graeme Harkness
|
||||||
Gian Lorenzetto
|
Gian Lorenzetto
|
||||||
George Papagiannakis
|
George Papagiannakis
|
||||||
|
Geoff Thu
|
||||||
Galen Faidley
|
Galen Faidley
|
||||||
Frida Schlaug
|
Frida Schlaug
|
||||||
Frederic Smith
|
Frederic Smith
|
||||||
@@ -494,6 +508,8 @@ Ferdinand Cornelissen
|
|||||||
Fajran Iman
|
Fajran Iman
|
||||||
Fabien Dachicourt
|
Fabien Dachicourt
|
||||||
Erik Johnson
|
Erik Johnson
|
||||||
|
Eric Thu
|
||||||
|
Eric Buehler
|
||||||
Eduardo Alberto
|
Eduardo Alberto
|
||||||
Edmond Gheury
|
Edmond Gheury
|
||||||
Ed Ralston
|
Ed Ralston
|
||||||
@@ -509,6 +525,8 @@ Daniel Stien
|
|||||||
Dan Minor
|
Dan Minor
|
||||||
C<EFBFBD>sar L. B. Silveira
|
C<EFBFBD>sar L. B. Silveira
|
||||||
Cyril Brulebois
|
Cyril Brulebois
|
||||||
|
Curtis Rubel
|
||||||
|
Cory Slep
|
||||||
Cl<EFBFBD>ment B<>sch
|
Cl<EFBFBD>ment B<>sch
|
||||||
Clay Fowler
|
Clay Fowler
|
||||||
Claus Steuer
|
Claus Steuer
|
||||||
@@ -520,12 +538,13 @@ Christian Noon
|
|||||||
Christian Kaser
|
Christian Kaser
|
||||||
Christian Ehrlicher
|
Christian Ehrlicher
|
||||||
Chris McGlone
|
Chris McGlone
|
||||||
|
Chris Djali
|
||||||
Carlos Garcea
|
Carlos Garcea
|
||||||
Bryce Eldridge
|
Bryce Eldridge
|
||||||
Bruno Herbelin
|
Bruno Herbelin
|
||||||
Brian Keener
|
Brian Keener
|
||||||
|
Brede Thu
|
||||||
Brandon Hamm
|
Brandon Hamm
|
||||||
Bora Utka
|
|
||||||
Bill Prendergast
|
Bill Prendergast
|
||||||
Bernardt Duvenhage
|
Bernardt Duvenhage
|
||||||
Benoit Laniel
|
Benoit Laniel
|
||||||
@@ -535,7 +554,7 @@ Bart Gallet
|
|||||||
Axel Volley
|
Axel Volley
|
||||||
Arjun Ramamurthy
|
Arjun Ramamurthy
|
||||||
Anthousis Andreadis
|
Anthousis Andreadis
|
||||||
Anish Thomas
|
Anna Sokol
|
||||||
Andy Preece
|
Andy Preece
|
||||||
Andrew Reyonolds
|
Andrew Reyonolds
|
||||||
Andreas Roth
|
Andreas Roth
|
||||||
@@ -552,3 +571,4 @@ Alan Harris
|
|||||||
Adrien Grandemange
|
Adrien Grandemange
|
||||||
Adrian Clark
|
Adrian Clark
|
||||||
Adam Richard
|
Adam Richard
|
||||||
|
Abhishek Bansal
|
||||||
|
|||||||
552
CMakeLists.txt
552
CMakeLists.txt
@@ -1,15 +1,19 @@
|
|||||||
|
#
|
||||||
|
# OpenSceneGraph CMake build file
|
||||||
|
#
|
||||||
|
SET(OPENSCENEGRAPH_MAJOR_VERSION 3)
|
||||||
|
SET(OPENSCENEGRAPH_MINOR_VERSION 6)
|
||||||
|
SET(OPENSCENEGRAPH_PATCH_VERSION 2)
|
||||||
|
SET(OPENSCENEGRAPH_SOVERSION 157)
|
||||||
|
|
||||||
|
|
||||||
|
# set to 0 when not a release candidate, non zero means that any generated
|
||||||
|
# git tags will be treated as release candidates of given number
|
||||||
|
SET(OPENSCENEGRAPH_RELEASE_CANDIDATE 0)
|
||||||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE)
|
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE)
|
||||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
|
|
||||||
IF(WIN32)
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR)
|
|
||||||
ELSE(WIN32)
|
|
||||||
IF(APPLE)
|
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
|
|
||||||
ELSE(APPLE)
|
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.4 FATAL_ERROR)
|
|
||||||
ENDIF(APPLE)
|
|
||||||
ENDIF(WIN32)
|
|
||||||
|
|
||||||
if(COMMAND cmake_policy)
|
if(COMMAND cmake_policy)
|
||||||
# Works around warnings libraries linked against that don't
|
# Works around warnings libraries linked against that don't
|
||||||
@@ -22,44 +26,90 @@ if(COMMAND cmake_policy)
|
|||||||
|
|
||||||
# tell CMake to prefer CMake's own CMake modules when available
|
# tell CMake to prefer CMake's own CMake modules when available
|
||||||
# only available from cmake-2.8.4
|
# only available from cmake-2.8.4
|
||||||
if(${CMAKE_MAJOR_VERSION} GREATER 2 OR
|
if("${CMAKE_VERSION}" VERSION_GREATER 2.8.3)
|
||||||
(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 8) OR
|
|
||||||
(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 8 AND ${CMAKE_PATCH_VERSION} GREATER 3))
|
|
||||||
cmake_policy(SET CMP0017 NEW)
|
cmake_policy(SET CMP0017 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# cmake-2.6.1 introduces policy cmp0008 decide how to treat full path libraries that do not appear to be valid library file names
|
|
||||||
# quote from cvslog "Such libraries worked by accident in the VS IDE and Xcode generators in CMake 2.4 and below."
|
|
||||||
if(${CMAKE_MAJOR_VERSION} GREATER 2 OR
|
|
||||||
(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 6) OR
|
|
||||||
(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 6 AND ${CMAKE_PATCH_VERSION} GREATER 0))
|
|
||||||
cmake_policy(SET CMP0008 OLD)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# disable autolinking to qtmain as we have our own main() functions (new in Qt 5.1)
|
|
||||||
if(${CMAKE_MAJOR_VERSION} GREATER 2 OR
|
|
||||||
(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 8) OR
|
|
||||||
(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 8 AND ${CMAKE_PATCH_VERSION} GREATER 10))
|
|
||||||
cmake_policy(SET CMP0020 OLD)
|
|
||||||
endif()
|
|
||||||
# nicer version check - but needs at least CMake 2.6.2? Worth upgrading the requirements?
|
|
||||||
#if("${CMAKE_VERSION}" VERSION_GREATER 2.8.10)
|
|
||||||
# or even easier (available in cmake-2.6)
|
|
||||||
#if(POLICY CMPxyzw)
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
IF(APPLE)
|
||||||
|
# Get OSX version in MAJOR.MINOR format
|
||||||
|
EXECUTE_PROCESS(COMMAND sw_vers -productVersion
|
||||||
|
OUTPUT_VARIABLE OSG_OSX_VERSION
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
STRING(REGEX REPLACE "^([0-9]+\\.[0-9]+).*$" "\\1"
|
||||||
|
OSG_OSX_VERSION "${OSG_OSX_VERSION}")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
# Set OSX architecture flags here, since they must be specified before
|
||||||
|
# creating the actual OSG project.
|
||||||
|
# Note that the CMAKE_OSX_* variables are not well documented in
|
||||||
|
# CMake 2.8, but they do officially exist.
|
||||||
|
# See https://cmake.org/Bug/view.php?id=14695#c34953
|
||||||
|
# Additionally, OSG_WINDOWING_SYSTEM is set here for OSX since its
|
||||||
|
# value is needed to find the correct version of OpenGL (X11 or Cocoa).
|
||||||
|
IF(APPLE AND NOT ANDROID)
|
||||||
|
|
||||||
|
# Here we check if the user specified IPhone SDK
|
||||||
|
# These options are formally defined later, but can also be specified
|
||||||
|
# by the user at the command line using the cmake -D switch
|
||||||
|
# Note that FORCE is used since the user will likely enable IPhone
|
||||||
|
# build via CMake GUI after already having configured once
|
||||||
|
IF(OSG_BUILD_PLATFORM_IPHONE OR OSG_BUILD_PLATFORM_IPHONE_SIMULATOR)
|
||||||
|
SET(OSG_WINDOWING_SYSTEM "IOS" CACHE STRING "Windowing system type for graphics window creation, options only IOS.")
|
||||||
|
|
||||||
|
#set iphone arch and flags taken from http://sites.google.com/site/michaelsafyan/coding/resources/how-to-guides/cross-compile-for-the-iphone/how-to-cross-compile-for-the-iphone-using-cmake
|
||||||
|
IF(OSG_BUILD_PLATFORM_IPHONE)
|
||||||
|
IF(${IPHONE_VERSION_MIN} LESS "7.0")
|
||||||
|
SET(CMAKE_OSX_ARCHITECTURES "armv6;armv7" CACHE STRING "Build architectures for iOS" FORCE)
|
||||||
|
ELSE()
|
||||||
|
SET(CMAKE_OSX_ARCHITECTURES "armv7;armv7s;arm64" CACHE STRING "Build architectures for iOS" FORCE)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
ELSE()
|
||||||
|
#simulator uses i386 and x86_64 architectures
|
||||||
|
SET(CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE STRING "Build architectures for iOS Simulator" FORCE)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
#here we set the specific iphone sdk version. We can only set either device or simulator sdk. So if you want both you currently have to have two separate projects
|
||||||
|
SET(CMAKE_OSX_SYSROOT "${IPHONE_SDKROOT}" CACHE STRING "System root for iOS" FORCE)
|
||||||
|
|
||||||
|
ELSE()
|
||||||
|
# OSX >= 10.5 uses Cocoa windowing system, otherwise Carbon
|
||||||
|
IF(OSG_OSX_VERSION VERSION_LESS 10.5)
|
||||||
|
SET(OSG_WINDOWING_SYSTEM "Carbon" CACHE STRING "Windowing system type for graphics window creation, options Carbon, Cocoa or X11.")
|
||||||
|
ELSE()
|
||||||
|
SET(OSG_WINDOWING_SYSTEM "Cocoa" CACHE STRING "Windowing system type for graphics window creation, options Carbon, Cocoa or X11.")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
# Set defaults for Universal Binaries. We want 32-bit Intel/PPC on 10.4
|
||||||
|
# and 32/64-bit Intel/PPC on >= 10.5. Anything <= 10.3 doesn't support.
|
||||||
|
# These are set the first time CMake is run, and can be changed by
|
||||||
|
# the user at any time.
|
||||||
|
IF(OSG_OSX_VERSION VERSION_GREATER 10.7)
|
||||||
|
# 64 Bit Works, i386,ppc is not supported any more
|
||||||
|
SET(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX")
|
||||||
|
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.8" CACHE STRING "Target OSX version")
|
||||||
|
ELSEIF(OSG_OSX_VERSION VERSION_EQUAL 10.7)
|
||||||
|
# 64 Bit Works, PPC is not supported any more
|
||||||
|
SET(CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE STRING "Build architectures for OSX")
|
||||||
|
ELSEIF(OSG_OSX_VERSION VERSION_GREATER 10.4)
|
||||||
|
# 64-bit compiles are not supported with Carbon.
|
||||||
|
SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX")
|
||||||
|
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.5" CACHE STRING "Target OSX version")
|
||||||
|
ELSEIF(OSG_OSX_VERSION VERSION_EQUAL 10.4)
|
||||||
|
# 64-bit compiles are not supported with Carbon.
|
||||||
|
SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX")
|
||||||
|
ELSE()
|
||||||
|
# No Universal Binary support and SDK detection is too unreliable.
|
||||||
|
# Warn user and continue at their own peril.
|
||||||
|
MESSAGE(WARNING "OSX 10.3 and earlier not supported.")
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
PROJECT(OpenSceneGraph)
|
PROJECT(OpenSceneGraph)
|
||||||
|
|
||||||
SET(OPENSCENEGRAPH_MAJOR_VERSION 3)
|
|
||||||
SET(OPENSCENEGRAPH_MINOR_VERSION 4)
|
|
||||||
SET(OPENSCENEGRAPH_PATCH_VERSION 0)
|
|
||||||
SET(OPENSCENEGRAPH_SOVERSION 130)
|
|
||||||
|
|
||||||
# set to 0 when not a release candidate, non zero means that any generated
|
|
||||||
# svn tags will be treated as release candidates of given number
|
|
||||||
SET(OPENSCENEGRAPH_RELEASE_CANDIDATE 1)
|
|
||||||
|
|
||||||
SET(OPENSCENEGRAPH_VERSION ${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION}.${OPENSCENEGRAPH_PATCH_VERSION})
|
SET(OPENSCENEGRAPH_VERSION ${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION}.${OPENSCENEGRAPH_PATCH_VERSION})
|
||||||
|
|
||||||
SET(OSG_PLUGINS osgPlugins-${OPENSCENEGRAPH_VERSION})
|
SET(OSG_PLUGINS osgPlugins-${OPENSCENEGRAPH_VERSION})
|
||||||
@@ -114,27 +164,15 @@ IF(CMAKE_SYSTEM MATCHES IRIX)
|
|||||||
SET(CMAKE_THREAD_LIBS_INIT "" CACHE INTERNAL "")
|
SET(CMAKE_THREAD_LIBS_INIT "" CACHE INTERNAL "")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
OPTION(OSG_MAINTAINER "Enable OpenSceneGraph maintainer build methods, such as making svn branches, tags, updating ChangeLog." OFF)
|
OPTION(OSG_MAINTAINER "Enable OpenSceneGraph maintainer build methods, such as making git branches, tags, updating ChangeLog." OFF)
|
||||||
IF (OSG_MAINTAINER)
|
IF (OSG_MAINTAINER)
|
||||||
|
|
||||||
SET(OPENSCENEGRAPH_SVN "trunk")
|
|
||||||
#SET(OPENSCENEGRAPH_SVN "branches")
|
|
||||||
SET(OPENSCENEGRAPH_BRANCH OpenSceneGraph-${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION})
|
SET(OPENSCENEGRAPH_BRANCH OpenSceneGraph-${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION})
|
||||||
|
|
||||||
#
|
#
|
||||||
# Provide target for tagging a release
|
# Provide target for tagging a release
|
||||||
#
|
#
|
||||||
SET(SVNCOMMAND svn)
|
SET(GITCOMMAND git)
|
||||||
SET(SVNTRUNKDIR http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk)
|
|
||||||
SET(SVNTAGDIR http://svn.openscenegraph.org/osg/OpenSceneGraph/tags)
|
|
||||||
SET(SVNBRANCHDIR http://svn.openscenegraph.org/osg/OpenSceneGraph/branches)
|
|
||||||
|
|
||||||
IF (OPENSCENEGRAPH_SVN STREQUAL "trunk")
|
|
||||||
SET(SVNSOURCEDIR ${SVNTRUNKDIR})
|
|
||||||
ELSE()
|
|
||||||
SET(SVNSOURCEDIR ${SVNBRANCHDIR}/${OPENSCENEGRAPH_BRANCH})
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
|
|
||||||
IF (OPENSCENEGRAPH_RELEASE_CANDIDATE EQUAL 0)
|
IF (OPENSCENEGRAPH_RELEASE_CANDIDATE EQUAL 0)
|
||||||
SET(RELEASE_NAME OpenSceneGraph-${OPENSCENEGRAPH_VERSION})
|
SET(RELEASE_NAME OpenSceneGraph-${OPENSCENEGRAPH_VERSION})
|
||||||
@@ -142,59 +180,55 @@ IF (OSG_MAINTAINER)
|
|||||||
SET(RELEASE_NAME OpenSceneGraph-${OPENSCENEGRAPH_VERSION}-rc${OPENSCENEGRAPH_RELEASE_CANDIDATE})
|
SET(RELEASE_NAME OpenSceneGraph-${OPENSCENEGRAPH_VERSION}-rc${OPENSCENEGRAPH_RELEASE_CANDIDATE})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
SET(RELEASE_MESSAGE "Release ${RELEASE_NAME}")
|
||||||
|
SET(BRANCH_MESSAGE "Branch ${OPENSCENEGRAPH_BRANCH}")
|
||||||
|
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(tag-test
|
ADD_CUSTOM_TARGET(tag-test
|
||||||
COMMAND echo ${SVNCOMMAND} copy ${SVNSOURCEDIR} ${SVNTAGDIR}/${RELEASE_NAME} -m "Release ${RELEASE_NAME}"
|
COMMAND echo ${GITCOMMAND} tag -a ${RELEASE_NAME} -m ${RELEASE_MESSAGE}
|
||||||
|
COMMAND echo ${GITCOMMAND} push origin ${RELEASE_NAME}
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(tag-run
|
ADD_CUSTOM_TARGET(tag-run
|
||||||
COMMAND ${SVNCOMMAND} copy ${SVNSOURCEDIR} ${SVNTAGDIR}/${RELEASE_NAME} -m "Release ${RELEASE_NAME}"
|
COMMAND ${GITCOMMAND} tag -a ${RELEASE_NAME} -m ${RELEASE_MESSAGE}
|
||||||
|
COMMAND ${GITCOMMAND} push origin ${RELEASE_NAME}
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(branch-test
|
ADD_CUSTOM_TARGET(branch-test
|
||||||
COMMAND echo ${SVNCOMMAND} copy ${SVNSOURCEDIR} ${SVNBRANCHDIR}/${OPENSCENEGRAPH_BRANCH} -m "Branch ${OPENSCENEGRAPH_BRANCH}"
|
COMMAND echo ${GITCOMMAND} branch ${OPENSCENEGRAPH_BRANCH}
|
||||||
|
COMMAND echo ${GITCOMMAND} push origin ${OPENSCENEGRAPH_BRANCH}
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(branch-run
|
ADD_CUSTOM_TARGET(branch-run
|
||||||
COMMAND ${SVNCOMMAND} copy ${SVNSOURCEDIR} ${SVNBRANCHDIR}/${OPENSCENEGRAPH_BRANCH} -m "Branch ${OPENSCENEGRAPH_BRANCH}"
|
COMMAND ${GITCOMMAND} branch ${OPENSCENEGRAPH_BRANCH}
|
||||||
|
COMMAND ${GITCOMMAND} push origin ${OPENSCENEGRAPH_BRANCH}
|
||||||
)
|
)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Provide target for generating ChangeLog
|
# Provide target for generating ChangeLog
|
||||||
#
|
#
|
||||||
SET(GENERATELOGS svn2cl)
|
SET(GITLOGFORMAT "%aD%nAuthor : %an%n%s%b%n")
|
||||||
|
SET(GENERATELOGS git log --pretty=format:${GITLOGFORMAT})
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(ChangeLog
|
ADD_CUSTOM_TARGET(ChangeLog
|
||||||
COMMAND ${SVNCOMMAND} update
|
COMMAND ${GENERATELOGS} > ChangeLog
|
||||||
COMMAND ${GENERATELOGS} ${SVNSOURCEDIR}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
ENDIF(OSG_MAINTAINER)
|
ENDIF(OSG_MAINTAINER)
|
||||||
|
|
||||||
IF(NOT ANDROID)
|
IF(NOT ANDROID)
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
# Determine the canonical name of the selected Platform SDK
|
|
||||||
EXECUTE_PROCESS(COMMAND "/usr/bin/sw_vers" "-productVersion"
|
|
||||||
OUTPUT_VARIABLE OSG_OSX_SDK_NAME
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
||||||
STRING(REPLACE "." ";" MACOS_VERSION_LIST ${OSG_OSX_SDK_NAME})
|
|
||||||
LIST(GET MACOS_VERSION_LIST 0 MACOS_VERSION_MAJOR)
|
|
||||||
LIST(GET MACOS_VERSION_LIST 1 MACOS_VERSION_MINOR)
|
|
||||||
LIST(GET MACOS_VERSION_LIST 2 MACOS_VERSION_PATCH)
|
|
||||||
|
|
||||||
SET(OSG_OSX_SDK_NAME "macosx${MACOS_VERSION_MAJOR}.${MACOS_VERSION_MINOR}")
|
|
||||||
|
|
||||||
# Trying to get CMake to generate an XCode IPhone project, current efforts are to get iphoneos sdk 3.1 working
|
# Trying to get CMake to generate an XCode IPhone project, current efforts are to get iphoneos sdk 3.1 working
|
||||||
# Added option which needs manually setting to select the IPhone SDK for building. We can only have one of the below
|
# Added option which needs manually setting to select the IPhone SDK for building. We can only have one of the below
|
||||||
# set to true. Should realy have an OSG_BUILD_PLATFORM variable that we set to our desired platform
|
# set to true. Should really have an OSG_BUILD_PLATFORM variable that we set to our desired platform
|
||||||
OPTION(OSG_BUILD_PLATFORM_IPHONE "Enable IPhoneSDK Device support" OFF)
|
OPTION(OSG_BUILD_PLATFORM_IPHONE "Enable IPhoneSDK Device support" OFF)
|
||||||
OPTION(OSG_BUILD_PLATFORM_IPHONE_SIMULATOR "Enable IPhoneSDK Simulator support" OFF)
|
OPTION(OSG_BUILD_PLATFORM_IPHONE_SIMULATOR "Enable IPhoneSDK Simulator support" OFF)
|
||||||
|
|
||||||
IF(OSG_BUILD_PLATFORM_IPHONE OR OSG_BUILD_PLATFORM_IPHONE_SIMULATOR)
|
IF(OSG_BUILD_PLATFORM_IPHONE OR OSG_BUILD_PLATFORM_IPHONE_SIMULATOR)
|
||||||
|
|
||||||
#you need to manually set the default sdk version here
|
#you need to manually set the default sdk version here
|
||||||
SET (IPHONE_SDKVER "6.0" CACHE STRING "IOS SDK-Version")
|
SET (IPHONE_SDKVER "10.2" CACHE STRING "IOS SDK-Version")
|
||||||
SET (IPHONE_VERSION_MIN "4.2" CACHE STRING "IOS minimum os version, use 7.0 or greater to get 64bit support")
|
SET (IPHONE_VERSION_MIN "7.0" CACHE STRING "IOS minimum os version, use 7.0 or greater to get 64bit support")
|
||||||
|
|
||||||
#the below is taken from ogre, it states the gcc stuff needs to happen before PROJECT() is called. I've no clue if we even need it
|
#the below is taken from ogre, it states the gcc stuff needs to happen before PROJECT() is called. I've no clue if we even need it
|
||||||
# Force gcc <= 4.2 on iPhone
|
# Force gcc <= 4.2 on iPhone
|
||||||
@@ -214,15 +248,40 @@ IF(APPLE)
|
|||||||
SET (IPHONE_SDKROOT "${IPHONE_DEVROOT}/SDKs/iPhoneSimulator${IPHONE_SDKVER}.sdk")
|
SET (IPHONE_SDKROOT "${IPHONE_DEVROOT}/SDKs/iPhoneSimulator${IPHONE_SDKVER}.sdk")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
SET (IPHONE_ENABLE_BITCODE "NO" CACHE STRING "IOS Enable Bitcode")
|
||||||
|
|
||||||
# Apple iOS: Find OpenGLES
|
# Apple iOS: Find OpenGLES
|
||||||
FIND_LIBRARY(OPENGLES_LIBRARY OpenGLES)
|
FIND_LIBRARY(OPENGLES_LIBRARY OpenGLES)
|
||||||
ELSE ()
|
ELSE ()
|
||||||
FIND_LIBRARY(CARBON_LIBRARY Carbon)
|
FIND_LIBRARY(CARBON_LIBRARY Carbon)
|
||||||
FIND_LIBRARY(COCOA_LIBRARY Cocoa)
|
FIND_LIBRARY(COCOA_LIBRARY Cocoa)
|
||||||
|
|
||||||
# Apple OS X: Find OpenGL and AGL
|
# Apple OS X: Find OpenGL and AGL based on OSG_WINDOWING_SYSTEM
|
||||||
|
# This is the accepted way of finding X11/OpenGL on OSX, as
|
||||||
|
# documented in CMake's FindOpenGL module.
|
||||||
|
# Note that without this check, libosg would use Cocoa/OpenGL but
|
||||||
|
# libosgViewer would use X11/OpenGL, which causes compatibility
|
||||||
|
# issues for applications using OSG.
|
||||||
|
UNSET(OPENGL_gl_LIBRARY CACHE)
|
||||||
|
UNSET(OPENGL_INCLUDE_DIR CACHE)
|
||||||
|
IF(OSG_WINDOWING_SYSTEM STREQUAL "X11")
|
||||||
|
FIND_PACKAGE(X11)
|
||||||
|
IF(NOT X11_FOUND)
|
||||||
|
MESSAGE(FATAL_ERROR "OSG_WINDOWING_SYSTEM is X11, but no X11 installation was found. Please make sure X11 is properly installed.")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
# Use X11 version of OpenGL as seed for CMake FindOpenGL
|
||||||
|
GET_FILENAME_COMPONENT(X11LIBDIR ${X11_X11_LIB} DIRECTORY)
|
||||||
|
FIND_LIBRARY(OPENGL_gl_LIBRARY GL PATHS ${X11LIBDIR} DOC "OpenGL lib for OSX" NO_DEFAULT_PATH)
|
||||||
|
SET(OPENGL_INCLUDE_DIR ${X11_INCLUDE_DIR} CACHE PATH "Include for OpenGL on OSX" FORCE)
|
||||||
|
|
||||||
|
ELSEIF(OSG_WINDOWING_SYSTEM STREQUAL "Carbon")
|
||||||
|
# AGL needed for Carbon windowing systems
|
||||||
|
FIND_LIBRARY(AGL_LIBRARY AGL)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
FIND_PACKAGE(OpenGL)
|
FIND_PACKAGE(OpenGL)
|
||||||
FIND_LIBRARY(AGL_LIBRARY AGL)
|
FIND_PACKAGE(EGL)
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
|
||||||
OPTION(OSG_COMPILE_FRAMEWORKS "compile frameworks instead of dylibs (experimental)" OFF)
|
OPTION(OSG_COMPILE_FRAMEWORKS "compile frameworks instead of dylibs (experimental)" OFF)
|
||||||
@@ -230,6 +289,7 @@ IF(APPLE)
|
|||||||
ELSE()
|
ELSE()
|
||||||
# Non-Apple: Find OpenGL
|
# Non-Apple: Find OpenGL
|
||||||
FIND_PACKAGE(OpenGL)
|
FIND_PACKAGE(OpenGL)
|
||||||
|
FIND_PACKAGE(EGL)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
@@ -255,22 +315,30 @@ IF(UNIX AND NOT ANDROID)
|
|||||||
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(
|
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include
|
|
||||||
${OPENGL_INCLUDE_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
# Make the headers visible to everything
|
# Make the headers visible to everything
|
||||||
IF(NOT ${PROJECT_BINARY_DIR} EQUAL ${PROJECT_SOURCE_DIR})
|
IF(NOT ${PROJECT_BINARY_DIR} EQUAL ${PROJECT_SOURCE_DIR})
|
||||||
INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/include)
|
INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}/include)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
INCLUDE_DIRECTORIES(${OpenSceneGraph_SOURCE_DIR}/include/)
|
||||||
|
|
||||||
|
INCLUDE_DIRECTORIES(SYSTEM ${OPENGL_INCLUDE_DIR})
|
||||||
|
|
||||||
# Common global definitions
|
# Common global definitions
|
||||||
#ADD_DEFINITIONS(-D)
|
#ADD_DEFINITIONS(-D)
|
||||||
# Platform specific definitions
|
# Platform specific definitions
|
||||||
|
|
||||||
|
|
||||||
IF(WIN32 AND NOT ANDROID)
|
IF(WIN32 AND NOT ANDROID)
|
||||||
|
OPTION(OSG_DETERMINE_WIN_VERSION "Wheter to automatically determine current Windows version" ON)
|
||||||
|
|
||||||
|
IF(OSG_DETERMINE_WIN_VERSION)
|
||||||
|
# Check window version
|
||||||
|
INCLUDE (OsgDetermineWinVersion)
|
||||||
|
get_WIN32_WINNT(WIN_VERSION)
|
||||||
|
ADD_DEFINITIONS(-D_WIN32_WINNT=${WIN_VERSION})
|
||||||
|
ENDIF(OSG_DETERMINE_WIN_VERSION)
|
||||||
|
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
# This option is to enable the /MP switch for Visual Studio 2005 and above compilers
|
# This option is to enable the /MP switch for Visual Studio 2005 and above compilers
|
||||||
@@ -339,21 +407,15 @@ IF(WIN32 AND NOT ANDROID)
|
|||||||
##########################################################################################################
|
##########################################################################################################
|
||||||
|
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
IF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4 AND ${CMAKE_PATCH_VERSION} LESS 7)
|
OPTION(OSG_MSVC_VERSIONED_DLL "Set to ON to build OpenSceneGraph with versioned dll names" ON)
|
||||||
MESSAGE("Warning: disabling versioned options 2.4.6 exibits inconsintencies in .pdb naming, at least under MSVC, suggested upgrading at least to 2.4.7")
|
MARK_AS_ADVANCED(OSG_MSVC_VERSIONED_DLL)
|
||||||
SET(OSG_MSVC_VERSIONED_DLL OFF)
|
OPTION(OSG_MSVC_DEBUG_INCREMENTAL_LINK "Set to OFF to build OpenSceneGraph without incremental linking in debug (release is off by default)" ON)
|
||||||
SET(OSG_MSVC_DEBUG_INCREMENTAL_LINK ON)
|
MARK_AS_ADVANCED(OSG_MSVC_DEBUG_INCREMENTAL_LINK)
|
||||||
ELSE()
|
IF(NOT OSG_MSVC_DEBUG_INCREMENTAL_LINK)
|
||||||
OPTION(OSG_MSVC_VERSIONED_DLL "Set to ON to build OpenSceneGraph with versioned dll names" ON)
|
SET(CMAKE_MODULE_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
|
||||||
MARK_AS_ADVANCED(OSG_MSVC_VERSIONED_DLL)
|
SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
|
||||||
OPTION(OSG_MSVC_DEBUG_INCREMENTAL_LINK "Set to OFF to build OpenSceneGraph without incremental linking in debug (release is off by default)" ON)
|
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
|
||||||
MARK_AS_ADVANCED(OSG_MSVC_DEBUG_INCREMENTAL_LINK)
|
ENDIF(NOT OSG_MSVC_DEBUG_INCREMENTAL_LINK)
|
||||||
IF(NOT OSG_MSVC_DEBUG_INCREMENTAL_LINK)
|
|
||||||
SET(CMAKE_MODULE_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
|
|
||||||
SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
|
|
||||||
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
|
|
||||||
ENDIF(NOT OSG_MSVC_DEBUG_INCREMENTAL_LINK)
|
|
||||||
ENDIF()
|
|
||||||
ENDIF(MSVC)
|
ENDIF(MSVC)
|
||||||
ENDIF(WIN32 AND NOT ANDROID)
|
ENDIF(WIN32 AND NOT ANDROID)
|
||||||
|
|
||||||
@@ -378,6 +440,8 @@ ENDIF(WIN32 AND NOT ANDROID)
|
|||||||
|
|
||||||
OPTION(OSG_NOTIFY_DISABLED "Set to ON to build OpenSceneGraph with the notify() disabled." OFF)
|
OPTION(OSG_NOTIFY_DISABLED "Set to ON to build OpenSceneGraph with the notify() disabled." OFF)
|
||||||
|
|
||||||
|
OPTION(OSG_USE_DEPRECATED_API "Set to ON to build OpenSceneGraph with the OSG_USE_DEPREFATED_API #define enabled to allow access to deprecated APIs ." ON)
|
||||||
|
|
||||||
OPTION(OSG_USE_FLOAT_MATRIX "Set to ON to build OpenSceneGraph with float Matrix instead of double." OFF)
|
OPTION(OSG_USE_FLOAT_MATRIX "Set to ON to build OpenSceneGraph with float Matrix instead of double." OFF)
|
||||||
MARK_AS_ADVANCED(OSG_USE_FLOAT_MATRIX)
|
MARK_AS_ADVANCED(OSG_USE_FLOAT_MATRIX)
|
||||||
|
|
||||||
@@ -398,11 +462,16 @@ ENDIF()
|
|||||||
OPTION(OSG_DISABLE_MSVC_WARNINGS "Set to OFF to not disable MSVC warnings generated by OSG headers." ON)
|
OPTION(OSG_DISABLE_MSVC_WARNINGS "Set to OFF to not disable MSVC warnings generated by OSG headers." ON)
|
||||||
MARK_AS_ADVANCED(OSG_DISABLE_MSVC_WARNINGS)
|
MARK_AS_ADVANCED(OSG_DISABLE_MSVC_WARNINGS)
|
||||||
|
|
||||||
|
OPTION(OSG_PROVIDE_READFILE "Set to ON for include/osgDB/ReadFile to provide the osgDB::read*File(() methods. " ON)
|
||||||
OPTION(OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION "Set to ON to use the ref_ptr<> T* operator() output conversion. " ON)
|
OPTION(OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION "Set to ON to use the ref_ptr<> T* operator() output conversion. " ON)
|
||||||
|
OPTION(OSG_USE_REF_PTR_SAFE_DEREFERENCE "Set to ON to throw an exception whenever ref_ptr<> is dereferenced or called. " OFF)
|
||||||
|
|
||||||
|
OPTION(OSG_ENVVAR_SUPPORTED "Set to ON to build OpenSceneGraph with the #define OSG_ENVVAR_SUPPORTED, found in include/osg/Config, to enable use of getenv() related functions." ON)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Map the OPENGL_PROFILE to OSG_GL*_AVAILABLE settings
|
# Map the OPENGL_PROFILE to OSG_GL*_AVAILABLE settings
|
||||||
SET(OPENGL_PROFILE "GL2" CACHE STRING "OpenGL Profile to use, choose from GL2, GL3, GLES1, GLES2, GLES3")
|
SET(OPENGL_PROFILE "GL2" CACHE STRING "OpenGL Profile to use, choose from GL1, GL2, GL3, GLES1, GLES2, GLES3")
|
||||||
|
|
||||||
IF ((OPENGL_PROFILE STREQUAL "GL1") OR (OPENGL_PROFILE STREQUAL "GL2"))
|
IF ((OPENGL_PROFILE STREQUAL "GL1") OR (OPENGL_PROFILE STREQUAL "GL2"))
|
||||||
OPTION(OSG_GL1_AVAILABLE "Set to OFF to disable use of OpenGL 1.x functions library." ON )
|
OPTION(OSG_GL1_AVAILABLE "Set to OFF to disable use of OpenGL 1.x functions library." ON )
|
||||||
@@ -418,6 +487,9 @@ ENDIF()
|
|||||||
|
|
||||||
IF ((OPENGL_PROFILE STREQUAL "GL3") OR (OPENGL_PROFILE STREQUAL "GLCORE"))
|
IF ((OPENGL_PROFILE STREQUAL "GL3") OR (OPENGL_PROFILE STREQUAL "GLCORE"))
|
||||||
OPTION(OSG_GL3_AVAILABLE "Set to OFF to disable use of OpenGL 3.x functions library." ON )
|
OPTION(OSG_GL3_AVAILABLE "Set to OFF to disable use of OpenGL 3.x functions library." ON )
|
||||||
|
if(APPLE)
|
||||||
|
add_definitions(-DGL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED)
|
||||||
|
endif()
|
||||||
ELSE()
|
ELSE()
|
||||||
OPTION(OSG_GL3_AVAILABLE "Set to OFF to disable use of OpenGL 3.x functions library." OFF )
|
OPTION(OSG_GL3_AVAILABLE "Set to OFF to disable use of OpenGL 3.x functions library." OFF )
|
||||||
ENDIF()
|
ENDIF()
|
||||||
@@ -431,6 +503,8 @@ ENDIF()
|
|||||||
IF ((OPENGL_PROFILE STREQUAL "GLES2"))
|
IF ((OPENGL_PROFILE STREQUAL "GLES2"))
|
||||||
OPTION(OSG_GLES2_AVAILABLE "Set to OFF to disable use of OpenGL ES 2.x functions library." ON )
|
OPTION(OSG_GLES2_AVAILABLE "Set to OFF to disable use of OpenGL ES 2.x functions library." ON )
|
||||||
ELSEIF ((OPENGL_PROFILE STREQUAL "GLES3"))
|
ELSEIF ((OPENGL_PROFILE STREQUAL "GLES3"))
|
||||||
|
OPTION(OSG_GLES3_AVAILABLE "Set to OFF to disable use of OpenGL ES 3.x functions library." ON )
|
||||||
|
ELSEIF ((OPENGL_PROFILE STREQUAL "GLES2+GLES3"))
|
||||||
OPTION(OSG_GLES2_AVAILABLE "Set to OFF to disable use of OpenGL ES 2.x functions library." ON )
|
OPTION(OSG_GLES2_AVAILABLE "Set to OFF to disable use of OpenGL ES 2.x functions library." ON )
|
||||||
OPTION(OSG_GLES3_AVAILABLE "Set to OFF to disable use of OpenGL ES 3.x functions library." ON )
|
OPTION(OSG_GLES3_AVAILABLE "Set to OFF to disable use of OpenGL ES 3.x functions library." ON )
|
||||||
ELSE()
|
ELSE()
|
||||||
@@ -441,10 +515,8 @@ ENDIF()
|
|||||||
|
|
||||||
OPTION(OSG_GL_LIBRARY_STATIC "Set to ON to statically link with OpenGL/GLES library." OFF)
|
OPTION(OSG_GL_LIBRARY_STATIC "Set to ON to statically link with OpenGL/GLES library." OFF)
|
||||||
|
|
||||||
SET(OPENGL_egl_LIBRARY CACHE STRING "Set the OpenGL egl library.")
|
|
||||||
|
|
||||||
# Map the OSG_GL*_AVAILABLE settings to OSG_GL_* settings
|
# Map the OSG_GL*_AVAILABLE settings to OSG_GL_* settings
|
||||||
IF (OSG_GLES2_AVAILABLE OR OSG_GL3_AVAILABLE)
|
IF (OSG_GLES2_AVAILABLE OR OSG_GLES3_AVAILABLE OR OSG_GL3_AVAILABLE)
|
||||||
OPTION(OSG_GL_DISPLAYLISTS_AVAILABLE "Set to OFF to disable use of OpenGL display lists." OFF)
|
OPTION(OSG_GL_DISPLAYLISTS_AVAILABLE "Set to OFF to disable use of OpenGL display lists." OFF)
|
||||||
OPTION(OSG_GL_MATRICES_AVAILABLE "Set to OFF to disable use of OpenGL built-in matrices." OFF)
|
OPTION(OSG_GL_MATRICES_AVAILABLE "Set to OFF to disable use of OpenGL built-in matrices." OFF)
|
||||||
OPTION(OSG_GL_VERTEX_FUNCS_AVAILABLE "Set to OFF to disable use of OpenGL vertex functions such as glVertex/glColor etc." OFF)
|
OPTION(OSG_GL_VERTEX_FUNCS_AVAILABLE "Set to OFF to disable use of OpenGL vertex functions such as glVertex/glColor etc." OFF)
|
||||||
@@ -464,15 +536,19 @@ ELSE()
|
|||||||
OPTION(OSG_GL_FIXED_FUNCTION_AVAILABLE "Set to OFF to disable use of OpenGL fixed function pipeline." ON)
|
OPTION(OSG_GL_FIXED_FUNCTION_AVAILABLE "Set to OFF to disable use of OpenGL fixed function pipeline." ON)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF (OSG_GLES1_AVAILABLE OR OSG_GLES2_AVAILABLE)
|
IF (OSG_GLES1_AVAILABLE OR OSG_GLES2_AVAILABLE OR OSG_GLES3_AVAILABLE)
|
||||||
OPTION(OSG_CPP_EXCEPTIONS_AVAILABLE "Set to OFF to disable compile of OSG components that use C++ exceptions." OFF)
|
OPTION(OSG_CPP_EXCEPTIONS_AVAILABLE "Set to OFF to disable compile of OSG components that use C++ exceptions." OFF)
|
||||||
ELSE()
|
ELSE()
|
||||||
OPTION(OSG_CPP_EXCEPTIONS_AVAILABLE "Set to OFF to disable compile of OSG components that use C++ exceptions." ON)
|
OPTION(OSG_CPP_EXCEPTIONS_AVAILABLE "Set to OFF to disable compile of OSG components that use C++ exceptions." ON)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
SET(OSG_GL_CONTEXT_VERSION "1.0" CACHE STRING "GL Context String to pass when creaing graphics contexts")
|
||||||
|
|
||||||
# Map the OSG_GL*_AVAILABLE settings to OpenGL header settings
|
# Map the OSG_GL*_AVAILABLE settings to OpenGL header settings
|
||||||
IF (OSG_GL3_AVAILABLE)
|
IF (OSG_GL3_AVAILABLE)
|
||||||
|
|
||||||
|
SET(OSG_GL_CONTEXT_VERSION "3.3")
|
||||||
|
|
||||||
IF (APPLE)
|
IF (APPLE)
|
||||||
SET(OPENGL_HEADER1 "#include <OpenGL/gl.h>" CACHE STRING "#include<> line for OpenGL Header")
|
SET(OPENGL_HEADER1 "#include <OpenGL/gl.h>" CACHE STRING "#include<> line for OpenGL Header")
|
||||||
SET(OPENGL_HEADER2 "#include <OpenGL/gl3.h>" CACHE STRING "#include<> line for additional OpenGL Headers if required")
|
SET(OPENGL_HEADER2 "#include <OpenGL/gl3.h>" CACHE STRING "#include<> line for additional OpenGL Headers if required")
|
||||||
@@ -485,7 +561,7 @@ IF (OSG_GL3_AVAILABLE)
|
|||||||
SET(OPENGL_HEADER1 "#include <GL/glcorearb.h>" CACHE STRING "#include<> line for OpenGL Header")
|
SET(OPENGL_HEADER1 "#include <GL/glcorearb.h>" CACHE STRING "#include<> line for OpenGL Header")
|
||||||
SET(OPENGL_HEADER2 "" CACHE STRING "#include<> line for additional OpenGL Headers if required")
|
SET(OPENGL_HEADER2 "" CACHE STRING "#include<> line for additional OpenGL Headers if required")
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(OPENGL_HEADER1 "#include <GL3/gl3.h>" CACHE STRING "#include<> line for OpenGL Header")
|
SET(OPENGL_HEADER1 "#include <GL/gl.h>" CACHE STRING "#include<> line for OpenGL Header")
|
||||||
SET(OPENGL_HEADER2 "" CACHE STRING "#include<> line for additional OpenGL Headers if required")
|
SET(OPENGL_HEADER2 "" CACHE STRING "#include<> line for additional OpenGL Headers if required")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
@@ -502,11 +578,17 @@ ELSEIF(OSG_GLES2_AVAILABLE)
|
|||||||
IF (APPLE AND NOT ANDROID)
|
IF (APPLE AND NOT ANDROID)
|
||||||
SET(OPENGL_HEADER1 "#include \"TargetConditionals.h\"" CACHE STRING "#include<> line for OpenGL Header")
|
SET(OPENGL_HEADER1 "#include \"TargetConditionals.h\"" CACHE STRING "#include<> line for OpenGL Header")
|
||||||
SET(OPENGL_HEADER2 "#include <OpenGLES/ES2/gl.h>" CACHE STRING "#include<> line for additional OpenGL Headers if required")
|
SET(OPENGL_HEADER2 "#include <OpenGLES/ES2/gl.h>" CACHE STRING "#include<> line for additional OpenGL Headers if required")
|
||||||
# TODO: GLES3
|
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(OPENGL_HEADER1 "#include <GLES2/gl2.h>" CACHE STRING "#include<> line for OpenGL Header")
|
SET(OPENGL_HEADER1 "#include <GLES2/gl2.h>" CACHE STRING "#include<> line for OpenGL Header")
|
||||||
SET(OPENGL_HEADER2 "" CACHE STRING "#include<> line for additional OpenGL Headers if required")
|
SET(OPENGL_HEADER2 "" CACHE STRING "#include<> line for additional OpenGL Headers if required")
|
||||||
# TODO: GLES3
|
ENDIF()
|
||||||
|
ELSEIF(OSG_GLES3_AVAILABLE)
|
||||||
|
IF (APPLE AND NOT ANDROID)
|
||||||
|
SET(OPENGL_HEADER1 "#include \"TargetConditionals.h\"" CACHE STRING "#include<> line for OpenGL Header")
|
||||||
|
SET(OPENGL_HEADER2 "#include <OpenGLES/ES3/gl.h>" CACHE STRING "#include<> line for additional OpenGL Headers if required")
|
||||||
|
ELSE()
|
||||||
|
SET(OPENGL_HEADER1 "#include <GLES3/gl3.h>" CACHE STRING "#include<> line for OpenGL Header")
|
||||||
|
SET(OPENGL_HEADER2 "" CACHE STRING "#include<> line for additional OpenGL Headers if required")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ELSE()
|
ELSE()
|
||||||
IF (APPLE)
|
IF (APPLE)
|
||||||
@@ -519,39 +601,39 @@ ELSE()
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF (OSG_GL1_AVAILABLE)
|
IF (OSG_GL1_AVAILABLE)
|
||||||
SET(OSG_GL1_FEATURES "true")
|
SET(OSG_GL1_FEATURES 1)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(OSG_GL1_FEATURES "false")
|
SET(OSG_GL1_FEATURES 0)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF (OSG_GL2_AVAILABLE)
|
IF (OSG_GL2_AVAILABLE)
|
||||||
SET(OSG_GL2_FEATURES "true")
|
SET(OSG_GL2_FEATURES 1)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(OSG_GL2_FEATURES "false")
|
SET(OSG_GL2_FEATURES 0)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF (OSG_GL3_AVAILABLE)
|
IF (OSG_GL3_AVAILABLE)
|
||||||
SET(OSG_GL3_FEATURES "true")
|
SET(OSG_GL3_FEATURES 1)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(OSG_GL3_FEATURES "false")
|
SET(OSG_GL3_FEATURES 0)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF (OSG_GLES1_AVAILABLE)
|
IF (OSG_GLES1_AVAILABLE)
|
||||||
SET(OSG_GLES1_FEATURES "true")
|
SET(OSG_GLES1_FEATURES 1)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(OSG_GLES1_FEATURES "false")
|
SET(OSG_GLES1_FEATURES 0)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF (OSG_GLES2_AVAILABLE)
|
IF (OSG_GLES2_AVAILABLE)
|
||||||
SET(OSG_GLES2_FEATURES "true")
|
SET(OSG_GLES2_FEATURES 1)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(OSG_GLES2_FEATURES "false")
|
SET(OSG_GLES2_FEATURES 0)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF (OSG_GLES3_AVAILABLE)
|
IF (OSG_GLES3_AVAILABLE)
|
||||||
SET(OSG_GLES3_FEATURES "true")
|
SET(OSG_GLES3_FEATURES 1)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(OSG_GLES3_FEATURES "false")
|
SET(OSG_GLES3_FEATURES 0)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(ANDROID)
|
IF(ANDROID)
|
||||||
@@ -569,17 +651,45 @@ IF(ANDROID)
|
|||||||
FIND_LIBRARY(OPENGL_gl_LIBRARY GLESv2
|
FIND_LIBRARY(OPENGL_gl_LIBRARY GLESv2
|
||||||
PATHS
|
PATHS
|
||||||
${ANDROID_SYSROOT}/usr/lib)
|
${ANDROID_SYSROOT}/usr/lib)
|
||||||
|
ELSEIF(OSG_GLES3_AVAILABLE)
|
||||||
|
FIND_PATH(OPENGL_INCLUDE_DIR GLES3/gl3.h
|
||||||
|
PATHS
|
||||||
|
${ANDROID_SYSROOT}/usr/include)
|
||||||
|
FIND_LIBRARY(OPENGL_gl_LIBRARY GLESv3
|
||||||
|
PATHS
|
||||||
|
${ANDROID_SYSROOT}/usr/lib)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Set Config/OpenGL header file
|
# Set Config header file
|
||||||
|
|
||||||
SET(OPENSCENEGRAPH_CONFIG_HEADER "${PROJECT_BINARY_DIR}/include/osg/Config")
|
SET(OPENSCENEGRAPH_CONFIG_HEADER "${PROJECT_BINARY_DIR}/include/osg/Config")
|
||||||
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/src/osg/Config.in"
|
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/src/osg/Config.in"
|
||||||
"${OPENSCENEGRAPH_CONFIG_HEADER}")
|
"${OPENSCENEGRAPH_CONFIG_HEADER}")
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Set OpenGL header file
|
||||||
|
|
||||||
|
INCLUDE (CheckCXXSourceCompiles)
|
||||||
|
#SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${OPENGL_INCLUDE_DIR})
|
||||||
|
|
||||||
|
check_cxx_source_compiles(
|
||||||
|
"${OPENGL_HEADER1}
|
||||||
|
${OPENGL_HEADER2}
|
||||||
|
int main() { GLint64 test; return 0; }"
|
||||||
|
GL_HEADER_HAS_GLINT64
|
||||||
|
)
|
||||||
|
|
||||||
|
check_cxx_source_compiles(
|
||||||
|
"${OPENGL_HEADER1}
|
||||||
|
${OPENGL_HEADER2}
|
||||||
|
int main() { GLuint64 test; return 0; }"
|
||||||
|
GL_HEADER_HAS_GLUINT64
|
||||||
|
)
|
||||||
|
|
||||||
SET(OPENSCENEGRAPH_OPENGL_HEADER "${PROJECT_BINARY_DIR}/include/osg/GL")
|
SET(OPENSCENEGRAPH_OPENGL_HEADER "${PROJECT_BINARY_DIR}/include/osg/GL")
|
||||||
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/src/osg/GL.in"
|
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/src/osg/GL.in"
|
||||||
"${OPENSCENEGRAPH_OPENGL_HEADER}")
|
"${OPENSCENEGRAPH_OPENGL_HEADER}")
|
||||||
@@ -588,7 +698,7 @@ CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/src/osg/GL.in"
|
|||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Set Vertsion header file
|
# Set Version header file
|
||||||
|
|
||||||
SET(OPENSCENEGRAPH_VERSION_HEADER "${PROJECT_BINARY_DIR}/include/osg/Version")
|
SET(OPENSCENEGRAPH_VERSION_HEADER "${PROJECT_BINARY_DIR}/include/osg/Version")
|
||||||
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/src/osg/Version.in"
|
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/src/osg/Version.in"
|
||||||
@@ -613,6 +723,9 @@ OPTION(BUILD_OSG_APPLICATIONS "Enable to build OSG Applications (e.g. osgviewer)
|
|||||||
# OSG Examples
|
# OSG Examples
|
||||||
OPTION(BUILD_OSG_EXAMPLES "Enable to build OSG Examples" OFF)
|
OPTION(BUILD_OSG_EXAMPLES "Enable to build OSG Examples" OFF)
|
||||||
|
|
||||||
|
# OSG Plugins disable option for apple build on travis ci test - full build job runs over time limit of 50 min.
|
||||||
|
OPTION(BUILD_OSG_PLUGINS "Build OSG Plugins - Disable for compile testing examples on a time limit" ON)
|
||||||
|
mark_as_advanced(BUILD_OSG_PLUGINS)
|
||||||
################################################################################
|
################################################################################
|
||||||
# 3rd Party Dependency Stuff
|
# 3rd Party Dependency Stuff
|
||||||
IF(WIN32 AND NOT ANDROID)
|
IF(WIN32 AND NOT ANDROID)
|
||||||
@@ -631,20 +744,20 @@ IF(ANDROID)
|
|||||||
ELSE()
|
ELSE()
|
||||||
# Common to all platforms except android:
|
# Common to all platforms except android:
|
||||||
FIND_PACKAGE(Freetype)
|
FIND_PACKAGE(Freetype)
|
||||||
|
FIND_PACKAGE(ilmbase)
|
||||||
FIND_PACKAGE(Inventor)
|
FIND_PACKAGE(Inventor)
|
||||||
FIND_PACKAGE(Jasper)
|
FIND_PACKAGE(Jasper)
|
||||||
FIND_PACKAGE(OpenEXR)
|
FIND_PACKAGE(OpenEXR)
|
||||||
|
FIND_PACKAGE(OpenCascade)
|
||||||
FIND_PACKAGE(COLLADA)
|
FIND_PACKAGE(COLLADA)
|
||||||
FIND_PACKAGE(FBX)
|
FIND_PACKAGE(FBX)
|
||||||
FIND_PACKAGE(ZLIB)
|
FIND_PACKAGE(ZLIB)
|
||||||
FIND_PACKAGE(Xine)
|
|
||||||
FIND_PACKAGE(OpenVRML)
|
FIND_PACKAGE(OpenVRML)
|
||||||
FIND_PACKAGE(Performer)
|
|
||||||
FIND_PACKAGE(GDAL)
|
FIND_PACKAGE(GDAL)
|
||||||
FIND_PACKAGE(GTA)
|
FIND_PACKAGE(GTA)
|
||||||
FIND_PACKAGE(CURL)
|
FIND_PACKAGE(CURL)
|
||||||
FIND_PACKAGE(LibVNCServer)
|
FIND_PACKAGE(LibVNCServer)
|
||||||
FIND_PACKAGE(OurDCMTK)
|
FIND_PACKAGE(DCMTK)
|
||||||
FIND_PACKAGE(FFmpeg)
|
FIND_PACKAGE(FFmpeg)
|
||||||
FIND_PACKAGE(GStreamer COMPONENTS app pbutils)
|
FIND_PACKAGE(GStreamer COMPONENTS app pbutils)
|
||||||
FIND_PACKAGE(GLIB COMPONENTS gobject)
|
FIND_PACKAGE(GLIB COMPONENTS gobject)
|
||||||
@@ -661,7 +774,6 @@ ELSE()
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
FIND_PACKAGE(ZeroConf)
|
FIND_PACKAGE(ZeroConf)
|
||||||
|
|
||||||
FIND_PACKAGE(Boost) # used by LIBLAS
|
|
||||||
FIND_PACKAGE(LIBLAS)
|
FIND_PACKAGE(LIBLAS)
|
||||||
|
|
||||||
IF (NOT(OSG_USE_LOCAL_LUA_SOURCE))
|
IF (NOT(OSG_USE_LOCAL_LUA_SOURCE))
|
||||||
@@ -676,68 +788,15 @@ ELSE()
|
|||||||
# FIND_PACKAGE(PythonLibs)
|
# FIND_PACKAGE(PythonLibs)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 8)
|
|
||||||
FIND_PACKAGE(ITK)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
# Include macro utilities here
|
# Include macro utilities here
|
||||||
INCLUDE(OsgMacroUtils)
|
INCLUDE(OsgMacroUtils)
|
||||||
|
|
||||||
OPTION(OSG_USE_QT "Enable to use Qt (build Qt-dependent libraries, plugins and examples)" ON)
|
|
||||||
|
|
||||||
IF(OSG_USE_QT AND NOT ANDROID)
|
|
||||||
# To select a specific version of QT define DESIRED_QT_VERSION
|
|
||||||
# via cmake -DDESIRED_QT_VERSION=5
|
|
||||||
# QUIET option disables messages if the package cannot be found.
|
|
||||||
|
|
||||||
IF (DESIRED_QT_VERSION)
|
|
||||||
IF (DESIRED_QT_VERSION MATCHES 5)
|
|
||||||
FIND_PACKAGE(Qt5Widgets)
|
|
||||||
ELSEIF (DESIRED_QT_VERSION MATCHES 4)
|
|
||||||
FIND_PACKAGE(Qt4)
|
|
||||||
ELSE()
|
|
||||||
FIND_PACKAGE(Qt3)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
ELSE()
|
|
||||||
|
|
||||||
FIND_PACKAGE(Qt5Widgets QUIET)
|
|
||||||
|
|
||||||
IF ( Qt5Widgets_FOUND )
|
|
||||||
# CMake 2.8.8 or greater required
|
|
||||||
BUILDER_VERSION_GREATER(2 8 7)
|
|
||||||
IF(NOT VALID_BUILDER_VERSION)
|
|
||||||
MESSAGE(
|
|
||||||
SEND_ERROR
|
|
||||||
"Qt5 requires CMake version 2.8.8 or greater!\n"
|
|
||||||
"Update CMake or set DESIRED_QT_VERSION to less than 5
|
|
||||||
or disable OSG_USE_QT."
|
|
||||||
)
|
|
||||||
ENDIF( )
|
|
||||||
ENDIF( )
|
|
||||||
|
|
||||||
IF ( NOT Qt5Widgets_FOUND )
|
|
||||||
FIND_PACKAGE(Qt4)
|
|
||||||
|
|
||||||
IF (NOT QT4_FOUND)
|
|
||||||
FIND_PACKAGE(Qt3)
|
|
||||||
ENDIF()
|
|
||||||
ENDIF()
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
#If we have found Qt5, let's try to top off by getting the webkit as well
|
|
||||||
IF ( Qt5Widgets_FOUND )
|
|
||||||
FIND_PACKAGE(Qt5WebKitWidgets QUIET)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
#optional example related dependencies
|
#optional example related dependencies
|
||||||
IF (BUILD_OSG_EXAMPLES AND NOT ANDROID)
|
IF (BUILD_OSG_EXAMPLES AND NOT ANDROID)
|
||||||
|
|
||||||
|
|
||||||
FIND_PACKAGE(FLTK)
|
FIND_PACKAGE(FLTK)
|
||||||
FIND_PACKAGE(GLUT)
|
|
||||||
FIND_PACKAGE(FOX)
|
FIND_PACKAGE(FOX)
|
||||||
|
|
||||||
SET(wxWidgets_USE_LIBS base core gl net)
|
SET(wxWidgets_USE_LIBS base core gl net)
|
||||||
@@ -798,6 +857,17 @@ SET(CMAKE_RELEASE_POSTFIX "" CACHE STRING "add a postfix, usually empty on windo
|
|||||||
SET(CMAKE_RELWITHDEBINFO_POSTFIX "rd" CACHE STRING "add a postfix, usually empty on windows")
|
SET(CMAKE_RELWITHDEBINFO_POSTFIX "rd" CACHE STRING "add a postfix, usually empty on windows")
|
||||||
SET(CMAKE_MINSIZEREL_POSTFIX "s" CACHE STRING "add a postfix, usually empty on windows")
|
SET(CMAKE_MINSIZEREL_POSTFIX "s" CACHE STRING "add a postfix, usually empty on windows")
|
||||||
|
|
||||||
|
# Correct any incorrect case usage in CMAKE_BUILD_TYPE
|
||||||
|
IF (CMAKE_BUILD_TYPE MATCHES "release" OR CMAKE_BUILD_TYPE MATCHES "RELEASE")
|
||||||
|
SET(CMAKE_BUILD_TYPE "Release")
|
||||||
|
ELSEIF (CMAKE_BUILD_TYPE MATCHES "minsizerel" OR CMAKE_BUILD_TYPE MATCHES "MINSIZEREL")
|
||||||
|
SET(CMAKE_BUILD_TYPE "MinSizeRel")
|
||||||
|
ELSEIF (CMAKE_BUILD_TYPE MATCHES "relwithdebinfo" OR CMAKE_BUILD_TYPE MATCHES "RELWITHDEBINFO")
|
||||||
|
SET(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
||||||
|
ELSEIF (CMAKE_BUILD_TYPE MATCHES "debug" OR CMAKE_BUILD_TYPE MATCHES "DEBUG")
|
||||||
|
SET(CMAKE_BUILD_TYPE "Debug")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# Set the build postfix extension according to what configuration is being built.
|
# Set the build postfix extension according to what configuration is being built.
|
||||||
IF (CMAKE_BUILD_TYPE MATCHES "Release")
|
IF (CMAKE_BUILD_TYPE MATCHES "Release")
|
||||||
SET(CMAKE_BUILD_POSTFIX "${CMAKE_RELEASE_POSTFIX}")
|
SET(CMAKE_BUILD_POSTFIX "${CMAKE_RELEASE_POSTFIX}")
|
||||||
@@ -831,7 +901,7 @@ IF(NOT DEFINED LIB_POSTFIX)
|
|||||||
SET(LIB_POSTFIX "")
|
SET(LIB_POSTFIX "")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Here we apparantly do some funky stuff with making the bin/ and lib/
|
# Here we apparently do some funky stuff with making the bin/ and lib/
|
||||||
# folders which is probably needed to work around a very old CMake bug?
|
# folders which is probably needed to work around a very old CMake bug?
|
||||||
|
|
||||||
#SET(OUTPUT_BINDIR ${PROJECT_BINARY_DIR}/bin/${CMAKE_SYSTEM_NAME})
|
#SET(OUTPUT_BINDIR ${PROJECT_BINARY_DIR}/bin/${CMAKE_SYSTEM_NAME})
|
||||||
@@ -848,45 +918,32 @@ IF(NOT MSVC OR MSVC_IDE)
|
|||||||
MAKE_DIRECTORY(${OUTPUT_LIBDIR}/${OSG_PLUGINS})
|
MAKE_DIRECTORY(${OUTPUT_LIBDIR}/${OSG_PLUGINS})
|
||||||
ENDIF(NOT MSVC OR MSVC_IDE)
|
ENDIF(NOT MSVC OR MSVC_IDE)
|
||||||
|
|
||||||
# On CMake 2.4.x use EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH and later
|
|
||||||
# we work around the DLL placement by use of the PREFIX target property hack
|
|
||||||
#
|
|
||||||
# On CMake 2.6.x use the newly minted CMAKE_LIBRARY_OUTPUT_DIRECTORY,
|
|
||||||
# CMAKE_ARCHIVE_OUTPUT_DIRECTORY & CMAKE_RUNTIME_OUTPUT_DIRECTORY
|
|
||||||
#
|
|
||||||
# CMake >= 2.8.1 changed the output directory algorithm (See doc).
|
# CMake >= 2.8.1 changed the output directory algorithm (See doc).
|
||||||
# Here we also set per-configuration directories (CMAKE_*_OUTPUT_DIRECTORY_<CONFIG>), or else binaries are generated in /bin/Debug and /bin/Release, etc. with MSVC and Xcode.
|
# Here we also set per-configuration directories (CMAKE_*_OUTPUT_DIRECTORY_<CONFIG>), or else binaries are generated in /bin/Debug and /bin/Release, etc. with MSVC and Xcode.
|
||||||
# (Doc reads "multi-configuration generators (VS, Xcode) do NOT append a per-configuration subdirectory to the specified directory").
|
# (Doc reads "multi-configuration generators (VS, Xcode) do NOT append a per-configuration subdirectory to the specified directory").
|
||||||
# The workaround for 2.6.x (adding "../" as an output prefix for each target) seem to have no effect in >=2.8.1, so there is no need to change this.
|
# The workaround for 2.6.x (adding "../" as an output prefix for each target) seem to have no effect in >=2.8.1, so there is no need to change this.
|
||||||
IF(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 5)
|
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_LIBDIR})
|
||||||
# If CMake < 2.6.0
|
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_BINDIR})
|
||||||
SET(EXECUTABLE_OUTPUT_PATH ${OUTPUT_BINDIR})
|
IF(WIN32)
|
||||||
SET(LIBRARY_OUTPUT_PATH ${OUTPUT_LIBDIR})
|
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_BINDIR})
|
||||||
ELSE()
|
ELSE(WIN32)
|
||||||
# If CMake >= 2.6.0
|
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_LIBDIR})
|
||||||
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_LIBDIR})
|
ENDIF(WIN32)
|
||||||
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_BINDIR})
|
|
||||||
IF(WIN32)
|
|
||||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_BINDIR})
|
|
||||||
ELSE(WIN32)
|
|
||||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_LIBDIR})
|
|
||||||
ENDIF(WIN32)
|
|
||||||
|
|
||||||
# Testing CMAKE_VERSION is possible in >= 2.6.4 only
|
# Testing CMAKE_VERSION is possible in >= 2.6.4 only
|
||||||
BUILDER_VERSION_GREATER(2 8 0)
|
BUILDER_VERSION_GREATER(2 8 0)
|
||||||
IF(VALID_BUILDER_VERSION) # If CMake >= 2.8.1
|
IF(VALID_BUILDER_VERSION) # If CMake >= 2.8.1
|
||||||
FOREACH(CONF ${CMAKE_CONFIGURATION_TYPES}) # For each configuration (Debug, Release, MinSizeRel... and/or anything the user chooses)
|
FOREACH(CONF ${CMAKE_CONFIGURATION_TYPES}) # For each configuration (Debug, Release, MinSizeRel... and/or anything the user chooses)
|
||||||
STRING(TOUPPER "${CONF}" CONF) # Go uppercase (DEBUG, RELEASE...)
|
STRING(TOUPPER "${CONF}" CONF) # Go uppercase (DEBUG, RELEASE...)
|
||||||
SET("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_LIBDIR}")
|
SET("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_LIBDIR}")
|
||||||
SET("CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_BINDIR}")
|
SET("CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_BINDIR}")
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_BINDIR}")
|
SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_BINDIR}")
|
||||||
ELSE()
|
ELSE()
|
||||||
SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_LIBDIR}")
|
SET("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONF}" "${OUTPUT_LIBDIR}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ENDIF(VALID_BUILDER_VERSION)
|
ENDIF(VALID_BUILDER_VERSION)
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
#SET(INSTALL_BINDIR OpenSceneGraph/bin)
|
#SET(INSTALL_BINDIR OpenSceneGraph/bin)
|
||||||
#SET(INSTALL_INCDIR OpenSceneGraph/include)
|
#SET(INSTALL_INCDIR OpenSceneGraph/include)
|
||||||
@@ -917,6 +974,7 @@ SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} CACHE STRING "You may add additiona
|
|||||||
# This is unofficial so this may be removed or changed at anytime.
|
# This is unofficial so this may be removed or changed at anytime.
|
||||||
SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} CACHE STRING "(EXPERIMENTAL) You may add additional search paths here. Use ; to separate multiple paths.")
|
SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} CACHE STRING "(EXPERIMENTAL) You may add additional search paths here. Use ; to separate multiple paths.")
|
||||||
|
|
||||||
|
|
||||||
# This is for an advanced option to give aggressive warnings
|
# This is for an advanced option to give aggressive warnings
|
||||||
# under different compilers. If yours is not implemented, this option
|
# under different compilers. If yours is not implemented, this option
|
||||||
# will not be made available.
|
# will not be made available.
|
||||||
@@ -933,6 +991,19 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
|
|||||||
# to be the workaround.
|
# to be the workaround.
|
||||||
SET(OSG_AGGRESSIVE_WARNING_FLAGS -Wall -Wparentheses -Wno-long-long -Wno-import -pedantic -Wreturn-type -Wmissing-braces -Wunknown-pragmas -Wunused)
|
SET(OSG_AGGRESSIVE_WARNING_FLAGS -Wall -Wparentheses -Wno-long-long -Wno-import -pedantic -Wreturn-type -Wmissing-braces -Wunknown-pragmas -Wunused)
|
||||||
|
|
||||||
|
MESSAGE( STATUS "g++ version ${CMAKE_CXX_COMPILER_VERSION} ")
|
||||||
|
IF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.6)
|
||||||
|
SET(OSG_AGGRESSIVE_WARNING_FLAGS ${OSG_AGGRESSIVE_WARNING_FLAGS} -Wmaybe-uninitialized -Wextra)
|
||||||
|
IF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9)
|
||||||
|
SET(OSG_AGGRESSIVE_WARNING_FLAGS ${OSG_AGGRESSIVE_WARNING_FLAGS} -Wshadow)
|
||||||
|
IF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0)
|
||||||
|
# -Wmisleading-indentation (in -Wall) generates less warnings when interpreting tab as 4 spaces instead of the default of 8
|
||||||
|
# SET(OSG_AGGRESSIVE_WARNING_FLAGS ${OSG_AGGRESSIVE_WARNING_FLAGS} -ftabstop=4)
|
||||||
|
SET(OSG_AGGRESSIVE_WARNING_FLAGS ${OSG_AGGRESSIVE_WARNING_FLAGS} -Wno-misleading-indentation)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# Previous included -Wformat=2 in OSG_AGGRESSIVE_WARNING_FLAGS but had to remove it due to standard library errors
|
# Previous included -Wformat=2 in OSG_AGGRESSIVE_WARNING_FLAGS but had to remove it due to standard library errors
|
||||||
|
|
||||||
|
|
||||||
@@ -941,7 +1012,8 @@ ELSEIF(MSVC)
|
|||||||
#C4100 'identifier' : unreferenced formal parameter
|
#C4100 'identifier' : unreferenced formal parameter
|
||||||
#C4127 Error Message conditional expression is constant
|
#C4127 Error Message conditional expression is constant
|
||||||
#C4706 assignment within conditional expression
|
#C4706 assignment within conditional expression
|
||||||
SET(OSG_AGGRESSIVE_WARNING_FLAGS /W4 /wd4706 /wd4127 /wd4100)
|
#C4589: Constructor of abstract class 'osgGA::CameraManipulator' ignores initializer for virtual base class 'osg::Object'
|
||||||
|
SET(OSG_AGGRESSIVE_WARNING_FLAGS /W4 /wd4589 /wd4706 /wd4127 /wd4100)
|
||||||
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
ELSEIF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
SET(OSG_AGGRESSIVE_WARNING_FLAGS -Wall -Wparentheses -Wno-long-long -Wno-import -pedantic -Wreturn-type -Wmissing-braces -Wunknown-pragmas -Wunused -Wno-overloaded-virtual)
|
SET(OSG_AGGRESSIVE_WARNING_FLAGS -Wall -Wparentheses -Wno-long-long -Wno-import -pedantic -Wreturn-type -Wmissing-braces -Wunknown-pragmas -Wunused -Wno-overloaded-virtual)
|
||||||
|
|
||||||
@@ -984,16 +1056,17 @@ ENDIF()
|
|||||||
# This will only be made available if we set values for OSG_AGGRESSIVE_WARNING_FLAGS.
|
# This will only be made available if we set values for OSG_AGGRESSIVE_WARNING_FLAGS.
|
||||||
IF(OSG_AGGRESSIVE_WARNING_FLAGS)
|
IF(OSG_AGGRESSIVE_WARNING_FLAGS)
|
||||||
|
|
||||||
|
SET(OSG_AGGRESSIVE_WARNING_FLAGS ${OSG_AGGRESSIVE_WARNING_FLAGS} CACHE STRING "Compiler flags to use when OSG_AGGRESSIVE_WARNINGS is enabled." FORCE)
|
||||||
|
|
||||||
IF (APPLE)
|
IF (APPLE)
|
||||||
SET(DEFAULT_USE_AGGRESSIVE_WARNINGS OFF)
|
SET(DEFAULT_USE_AGGRESSIVE_WARNINGS OFF)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(DEFAULT_USE_AGGRESSIVE_WARNINGS ON)
|
SET(DEFAULT_USE_AGGRESSIVE_WARNINGS ON)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
OPTION(OSG_USE_AGGRESSIVE_WARNINGS "Enable to activate aggressive warnings" ${DEFAULT_USE_AGGRESSIVE_WARNINGS})
|
OPTION(OSG_AGGRESSIVE_WARNINGS "Enable to activate aggressive warnings" ${DEFAULT_USE_AGGRESSIVE_WARNINGS})
|
||||||
MARK_AS_ADVANCED(OSG_USE_AGGRESSIVE_WARNINGS)
|
|
||||||
|
|
||||||
IF(OSG_USE_AGGRESSIVE_WARNINGS)
|
IF(OSG_AGGRESSIVE_WARNINGS)
|
||||||
# Add flags defined by OSG_AGGRESSIVE_WARNING_FLAGS if they aren't already there
|
# Add flags defined by OSG_AGGRESSIVE_WARNING_FLAGS if they aren't already there
|
||||||
FOREACH(flag ${OSG_AGGRESSIVE_WARNING_FLAGS})
|
FOREACH(flag ${OSG_AGGRESSIVE_WARNING_FLAGS})
|
||||||
IF(NOT CMAKE_CXX_FLAGS MATCHES "${flag}")
|
IF(NOT CMAKE_CXX_FLAGS MATCHES "${flag}")
|
||||||
@@ -1001,7 +1074,7 @@ IF(OSG_AGGRESSIVE_WARNING_FLAGS)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
ELSE()
|
ELSE()
|
||||||
# Remove all flags considered aggresive
|
# Remove all flags considered aggressive
|
||||||
FOREACH(flag ${OSG_AGGRESSIVE_WARNING_FLAGS})
|
FOREACH(flag ${OSG_AGGRESSIVE_WARNING_FLAGS})
|
||||||
STRING(REGEX REPLACE "${flag}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
STRING(REGEX REPLACE "${flag}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
@@ -1048,15 +1121,15 @@ IF(APPLE AND NOT ANDROID)
|
|||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -miphoneos-version-min=${IPHONE_VERSION_MIN}" FORCE)
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -miphoneos-version-min=${IPHONE_VERSION_MIN}" FORCE)
|
||||||
|
|
||||||
ELSE()
|
ELSE()
|
||||||
#simulator uses i386 architectures
|
#simulator uses i386 and x86_64 architectures
|
||||||
SET(CMAKE_OSX_ARCHITECTURES "i386" CACHE STRING "Build architectures for iOS Simulator" FORCE)
|
SET(CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE STRING "Build architectures for iOS Simulator" FORCE)
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mno-thumb -arch i386 -pipe -no-cpp-precomp" CACHE STRING "Flags used by the compiler during all build types." FORCE)
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mno-thumb -pipe -no-cpp-precomp" CACHE STRING "Flags used by the compiler during all build types." FORCE)
|
||||||
|
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mios-simulator-version-min=${IPHONE_VERSION_MIN}" FORCE)
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mios-simulator-version-min=${IPHONE_VERSION_MIN}" FORCE)
|
||||||
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
#here we set the specific iphone sdk version. We can only set either device or simulator sdk. So if you want both you currently have to have two seperate projects
|
#here we set the specific iphone sdk version. We can only set either device or simulator sdk. So if you want both you currently have to have two separate projects
|
||||||
SET(CMAKE_OSX_SYSROOT "${IPHONE_SDKROOT}" CACHE STRING "System root for iOS" FORCE)
|
SET(CMAKE_OSX_SYSROOT "${IPHONE_SDKROOT}" CACHE STRING "System root for iOS" FORCE)
|
||||||
|
|
||||||
#hack, force link to opengles
|
#hack, force link to opengles
|
||||||
@@ -1081,30 +1154,19 @@ IF(APPLE AND NOT ANDROID)
|
|||||||
# FORCE is used because the options are not reflected in the UI otherwise.
|
# FORCE is used because the options are not reflected in the UI otherwise.
|
||||||
# Seems like a good place to add version specific compiler flags too.
|
# Seems like a good place to add version specific compiler flags too.
|
||||||
IF(NOT OSG_CONFIG_HAS_BEEN_RUN_BEFORE)
|
IF(NOT OSG_CONFIG_HAS_BEEN_RUN_BEFORE)
|
||||||
IF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.8" OR ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.9" OR ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.10")
|
IF(OSG_OSX_VERSION VERSION_GREATER 10.7)
|
||||||
SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX "imageio" CACHE STRING "Forced imageio default image plugin for OSX" FORCE)
|
SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX "imageio" CACHE STRING "Forced imageio default image plugin for OSX" FORCE)
|
||||||
# 64 Bit Works, i386,ppc is not supported any more
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE)
|
||||||
SET(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX" FORCE)
|
ELSEIF(OSG_OSX_VERSION VERSION_EQUAL 10.7)
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.8 -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE)
|
SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX "imageio" CACHE STRING "Forced imageio default image plugin for OSX" FORCE)
|
||||||
ELSEIF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.7")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE)
|
||||||
SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX "imageio" CACHE STRING "Forced imageio default image plugin for OSX" FORCE)
|
ELSEIF(OSG_OSX_VERSION VERSION_GREATER 10.4)
|
||||||
# 64 Bit Works, PPC is not supported any more
|
SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX "imageio" CACHE STRING "Forced imageio default image plugin for OSX" FORCE)
|
||||||
SET(CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE STRING "Build architectures for OSX" FORCE)
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftree-vectorize -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE)
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7 -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE)
|
ELSEIF(OSG_OSX_VERSION VERSION_EQUAL 10.4)
|
||||||
ELSEIF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.6" OR ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.5")
|
SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX "quicktime" CACHE STRING "Forced imageio default image plugin for OSX" FORCE)
|
||||||
SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX "imageio" CACHE STRING "Forced imageio default image plugin for OSX" FORCE)
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftree-vectorize -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE)
|
||||||
# 64-bit compiles are not supported with Carbon.
|
ENDIF()
|
||||||
SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE)
|
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.5 -ftree-vectorize -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE)
|
|
||||||
ELSEIF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.4")
|
|
||||||
SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX "quicktime" CACHE STRING "Forced imageio default image plugin for OSX" FORCE)
|
|
||||||
SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" CACHE STRING "Build architectures for OSX" FORCE)
|
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.4 -ftree-vectorize -fvisibility-inlines-hidden" CACHE STRING "Flags used by the compiler during all build types." FORCE)
|
|
||||||
ELSE()
|
|
||||||
# No Universal Binary support
|
|
||||||
# Should break down further to set the -mmacosx-version-min,
|
|
||||||
# but the SDK detection is too unreliable here.
|
|
||||||
ENDIF()
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
OPTION(OSG_BUILD_APPLICATION_BUNDLES "Enable the building of applications and examples as OSX Bundles" OFF)
|
OPTION(OSG_BUILD_APPLICATION_BUNDLES "Enable the building of applications and examples as OSX Bundles" OFF)
|
||||||
@@ -1243,10 +1305,6 @@ SET(PKGCONFIG_FILES
|
|||||||
openscenegraph-osgVolume
|
openscenegraph-osgVolume
|
||||||
)
|
)
|
||||||
|
|
||||||
IF(QT4_FOUND OR Qt5Widgets_FOUND )
|
|
||||||
SET(PKGCONFIG_FILES ${PKGCONFIG_FILES} openscenegraph-osgQt)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
FOREACH(PKGCONFIG_FILE ${PKGCONFIG_FILES})
|
FOREACH(PKGCONFIG_FILE ${PKGCONFIG_FILES})
|
||||||
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/packaging/pkgconfig/${PKGCONFIG_FILE}.pc.in
|
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/packaging/pkgconfig/${PKGCONFIG_FILE}.pc.in
|
||||||
${PROJECT_BINARY_DIR}/packaging/pkgconfig/${PKGCONFIG_FILE}.pc
|
${PROJECT_BINARY_DIR}/packaging/pkgconfig/${PKGCONFIG_FILE}.pc
|
||||||
|
|||||||
@@ -9,19 +9,19 @@ MACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBU
|
|||||||
|
|
||||||
SET(MY_PATH_INCLUDE )
|
SET(MY_PATH_INCLUDE )
|
||||||
SET(MY_PATH_LIB )
|
SET(MY_PATH_LIB )
|
||||||
|
|
||||||
FOREACH( MYPATH ${SEARCHPATHLIST} )
|
FOREACH( MYPATH ${SEARCHPATHLIST} )
|
||||||
SET(MY_PATH_INCLUDE ${MY_PATH_INCLUDE} ${MYPATH}/include)
|
SET(MY_PATH_INCLUDE ${MY_PATH_INCLUDE} ${MYPATH}/include)
|
||||||
SET(MY_PATH_LIB ${MY_PATH_LIB} ${MYPATH}/lib)
|
SET(MY_PATH_LIB ${MY_PATH_LIB} ${MYPATH}/lib)
|
||||||
ENDFOREACH( MYPATH ${SEARCHPATHLIST} )
|
ENDFOREACH( MYPATH ${SEARCHPATHLIST} )
|
||||||
|
|
||||||
FIND_PATH("${DEPNAME}_INCLUDE_DIR" ${INCLUDEFILE}
|
FIND_PATH("${DEPNAME}_INCLUDE_DIR" ${INCLUDEFILE}
|
||||||
${MY_PATH_INCLUDE}
|
${MY_PATH_INCLUDE}
|
||||||
NO_DEFAULT_PATH
|
NO_DEFAULT_PATH
|
||||||
)
|
)
|
||||||
MARK_AS_ADVANCED("${DEPNAME}_INCLUDE_DIR")
|
MARK_AS_ADVANCED("${DEPNAME}_INCLUDE_DIR")
|
||||||
#MESSAGE( " ${DEPNAME}_INCLUDE_DIR --> ${${DEPNAME}_INCLUDE_DIR}<--")
|
#MESSAGE( " ${DEPNAME}_INCLUDE_DIR --> ${${DEPNAME}_INCLUDE_DIR}<--")
|
||||||
|
|
||||||
SET(LIBRARY_NAMES "")
|
SET(LIBRARY_NAMES "")
|
||||||
FOREACH(LIBNAME ${LIBRARY_NAMES_BASE})
|
FOREACH(LIBNAME ${LIBRARY_NAMES_BASE})
|
||||||
LIST(APPEND LIBRARY_NAMES "${LIBNAME}${EXSUFFIX}")
|
LIST(APPEND LIBRARY_NAMES "${LIBNAME}${EXSUFFIX}")
|
||||||
@@ -35,7 +35,7 @@ MACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBU
|
|||||||
FOREACH(LIBNAME ${LIBRARY_NAMES_BASE})
|
FOREACH(LIBNAME ${LIBRARY_NAMES_BASE})
|
||||||
LIST(APPEND LIBRARY_NAMES_DEBUG "${LIBNAME}${DEBUGSUFFIX}${EXSUFFIX}")
|
LIST(APPEND LIBRARY_NAMES_DEBUG "${LIBNAME}${DEBUGSUFFIX}${EXSUFFIX}")
|
||||||
ENDFOREACH(LIBNAME)
|
ENDFOREACH(LIBNAME)
|
||||||
FIND_LIBRARY("${DEPNAME}_LIBRARY_DEBUG"
|
FIND_LIBRARY("${DEPNAME}_LIBRARY_DEBUG"
|
||||||
NAMES ${LIBRARY_NAMES_DEBUG}
|
NAMES ${LIBRARY_NAMES_DEBUG}
|
||||||
PATHS ${MY_PATH_LIB}
|
PATHS ${MY_PATH_LIB}
|
||||||
NO_DEFAULT_PATH
|
NO_DEFAULT_PATH
|
||||||
@@ -49,7 +49,13 @@ MACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBU
|
|||||||
MESSAGE("-- Warning Debug ${DEPNAME} not found, using: ${${DEPNAME}_LIBRARY}")
|
MESSAGE("-- Warning Debug ${DEPNAME} not found, using: ${${DEPNAME}_LIBRARY}")
|
||||||
SET(${DEPNAME}_LIBRARY_DEBUG "${${DEPNAME}_LIBRARY}")
|
SET(${DEPNAME}_LIBRARY_DEBUG "${${DEPNAME}_LIBRARY}")
|
||||||
ENDIF(NOT ${DEPNAME}_LIBRARY_DEBUG)
|
ENDIF(NOT ${DEPNAME}_LIBRARY_DEBUG)
|
||||||
|
|
||||||
|
SET(${DEPNAME}_LIBRARIES debug ${${DEPNAME}_LIBRARY_DEBUG} optimized ${${DEPNAME}_LIBRARY} )
|
||||||
|
|
||||||
ENDIF(${DEPNAME}_INCLUDE_DIR AND ${DEPNAME}_LIBRARY)
|
ENDIF(${DEPNAME}_INCLUDE_DIR AND ${DEPNAME}_LIBRARY)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ENDMACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBUGSUFFIX)
|
ENDMACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBUGSUFFIX)
|
||||||
|
|
||||||
|
|
||||||
@@ -58,21 +64,21 @@ ENDMACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST D
|
|||||||
################################################################################################
|
################################################################################################
|
||||||
|
|
||||||
MACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
|
MACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
|
||||||
FIND_DEPENDENCY(TIFF tiff.h libtiff ${OSG_3RDPARTY_BIN} "D" "_i")
|
FIND_DEPENDENCY(TIFF tiff.h "libtiff;tiff" ${OSG_3RDPARTY_BIN} "D" "")
|
||||||
FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype2311MT;freetype234;freetype234MT;freetype235;freetype237;freetype238;freetype244;freetype250;" ${OSG_3RDPARTY_BIN} "d" "")
|
FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype2311MT;freetype234;freetype234MT;freetype235;freetype237;freetype238;freetype244;freetype250;freetype27;freetype271;" ${OSG_3RDPARTY_BIN} "d" "")
|
||||||
IF(FREETYPE_FOUND)
|
IF(FREETYPE_FOUND)
|
||||||
#forcing subsequent FindFreeType stuff to not search for other variables.... kind of a hack
|
#forcing subsequent FindFreeType stuff to not search for other variables.... kind of a hack
|
||||||
SET(FREETYPE_INCLUDE_DIR_ft2build ${FREETYPE_INCLUDE_DIR} CACHE PATH "" FORCE)
|
SET(FREETYPE_INCLUDE_DIR_ft2build ${FREETYPE_INCLUDE_DIR} CACHE PATH "" FORCE)
|
||||||
SET(FREETYPE_INCLUDE_DIR_freetype2 ${FREETYPE_INCLUDE_DIR} CACHE PATH "" FORCE)
|
SET(FREETYPE_INCLUDE_DIR_freetype2 ${FREETYPE_INCLUDE_DIR} CACHE PATH "" FORCE)
|
||||||
MARK_AS_ADVANCED(FREETYPE_INCLUDE_DIR_ft2build FREETYPE_INCLUDE_DIR_freetype2)
|
MARK_AS_ADVANCED(FREETYPE_INCLUDE_DIR_ft2build FREETYPE_INCLUDE_DIR_freetype2)
|
||||||
SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
|
SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
|
||||||
ENDIF(FREETYPE_FOUND)
|
ENDIF(FREETYPE_FOUND)
|
||||||
FIND_DEPENDENCY(CURL curl/curl.h "libcurl;curllib" ${OSG_3RDPARTY_BIN} "D" "")
|
FIND_DEPENDENCY(CURL curl/curl.h "libcurl;curllib;libcurl_imp" ${OSG_3RDPARTY_BIN} "D" "")
|
||||||
FIND_DEPENDENCY(JPEG jpeglib.h "libjpeg;jpeg" ${OSG_3RDPARTY_BIN} "D" "")
|
FIND_DEPENDENCY(JPEG jpeglib.h "libjpeg;jpeg" ${OSG_3RDPARTY_BIN} "D" "")
|
||||||
FIND_DEPENDENCY(GDAL gdal.h "gdal;gdal16" ${OSG_3RDPARTY_BIN} "d" "_i")
|
FIND_DEPENDENCY(GDAL gdal.h "gdal;gdal16" ${OSG_3RDPARTY_BIN} "d" "_i")
|
||||||
FIND_DEPENDENCY(GLUT GL/glut.h glut32 ${OSG_3RDPARTY_BIN} "D" "")
|
FIND_DEPENDENCY(GLUT GL/glut.h glut32 ${OSG_3RDPARTY_BIN} "D" "")
|
||||||
IF(GLUT_FOUND)
|
IF(GLUT_FOUND)
|
||||||
#forcing subsequent FindGlut stuff to not search for other variables.... kind of a hack
|
#forcing subsequent FindGlut stuff to not search for other variables.... kind of a hack
|
||||||
SET(GLUT_glut_LIBRARY ${GLUT_LIBRARY} CACHE FILEPATH "")
|
SET(GLUT_glut_LIBRARY ${GLUT_LIBRARY} CACHE FILEPATH "")
|
||||||
MARK_AS_ADVANCED(GLUT_glut_LIBRARY)
|
MARK_AS_ADVANCED(GLUT_glut_LIBRARY)
|
||||||
ENDIF(GLUT_FOUND)
|
ENDIF(GLUT_FOUND)
|
||||||
@@ -81,16 +87,18 @@ MACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
|
|||||||
IF(ZLIB_FOUND)
|
IF(ZLIB_FOUND)
|
||||||
FIND_DEPENDENCY(PNG png.h "libpng;libpng13;libpng15;libpng16" ${OSG_3RDPARTY_BIN} "D" "")
|
FIND_DEPENDENCY(PNG png.h "libpng;libpng13;libpng15;libpng16" ${OSG_3RDPARTY_BIN} "D" "")
|
||||||
IF(PNG_FOUND)
|
IF(PNG_FOUND)
|
||||||
#forcing subsequent FindPNG stuff to not search for other variables.... kind of a hack
|
#forcing subsequent FindPNG stuff to not search for other variables.... kind of a hack
|
||||||
SET(PNG_PNG_INCLUDE_DIR ${PNG_INCLUDE_DIR} CACHE FILEPATH "")
|
SET(PNG_PNG_INCLUDE_DIR ${PNG_INCLUDE_DIR} CACHE FILEPATH "")
|
||||||
MARK_AS_ADVANCED(PNG_PNG_INCLUDE_DIR)
|
MARK_AS_ADVANCED(PNG_PNG_INCLUDE_DIR)
|
||||||
ENDIF(PNG_FOUND)
|
ENDIF(PNG_FOUND)
|
||||||
ENDIF(ZLIB_FOUND)
|
ENDIF(ZLIB_FOUND)
|
||||||
FIND_DEPENDENCY(LIBXML2 libxml2 "libxml2" ${OSG_3RDPARTY_BIN} "D" "")
|
|
||||||
|
# CMakes default module to find libxml2 will not find the in
|
||||||
|
FIND_DEPENDENCY(LIBXML2 libxml/xpath.h "libxml2" ${OSG_3RDPARTY_BIN} "D" "")
|
||||||
IF(LIBXML2_FOUND)
|
IF(LIBXML2_FOUND)
|
||||||
# The CMAKE find libxml module uses LIBXML2_LIBRARIES -> fill it.... kind of a hack
|
# The CMAKE find libxml module uses LIBXML2_LIBRARIES -> fill it.... kind of a hack
|
||||||
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY} CACHE FILEPATH "" FORCE)
|
SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY} CACHE FILEPATH "LibXML2 library for collada" FORCE)
|
||||||
SET(LIBXML2_XMLLINT_EXECUTABLE ${OSG_3RDPARTY_BIN}/bin/xmllint.exe CACHE FILEPATH "Path to xmllint executable" FORCE)
|
# SET(LIBXML2_XMLLINT_EXECUTABLE ${OSG_3RDPARTY_BIN}/bin/xmllint.exe CACHE FILEPATH "Path to xmllint executable" FORCE)
|
||||||
ENDIF(LIBXML2_FOUND)
|
ENDIF(LIBXML2_FOUND)
|
||||||
#FIND_DEPENDENCY(DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBUGSUFFIX EXSUFFIX)
|
#FIND_DEPENDENCY(DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBUGSUFFIX EXSUFFIX)
|
||||||
FIND_Package(NVTT)
|
FIND_Package(NVTT)
|
||||||
@@ -104,7 +112,7 @@ ENDMACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
|
|||||||
# this is code for handling optional 3RDPARTY usage
|
# this is code for handling optional 3RDPARTY usage
|
||||||
################################################################################################
|
################################################################################################
|
||||||
|
|
||||||
OPTION(USE_3RDPARTY_BIN "Set to ON to use Mike prebuilt dependencies situated side of OpenSceneGraph source. Use OFF for avoiding." ON)
|
OPTION(USE_3RDPARTY_BIN "Set to ON to use Mike or Torbens prebuilt dependencies situated side of OpenSceneGraph source. Use OFF for avoiding." ON)
|
||||||
IF(USE_3RDPARTY_BIN)
|
IF(USE_3RDPARTY_BIN)
|
||||||
|
|
||||||
# Check Architecture
|
# Check Architecture
|
||||||
@@ -132,7 +140,7 @@ IF(USE_3RDPARTY_BIN)
|
|||||||
SET(TEST_3RDPARTY_DIR "${PARENT_DIR}/3rdParty_win32binaries_vs90sp1")
|
SET(TEST_3RDPARTY_DIR "${PARENT_DIR}/3rdParty_win32binaries_vs90sp1")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF(NOT EXISTS ${TEST_3RDPARTY_DIR})
|
ENDIF(NOT EXISTS ${TEST_3RDPARTY_DIR})
|
||||||
|
|
||||||
SET(ACTUAL_3RDPARTY_DIR "${TEST_3RDPARTY_DIR}" CACHE PATH "Location of 3rdparty dependencies")
|
SET(ACTUAL_3RDPARTY_DIR "${TEST_3RDPARTY_DIR}" CACHE PATH "Location of 3rdparty dependencies")
|
||||||
SET(ACTUAL_3DPARTY_DIR "${ACTUAL_3RDPARTY_DIR}") # kept for backcompatibility
|
SET(ACTUAL_3DPARTY_DIR "${ACTUAL_3RDPARTY_DIR}") # kept for backcompatibility
|
||||||
IF(EXISTS ${ACTUAL_3RDPARTY_DIR})
|
IF(EXISTS ${ACTUAL_3RDPARTY_DIR})
|
||||||
|
|||||||
@@ -30,11 +30,9 @@ ELSE()
|
|||||||
# AVFoundation exists since 10.7, but only 10.8 has all features necessary for OSG
|
# AVFoundation exists since 10.7, but only 10.8 has all features necessary for OSG
|
||||||
# so check the SDK-setting
|
# so check the SDK-setting
|
||||||
|
|
||||||
IF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.8" OR ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.9" OR ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.10")
|
IF(OSG_OSX_VERSION VERSION_LESS 10.8)
|
||||||
# nothing special here ;-)
|
MESSAGE("AVFoundation disabled for SDK < 10.8")
|
||||||
ELSE()
|
SET(AV_FOUNDATION_FOUND "NO")
|
||||||
MESSAGE("AVFoundation disabled for SDK < 10.8")
|
|
||||||
SET(AV_FOUNDATION_FOUND "NO")
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
# Locate ASIO-headers (http://think-async.com/Asio)
|
# Locate ASIO-headers (http://think-async.com/Asio)
|
||||||
# This module defines
|
# This module defines
|
||||||
# ASIO_FOUND, if false, do not try to link to gdal
|
# ASIO_FOUND, if false, do not try to link to gdal
|
||||||
# ASIO_INCLUDE_DIR, where to find the headers
|
# ASIO_INCLUDE_DIR, where to find the headers
|
||||||
#
|
#
|
||||||
# Created by Stephan Maximilian Huber
|
# Created by Stephan Maximilian Huber
|
||||||
|
|
||||||
FIND_PATH(ASIO_INCLUDE_DIR
|
FIND_PATH(ASIO_INCLUDE_DIR
|
||||||
NAMES
|
NAMES
|
||||||
@@ -14,7 +14,9 @@ FIND_PATH(ASIO_INCLUDE_DIR
|
|||||||
)
|
)
|
||||||
|
|
||||||
SET(ASIO_FOUND "NO")
|
SET(ASIO_FOUND "NO")
|
||||||
FIND_PACKAGE( Boost 1.37 )
|
IF(ASIO_INCLUDE_DIR)
|
||||||
IF(Boost_FOUND AND ASIO_INCLUDE_DIR)
|
FIND_PACKAGE( Boost 1.37 )
|
||||||
SET(ASIO_FOUND "YES")
|
IF(Boost_FOUND)
|
||||||
|
SET(ASIO_FOUND "YES")
|
||||||
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|||||||
@@ -23,24 +23,38 @@ ELSE ()
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
SET(COLLADA_BUILDNAME "mac")
|
SET(COLLADA_BUILDNAME "mac")
|
||||||
|
SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME})
|
||||||
ELSEIF(MINGW)
|
ELSEIF(MINGW)
|
||||||
SET(COLLADA_BUILDNAME "mingw")
|
SET(COLLADA_BUILDNAME "mingw")
|
||||||
ELSEIF(MSVC12)
|
SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME})
|
||||||
|
ELSEIF(MSVC_VERSION EQUAL 1900 OR MSVC_VERSION EQUAL 1910 )
|
||||||
|
SET(COLLADA_BUILDNAME "vc14")
|
||||||
|
SET(COLLADA_BOOST_BUILDNAME "vc140")
|
||||||
|
ELSEIF(MSVC_VERSION EQUAL 1800)
|
||||||
SET(COLLADA_BUILDNAME "vc12")
|
SET(COLLADA_BUILDNAME "vc12")
|
||||||
ELSEIF(MSVC11)
|
SET(COLLADA_BOOST_BUILDNAME "vc120")
|
||||||
|
ELSEIF(MSVC_VERSION EQUAL 1700)
|
||||||
SET(COLLADA_BUILDNAME "vc11")
|
SET(COLLADA_BUILDNAME "vc11")
|
||||||
ELSEIF(MSVC10)
|
SET(COLLADA_BOOST_BUILDNAME "vc110")
|
||||||
|
ELSEIF(MSVC_VERSION EQUAL 1600)
|
||||||
SET(COLLADA_BUILDNAME "vc10")
|
SET(COLLADA_BUILDNAME "vc10")
|
||||||
ELSEIF(MSVC90)
|
SET(COLLADA_BOOST_BUILDNAME "vc100")
|
||||||
|
ELSEIF(MSVC_VERSION EQUAL 1500)
|
||||||
SET(COLLADA_BUILDNAME "vc9")
|
SET(COLLADA_BUILDNAME "vc9")
|
||||||
ELSEIF(MSVC80)
|
SET(COLLADA_BOOST_BUILDNAME "vc90")
|
||||||
|
ELSEIF(MSVC_VERSION EQUAL 1400)
|
||||||
SET(COLLADA_BUILDNAME "vc8")
|
SET(COLLADA_BUILDNAME "vc8")
|
||||||
ELSE(APPLE)
|
SET(COLLADA_BOOST_BUILDNAME "vc80")
|
||||||
|
ELSE()
|
||||||
SET(COLLADA_BUILDNAME "linux")
|
SET(COLLADA_BUILDNAME "linux")
|
||||||
ENDIF(APPLE)
|
SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME})
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(${CMAKE_VS_PLATFORM_TOOLSET})
|
||||||
|
string(REPLACE "v" "vc" COLLADA_BOOST_BUILDNAME ${CMAKE_VS_PLATFORM_TOOLSET})
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(COLLADA_INCLUDE_DIR dae.h
|
FIND_PATH(COLLADA_INCLUDE_DIR dae.h
|
||||||
@@ -53,10 +67,19 @@ FIND_PATH(COLLADA_INCLUDE_DIR dae.h
|
|||||||
/usr/local/include
|
/usr/local/include
|
||||||
/usr/local/include/colladadom
|
/usr/local/include/colladadom
|
||||||
/usr/local/include/collada-dom
|
/usr/local/include/collada-dom
|
||||||
|
/usr/local/include/collada-dom2.5
|
||||||
|
/usr/local/include/collada-dom2.4
|
||||||
|
/usr/local/include/collada-dom2.2
|
||||||
/opt/local/include/collada-dom
|
/opt/local/include/collada-dom
|
||||||
|
/opt/local/include/collada-dom2.5
|
||||||
|
/opt/local/include/collada-dom2.4
|
||||||
|
/opt/local/include/collada-dom2.2
|
||||||
/usr/include/
|
/usr/include/
|
||||||
/usr/include/colladadom
|
/usr/include/colladadom
|
||||||
/usr/include/collada-dom
|
/usr/include/collada-dom
|
||||||
|
/usr/include/collada-dom2.5
|
||||||
|
/usr/include/collada-dom2.4
|
||||||
|
/usr/include/collada-dom2.2
|
||||||
/sw/include # Fink
|
/sw/include # Fink
|
||||||
/opt/local/include # DarwinPorts
|
/opt/local/include # DarwinPorts
|
||||||
/opt/csw/include # Blastwave
|
/opt/csw/include # Blastwave
|
||||||
@@ -66,7 +89,7 @@ FIND_PATH(COLLADA_INCLUDE_DIR dae.h
|
|||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
|
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
|
||||||
NAMES collada_dom collada14dom Collada14Dom libcollada14dom21 libcollada14dom22 collada-dom2.4-dp
|
NAMES collada_dom collada14dom Collada14Dom libcollada14dom21 libcollada14dom22 collada-dom2.5-dp collada-dom2.5-dp-${COLLADA_BOOST_BUILDNAME}-mt collada-dom2.4-dp collada-dom2.4-dp-${COLLADA_BOOST_BUILDNAME}-mt
|
||||||
PATHS
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4
|
${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4
|
||||||
${COLLADA_DOM_ROOT}
|
${COLLADA_DOM_ROOT}
|
||||||
@@ -90,7 +113,7 @@ FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
|
|||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG
|
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG
|
||||||
NAMES collada_dom-d collada14dom-d Collada14Dom-d libcollada14dom21-d libcollada14dom22-d collada-dom2.4-dp-d
|
NAMES collada_dom-d collada14dom-d Collada14Dom-d libcollada14dom21-d libcollada14dom22-d collada-dom2.5-dp-d collada-dom2.5-dp-${COLLADA_BOOST_BUILDNAME}-mt-d collada-dom2.4-dp-d collada-dom2.4-dp-${COLLADA_BOOST_BUILDNAME}-mt-d
|
||||||
PATHS
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4-d
|
${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4-d
|
||||||
${COLLADA_DOM_ROOT}
|
${COLLADA_DOM_ROOT}
|
||||||
@@ -178,7 +201,16 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
|
|||||||
|
|
||||||
FIND_PACKAGE(ZLIB)
|
FIND_PACKAGE(ZLIB)
|
||||||
IF (ZLIB_FOUND)
|
IF (ZLIB_FOUND)
|
||||||
SET(COLLADA_ZLIB_LIBRARY "${ZLIB_LIBRARY}" CACHE FILEPATH "" FORCE)
|
IF (ZLIB_LIBRARY_RELEASE)
|
||||||
|
SET(COLLADA_ZLIB_LIBRARY "${ZLIB_LIBRARY_RELEASE}" CACHE FILEPATH "" FORCE)
|
||||||
|
ELSE(ZLIB_LIBRARY_RELEASE)
|
||||||
|
SET(COLLADA_ZLIB_LIBRARY "${ZLIB_LIBRARY}" CACHE FILEPATH "" FORCE)
|
||||||
|
ENDIF(ZLIB_LIBRARY_RELEASE)
|
||||||
|
IF (ZLIB_LIBRARY_DEBUG)
|
||||||
|
SET(COLLADA_ZLIB_LIBRARY_DEBUG "${ZLIB_LIBRARY_DEBUG}" CACHE FILEPATH "" FORCE)
|
||||||
|
ELSE(ZLIB_LIBRARY_DEBUG)
|
||||||
|
SET(COLLADA_ZLIB_LIBRARY_DEBUG "${COLLADA_ZLIB_LIBRARY}" CACHE FILEPATH "" FORCE)
|
||||||
|
ENDIF(ZLIB_LIBRARY_DEBUG)
|
||||||
ELSE(ZLIB_FOUND)
|
ELSE(ZLIB_FOUND)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
FIND_LIBRARY(COLLADA_ZLIB_LIBRARY
|
FIND_LIBRARY(COLLADA_ZLIB_LIBRARY
|
||||||
@@ -244,7 +276,7 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
|
|||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY
|
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY
|
||||||
NAMES libboost_filesystem boost_filesystem boost_filesystem-mt libboost_filesystem-${COLLADA_BUILDNAME}0-mt libboost_filesystem-${COLLADA_BUILDNAME}0-mt-1_54 libboost_filesystem-${COLLADA_BUILDNAME}0-mt-1_55
|
NAMES libboost_filesystem boost_filesystem boost_filesystem-mt libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_54 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_55 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_58 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_62 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_63
|
||||||
PATHS
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||||
@@ -252,7 +284,7 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
|
|||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY_DEBUG
|
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY_DEBUG
|
||||||
NAMES libboost_filesystem-d boost_filesystem-d boost_filesystem-mt-d libboost_filesystem-${COLLADA_BUILDNAME}0-mt-gd libboost_filesystem-${COLLADA_BUILDNAME}0-mt-gd-1_54 libboost_filesystem-${COLLADA_BUILDNAME}0-mt-gd-1_55
|
NAMES libboost_filesystem-d boost_filesystem-d boost_filesystem-mt-d libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_54 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_55 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_58 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_62 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_63
|
||||||
PATHS
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||||
@@ -260,7 +292,7 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
|
|||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY
|
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY
|
||||||
NAMES libboost_system boost_system boost_system-mt libboost_system-${COLLADA_BUILDNAME}0-mt libboost_system-${COLLADA_BUILDNAME}0-mt-1_54 libboost_system-${COLLADA_BUILDNAME}0-mt-1_55
|
NAMES libboost_system boost_system boost_system-mt libboost_system-${COLLADA_BOOST_BUILDNAME}-mt libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_54 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_55 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_58 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_62 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_63
|
||||||
PATHS
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||||
@@ -268,7 +300,7 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
|
|||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY_DEBUG
|
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY_DEBUG
|
||||||
NAMES libboost_system-d boost_system-d boost_system-mt-d libboost_system-${COLLADA_BUILDNAME}0-mt-gd libboost_system-${COLLADA_BUILDNAME}0-mt-gd-1_54 libboost_system-${COLLADA_BUILDNAME}0-mt-gd-1_55
|
NAMES libboost_system-d boost_system-d boost_system-mt-d libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_54 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_55 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_58 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_62 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_63
|
||||||
PATHS
|
PATHS
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME}
|
||||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||||
|
|||||||
33
CMakeModules/FindEGL.cmake
Normal file
33
CMakeModules/FindEGL.cmake
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# Finds EGL header and library
|
||||||
|
#
|
||||||
|
# This script defines the following:
|
||||||
|
# EGL_FOUND // Set to TRUE if EGL is found
|
||||||
|
# EGL_INCLUDE_DIR // Parent directory of directory EGL/egl.h header.
|
||||||
|
#
|
||||||
|
# EGL_DIR can be set as an environment variable or a CMake variable,
|
||||||
|
# to the parent directory of the EGL header.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
FIND_PATH( EGL_INCLUDE_DIR
|
||||||
|
NAMES EGL/egl.h
|
||||||
|
HINTS ENV EGL_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(EGL_LIBRARY
|
||||||
|
NAMES EGL
|
||||||
|
HINTS ENV EGL_DIR
|
||||||
|
PATH_SUFFIXES lib
|
||||||
|
)
|
||||||
|
|
||||||
|
# handle the QUIETLY and REQUIRED arguments and set
|
||||||
|
# EGL_FOUND to TRUE as appropriate
|
||||||
|
INCLUDE( FindPackageHandleStandardArgs )
|
||||||
|
|
||||||
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EGL
|
||||||
|
REQUIRED_VARS EGL_LIBRARY EGL_INCLUDE_DIR)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(
|
||||||
|
EGL_INCLUDE_DIR
|
||||||
|
EGL_LIBRARY
|
||||||
|
)
|
||||||
@@ -9,7 +9,12 @@
|
|||||||
# correspond to the ./configure --prefix=$FBX_DIR
|
# correspond to the ./configure --prefix=$FBX_DIR
|
||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
# using regular Clang or AppleClang
|
||||||
|
SET(FBX_LIBDIR "clang")
|
||||||
|
else()
|
||||||
SET(FBX_LIBDIR "gcc4/ub")
|
SET(FBX_LIBDIR "gcc4/ub")
|
||||||
|
endif()
|
||||||
ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
|
ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
SET(FBX_LIBDIR "gcc4")
|
SET(FBX_LIBDIR "gcc4")
|
||||||
ELSEIF(MSVC80)
|
ELSEIF(MSVC80)
|
||||||
@@ -20,8 +25,10 @@ ELSEIF(MSVC10)
|
|||||||
SET(FBX_LIBDIR "vs2010")
|
SET(FBX_LIBDIR "vs2010")
|
||||||
ELSEIF(MSVC11)
|
ELSEIF(MSVC11)
|
||||||
SET(FBX_LIBDIR "vs2012")
|
SET(FBX_LIBDIR "vs2012")
|
||||||
ELSEIF(MSVC12 OR MSVC_VERSION>1800)
|
ELSEIF(MSVC12 OR MSVC_VERSION==1800)
|
||||||
SET(FBX_LIBDIR "vs2013")
|
SET(FBX_LIBDIR "vs2013")
|
||||||
|
ELSEIF(MSVC14 OR MSVC_VERSION>1900)
|
||||||
|
SET(FBX_LIBDIR "vs2015")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
@@ -37,26 +44,41 @@ ENDIF()
|
|||||||
#try to use 2015.1 or 2014.2 version
|
#try to use 2015.1 or 2014.2 version
|
||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
SET(FBX_LIBNAME "libfbxsdk")
|
SET(FBX_LIBNAME "fbxsdk")
|
||||||
ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
|
ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
SET(FBX_LIBNAME "fbxsdk")
|
SET(FBX_LIBNAME "fbxsdk")
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(FBX_LIBNAME "libfbxsdk-md")
|
OPTION(FBX_SHARED OFF)
|
||||||
|
IF(FBX_SHARED)
|
||||||
|
SET(FBX_LIBNAME "libfbxsdk")
|
||||||
|
ELSE()
|
||||||
|
SET(FBX_LIBNAME "libfbxsdk-md")
|
||||||
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME}d)
|
SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME}d)
|
||||||
|
|
||||||
SET( FBX_SEARCH_PATHS
|
SET( FBX_SEARCH_PATHS
|
||||||
$ENV{FBX_DIR}
|
$ENV{FBX_DIR}
|
||||||
|
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2018.1.1"
|
||||||
|
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2018.1.1"
|
||||||
|
"/Applications/Autodesk/FBX\ SDK/2018.0"
|
||||||
|
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2017.1"
|
||||||
|
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2017.1"
|
||||||
|
"/Applications/Autodesk/FBX SDK/2017.1"
|
||||||
|
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2016.1.2"
|
||||||
|
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2016.1.2"
|
||||||
|
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2016.1.1"
|
||||||
|
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2016.1.1"
|
||||||
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2015.1"
|
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2015.1"
|
||||||
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2015.1"
|
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2015.1"
|
||||||
|
"/Applications/Autodesk/FBX/FBX SDK/2015.1"
|
||||||
/Applications/Autodesk/FBXSDK20151
|
/Applications/Autodesk/FBXSDK20151
|
||||||
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2014.2"
|
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2014.2"
|
||||||
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2014.2"
|
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2014.2"
|
||||||
|
"/Applications/Autodesk/FBX/FBX SDK/2014.2"
|
||||||
/Applications/Autodesk/FBXSDK20142
|
/Applications/Autodesk/FBXSDK20142
|
||||||
/Applications/Autodesk/FBXSDK20141
|
|
||||||
)
|
)
|
||||||
#I think the last line in the search path is an old typo, but let's search for 2014.1 anyway - LV
|
|
||||||
|
|
||||||
# search for headers & debug/release libraries
|
# search for headers & debug/release libraries
|
||||||
FIND_PATH(FBX_INCLUDE_DIR "fbxsdk.h"
|
FIND_PATH(FBX_INCLUDE_DIR "fbxsdk.h"
|
||||||
@@ -96,8 +118,9 @@ IF(NOT FBX_FOUND)
|
|||||||
|
|
||||||
SET( FBX_SEARCH_PATHS
|
SET( FBX_SEARCH_PATHS
|
||||||
$ENV{FBX_DIR}
|
$ENV{FBX_DIR}
|
||||||
$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2014.1
|
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2014.1"
|
||||||
$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2014.1
|
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2014.1"
|
||||||
|
"/Applications/Autodesk/FBX/FBX SDK/2014.1"
|
||||||
/Applications/Autodesk/FBXSDK20141
|
/Applications/Autodesk/FBXSDK20141
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -134,8 +157,9 @@ IF(NOT FBX_FOUND)
|
|||||||
|
|
||||||
SET( FBX_SEARCH_PATHS
|
SET( FBX_SEARCH_PATHS
|
||||||
$ENV{FBX_DIR}
|
$ENV{FBX_DIR}
|
||||||
$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2013.3
|
"$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2013.3"
|
||||||
$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2013.3
|
"$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2013.3"
|
||||||
|
"/Applications/Autodesk/FBX/FBX SDK/2013.3"
|
||||||
/Applications/Autodesk/FBXSDK20133
|
/Applications/Autodesk/FBXSDK20133
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#In ffmpeg code, old version use "#include <header.h>" and newer use "#include <libname/header.h>"
|
#In ffmpeg code, old version use "#include <header.h>" and newer use "#include <libname/header.h>"
|
||||||
#In OSG ffmpeg plugin, we used "#include <header.h>" for compatibility with old version of ffmpeg
|
#In OSG ffmpeg plugin, we used "#include <header.h>" for compatibility with old version of ffmpeg
|
||||||
#With the new version of FFmpeg, a file named "time.h" was added that breaks compatability with the old version of ffmpeg.
|
#With the new version of FFmpeg, a file named "time.h" was added that breaks compatibility with the old version of ffmpeg.
|
||||||
|
|
||||||
#We have to search the path which contain the header.h (useful for old version)
|
#We have to search the path which contain the header.h (useful for old version)
|
||||||
#and search the path which contain the libname/header.h (useful for new version)
|
#and search the path which contain the libname/header.h (useful for new version)
|
||||||
@@ -96,7 +96,7 @@ ENDMACRO(FFMPEG_FIND)
|
|||||||
SET(FFMPEG_ROOT "$ENV{FFMPEG_DIR}" CACHE PATH "Location of FFMPEG")
|
SET(FFMPEG_ROOT "$ENV{FFMPEG_DIR}" CACHE PATH "Location of FFMPEG")
|
||||||
|
|
||||||
# find stdint.h
|
# find stdint.h
|
||||||
IF(WIN32)
|
IF(MSVC)
|
||||||
|
|
||||||
FIND_PATH(FFMPEG_STDINT_INCLUDE_DIR stdint.h
|
FIND_PATH(FFMPEG_STDINT_INCLUDE_DIR stdint.h
|
||||||
PATHS
|
PATHS
|
||||||
|
|||||||
@@ -1,141 +1,188 @@
|
|||||||
# - Locate FreeType library
|
#.rst:
|
||||||
|
# FindFreetype
|
||||||
|
# ------------
|
||||||
|
#
|
||||||
|
# Locate FreeType library
|
||||||
|
#
|
||||||
# This module defines
|
# This module defines
|
||||||
# FREETYPE_LIBRARY, the library to link against
|
#
|
||||||
# FREETYPE_FOUND, if false, do not try to link to FREETYPE
|
# ::
|
||||||
# FREETYPE_INCLUDE_DIRS, where to find headers.
|
#
|
||||||
# This is the concatenation of the paths:
|
# FREETYPE_LIBRARIES, the library to link against
|
||||||
# FREETYPE_INCLUDE_DIR_ft2build
|
# FREETYPE_FOUND, if false, do not try to link to FREETYPE
|
||||||
# FREETYPE_INCLUDE_DIR_freetype2
|
# FREETYPE_INCLUDE_DIRS, where to find headers.
|
||||||
#
|
# FREETYPE_VERSION_STRING, the version of freetype found (since CMake 2.8.8)
|
||||||
# $FREETYPE_DIR is an environment variable that would
|
# This is the concatenation of the paths:
|
||||||
# correspond to the ./configure --prefix=$FREETYPE_DIR
|
# FREETYPE_INCLUDE_DIR_ft2build
|
||||||
# used in building FREETYPE.
|
# FREETYPE_INCLUDE_DIR_freetype2
|
||||||
# Created by Eric Wing.
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# $FREETYPE_DIR is an environment variable that would correspond to the
|
||||||
|
# ./configure --prefix=$FREETYPE_DIR used in building FREETYPE.
|
||||||
|
|
||||||
# prefer FindFreetype from cmake distribution
|
#=============================================================================
|
||||||
if(EXISTS ${CMAKE_ROOT}/Modules/FindFreetype.cmake)
|
# Copyright 2000-2016 Kitware, Inc.
|
||||||
include(${CMAKE_ROOT}/Modules/FindFreetype.cmake)
|
# Copyright 2000-2011 Insight Software Consortium
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
#
|
||||||
|
# * Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
#
|
||||||
|
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
|
||||||
|
# nor the names of their contributors may be used to endorse or promote
|
||||||
|
# products derived from this software without specific prior written
|
||||||
|
# permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#=============================================================================
|
||||||
|
|
||||||
if(FREETYPE_FOUND)
|
# Created by Eric Wing.
|
||||||
return()
|
# Modifications by Alexander Neundorf.
|
||||||
endif()
|
# This file has been renamed to "FindFreetype.cmake" instead of the correct
|
||||||
endif()
|
# "FindFreeType.cmake" in order to be compatible with the one from KDE4, Alex.
|
||||||
|
|
||||||
# Ugh, FreeType seems to use some #include trickery which
|
# Ugh, FreeType seems to use some #include trickery which
|
||||||
# makes this harder than it should be. It looks like they
|
# makes this harder than it should be. It looks like they
|
||||||
# put ft2build.h in a common/easier-to-find location which
|
# put ft2build.h in a common/easier-to-find location which
|
||||||
# then contains a #include to a more specific header in a
|
# then contains a #include to a more specific header in a
|
||||||
# more specific location (#include <freetype/config/ftheader.h>).
|
# more specific location (#include <freetype/config/ftheader.h>).
|
||||||
# Then from there, they need to set a bunch of #define's
|
# Then from there, they need to set a bunch of #define's
|
||||||
# so you can do something like:
|
# so you can do something like:
|
||||||
# #include FT_FREETYPE_H
|
# #include FT_FREETYPE_H
|
||||||
# Unfortunately, using CMake's mechanisms like INCLUDE_DIRECTORIES()
|
# Unfortunately, using CMake's mechanisms like include_directories()
|
||||||
# wants explicit full paths and this trickery doesn't work too well.
|
# wants explicit full paths and this trickery doesn't work too well.
|
||||||
# I'm going to attempt to cut out the middleman and hope
|
# I'm going to attempt to cut out the middleman and hope
|
||||||
# everything still works.
|
# everything still works.
|
||||||
|
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
|
# Adapted for OpenSceneGraph until the updates here for finding the debug Windows library freetyped are released with CMake
|
||||||
|
|
||||||
|
set(FREETYPE_FIND_ARGS
|
||||||
|
HINTS
|
||||||
|
ENV FREETYPE_DIR
|
||||||
PATHS
|
PATHS
|
||||||
$ENV{FREETYPE_DIR}
|
/usr/X11R6
|
||||||
NO_DEFAULT_PATH
|
/usr/local/X11R6
|
||||||
PATH_SUFFIXES include
|
/usr/local/X11
|
||||||
)
|
/usr/freeware
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
|
ENV GTKMM_BASEPATH
|
||||||
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
|
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
|
||||||
NO_DEFAULT_PATH
|
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
|
||||||
PATH_SUFFIXES include
|
|
||||||
)
|
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
|
|
||||||
PATHS
|
|
||||||
/usr/local
|
|
||||||
/usr
|
|
||||||
/usr/local/X11R6
|
|
||||||
/usr/local/X11
|
|
||||||
/usr/X11R6
|
|
||||||
/usr/X11
|
|
||||||
/sw
|
|
||||||
/opt/local
|
|
||||||
/opt/csw
|
|
||||||
/opt
|
|
||||||
/usr/freeware
|
|
||||||
PATH_SUFFIXES include include/freetype2
|
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
|
find_path(
|
||||||
$ENV{FREETYPE_DIR}/include/freetype2
|
FREETYPE_INCLUDE_DIR_ft2build
|
||||||
NO_DEFAULT_PATH
|
ft2build.h
|
||||||
)
|
${FREETYPE_FIND_ARGS}
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
|
PATH_SUFFIXES
|
||||||
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
|
include/freetype2
|
||||||
NO_DEFAULT_PATH
|
include
|
||||||
PATH_SUFFIXES include/freetype2
|
freetype2
|
||||||
)
|
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
|
|
||||||
/usr/local/include/freetype2
|
|
||||||
/usr/include/freetype2
|
|
||||||
/usr/local/X11R6/include/freetype2
|
|
||||||
/usr/local/X11/include/freetype2
|
|
||||||
/usr/X11R6/include/freetype2
|
|
||||||
/usr/X11/include/freetype2
|
|
||||||
/sw/include/freetype2
|
|
||||||
/opt/local/include/freetype2
|
|
||||||
/opt/csw/include/freetype2
|
|
||||||
/opt/include/freetype2
|
|
||||||
/usr/freeware/include/freetype2
|
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 config/ftheader.h
|
find_path(
|
||||||
/usr/local/include/freetype2
|
FREETYPE_INCLUDE_DIR_freetype2
|
||||||
/usr/include/freetype2
|
NAMES
|
||||||
/usr/local/X11R6/include/freetype2
|
freetype/config/ftheader.h
|
||||||
/usr/local/X11/include/freetype2
|
config/ftheader.h
|
||||||
/usr/X11R6/include/freetype2
|
${FREETYPE_FIND_ARGS}
|
||||||
/usr/X11/include/freetype2
|
PATH_SUFFIXES
|
||||||
/sw/include/freetype2
|
include/freetype2
|
||||||
/opt/local/include/freetype2
|
include
|
||||||
/opt/csw/include/freetype2
|
freetype2
|
||||||
/opt/include/freetype2
|
|
||||||
/usr/freeware/include/freetype2
|
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(FREETYPE_LIBRARY
|
if(NOT FREETYPE_LIBRARY)
|
||||||
NAMES freetype libfreetype freetype219
|
find_library(FREETYPE_LIBRARY_RELEASE
|
||||||
PATHS
|
NAMES
|
||||||
$ENV{FREETYPE_DIR}
|
freetype
|
||||||
NO_DEFAULT_PATH
|
libfreetype
|
||||||
PATH_SUFFIXES lib64 lib
|
freetype219
|
||||||
)
|
${FREETYPE_FIND_ARGS}
|
||||||
FIND_LIBRARY(FREETYPE_LIBRARY
|
PATH_SUFFIXES
|
||||||
NAMES freetype libfreetype freetype219
|
lib
|
||||||
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
|
)
|
||||||
NO_DEFAULT_PATH
|
find_library(FREETYPE_LIBRARY_DEBUG
|
||||||
PATH_SUFFIXES lib64 lib
|
NAMES
|
||||||
)
|
freetyped
|
||||||
FIND_LIBRARY(FREETYPE_LIBRARY
|
libfreetyped
|
||||||
NAMES freetype libfreetype freetype219
|
freetype219d
|
||||||
PATHS
|
${FREETYPE_FIND_ARGS}
|
||||||
/usr/local
|
PATH_SUFFIXES
|
||||||
/usr
|
lib
|
||||||
/usr/local/X11R6
|
)
|
||||||
/usr/local/X11
|
include(SelectLibraryConfigurations) #OSG Look in CMake Modules dir
|
||||||
/usr/X11R6
|
select_library_configurations(FREETYPE)
|
||||||
/usr/X11
|
endif()
|
||||||
/sw
|
|
||||||
/opt/local
|
unset(FREETYPE_FIND_ARGS)
|
||||||
/opt/csw
|
|
||||||
/opt
|
# set the user variables
|
||||||
/usr/freeware
|
if(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
|
||||||
PATH_SUFFIXES lib64 lib
|
set(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
|
||||||
|
list(REMOVE_DUPLICATES FREETYPE_INCLUDE_DIRS)
|
||||||
|
endif()
|
||||||
|
set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}")
|
||||||
|
|
||||||
|
if(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
|
||||||
|
set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
|
||||||
|
elseif(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h")
|
||||||
|
set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(FREETYPE_INCLUDE_DIR_freetype2 AND FREETYPE_H)
|
||||||
|
file(STRINGS "${FREETYPE_H}" freetype_version_str
|
||||||
|
REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$")
|
||||||
|
|
||||||
|
unset(FREETYPE_VERSION_STRING)
|
||||||
|
foreach(VPART MAJOR MINOR PATCH)
|
||||||
|
foreach(VLINE ${freetype_version_str})
|
||||||
|
if(VLINE MATCHES "^#[\t ]*define[\t ]+FREETYPE_${VPART}[\t ]+([0-9]+)$")
|
||||||
|
set(FREETYPE_VERSION_PART "${CMAKE_MATCH_1}")
|
||||||
|
if(FREETYPE_VERSION_STRING)
|
||||||
|
set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_STRING}.${FREETYPE_VERSION_PART}")
|
||||||
|
else()
|
||||||
|
set(FREETYPE_VERSION_STRING "${FREETYPE_VERSION_PART}")
|
||||||
|
endif()
|
||||||
|
unset(FREETYPE_VERSION_PART)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
# handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if
|
||||||
|
# all listed variables are TRUE
|
||||||
|
include(FindPackageHandleStandardArgs) #OSG Look in CMake Modules dir
|
||||||
|
|
||||||
|
find_package_handle_standard_args(
|
||||||
|
Freetype
|
||||||
|
REQUIRED_VARS
|
||||||
|
FREETYPE_LIBRARY
|
||||||
|
FREETYPE_INCLUDE_DIRS
|
||||||
|
VERSION_VAR
|
||||||
|
FREETYPE_VERSION_STRING
|
||||||
)
|
)
|
||||||
|
|
||||||
IF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
|
mark_as_advanced(
|
||||||
SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
|
FREETYPE_INCLUDE_DIR_freetype2
|
||||||
ENDIF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
|
FREETYPE_INCLUDE_DIR_ft2build
|
||||||
|
)
|
||||||
|
|
||||||
SET(FREETYPE_FOUND "NO")
|
|
||||||
IF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
|
|
||||||
SET(FREETYPE_FOUND "YES")
|
|
||||||
ENDIF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
# )
|
# )
|
||||||
#endmacro()
|
#endmacro()
|
||||||
|
|
||||||
if (WIN32)
|
if (MSVC)
|
||||||
macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
|
macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
|
||||||
find_path(${_component_prefix}_INCLUDE_DIRS
|
find_path(${_component_prefix}_INCLUDE_DIRS
|
||||||
NAMES ${_header}
|
NAMES ${_header}
|
||||||
@@ -83,18 +83,18 @@ else ()
|
|||||||
find_package(PkgConfig)
|
find_package(PkgConfig)
|
||||||
|
|
||||||
macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
|
macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
|
||||||
pkg_check_modules(PC_${_component_prefix} QUIET ${_pkgconfig_name})
|
pkg_check_modules(${_component_prefix} QUIET ${_pkgconfig_name})
|
||||||
|
|
||||||
find_path(${_component_prefix}_INCLUDE_DIRS
|
# find_path(${_component_prefix}_INCLUDE_DIRS
|
||||||
NAMES ${_header}
|
# NAMES ${_header}
|
||||||
HINTS ${PC_${_component_prefix}_INCLUDE_DIRS} ${PC_${_component_prefix}_INCLUDEDIR}
|
# HINTS ${PC_${_component_prefix}_INCLUDE_DIRS} ${PC_${_component_prefix}_INCLUDEDIR}
|
||||||
PATH_SUFFIXES gstreamer-1.0
|
# PATH_SUFFIXES gstreamer-1.0
|
||||||
)
|
# )
|
||||||
|
|
||||||
find_library(${_component_prefix}_LIBRARIES
|
# find_library(${_component_prefix}_LIBRARIES
|
||||||
NAMES ${_library}
|
# NAMES ${_library}
|
||||||
HINTS ${PC_${_component_prefix}_LIBRARY_DIRS} ${PC_${_component_prefix}_LIBDIR}
|
# HINTS ${PC_${_component_prefix}_LIBRARY_DIRS} ${PC_${_component_prefix}_LIBDIR}
|
||||||
)
|
# )
|
||||||
endmacro()
|
endmacro()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|||||||
@@ -16,41 +16,42 @@ IF(PKG_CONFIG_FOUND)
|
|||||||
|
|
||||||
PKG_CHECK_MODULES(GTA gta)
|
PKG_CHECK_MODULES(GTA gta)
|
||||||
|
|
||||||
ELSE(PKG_CONFIG_FOUND)
|
|
||||||
|
|
||||||
FIND_PATH(GTA_INCLUDE_DIRS gta/gta.hpp
|
|
||||||
$ENV{GTA_DIR}/include
|
|
||||||
$ENV{GTA_DIR}
|
|
||||||
~/Library/Frameworks
|
|
||||||
/Library/Frameworks
|
|
||||||
/usr/local/include
|
|
||||||
/usr/include
|
|
||||||
/sw/include # Fink
|
|
||||||
/opt/local/include # DarwinPorts
|
|
||||||
/opt/csw/include # Blastwave
|
|
||||||
/opt/include
|
|
||||||
/usr/freeware/include
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY(GTA_LIBRARIES
|
|
||||||
NAMES gta libgta
|
|
||||||
PATHS
|
|
||||||
$ENV{GTA_DIR}/lib
|
|
||||||
$ENV{GTA_DIR}
|
|
||||||
~/Library/Frameworks
|
|
||||||
/Library/Frameworks
|
|
||||||
/usr/local/lib
|
|
||||||
/usr/lib
|
|
||||||
/sw/lib
|
|
||||||
/opt/local/lib
|
|
||||||
/opt/csw/lib
|
|
||||||
/opt/lib
|
|
||||||
/usr/freeware/lib64
|
|
||||||
)
|
|
||||||
|
|
||||||
SET(GTA_FOUND "NO")
|
|
||||||
IF(GTA_LIBRARIES AND GTA_INCLUDE_DIRS)
|
|
||||||
SET(GTA_FOUND "YES")
|
|
||||||
ENDIF(GTA_LIBRARIES AND GTA_INCLUDE_DIRS)
|
|
||||||
|
|
||||||
ENDIF(PKG_CONFIG_FOUND)
|
ENDIF(PKG_CONFIG_FOUND)
|
||||||
|
|
||||||
|
IF(NOT GTA_FOUND)
|
||||||
|
FIND_PATH(GTA_INCLUDE_DIRS gta/gta.hpp
|
||||||
|
$ENV{GTA_DIR}/include
|
||||||
|
$ENV{GTA_DIR}
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local/include
|
||||||
|
/usr/include
|
||||||
|
/sw/include # Fink
|
||||||
|
/opt/local/include # DarwinPorts
|
||||||
|
/opt/csw/include # Blastwave
|
||||||
|
/opt/include
|
||||||
|
/usr/freeware/include
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(GTA_LIBRARY
|
||||||
|
NAMES gta libgta
|
||||||
|
PATHS
|
||||||
|
$ENV{GTA_DIR}/lib
|
||||||
|
$ENV{GTA_DIR}
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib
|
||||||
|
/sw/lib
|
||||||
|
/opt/local/lib
|
||||||
|
/opt/csw/lib
|
||||||
|
/opt/lib
|
||||||
|
/usr/freeware/lib64
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(GTA_FOUND "NO")
|
||||||
|
IF(GTA_LIBRARY AND GTA_INCLUDE_DIRS)
|
||||||
|
SET(GTA_FOUND "YES")
|
||||||
|
ENDIF(GTA_LIBRARY AND GTA_INCLUDE_DIRS)
|
||||||
|
|
||||||
|
ENDIF(NOT GTA_FOUND)
|
||||||
@@ -17,7 +17,7 @@ macro(FIND_LIBLAS_LIBRARY MYLIBRARY MYLIBRARYNAME)
|
|||||||
|
|
||||||
find_library(
|
find_library(
|
||||||
"${MYLIBRARY}_DEBUG"
|
"${MYLIBRARY}_DEBUG"
|
||||||
NAMES "${MYLIBRARYNAME}${CMAKE_DEBUG_POSTFIX}"
|
NAMES "${MYLIBRARYNAME}${CMAKE_DEBUG_POSTFIX}" "lib${MYLIBRARYNAME}${CMAKE_DEBUG_POSTFIX}"
|
||||||
PATHS
|
PATHS
|
||||||
${LIBLAS_DIR}/lib/Debug
|
${LIBLAS_DIR}/lib/Debug
|
||||||
${LIBLAS_DIR}/lib64/Debug
|
${LIBLAS_DIR}/lib64/Debug
|
||||||
@@ -30,7 +30,7 @@ macro(FIND_LIBLAS_LIBRARY MYLIBRARY MYLIBRARYNAME)
|
|||||||
|
|
||||||
find_library(
|
find_library(
|
||||||
"${MYLIBRARY}_DEBUG"
|
"${MYLIBRARY}_DEBUG"
|
||||||
NAMES "${MYLIBRARYNAME}${CMAKE_DEBUG_POSTFIX}"
|
NAMES "${MYLIBRARYNAME}${CMAKE_DEBUG_POSTFIX}" "lib${MYLIBRARYNAME}${CMAKE_DEBUG_POSTFIX}"
|
||||||
PATHS
|
PATHS
|
||||||
~/Library/Frameworks
|
~/Library/Frameworks
|
||||||
/Library/Frameworks
|
/Library/Frameworks
|
||||||
@@ -48,7 +48,7 @@ macro(FIND_LIBLAS_LIBRARY MYLIBRARY MYLIBRARYNAME)
|
|||||||
|
|
||||||
find_library(
|
find_library(
|
||||||
${MYLIBRARY}
|
${MYLIBRARY}
|
||||||
NAMES "${MYLIBRARYNAME}${CMAKE_RELEASE_POSTFIX}"
|
NAMES "${MYLIBRARYNAME}${CMAKE_RELEASE_POSTFIX}" "lib${MYLIBRARYNAME}${CMAKE_RELEASE_POSTFIX}"
|
||||||
PATHS
|
PATHS
|
||||||
${LIBLAS_DIR}/lib/Release
|
${LIBLAS_DIR}/lib/Release
|
||||||
${LIBLAS_DIR}/lib64/Release
|
${LIBLAS_DIR}/lib64/Release
|
||||||
@@ -69,7 +69,7 @@ macro(FIND_LIBLAS_LIBRARY MYLIBRARY MYLIBRARYNAME)
|
|||||||
|
|
||||||
find_library(
|
find_library(
|
||||||
${MYLIBRARY}
|
${MYLIBRARY}
|
||||||
NAMES "${MYLIBRARYNAME}${CMAKE_RELEASE_POSTFIX}"
|
NAMES "${MYLIBRARYNAME}${CMAKE_RELEASE_POSTFIX}" "lib${MYLIBRARYNAME}${CMAKE_RELEASE_POSTFIX}"
|
||||||
PATHS
|
PATHS
|
||||||
~/Library/Frameworks
|
~/Library/Frameworks
|
||||||
/Library/Frameworks
|
/Library/Frameworks
|
||||||
@@ -94,10 +94,12 @@ macro(FIND_LIBLAS_LIBRARY MYLIBRARY MYLIBRARYNAME)
|
|||||||
endmacro(FIND_LIBLAS_LIBRARY LIBRARY LIBRARYNAME)
|
endmacro(FIND_LIBLAS_LIBRARY LIBRARY LIBRARYNAME)
|
||||||
|
|
||||||
FIND_LIBLAS_LIBRARY(LIBLAS_LIBRARY las)
|
FIND_LIBLAS_LIBRARY(LIBLAS_LIBRARY las)
|
||||||
FIND_LIBLAS_LIBRARY(LIBLASC_LIBRARY las_c)
|
|
||||||
|
|
||||||
set(LIBLAS_FOUND "NO")
|
set(LIBLAS_FOUND "NO")
|
||||||
if(LIBLAS_LIBRARY AND LIBLASC_LIBRARY AND LIBLAS_INCLUDE_DIR)
|
if(LIBLAS_LIBRARY AND LIBLAS_INCLUDE_DIR)
|
||||||
set(LIBLAS_LIBRARIES ${LIBLAS_LIBRARY} ${LIBLASC_LIBRARY} )
|
FIND_PACKAGE(Boost) # used by LIBLAS
|
||||||
set(LIBLAS_FOUND "YES")
|
if(Boost_FOUND)
|
||||||
|
set(LIBLAS_LIBRARIES ${LIBLAS_LIBRARY} )
|
||||||
|
set(LIBLAS_FOUND "YES")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ FIND_PATH(NVTT_INCLUDE_DIR nvtt/nvtt.h
|
|||||||
)
|
)
|
||||||
|
|
||||||
# NVTT
|
# NVTT
|
||||||
FIND_LIBRARY(NVTT_LIBRARY
|
FIND_LIBRARY(NVTT_LIBRARY_RELEASE
|
||||||
NAMES nvtt
|
NAMES nvtt
|
||||||
PATHS
|
PATHS
|
||||||
/usr/local
|
/usr/local
|
||||||
@@ -37,7 +37,7 @@ FIND_LIBRARY(NVTT_LIBRARY_DEBUG
|
|||||||
)
|
)
|
||||||
|
|
||||||
# NVIMAGE
|
# NVIMAGE
|
||||||
FIND_LIBRARY(NVIMAGE_LIBRARY
|
FIND_LIBRARY(NVIMAGE_LIBRARY_RELEASE
|
||||||
NAMES nvimage
|
NAMES nvimage
|
||||||
PATHS
|
PATHS
|
||||||
/usr/local
|
/usr/local
|
||||||
@@ -58,7 +58,7 @@ FIND_LIBRARY(NVIMAGE_LIBRARY_DEBUG
|
|||||||
)
|
)
|
||||||
|
|
||||||
# NVMATH
|
# NVMATH
|
||||||
FIND_LIBRARY(NVMATH_LIBRARY
|
FIND_LIBRARY(NVMATH_LIBRARY_RELEASE
|
||||||
NAMES nvmath
|
NAMES nvmath
|
||||||
PATHS
|
PATHS
|
||||||
/usr/local
|
/usr/local
|
||||||
@@ -79,7 +79,7 @@ FIND_LIBRARY(NVMATH_LIBRARY_DEBUG
|
|||||||
)
|
)
|
||||||
|
|
||||||
# NVCORE
|
# NVCORE
|
||||||
FIND_LIBRARY(NVCORE_LIBRARY
|
FIND_LIBRARY(NVCORE_LIBRARY_RELEASE
|
||||||
NAMES nvcore
|
NAMES nvcore
|
||||||
PATHS
|
PATHS
|
||||||
/usr/local
|
/usr/local
|
||||||
@@ -98,10 +98,114 @@ FIND_LIBRARY(NVCORE_LIBRARY_DEBUG
|
|||||||
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# NVTHREAD
|
||||||
|
FIND_LIBRARY(NVTHREAD_LIBRARY_RELEASE
|
||||||
|
NAMES nvthread
|
||||||
|
PATHS
|
||||||
|
/usr/local
|
||||||
|
/usr
|
||||||
|
$ENV{NVTT_DIR}
|
||||||
|
${3rdPartyRoot}
|
||||||
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
||||||
|
)
|
||||||
|
FIND_LIBRARY(NVTHREAD_LIBRARY_DEBUG
|
||||||
|
NAMES nvthread_d
|
||||||
|
PATHS
|
||||||
|
/usr/local
|
||||||
|
/usr
|
||||||
|
$ENV{NVTT_DIR}
|
||||||
|
${3rdPartyRoot}
|
||||||
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
||||||
|
)
|
||||||
|
|
||||||
|
# SQUISH
|
||||||
|
FIND_LIBRARY(NVSQUISH_LIBRARY_RELEASE
|
||||||
|
NAMES squish
|
||||||
|
PATHS
|
||||||
|
/usr/local
|
||||||
|
/usr
|
||||||
|
$ENV{NVTT_DIR}
|
||||||
|
${3rdPartyRoot}
|
||||||
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
||||||
|
)
|
||||||
|
FIND_LIBRARY(NVSQUISH_LIBRARY_DEBUG
|
||||||
|
NAMES squish_d
|
||||||
|
PATHS
|
||||||
|
/usr/local
|
||||||
|
/usr
|
||||||
|
$ENV{NVTT_DIR}
|
||||||
|
${3rdPartyRoot}
|
||||||
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
||||||
|
)
|
||||||
|
|
||||||
|
# BC6H
|
||||||
|
FIND_LIBRARY(NVBC6H_LIBRARY_RELEASE
|
||||||
|
NAMES bc6h
|
||||||
|
PATHS
|
||||||
|
/usr/local
|
||||||
|
/usr
|
||||||
|
$ENV{NVTT_DIR}
|
||||||
|
${3rdPartyRoot}
|
||||||
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
||||||
|
)
|
||||||
|
FIND_LIBRARY(NVBC6H_LIBRARY_DEBUG
|
||||||
|
NAMES bc6h_d
|
||||||
|
PATHS
|
||||||
|
/usr/local
|
||||||
|
/usr
|
||||||
|
$ENV{NVTT_DIR}
|
||||||
|
${3rdPartyRoot}
|
||||||
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
||||||
|
)
|
||||||
|
|
||||||
|
# BC7
|
||||||
|
FIND_LIBRARY(NVBC7_LIBRARY_RELEASE
|
||||||
|
NAMES bc7
|
||||||
|
PATHS
|
||||||
|
/usr/local
|
||||||
|
/usr
|
||||||
|
$ENV{NVTT_DIR}
|
||||||
|
${3rdPartyRoot}
|
||||||
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
||||||
|
)
|
||||||
|
FIND_LIBRARY(NVBC7_LIBRARY_DEBUG
|
||||||
|
NAMES bc7_d
|
||||||
|
PATHS
|
||||||
|
/usr/local
|
||||||
|
/usr
|
||||||
|
$ENV{NVTT_DIR}
|
||||||
|
${3rdPartyRoot}
|
||||||
|
PATH_SUFFIXES lib64 lib lib/shared lib/static lib64/static
|
||||||
|
)
|
||||||
|
|
||||||
|
IF (WIN32)
|
||||||
|
SET(LIBS_TO_SETUP "NVTT" "NVCORE" "NVMATH" "NVIMAGE" "NVTHREAD" "NVBC7" "NVBC6H" "NVSQUISH")
|
||||||
|
ELSE()
|
||||||
|
SET(LIBS_TO_SETUP "NVTT" "NVCORE" "NVMATH" "NVIMAGE")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
|
FOREACH(LIB ${LIBS_TO_SETUP})
|
||||||
|
IF(${LIB}_LIBRARY_DEBUG)
|
||||||
|
SET(${LIB}_LIBRARIES optimized ${${LIB}_LIBRARY_RELEASE} debug ${${LIB}_LIBRARY_DEBUG})
|
||||||
|
ELSE(${LIB}_LIBRARY_DEBUG)
|
||||||
|
SET(${LIB}_LIBRARY_DEBUG ${${LIB}_LIBRARY_RELEASE})
|
||||||
|
SET(${LIB}_LIBRARIES optimized ${${LIB}_LIBRARY_RELEASE} debug ${${LIB}_LIBRARY_DEBUG})
|
||||||
|
ENDIF(${LIB}_LIBRARY_DEBUG)
|
||||||
|
ENDFOREACH(LIB ${LIBS_TO_SETUP})
|
||||||
|
|
||||||
|
SET(NVTT_LIBRARIES
|
||||||
|
${NVTT_LIBRARIES}
|
||||||
|
${NVCORE_LIBRARIES}
|
||||||
|
${NVMATH_LIBRARIES}
|
||||||
|
${NVIMAGE_LIBRARIES}
|
||||||
|
${NVTHREAD_LIBRARIES}
|
||||||
|
${NVBC7_LIBRARIES}
|
||||||
|
${NVBC6H_LIBRARIES}
|
||||||
|
${NVSQUISH_LIBRARIES}
|
||||||
|
)
|
||||||
|
|
||||||
SET(NVTT_FOUND "NO")
|
SET(NVTT_FOUND "NO")
|
||||||
IF(NVTT_LIBRARY AND NVTT_INCLUDE_DIR)
|
IF(NVTT_LIBRARY_RELEASE AND NVTT_INCLUDE_DIR)
|
||||||
SET(NVTT_FOUND "YES")
|
SET(NVTT_FOUND "YES" )
|
||||||
ENDIF(NVTT_LIBRARY AND NVTT_INCLUDE_DIR)
|
ENDIF(NVTT_LIBRARY_RELEASE AND NVTT_INCLUDE_DIR)
|
||||||
|
|||||||
@@ -116,7 +116,6 @@ FIND_OSG_LIBRARY(OSGUTIL_LIBRARY osgUtil)
|
|||||||
FIND_OSG_LIBRARY(OSGDB_LIBRARY osgDB)
|
FIND_OSG_LIBRARY(OSGDB_LIBRARY osgDB)
|
||||||
FIND_OSG_LIBRARY(OSGTEXT_LIBRARY osgText)
|
FIND_OSG_LIBRARY(OSGTEXT_LIBRARY osgText)
|
||||||
FIND_OSG_LIBRARY(OSGWIDGET_LIBRARY osgWidget)
|
FIND_OSG_LIBRARY(OSGWIDGET_LIBRARY osgWidget)
|
||||||
FIND_OSG_LIBRARY(OSGQT_LIBRARY osgQt)
|
|
||||||
FIND_OSG_LIBRARY(OSGTERRAIN_LIBRARY osgTerrain)
|
FIND_OSG_LIBRARY(OSGTERRAIN_LIBRARY osgTerrain)
|
||||||
FIND_OSG_LIBRARY(OSGFX_LIBRARY osgFX)
|
FIND_OSG_LIBRARY(OSGFX_LIBRARY osgFX)
|
||||||
FIND_OSG_LIBRARY(OSGVIEWER_LIBRARY osgViewer)
|
FIND_OSG_LIBRARY(OSGVIEWER_LIBRARY osgViewer)
|
||||||
|
|||||||
173
CMakeModules/FindOpenCascade.cmake
Normal file
173
CMakeModules/FindOpenCascade.cmake
Normal file
@@ -0,0 +1,173 @@
|
|||||||
|
# LocateOPENCASCADE
|
||||||
|
# This module defines
|
||||||
|
# OPENCASCADE_LIBRARY
|
||||||
|
# OPENCASCADE_FOUND, if false, do not try to link to OPENCASCADE
|
||||||
|
# OPENCASCADE_INCLUDE_DIR, where to find the headers
|
||||||
|
#
|
||||||
|
# $OPENCASCADE_DIR is an environment variable that would
|
||||||
|
# correspond to the ./configure --prefix=$OPENCASCADE_DIR
|
||||||
|
# used in building OPENCASCADE.
|
||||||
|
|
||||||
|
FIND_PATH(OPENCASCADE_INCLUDE_DIR BRepMesh.hxx
|
||||||
|
PATHS
|
||||||
|
${OPENCASCADE_DIR}
|
||||||
|
$ENV{OPENCASCADE_DIR}
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local
|
||||||
|
/usr
|
||||||
|
/sw # Fink
|
||||||
|
/opt/local # DarwinPorts
|
||||||
|
/opt/csw # Blastwave
|
||||||
|
/opt
|
||||||
|
/usr/freeware
|
||||||
|
PATH_SUFFIXES
|
||||||
|
opencascade
|
||||||
|
inc
|
||||||
|
include
|
||||||
|
inc/cascade
|
||||||
|
include/cascade
|
||||||
|
)
|
||||||
|
|
||||||
|
MACRO(FIND_OPENCASCADE_LIBRARY MYLIBRARY MYLIBRARYNAME)
|
||||||
|
|
||||||
|
FIND_LIBRARY("${MYLIBRARY}"
|
||||||
|
NAMES "${MYLIBRARYNAME}"
|
||||||
|
PATHS
|
||||||
|
$ENV{OPENCASCADE_DIR}/lib}
|
||||||
|
$ENV{OPENCASCADE_LIB}
|
||||||
|
${OPENCASCADE_DIR}/lib
|
||||||
|
$ENV{OPENCASCADE_DIR}/lib
|
||||||
|
${OPENCASCADE_DIR}/lib/
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib
|
||||||
|
/sw/lib
|
||||||
|
/opt/local/lib
|
||||||
|
/opt/csw/lib
|
||||||
|
/opt/lib
|
||||||
|
/usr/freeware/lib64
|
||||||
|
)
|
||||||
|
|
||||||
|
ENDMACRO()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBinL TKBinL)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBin TKBin)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBinTObj TKBinTObj)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBinXCAF TKBinXCAF)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBool TKBool)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBO TKBO)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBRep TKBRep)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKCAF TKCAF)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKCDF TKCDF)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKernel TKernel)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKFeat TKFeat)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKFillet TKFillet)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKG2d TKG2d)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKG3d TKG3d)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKGeomAlgo TKGeomAlgo)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKGeomBase TKGeomBase)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKHLR TKHLR)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKIGES TKIGES)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKLCAF TKLCAF)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKMath TKMath)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKMesh TKMesh)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKMeshVS TKMeshVS)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKOffset TKOffset)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKOpenGl TKOpenGl)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKPrim TKPrim)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKService TKService)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKShHealing TKShHealing)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEP209 TKSTEP209)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEPAttr TKSTEPAttr)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEPBase TKSTEPBase)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEP TKSTEP)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTL TKSTL)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKTObj TKTObj)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKTopAlgo TKTopAlgo)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKV3d TKV3d)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKVRML TKVRML)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXDEIGES TKXDEIGES)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXDESTEP TKXDESTEP)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXMesh TKXMesh)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXmlL TKXmlL)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXml TKXml)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXmlTObj TKXmlTObj)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXmlXCAF TKXmlXCAF)
|
||||||
|
FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXSBase TKXSBase)
|
||||||
|
|
||||||
|
set (OPENCASCADE_LIBRARY_TYPE_DESCR
|
||||||
|
"Specifies the type of library to be used. 'Shared' libraries
|
||||||
|
are linked dynamically and loaded at runtime. 'Static' libraries
|
||||||
|
are archives of object files for use when linking other targets")
|
||||||
|
|
||||||
|
# set type of OCCT libraries
|
||||||
|
if (NOT OPENCASCADE_LIBRARY_TYPE)
|
||||||
|
set (OPENCASCADE_LIBRARY_TYPE "Static" CACHE STRING "${OPENCASCADE_LIBRARY_TYPE_DESCR}" FORCE)
|
||||||
|
SET_PROPERTY(CACHE OPENCASCADE_LIBRARY_TYPE PROPERTY STRINGS Shared Static)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if ("${OPENCASCADE_LIBRARY_TYPE}" STREQUAL "Shared")
|
||||||
|
|
||||||
|
SET(OPENCASCADE_LIBRARY ${OPENCASCADE_LIBRARY}
|
||||||
|
${OPENCASCADE_TKernel}
|
||||||
|
${OPENCASCADE_TKMath}
|
||||||
|
${OPENCASCADE_TKXCAF}
|
||||||
|
${OPENCASCADE_TKXSBase}
|
||||||
|
${OPENCASCADE_TKSTEPAttr}
|
||||||
|
${OPENCASCADE_TKSTEPBase}
|
||||||
|
${OPENCASCADE_TKSTEP209}
|
||||||
|
${OPENCASCADE_TKSTEP}
|
||||||
|
${OPENCASCADE_TKXDESTEP}
|
||||||
|
${OPENCASCADE_TKIGES}
|
||||||
|
${OPENCASCADE_TKXDEIGES}
|
||||||
|
${OPENCASCADE_TKLCAF}
|
||||||
|
${OPENCASCADE_TKBRep}
|
||||||
|
${OPENCASCADE_TKMesh}
|
||||||
|
${OPENCASCADE_TKTopAlgo}
|
||||||
|
${OPENCASCADE_TKShHealing}
|
||||||
|
)
|
||||||
|
else ("${OPENCASCADE_LIBRARY_TYPE}" STREQUAL "Shared")
|
||||||
|
SET(OPENCASCADE_LIBRARY ${OPENCASCADE_LIBRARY}
|
||||||
|
${OPENCASCADE_TKBO}
|
||||||
|
${OPENCASCADE_TKBool}
|
||||||
|
${OPENCASCADE_TKBRep}
|
||||||
|
${OPENCASCADE_TKCAF}
|
||||||
|
${OPENCASCADE_TKCDF}
|
||||||
|
${OPENCASCADE_TKernel}
|
||||||
|
${OPENCASCADE_TKG2d}
|
||||||
|
${OPENCASCADE_TKG3d}
|
||||||
|
${OPENCASCADE_TKGeomAlgo}
|
||||||
|
${OPENCASCADE_TKGeomBase}
|
||||||
|
${OPENCASCADE_TKHLR}
|
||||||
|
${OPENCASCADE_TKIGES}
|
||||||
|
${OPENCASCADE_TKLCAF}
|
||||||
|
${OPENCASCADE_TKMath}
|
||||||
|
${OPENCASCADE_TKMesh}
|
||||||
|
${OPENCASCADE_TKPrim}
|
||||||
|
${OPENCASCADE_TKService}
|
||||||
|
${OPENCASCADE_TKShHealing}
|
||||||
|
${OPENCASCADE_TKSTEP}
|
||||||
|
${OPENCASCADE_TKSTEP209}
|
||||||
|
${OPENCASCADE_TKSTEPAttr}
|
||||||
|
${OPENCASCADE_TKSTEPBase}
|
||||||
|
${OPENCASCADE_TKTopAlgo}
|
||||||
|
${OPENCASCADE_TKV3d}
|
||||||
|
${OPENCASCADE_TKXCAF}
|
||||||
|
${OPENCASCADE_TKXDEIGES}
|
||||||
|
${OPENCASCADE_TKXDESTEP}
|
||||||
|
${OPENCASCADE_TKXSBase}
|
||||||
|
)
|
||||||
|
endif ("${OPENCASCADE_LIBRARY_TYPE}" STREQUAL "Shared")
|
||||||
|
|
||||||
|
SET(OPENCASCADE_FOUND "NO")
|
||||||
|
IF(OPENCASCADE_LIBRARY AND OPENCASCADE_INCLUDE_DIR)
|
||||||
|
SET(OPENCASCADE_FOUND "YES")
|
||||||
|
ENDIF(OPENCASCADE_LIBRARY AND OPENCASCADE_INCLUDE_DIR)
|
||||||
|
|
||||||
|
IF(OPENCASCADE_INCLUDE_DIR)
|
||||||
|
SET(OPENCASCADE_FOUND "YES")
|
||||||
|
ENDIF(OPENCASCADE_INCLUDE_DIR)
|
||||||
@@ -28,7 +28,7 @@ FIND_PATH(OPENEXR_INCLUDE_DIR OpenEXR/ImfIO.h
|
|||||||
# example: OPENEXR_FIND_VAR(OPENEXR_IlmImf_LIBRARY IlmImf)
|
# example: OPENEXR_FIND_VAR(OPENEXR_IlmImf_LIBRARY IlmImf)
|
||||||
MACRO(OPENEXR_FIND_VAR varname libname)
|
MACRO(OPENEXR_FIND_VAR varname libname)
|
||||||
FIND_LIBRARY( ${varname}
|
FIND_LIBRARY( ${varname}
|
||||||
NAMES ${libname}
|
NAMES ${libname} ${libname}-2_1 ${libname}-2_2
|
||||||
PATHS
|
PATHS
|
||||||
$ENV{OPENEXR_DIR}/lib
|
$ENV{OPENEXR_DIR}/lib
|
||||||
$ENV{OPENEXR_DIR}
|
$ENV{OPENEXR_DIR}
|
||||||
@@ -52,13 +52,10 @@ MACRO(OPENEXR_FIND libname)
|
|||||||
ENDMACRO(OPENEXR_FIND)
|
ENDMACRO(OPENEXR_FIND)
|
||||||
|
|
||||||
OPENEXR_FIND(IlmImf)
|
OPENEXR_FIND(IlmImf)
|
||||||
OPENEXR_FIND(IlmThread)
|
|
||||||
OPENEXR_FIND(Iex)
|
|
||||||
OPENEXR_FIND(Half)
|
|
||||||
|
|
||||||
SET(OPENEXR_FOUND "NO")
|
SET(OPENEXR_FOUND "NO")
|
||||||
IF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmImf_LIBRARY AND OPENEXR_IlmThread_LIBRARY AND OPENEXR_Iex_LIBRARY AND OPENEXR_Half_LIBRARY)
|
IF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmImf_LIBRARY)
|
||||||
SET(OPENEXR_LIBRARIES ${OPENEXR_IlmImf_LIBRARY} ${OPENEXR_IlmThread_LIBRARY} ${OPENEXR_Half_LIBRARY} ${OPENEXR_Iex_LIBRARY} )
|
SET(OPENEXR_LIBRARIES ${OPENEXR_IlmImf_LIBRARY} )
|
||||||
SET(OPENEXR_LIBRARIES_VARS OPENEXR_IlmImf_LIBRARY OPENEXR_IlmThread_LIBRARY OPENEXR_Half_LIBRARY OPENEXR_Iex_LIBRARY )
|
SET(OPENEXR_LIBRARIES_VARS OPENEXR_IlmImf_LIBRARY )
|
||||||
SET(OPENEXR_FOUND "YES")
|
SET(OPENEXR_FOUND "YES")
|
||||||
ENDIF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmImf_LIBRARY AND OPENEXR_IlmThread_LIBRARY AND OPENEXR_Iex_LIBRARY AND OPENEXR_Half_LIBRARY)
|
ENDIF(OPENEXR_INCLUDE_DIR AND OPENEXR_IlmImf_LIBRARY)
|
||||||
|
|||||||
@@ -1,270 +0,0 @@
|
|||||||
# - find DCMTK libraries
|
|
||||||
#
|
|
||||||
|
|
||||||
# DCMTK_INCLUDE_DIRS - Directories to include to use DCMTK
|
|
||||||
# DCMTK_LIBRARIES - Files to link against to use DCMTK
|
|
||||||
# DCMTK_FOUND - If false, don't try to use DCMTK
|
|
||||||
# DCMTK_DIR - (optional) Source directory for DCMTK
|
|
||||||
#
|
|
||||||
# DCMTK_DIR can be used to make it simpler to find the various include
|
|
||||||
# directories and compiled libraries if you've just compiled it in the
|
|
||||||
# source tree. Just set it to the root of the tree where you extracted
|
|
||||||
# the source.
|
|
||||||
#
|
|
||||||
# Written for VXL by Amitha Perera.
|
|
||||||
# Modified by Robert Osfied to enable support for install placements of DCMTK 3.5.4 versions onwards
|
|
||||||
|
|
||||||
FIND_PATH( DCMTK_ROOT_INCLUDE_DIR dcmtk/config/osconfig.h
|
|
||||||
${DCMTK_DIR}/config/include
|
|
||||||
${DCMTK_DIR}/include
|
|
||||||
/usr/local/dicom/include
|
|
||||||
/usr/local/include/
|
|
||||||
/usr/include/
|
|
||||||
/usr/local/dicom/include/
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_PATH( DCMTK_config_INCLUDE_DIR osconfig.h
|
|
||||||
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/config
|
|
||||||
${DCMTK_DIR}/config/include
|
|
||||||
${DCMTK_DIR}/include
|
|
||||||
/usr/local/dicom/include
|
|
||||||
/usr/local/include/dcmtk/config
|
|
||||||
/usr/include/dcmtk/config
|
|
||||||
/usr/local/dicom/include/dcmtk/config
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_PATH( DCMTK_ofstd_INCLUDE_DIR ofstdinc.h
|
|
||||||
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/ofstd
|
|
||||||
${DCMTK_DIR}/ofstd/include
|
|
||||||
${DCMTK_DIR}/include/ofstd
|
|
||||||
/usr/local/dicom/include/dcmtk/ofstd
|
|
||||||
/usr/local/include/dcmtk/ofstd
|
|
||||||
/usr/include/dcmtk/ofstd
|
|
||||||
/usr/local/dicom/include/dcmtk/ofstd
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY( DCMTK_ofstd_LIBRARY ofstd
|
|
||||||
PATHS
|
|
||||||
${DCMTK_DIR}/ofstd/libsrc
|
|
||||||
${DCMTK_DIR}/ofstd/libsrc/Release
|
|
||||||
${DCMTK_DIR}/ofstd/libsrc/Debug
|
|
||||||
${DCMTK_DIR}/ofstd/Release
|
|
||||||
${DCMTK_DIR}/ofstd/Debug
|
|
||||||
${DCMTK_DIR}/lib
|
|
||||||
/usr/local/dicom/lib
|
|
||||||
/usr/local/lib64
|
|
||||||
/usr/lib64
|
|
||||||
/usr/local/lib
|
|
||||||
/usr/lib
|
|
||||||
/usr/local/dicom/lib
|
|
||||||
PATH_SUFFIXES dcmtk
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH( DCMTK_dcmdata_INCLUDE_DIR dctypes.h
|
|
||||||
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/dcmdata
|
|
||||||
${DCMTK_DIR}/dcmdata/include
|
|
||||||
${DCMTK_DIR}/include/dcmdata
|
|
||||||
/usr/local/dicom/include/dcmtk/dcmdata
|
|
||||||
/usr/local/include/dcmtk/dcmdata
|
|
||||||
/usr/include/dcmtk/dcmdata
|
|
||||||
/usr/local/dicom/include/dcmtk/dcmdata
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY( DCMTK_dcmdata_LIBRARY dcmdata
|
|
||||||
PATHS
|
|
||||||
${DCMTK_DIR}/dcmdata/libsrc
|
|
||||||
${DCMTK_DIR}/dcmdata/libsrc/Release
|
|
||||||
${DCMTK_DIR}/dcmdata/libsrc/Debug
|
|
||||||
${DCMTK_DIR}/dcmdata/Release
|
|
||||||
${DCMTK_DIR}/dcmdata/Debug
|
|
||||||
${DCMTK_DIR}/lib
|
|
||||||
/usr/local/dicom/lib
|
|
||||||
/usr/local/lib64
|
|
||||||
/usr/lib64
|
|
||||||
/usr/local/lib
|
|
||||||
/usr/lib
|
|
||||||
/usr/local/dicom/lib
|
|
||||||
PATH_SUFFIXES dcmtk
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH( DCMTK_dcmimgle_INCLUDE_DIR dcmimage.h
|
|
||||||
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/dcmimgle
|
|
||||||
${DCMTK_DIR}/dcmimgle/include
|
|
||||||
${DCMTK_DIR}/include/dcmimgle
|
|
||||||
/usr/local/dicom/include/dcmtk/dcmimgle
|
|
||||||
/usr/local/include/dcmtk/dcmimgle
|
|
||||||
/usr/include/dcmtk/dcmimgle
|
|
||||||
/usr/local/dicom/include/dcmtk/dcmimgle
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY( DCMTK_dcmimgle_LIBRARY dcmimgle
|
|
||||||
PATHS
|
|
||||||
${DCMTK_DIR}/dcmimgle/libsrc
|
|
||||||
${DCMTK_DIR}/dcmimgle/libsrc/Release
|
|
||||||
${DCMTK_DIR}/dcmimgle/libsrc/Debug
|
|
||||||
${DCMTK_DIR}/dcmimgle/Release
|
|
||||||
${DCMTK_DIR}/dcmimgle/Debug
|
|
||||||
${DCMTK_DIR}/lib
|
|
||||||
/usr/local/dicom/lib
|
|
||||||
/usr/local/lib64
|
|
||||||
/usr/lib64
|
|
||||||
/usr/local/lib
|
|
||||||
/usr/lib
|
|
||||||
/usr/local/dicom/lib
|
|
||||||
PATH_SUFFIXES dcmtk
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_PATH( DCMTK_dcmimage_INCLUDE_DIR diregist.h
|
|
||||||
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/dcmimage
|
|
||||||
${DCMTK_DIR}/dcmimage/include
|
|
||||||
${DCMTK_DIR}/include/dcmimage
|
|
||||||
/usr/local/dicom/include/dcmtk/dcmimage
|
|
||||||
/usr/local/include/dcmtk/dcmimage
|
|
||||||
/usr/include/dcmtk/dcmimage
|
|
||||||
/usr/local/dicom/include/dcmtk/dcmimage
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY( DCMTK_dcmimage_LIBRARY dcmimage
|
|
||||||
PATHS
|
|
||||||
${DCMTK_DIR}/dcmimage/libsrc
|
|
||||||
${DCMTK_DIR}/dcmimage/libsrc/Release
|
|
||||||
${DCMTK_DIR}/dcmimage/libsrc/Debug
|
|
||||||
${DCMTK_DIR}/dcmimage/Release
|
|
||||||
${DCMTK_DIR}/dcmimage/Debug
|
|
||||||
${DCMTK_DIR}/lib
|
|
||||||
/usr/local/dicom/lib
|
|
||||||
/usr/local/lib64
|
|
||||||
/usr/lib64
|
|
||||||
/usr/local/lib
|
|
||||||
/usr/lib
|
|
||||||
/usr/local/dicom/lib
|
|
||||||
PATH_SUFFIXES dcmtk
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY(DCMTK_imagedb_LIBRARY imagedb
|
|
||||||
PATHS
|
|
||||||
${DCMTK_DIR}/imagectn/libsrc/Release
|
|
||||||
${DCMTK_DIR}/imagectn/libsrc/
|
|
||||||
${DCMTK_DIR}/imagectn/libsrc/Debug
|
|
||||||
${DCMTK_DIR}/lib
|
|
||||||
/usr/local/dicom/lib
|
|
||||||
/usr/local/lib64
|
|
||||||
/usr/lib64
|
|
||||||
/usr/local/lib
|
|
||||||
/usr/lib
|
|
||||||
/usr/local/dicom/lib
|
|
||||||
PATH_SUFFIXES dcmtk
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY(DCMTK_dcmnet_LIBRARY dcmnet
|
|
||||||
PATHS
|
|
||||||
${DCMTK_DIR}/dcmnet/libsrc/Release
|
|
||||||
${DCMTK_DIR}/dcmnet/libsrc/Debug
|
|
||||||
${DCMTK_DIR}/dcmnet/libsrc/
|
|
||||||
${DCMTK_DIR}/lib
|
|
||||||
/usr/local/dicom/lib
|
|
||||||
/usr/local/lib64
|
|
||||||
/usr/lib64
|
|
||||||
/usr/local/lib
|
|
||||||
/usr/lib
|
|
||||||
/usr/local/dicom/lib
|
|
||||||
PATH_SUFFIXES dcmtk
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY(DCMTK_oflog_LIBRARY oflog
|
|
||||||
PATHS
|
|
||||||
${DCMTK_DIR}/dcmnet/libsrc/Release
|
|
||||||
${DCMTK_DIR}/dcmnet/libsrc/Debug
|
|
||||||
${DCMTK_DIR}/dcmnet/libsrc/
|
|
||||||
${DCMTK_DIR}/lib
|
|
||||||
/usr/local/dicom/lib
|
|
||||||
/usr/local/lib64
|
|
||||||
/usr/lib64
|
|
||||||
/usr/local/lib
|
|
||||||
/usr/lib
|
|
||||||
/usr/local/dicom/lib
|
|
||||||
PATH_SUFFIXES dcmtk
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY(DCMTK_ofstd_LIBRARY ofstd
|
|
||||||
PATHS
|
|
||||||
${DCMTK_DIR}/dcmnet/libsrc/Release
|
|
||||||
${DCMTK_DIR}/dcmnet/libsrc/Debug
|
|
||||||
${DCMTK_DIR}/dcmnet/libsrc/
|
|
||||||
${DCMTK_DIR}/lib
|
|
||||||
/usr/local/dicom/lib
|
|
||||||
/usr/local/lib64
|
|
||||||
/usr/lib64
|
|
||||||
/usr/local/lib
|
|
||||||
/usr/lib
|
|
||||||
/usr/local/dicom/lib
|
|
||||||
PATH_SUFFIXES dcmtk
|
|
||||||
)
|
|
||||||
|
|
||||||
IF( DCMTK_config_INCLUDE_DIR
|
|
||||||
AND DCMTK_ofstd_INCLUDE_DIR
|
|
||||||
AND DCMTK_ofstd_LIBRARY
|
|
||||||
AND DCMTK_dcmdata_INCLUDE_DIR
|
|
||||||
AND DCMTK_dcmdata_LIBRARY
|
|
||||||
AND DCMTK_dcmimgle_INCLUDE_DIR
|
|
||||||
AND DCMTK_dcmimgle_LIBRARY
|
|
||||||
AND DCMTK_dcmimage_INCLUDE_DIR
|
|
||||||
AND DCMTK_dcmimage_LIBRARY )
|
|
||||||
|
|
||||||
SET( DCMTK_FOUND "YES" )
|
|
||||||
SET( DCMTK_INCLUDE_DIRS
|
|
||||||
${DCMTK_config_INCLUDE_DIR}
|
|
||||||
${DCMTK_ofstd_INCLUDE_DIR}
|
|
||||||
${DCMTK_dcmdata_INCLUDE_DIR}
|
|
||||||
${DCMTK_dcmimgle_INCLUDE_DIR}
|
|
||||||
${DCMTK_dcmimage_INCLUDE_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
SET( DCMTK_LIBRARIES
|
|
||||||
${DCMTK_dcmimgle_LIBRARY}
|
|
||||||
${DCMTK_dcmimage_LIBRARY}
|
|
||||||
${DCMTK_dcmdata_LIBRARY}
|
|
||||||
${DCMTK_ofstd_LIBRARY}
|
|
||||||
${DCMTK_config_LIBRARY}
|
|
||||||
)
|
|
||||||
|
|
||||||
IF(DCMTK_imagedb_LIBRARY)
|
|
||||||
SET( DCMTK_LIBRARIES
|
|
||||||
${DCMTK_LIBRARIES}
|
|
||||||
${DCMTK_imagedb_LIBRARY}
|
|
||||||
)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF(DCMTK_dcmnet_LIBRARY)
|
|
||||||
SET( DCMTK_LIBRARIES
|
|
||||||
${DCMTK_LIBRARIES}
|
|
||||||
${DCMTK_dcmnet_LIBRARY}
|
|
||||||
)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF(DCMTK_oflog_LIBRARY)
|
|
||||||
SET( DCMTK_LIBRARIES
|
|
||||||
${DCMTK_LIBRARIES}
|
|
||||||
${DCMTK_oflog_LIBRARY}
|
|
||||||
)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF(DCMTK_ofstd_LIBRARY)
|
|
||||||
SET( DCMTK_LIBRARIES
|
|
||||||
${DCMTK_LIBRARIES}
|
|
||||||
${DCMTK_ofstd_LIBRARY}
|
|
||||||
)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF( WIN32 )
|
|
||||||
SET( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} netapi32 )
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF( NOT DCMTK_FOUND )
|
|
||||||
SET( DCMTK_DIR "" CACHE PATH "Root of DCMTK source tree (optional)." )
|
|
||||||
MARK_AS_ADVANCED( DCMTK_DIR )
|
|
||||||
ENDIF()
|
|
||||||
@@ -55,19 +55,20 @@ ELSE()
|
|||||||
#Quicktime is not supported under 64bit OSX build so we need to detect it and disable it.
|
#Quicktime is not supported under 64bit OSX build so we need to detect it and disable it.
|
||||||
#First check to see if we are running with a native 64-bit compiler (10.6 default) and implicit arch
|
#First check to see if we are running with a native 64-bit compiler (10.6 default) and implicit arch
|
||||||
IF(NOT CMAKE_OSX_ARCHITECTURES AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
IF(NOT CMAKE_OSX_ARCHITECTURES AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
SET(QUICKTIME_FOUND "NO")
|
MESSAGE("Disabling QuickTime on 64-bit architectures")
|
||||||
|
SET(QUICKTIME_FOUND "NO")
|
||||||
|
ELSEIF(OSG_OSX_VERSION VERSION_GREATER 10.6)
|
||||||
|
# Quicktime officially deprecated starting 10.7
|
||||||
|
MESSAGE("Disabling QuickTime because it's not supported by the selected SDK ${OSG_OSX_VERSION}")
|
||||||
|
SET(QUICKTIME_FOUND "NO")
|
||||||
ELSE()
|
ELSE()
|
||||||
#Otherwise check to see if 64-bit is explicitly called for.
|
#Otherwise check to see if 64-bit is explicitly called for.
|
||||||
LIST(FIND CMAKE_OSX_ARCHITECTURES "x86_64" has64Compile)
|
LIST(FIND CMAKE_OSX_ARCHITECTURES "x86_64" has64Compile)
|
||||||
IF(NOT has64Compile EQUAL -1)
|
IF(NOT has64Compile EQUAL -1)
|
||||||
SET(QUICKTIME_FOUND "NO")
|
MESSAGE("Disabling QuickTime on 64-bit architectures")
|
||||||
ENDIF()
|
|
||||||
ENDIF()
|
|
||||||
# Disable quicktime for >= 10.7, as it's officially deprecated
|
|
||||||
|
|
||||||
IF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.7" OR ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.8" OR ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.9" OR ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.10")
|
|
||||||
MESSAGE("disabling quicktime because it's not supported by the selected SDK ${OSG_OSX_SDK_NAME}")
|
|
||||||
SET(QUICKTIME_FOUND "NO")
|
SET(QUICKTIME_FOUND "NO")
|
||||||
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
# Locate zlib
|
|
||||||
# This module defines
|
|
||||||
# ZLIB_LIBRARY
|
|
||||||
# ZLIB_FOUND, if false, do not try to link to zlib
|
|
||||||
# ZLIB_INCLUDE_DIR, where to find the headers
|
|
||||||
#
|
|
||||||
# $ZLIB_DIR is an environment variable that would
|
|
||||||
# correspond to the ./configure --prefix=$ZLIB_DIR
|
|
||||||
# used in building zlib.
|
|
||||||
#
|
|
||||||
# Created by Ulrich Hertlein.
|
|
||||||
|
|
||||||
# prefer FindZLIB from cmake distribution
|
|
||||||
if(EXISTS ${CMAKE_ROOT}/Modules/FindZLIB.cmake)
|
|
||||||
include(${CMAKE_ROOT}/Modules/FindZLIB.cmake)
|
|
||||||
|
|
||||||
if(ZLIB_FOUND)
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
|
|
||||||
$ENV{ZLIB_DIR}/include
|
|
||||||
$ENV{ZLIB_DIR}
|
|
||||||
~/Library/Frameworks
|
|
||||||
/Library/Frameworks
|
|
||||||
/usr/local/include
|
|
||||||
/usr/include
|
|
||||||
/sw/include # Fink
|
|
||||||
/opt/local/include # DarwinPorts
|
|
||||||
/opt/csw/include # Blastwave
|
|
||||||
/opt/include
|
|
||||||
/usr/freeware/include
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY(ZLIB_LIBRARY
|
|
||||||
NAMES z libz zlib
|
|
||||||
PATHS
|
|
||||||
$ENV{ZLIB_DIR}/lib
|
|
||||||
$ENV{ZLIB_DIR}
|
|
||||||
~/Library/Frameworks
|
|
||||||
/Library/Frameworks
|
|
||||||
/usr/local/lib
|
|
||||||
/usr/lib
|
|
||||||
/sw/lib
|
|
||||||
/opt/local/lib
|
|
||||||
/opt/csw/lib
|
|
||||||
/opt/lib
|
|
||||||
/usr/freeware/lib64
|
|
||||||
)
|
|
||||||
|
|
||||||
SET(ZLIB_FOUND "NO")
|
|
||||||
IF(ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
|
|
||||||
SET(ZLIB_FOUND "YES")
|
|
||||||
ENDIF(ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
|
|
||||||
|
|
||||||
|
|
||||||
63
CMakeModules/Findilmbase.cmake
Normal file
63
CMakeModules/Findilmbase.cmake
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
# Locate ILMBASE
|
||||||
|
# This module defines
|
||||||
|
# ILMBASE_LIBRARY
|
||||||
|
# ILMBASE_FOUND, if false, do not try to link to ILMBASE
|
||||||
|
# ILMBASE_INCLUDE_DIR, where to find the headers
|
||||||
|
#
|
||||||
|
# $ILMBASE_DIR is an environment variable that would
|
||||||
|
# correspond to the ./configure --prefix=$ILMBASE_DIR
|
||||||
|
#
|
||||||
|
# Created by Robert Osfield.
|
||||||
|
|
||||||
|
|
||||||
|
FIND_PATH(ILMBASE_INCLUDE_DIR OpenEXR/ImathVec.h
|
||||||
|
$ENV{ILMBASE_DIR}/include
|
||||||
|
$ENV{ILMBASE_DIR}
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local/include
|
||||||
|
/usr/include
|
||||||
|
/sw/include # Fink
|
||||||
|
/opt/local/include # DarwinPorts
|
||||||
|
/opt/csw/include # Blastwave
|
||||||
|
/opt/include
|
||||||
|
/usr/freeware/include
|
||||||
|
)
|
||||||
|
|
||||||
|
# Macro to find ilmbase libraries
|
||||||
|
# example: ILMBASE_FIND_VAR(OPENEXR_IlmThread_LIBRARY IlmThread)
|
||||||
|
MACRO(ILMBASE_FIND_VAR varname libname)
|
||||||
|
FIND_LIBRARY( ${varname}
|
||||||
|
NAMES ${libname} ${libname}-2_1 ${libname}-2_2
|
||||||
|
PATHS
|
||||||
|
$ENV{ILMBASE_DIR}/lib
|
||||||
|
$ENV{ILMBASE_DIR}
|
||||||
|
~/Library/Frameworks
|
||||||
|
/Library/Frameworks
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib
|
||||||
|
/sw/lib
|
||||||
|
/opt/local/lib
|
||||||
|
/opt/csw/lib
|
||||||
|
/opt/lib
|
||||||
|
/usr/freeware/lib64
|
||||||
|
)
|
||||||
|
ENDMACRO(ILMBASE_FIND_VAR)
|
||||||
|
|
||||||
|
# Macro to find exr libraries (and debug versions)
|
||||||
|
# example: ILMBASE_FIND(OPENEXR_IlmThread_LIBRARY IlmThread)
|
||||||
|
MACRO(ILMBASE_FIND libname)
|
||||||
|
ILMBASE_FIND_VAR(ILMBASE_${libname}_LIBRARY ${libname})
|
||||||
|
ILMBASE_FIND_VAR(ILMBASE_${libname}_LIBRARY_DEBUG ${libname}d)
|
||||||
|
ENDMACRO(ILMBASE_FIND)
|
||||||
|
|
||||||
|
ILMBASE_FIND(IlmThread)
|
||||||
|
ILMBASE_FIND(Iex)
|
||||||
|
ILMBASE_FIND(Half)
|
||||||
|
|
||||||
|
SET(ILMBASE_FOUND "NO")
|
||||||
|
IF(ILMBASE_INCLUDE_DIR AND ILMBASE_IlmThread_LIBRARY AND ILMBASE_Iex_LIBRARY AND ILMBASE_Half_LIBRARY)
|
||||||
|
SET(ILMBASE_LIBRARIES ${ILMBASE_IlmThread_LIBRARY} ${ILMBASE_Half_LIBRARY} ${ILMBASE_Iex_LIBRARY} )
|
||||||
|
SET(ILMBASE_LIBRARIES_VARS ILMBASE_IlmThread_LIBRARY ILMBASE_Half_LIBRARY ILMBASE_Iex_LIBRARY )
|
||||||
|
SET(ILMBASE_FOUND "YES")
|
||||||
|
ENDIF(ILMBASE_INCLUDE_DIR AND ILMBASE_IlmThread_LIBRARY AND ILMBASE_Iex_LIBRARY AND ILMBASE_Half_LIBRARY)
|
||||||
@@ -32,6 +32,12 @@ INSTALL(
|
|||||||
ARCHIVE DESTINATION ${INSTALL_ARCHIVEDIR} COMPONENT libopenscenegraph-dev
|
ARCHIVE DESTINATION ${INSTALL_ARCHIVEDIR} COMPONENT libopenscenegraph-dev
|
||||||
)
|
)
|
||||||
|
|
||||||
|
IF(MSVC AND DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
GET_TARGET_PROPERTY(PREFIX ${LIB_NAME} PREFIX)
|
||||||
|
INSTALL(FILES ${OUTPUT_BINDIR}/${PREFIX}${LIB_NAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph CONFIGURATIONS RelWithDebInfo)
|
||||||
|
INSTALL(FILES ${OUTPUT_BINDIR}/${PREFIX}${LIB_NAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION ${INSTALL_BINDIR} COMPONENT libopenscenegraph CONFIGURATIONS Debug)
|
||||||
|
ENDIF(MSVC AND DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
|
||||||
IF(NOT OSG_COMPILE_FRAMEWORKS)
|
IF(NOT OSG_COMPILE_FRAMEWORKS)
|
||||||
INSTALL (
|
INSTALL (
|
||||||
FILES ${TARGET_H}
|
FILES ${TARGET_H}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ MACRO(ANDROID_3RD_PARTY)
|
|||||||
#JPEG
|
#JPEG
|
||||||
################################################
|
################################################
|
||||||
FIND_PATH(JPEG_INCLUDE_DIR Android.mk
|
FIND_PATH(JPEG_INCLUDE_DIR Android.mk
|
||||||
${CMAKE_SOURCE_DIR}/3rdparty/libjpeg
|
${CMAKE_SOURCE_DIR}/3rdparty/libjpeg NO_CMAKE_FIND_ROOT_PATH
|
||||||
)
|
)
|
||||||
#set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libjpeg")
|
#set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libjpeg")
|
||||||
#set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${JPEG_INCLUDE_DIR}/Android.mk \n")
|
#set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${JPEG_INCLUDE_DIR}/Android.mk \n")
|
||||||
@@ -82,7 +82,7 @@ MACRO(ANDROID_3RD_PARTY)
|
|||||||
#PNG
|
#PNG
|
||||||
################################################
|
################################################
|
||||||
FIND_PATH(PNG_INCLUDE_DIR Android.mk
|
FIND_PATH(PNG_INCLUDE_DIR Android.mk
|
||||||
${CMAKE_SOURCE_DIR}/3rdparty/libpng
|
${CMAKE_SOURCE_DIR}/3rdparty/libpng NO_CMAKE_FIND_ROOT_PATH
|
||||||
)
|
)
|
||||||
#set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libpng")
|
#set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libpng")
|
||||||
#set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${PNG_INCLUDE_DIR}/Android.mk \n")
|
#set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${PNG_INCLUDE_DIR}/Android.mk \n")
|
||||||
@@ -97,7 +97,7 @@ MACRO(ANDROID_3RD_PARTY)
|
|||||||
#GIF
|
#GIF
|
||||||
################################################
|
################################################
|
||||||
FIND_PATH(GIFLIB_INCLUDE_DIR Android.mk
|
FIND_PATH(GIFLIB_INCLUDE_DIR Android.mk
|
||||||
${CMAKE_SOURCE_DIR}/3rdparty/giflib
|
${CMAKE_SOURCE_DIR}/3rdparty/giflib NO_CMAKE_FIND_ROOT_PATH
|
||||||
)
|
)
|
||||||
#set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libgif")
|
#set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libgif")
|
||||||
#set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${GIFLIB_INCLUDE_DIR}/Android.mk \n")
|
#set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${GIFLIB_INCLUDE_DIR}/Android.mk \n")
|
||||||
@@ -112,7 +112,7 @@ MACRO(ANDROID_3RD_PARTY)
|
|||||||
#TIF
|
#TIF
|
||||||
################################################
|
################################################
|
||||||
FIND_PATH(TIFF_INCLUDE_DIR Android.mk
|
FIND_PATH(TIFF_INCLUDE_DIR Android.mk
|
||||||
${CMAKE_SOURCE_DIR}/3rdparty/libtiff
|
${CMAKE_SOURCE_DIR}/3rdparty/libtiff NO_CMAKE_FIND_ROOT_PATH
|
||||||
)
|
)
|
||||||
#set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libtiff")
|
#set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libtiff")
|
||||||
#set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${TIFF_INCLUDE_DIR}/Android.mk \n")
|
#set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${TIFF_INCLUDE_DIR}/Android.mk \n")
|
||||||
@@ -142,7 +142,7 @@ MACRO(ANDROID_3RD_PARTY)
|
|||||||
#CURL
|
#CURL
|
||||||
################################################
|
################################################
|
||||||
FIND_PATH(CURL_DIR Android.mk
|
FIND_PATH(CURL_DIR Android.mk
|
||||||
${CMAKE_SOURCE_DIR}/3rdparty/curl
|
${CMAKE_SOURCE_DIR}/3rdparty/curl NO_CMAKE_FIND_ROOT_PATH
|
||||||
)
|
)
|
||||||
#set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libcurl")
|
#set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libcurl")
|
||||||
#set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${CURL_DIR}/Android.mk \n")
|
#set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${CURL_DIR}/Android.mk \n")
|
||||||
@@ -159,11 +159,11 @@ MACRO(ANDROID_3RD_PARTY)
|
|||||||
#FREETYPE
|
#FREETYPE
|
||||||
################################################
|
################################################
|
||||||
FIND_PATH(FREETYPE_DIR Android.mk
|
FIND_PATH(FREETYPE_DIR Android.mk
|
||||||
${CMAKE_SOURCE_DIR}/3rdparty/freetype
|
${CMAKE_SOURCE_DIR}/3rdparty/freetype NO_CMAKE_FIND_ROOT_PATH
|
||||||
)
|
)
|
||||||
#set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libft2")
|
#set(ENV{AND_OSG_LIB_NAMES} "$ENV{AND_OSG_LIB_NAMES} libft2")
|
||||||
#set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${FREETYPE_DIR}/Android.mk \n")
|
#set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${FREETYPE_DIR}/Android.mk \n")
|
||||||
set(FREETYPE_INCLUDE_DIRS "${FREETYPE_DIR}/include ${FREETYPE_DIR}/include/freetype/config")
|
set(FREETYPE_INCLUDE_DIRS ${FREETYPE_DIR}/include ${FREETYPE_DIR}/include/freetype/config)
|
||||||
if(FREETYPE_DIR)
|
if(FREETYPE_DIR)
|
||||||
message(STATUS "FREETYPE found ${FREETYPE_DIR}" )
|
message(STATUS "FREETYPE found ${FREETYPE_DIR}" )
|
||||||
set(FREETYPE_FOUND "Yes")
|
set(FREETYPE_FOUND "Yes")
|
||||||
@@ -175,7 +175,7 @@ MACRO(ANDROID_3RD_PARTY)
|
|||||||
#GDAL
|
#GDAL
|
||||||
################################################
|
################################################
|
||||||
FIND_PATH(GDAL_DIR gdal.h
|
FIND_PATH(GDAL_DIR gdal.h
|
||||||
${CMAKE_SOURCE_DIR}/3rdparty/gdal/include
|
${CMAKE_SOURCE_DIR}/3rdparty/gdal/include NO_CMAKE_FIND_ROOT_PATH
|
||||||
)
|
)
|
||||||
set(GDAL_INCLUDE_DIR "${GDAL_DIR}")
|
set(GDAL_INCLUDE_DIR "${GDAL_DIR}")
|
||||||
if(GDAL_DIR)
|
if(GDAL_DIR)
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ ENDIF()
|
|||||||
SET(CPACK_SOURCE_GENERATOR "TGZ")
|
SET(CPACK_SOURCE_GENERATOR "TGZ")
|
||||||
|
|
||||||
|
|
||||||
# for ms visual studio we use it's internally defined variable to get the configuration (debug,release, ...)
|
# for ms visual studio we use it's internally defined variable to get the configuration (debug,release, ...)
|
||||||
IF(MSVC_IDE)
|
IF(MSVC_IDE)
|
||||||
SET(OSG_CPACK_CONFIGURATION "$(OutDir)")
|
SET(OSG_CPACK_CONFIGURATION "$(OutDir)")
|
||||||
SET(PACKAGE_TARGET_PREFIX "Package ")
|
SET(PACKAGE_TARGET_PREFIX "Package ")
|
||||||
@@ -84,9 +84,87 @@ ENDIF()
|
|||||||
SET(PACKAGE_ALL_TARGETNAME "${PACKAGE_TARGET_PREFIX}ALL")
|
SET(PACKAGE_ALL_TARGETNAME "${PACKAGE_TARGET_PREFIX}ALL")
|
||||||
ADD_CUSTOM_TARGET(${PACKAGE_ALL_TARGETNAME})
|
ADD_CUSTOM_TARGET(${PACKAGE_ALL_TARGETNAME})
|
||||||
|
|
||||||
|
# cpack configuration for debian packages
|
||||||
|
IF(${CPACK_GENERATOR} STREQUAL "DEB")
|
||||||
|
SET(OPENSCENEGRAPH_PACKAGE_MAINTAINER
|
||||||
|
""
|
||||||
|
CACHE STRING
|
||||||
|
"Name and email address of the package maintainer, e.g., 'Jon Doe <jon.doe@superawesomemail.com>'"
|
||||||
|
)
|
||||||
|
SET(CPACK_LIBOPENSCENEGRAPH_DEPENDENCIES
|
||||||
|
"libopenthreads"
|
||||||
|
CACHE STRING
|
||||||
|
"Dependend packages for the openscenegraph library package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||||
|
)
|
||||||
|
SET(CPACK_LIBOPENSCENEGRAPH-DEV_DEPENDENCIES
|
||||||
|
"libopenscenegraph"
|
||||||
|
CACHE STRING
|
||||||
|
"Dependend packages for the openscenegraph development package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||||
|
)
|
||||||
|
SET(CPACK_LIBOPENTHREADS_DEPENDENCIES
|
||||||
|
""
|
||||||
|
CACHE STRING
|
||||||
|
"Dependend packages for the openthreads library package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||||
|
)
|
||||||
|
SET(CPACK_LIBOPENTHREADS-DEV_DEPENDENCIES
|
||||||
|
"libopenthreads"
|
||||||
|
CACHE STRING
|
||||||
|
"Dependend packages for the openthreads development package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||||
|
)
|
||||||
|
SET(CPACK_OPENSCENEGRAPH_DEPENDENCIES
|
||||||
|
"libopenscenegraph"
|
||||||
|
CACHE STRING
|
||||||
|
"Dependend packages for the openscenegraph main package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||||
|
)
|
||||||
|
SET(CPACK_OPENSCENEGRAPH-ALL_DEPENDENCIES
|
||||||
|
""
|
||||||
|
CACHE STRING
|
||||||
|
"Dependend packages for the openscenegraph package with all components (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||||
|
)
|
||||||
|
|
||||||
|
SET(CPACK_LIBOPENSCENEGRAPH_CONFLICTS
|
||||||
|
""
|
||||||
|
CACHE STRING
|
||||||
|
"Conflicting packages for the openscenegraph library package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||||
|
)
|
||||||
|
SET(CPACK_LIBOPENSCENEGRAPH-DEV_CONFLICTS
|
||||||
|
""
|
||||||
|
CACHE STRING
|
||||||
|
"Conflicting packages for the openscenegraph development package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||||
|
)
|
||||||
|
SET(CPACK_LIBOPENTHREADS_CONFLICTS
|
||||||
|
""
|
||||||
|
CACHE STRING
|
||||||
|
"Conflicting packages for the openthreads library package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||||
|
)
|
||||||
|
SET(CPACK_LIBOPENTHREADS-DEV_CONFLICTS
|
||||||
|
""
|
||||||
|
CACHE STRING
|
||||||
|
"Conflicting packages for the openthreads development package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||||
|
)
|
||||||
|
SET(CPACK_OPENSCENEGRAPH_CONFLICTS
|
||||||
|
""
|
||||||
|
CACHE STRING
|
||||||
|
"Conflicting packages for the openscenegraph main package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||||
|
)
|
||||||
|
SET(CPACK_OPENSCENEGRAPH-ALL_CONFLICTS
|
||||||
|
""
|
||||||
|
CACHE STRING
|
||||||
|
"Conflicting packages for the openscenegraph package with all components (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
MACRO(GENERATE_PACKAGING_TARGET package_name)
|
MACRO(GENERATE_PACKAGING_TARGET package_name)
|
||||||
SET(CPACK_PACKAGE_NAME ${package_name})
|
SET(CPACK_PACKAGE_NAME ${package_name})
|
||||||
|
|
||||||
|
# set debian dependencies AND conflicts
|
||||||
|
IF(${CPACK_GENERATOR} STREQUAL "DEB")
|
||||||
|
STRING(TOUPPER CPACK_${package_name}_DEPENDENCIES DEPENDENCIES_VAR)
|
||||||
|
STRING(TOUPPER CPACK_${package_name}_CONFLICTS CONFLICTS_VAR)
|
||||||
|
SET(OSG_PACKAGE_DEPENDS "${${DEPENDENCIES_VAR}}")
|
||||||
|
SET(OSG_PACKAGE_CONFLICTS "${${CONFLICTS_VAR}}")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# the doc packages don't need a system-arch specification
|
# the doc packages don't need a system-arch specification
|
||||||
IF(${package} MATCHES -doc)
|
IF(${package} MATCHES -doc)
|
||||||
SET(OSG_PACKAGE_FILE_NAME ${package_name}-${OPENSCENEGRAPH_VERSION})
|
SET(OSG_PACKAGE_FILE_NAME ${package_name}-${OPENSCENEGRAPH_VERSION})
|
||||||
@@ -114,7 +192,7 @@ MACRO(GENERATE_PACKAGING_TARGET package_name)
|
|||||||
ELSE()
|
ELSE()
|
||||||
SET(ARCHIVE_EXT "tar.gz")
|
SET(ARCHIVE_EXT "tar.gz")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Create a target that creates the current package
|
# Create a target that creates the current package
|
||||||
# and rename the package to give it proper filename
|
# and rename the package to give it proper filename
|
||||||
ADD_CUSTOM_TARGET(${PACKAGE_TARGETNAME})
|
ADD_CUSTOM_TARGET(${PACKAGE_TARGETNAME})
|
||||||
@@ -124,8 +202,8 @@ MACRO(GENERATE_PACKAGING_TARGET package_name)
|
|||||||
COMMAND ${CMAKE_CPACK_COMMAND} -C ${OSG_CPACK_CONFIGURATION} --config ${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake
|
COMMAND ${CMAKE_CPACK_COMMAND} -C ${OSG_CPACK_CONFIGURATION} --config ${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake
|
||||||
COMMENT "Run CPack packaging for ${package_name}..."
|
COMMENT "Run CPack packaging for ${package_name}..."
|
||||||
)
|
)
|
||||||
# Add the exact same custom command to the all package generating target.
|
# Add the exact same custom command to the all package generating target.
|
||||||
# I can't use add_dependencies to do this because it would allow parallell building of packages so am going brute here
|
# I can't use add_dependencies to do this because it would allow parallel building of packages so am going brute here
|
||||||
ADD_CUSTOM_COMMAND(TARGET ${PACKAGE_ALL_TARGETNAME}
|
ADD_CUSTOM_COMMAND(TARGET ${PACKAGE_ALL_TARGETNAME}
|
||||||
COMMAND ${CMAKE_CPACK_COMMAND} -C ${OSG_CPACK_CONFIGURATION} --config ${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake
|
COMMAND ${CMAKE_CPACK_COMMAND} -C ${OSG_CPACK_CONFIGURATION} --config ${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ SET(CPACK_NSIS_INSTALLER_ICON_CODE "")
|
|||||||
SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "")
|
SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "")
|
||||||
SET(CPACK_OUTPUT_CONFIG_FILE "${PROJECT_BINARY_DIR}/CPackConfig-${OSG_CPACK_COMPONENT}.cmake")
|
SET(CPACK_OUTPUT_CONFIG_FILE "${PROJECT_BINARY_DIR}/CPackConfig-${OSG_CPACK_COMPONENT}.cmake")
|
||||||
SET(CPACK_PACKAGE_DEFAULT_LOCATION "/")
|
SET(CPACK_PACKAGE_DEFAULT_LOCATION "/")
|
||||||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${OpenSceneGraph_SOURCE_DIR}/README.txt")
|
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${OpenSceneGraph_SOURCE_DIR}/README.md")
|
||||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The OpenSceneGraph is an open source high performance 3d graphics toolkit")
|
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The OpenSceneGraph is an open source high performance 3d graphics toolkit")
|
||||||
SET(CPACK_PACKAGE_FILE_NAME "${OSG_PACKAGE_FILE_NAME}")
|
SET(CPACK_PACKAGE_FILE_NAME "${OSG_PACKAGE_FILE_NAME}")
|
||||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
|
||||||
@@ -66,6 +66,16 @@ SET(CPACK_PACKAGE_VERSION_MAJOR "${OPENSCENEGRAPH_MAJOR_VERSION}")
|
|||||||
SET(CPACK_PACKAGE_VERSION_MINOR "${OPENSCENEGRAPH_MINOR_VERSION}")
|
SET(CPACK_PACKAGE_VERSION_MINOR "${OPENSCENEGRAPH_MINOR_VERSION}")
|
||||||
SET(CPACK_PACKAGE_VERSION_PATCH "${OPENSCENEGRAPH_PATCH_VERSION}")
|
SET(CPACK_PACKAGE_VERSION_PATCH "${OPENSCENEGRAPH_PATCH_VERSION}")
|
||||||
SET(CPACK_RESOURCE_FILE_LICENSE "${OpenSceneGraph_SOURCE_DIR}/LICENSE.txt")
|
SET(CPACK_RESOURCE_FILE_LICENSE "${OpenSceneGraph_SOURCE_DIR}/LICENSE.txt")
|
||||||
SET(CPACK_RESOURCE_FILE_README "${OpenSceneGraph_SOURCE_DIR}/README.txt")
|
SET(CPACK_RESOURCE_FILE_README "${OpenSceneGraph_SOURCE_DIR}/README.md")
|
||||||
SET(CPACK_RESOURCE_FILE_WELCOME "${OpenSceneGraph_SOURCE_DIR}/NEWS.txt")
|
SET(CPACK_RESOURCE_FILE_WELCOME "${OpenSceneGraph_SOURCE_DIR}/NEWS.txt")
|
||||||
SET(CPACK_STRIP_FILES "ON")
|
SET(CPACK_STRIP_FILES "ON")
|
||||||
|
|
||||||
|
# DEBIAN OPTIONS
|
||||||
|
IF(${CPACK_GENERATOR} STREQUAL "DEB")
|
||||||
|
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "${OPENSCENEGRAPH_PACKAGE_MAINTAINER}")
|
||||||
|
SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://www.openscenegraph.org")
|
||||||
|
SET(CPACK_DEBIAN_PACKAGE_SECTION "Development")
|
||||||
|
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "${OSG_PACKAGE_DEPENDS}")
|
||||||
|
SET(CPACK_DEBIAN_PACKAGE_CONFLICTS "${OSG_PACKAGE_CONFLICTS}")
|
||||||
|
SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${OpenSceneGraph_SOURCE_DIR}/debian_scripts/postinst;")
|
||||||
|
ENDIF()
|
||||||
|
|||||||
22
CMakeModules/OsgDetermineWinVersion.cmake
Normal file
22
CMakeModules/OsgDetermineWinVersion.cmake
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# - If Windows is used, this script sets the variable WIN32_WINNT to the corresponding windows version
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
message(STATUS "Checking windows version...")
|
||||||
|
macro(get_WIN32_WINNT version)
|
||||||
|
if (CMAKE_SYSTEM_VERSION)
|
||||||
|
set(ver ${CMAKE_SYSTEM_VERSION})
|
||||||
|
string(REGEX MATCH "^([0-9]+).([0-9])" ver ${ver})
|
||||||
|
string(REGEX MATCH "^([0-9]+)" verMajor ${ver})
|
||||||
|
# Check for Windows 10, b/c we'll need to convert to hex 'A'.
|
||||||
|
if ("${verMajor}" MATCHES "10")
|
||||||
|
set(verMajor "A")
|
||||||
|
string(REGEX REPLACE "^([0-9]+)" ${verMajor} ver ${ver})
|
||||||
|
endif ("${verMajor}" MATCHES "10")
|
||||||
|
# Remove all remaining '.' characters.
|
||||||
|
string(REPLACE "." "" ver ${ver})
|
||||||
|
# Prepend each digit with a zero.
|
||||||
|
string(REGEX REPLACE "([0-9A-Z])" "0\\1" ver ${ver})
|
||||||
|
set(${version} "0x${ver}")
|
||||||
|
endif(CMAKE_SYSTEM_VERSION)
|
||||||
|
endmacro(get_WIN32_WINNT)
|
||||||
|
endif(WIN32)
|
||||||
@@ -27,15 +27,10 @@ MACRO(BUILDER_VERSION_GREATER MAJOR_VER MINOR_VER PATCH_VER)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
ENDMACRO(BUILDER_VERSION_GREATER MAJOR_VER MINOR_VER PATCH_VER)
|
ENDMACRO(BUILDER_VERSION_GREATER MAJOR_VER MINOR_VER PATCH_VER)
|
||||||
|
|
||||||
# CMAKE24: if CMake version is <2.6.0.
|
|
||||||
SET(CMAKE24 OFF)
|
|
||||||
IF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} LESS 5)
|
|
||||||
SET(CMAKE24 ON)
|
|
||||||
ENDIF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} LESS 5)
|
|
||||||
|
|
||||||
# CMAKE_VERSION_TEST: Define whether "IF(${CMAKE_VERSION} VERSION_LESS "x.y.z")" can be used or not.
|
# CMAKE_VERSION_TEST: Define whether "IF(${CMAKE_VERSION} VERSION_LESS "x.y.z")" can be used or not.
|
||||||
BUILDER_VERSION_GREATER(2 6 3)
|
BUILDER_VERSION_GREATER(2 8 0)
|
||||||
SET(CMAKE_VERSION_TEST ${VALID_BUILDER_VERSION}) # >= 2.6.4
|
SET(CMAKE_VERSION_TEST ${VALID_BUILDER_VERSION}) # >= 2.8.0
|
||||||
|
|
||||||
SET(VALID_BUILDER_VERSION OFF)
|
SET(VALID_BUILDER_VERSION OFF)
|
||||||
|
|
||||||
@@ -43,9 +38,13 @@ SET(VALID_BUILDER_VERSION OFF)
|
|||||||
MACRO(LINK_WITH_VARIABLES TRGTNAME)
|
MACRO(LINK_WITH_VARIABLES TRGTNAME)
|
||||||
FOREACH(varname ${ARGN})
|
FOREACH(varname ${ARGN})
|
||||||
IF(${varname}_DEBUG)
|
IF(${varname}_DEBUG)
|
||||||
TARGET_LINK_LIBRARIES(${TRGTNAME} optimized "${${varname}}" debug "${${varname}_DEBUG}")
|
IF(${varname}_RELEASE)
|
||||||
|
TARGET_LINK_LIBRARIES(${TRGTNAME} optimized "${${varname}_RELEASE}" debug "${${varname}_DEBUG}")
|
||||||
|
ELSE(${varname}_RELEASE)
|
||||||
|
TARGET_LINK_LIBRARIES(${TRGTNAME} optimized "${${varname}}" debug "${${varname}_DEBUG}")
|
||||||
|
ENDIF(${varname}_RELEASE)
|
||||||
ELSE(${varname}_DEBUG)
|
ELSE(${varname}_DEBUG)
|
||||||
TARGET_LINK_LIBRARIES(${TRGTNAME} "${${varname}}" )
|
TARGET_LINK_LIBRARIES(${TRGTNAME} ${${varname}} )
|
||||||
ENDIF(${varname}_DEBUG)
|
ENDIF(${varname}_DEBUG)
|
||||||
ENDFOREACH(varname)
|
ENDFOREACH(varname)
|
||||||
ENDMACRO(LINK_WITH_VARIABLES TRGTNAME)
|
ENDMACRO(LINK_WITH_VARIABLES TRGTNAME)
|
||||||
@@ -83,8 +82,8 @@ ENDMACRO(LINK_EXTERNAL TRGTNAME)
|
|||||||
MACRO(LINK_CORELIB_DEFAULT CORELIB_NAME)
|
MACRO(LINK_CORELIB_DEFAULT CORELIB_NAME)
|
||||||
#SET(ALL_GL_LIBRARIES ${OPENGL_LIBRARIES})
|
#SET(ALL_GL_LIBRARIES ${OPENGL_LIBRARIES})
|
||||||
SET(ALL_GL_LIBRARIES ${OPENGL_gl_LIBRARY})
|
SET(ALL_GL_LIBRARIES ${OPENGL_gl_LIBRARY})
|
||||||
IF (OSG_GLES1_AVAILABLE OR OSG_GLES2_AVAILABLE)
|
IF (OSG_GLES1_AVAILABLE OR OSG_GLES2_AVAILABLE OR OSG_GLES3_AVAILABLE)
|
||||||
SET(ALL_GL_LIBRARIES ${ALL_GL_LIBRARIES} ${OPENGL_egl_LIBRARY})
|
SET(ALL_GL_LIBRARIES ${ALL_GL_LIBRARIES} ${EGL_LIBRARY})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
LINK_EXTERNAL(${CORELIB_NAME} ${ALL_GL_LIBRARIES})
|
LINK_EXTERNAL(${CORELIB_NAME} ${ALL_GL_LIBRARIES})
|
||||||
@@ -123,9 +122,9 @@ MACRO(SETUP_LINK_LIBRARIES)
|
|||||||
FOREACH(LINKLIB ${TARGET_ADDED_LIBRARIES})
|
FOREACH(LINKLIB ${TARGET_ADDED_LIBRARIES})
|
||||||
SET(TO_INSERT TRUE)
|
SET(TO_INSERT TRUE)
|
||||||
FOREACH (value ${TARGET_COMMON_LIBRARIES})
|
FOREACH (value ${TARGET_COMMON_LIBRARIES})
|
||||||
IF (${value} STREQUAL ${LINKLIB})
|
IF ("${value}" STREQUAL "${LINKLIB}")
|
||||||
SET(TO_INSERT FALSE)
|
SET(TO_INSERT FALSE)
|
||||||
ENDIF (${value} STREQUAL ${LINKLIB})
|
ENDIF ("${value}" STREQUAL "${LINKLIB}")
|
||||||
ENDFOREACH (value ${TARGET_COMMON_LIBRARIES})
|
ENDFOREACH (value ${TARGET_COMMON_LIBRARIES})
|
||||||
IF(TO_INSERT)
|
IF(TO_INSERT)
|
||||||
LIST(APPEND TARGET_LIBRARIES ${LINKLIB})
|
LIST(APPEND TARGET_LIBRARIES ${LINKLIB})
|
||||||
@@ -134,8 +133,8 @@ MACRO(SETUP_LINK_LIBRARIES)
|
|||||||
|
|
||||||
#SET(ALL_GL_LIBRARIES ${OPENGL_LIBRARIES})
|
#SET(ALL_GL_LIBRARIES ${OPENGL_LIBRARIES})
|
||||||
SET(ALL_GL_LIBRARIES ${OPENGL_gl_LIBRARY})
|
SET(ALL_GL_LIBRARIES ${OPENGL_gl_LIBRARY})
|
||||||
IF (OSG_GLES1_AVAILABLE OR OSG_GLES2_AVAILABLE)
|
IF (OSG_GLES1_AVAILABLE OR OSG_GLES2_AVAILABLE OR OSG_GLES3_AVAILABLE)
|
||||||
SET(ALL_GL_LIBRARIES ${ALL_GL_LIBRARIES} ${OPENGL_egl_LIBRARY})
|
SET(ALL_GL_LIBRARIES ${ALL_GL_LIBRARIES} ${EGL_LIBRARY})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# FOREACH(LINKLIB ${TARGET_LIBRARIES})
|
# FOREACH(LINKLIB ${TARGET_LIBRARIES})
|
||||||
@@ -226,6 +225,9 @@ MACRO(SETUP_LIBRARY LIB_NAME)
|
|||||||
)
|
)
|
||||||
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES FOLDER "OSG Core")
|
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES FOLDER "OSG Core")
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
|
IF(OSG_BUILD_PLATFORM_IPHONE OR OSG_BUILD_PLATFORM_IPHONE_SIMULATOR)
|
||||||
|
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES XCODE_ATTRIBUTE_ENABLE_BITCODE ${IPHONE_ENABLE_BITCODE})
|
||||||
|
ENDIF()
|
||||||
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES XCODE_ATTRIBUTE_WARNING_CFLAGS "")
|
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES XCODE_ATTRIBUTE_WARNING_CFLAGS "")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(TARGET_LABEL)
|
IF(TARGET_LABEL)
|
||||||
@@ -267,6 +269,23 @@ MACRO(SETUP_PLUGIN PLUGIN_NAME)
|
|||||||
## plugins gets put in libopenscenegraph by default
|
## plugins gets put in libopenscenegraph by default
|
||||||
IF(${ARGC} GREATER 1)
|
IF(${ARGC} GREATER 1)
|
||||||
SET(PACKAGE_COMPONENT libopenscenegraph-${ARGV1})
|
SET(PACKAGE_COMPONENT libopenscenegraph-${ARGV1})
|
||||||
|
|
||||||
|
# add cpack config variables for plugin with own package
|
||||||
|
IF(BUILD_OSG_PACKAGES)
|
||||||
|
IF("${CPACK_GENERATOR}" STREQUAL "DEB")
|
||||||
|
STRING(TOUPPER ${PACKAGE_COMPONENT} UPPER_PACKAGE_COMPONENT)
|
||||||
|
SET(CPACK_${UPPER_PACKAGE_COMPONENT}_DEPENDENCIES
|
||||||
|
"libopenscenegraph"
|
||||||
|
CACHE STRING
|
||||||
|
"Dependend packages for the ${PACKAGE_COMPONENT} package with all components (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||||
|
)
|
||||||
|
SET(CPACK_${UPPER_PACKAGE_COMPONENT}_CONFLICTS
|
||||||
|
""
|
||||||
|
CACHE STRING
|
||||||
|
"Conflicting packages for the ${PACKAGE_COMPONENT} package (uses deb dependecy format), e.g., 'libc6, libcurl3-gnutls, libgif4, libjpeg8, libpng12-0'"
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
ELSE(${ARGC} GREATER 1)
|
ELSE(${ARGC} GREATER 1)
|
||||||
SET(PACKAGE_COMPONENT libopenscenegraph)
|
SET(PACKAGE_COMPONENT libopenscenegraph)
|
||||||
ENDIF(${ARGC} GREATER 1)
|
ENDIF(${ARGC} GREATER 1)
|
||||||
@@ -317,6 +336,9 @@ MACRO(SETUP_PLUGIN PLUGIN_NAME)
|
|||||||
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES FOLDER "Plugins")
|
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES FOLDER "Plugins")
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES XCODE_ATTRIBUTE_WARNING_CFLAGS "")
|
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES XCODE_ATTRIBUTE_WARNING_CFLAGS "")
|
||||||
|
IF(OSG_BUILD_PLATFORM_IPHONE OR OSG_BUILD_PLATFORM_IPHONE_SIMULATOR)
|
||||||
|
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES XCODE_ATTRIBUTE_ENABLE_BITCODE ${IPHONE_ENABLE_BITCODE})
|
||||||
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
SETUP_LINK_LIBRARIES()
|
SETUP_LINK_LIBRARIES()
|
||||||
|
|
||||||
@@ -326,6 +348,10 @@ MACRO(SETUP_PLUGIN PLUGIN_NAME)
|
|||||||
RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT}
|
RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT}
|
||||||
ARCHIVE DESTINATION lib/${OSG_PLUGINS} COMPONENT libopenscenegraph-dev
|
ARCHIVE DESTINATION lib/${OSG_PLUGINS} COMPONENT libopenscenegraph-dev
|
||||||
LIBRARY DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT})
|
LIBRARY DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT})
|
||||||
|
IF(MSVC AND DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
INSTALL(FILES ${OUTPUT_BINDIR}/${OSG_PLUGINS}/${TARGET_TARGETNAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT} CONFIGURATIONS RelWithDebInfo)
|
||||||
|
INSTALL(FILES ${OUTPUT_BINDIR}/${OSG_PLUGINS}/${TARGET_TARGETNAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION bin/${OSG_PLUGINS} COMPONENT ${PACKAGE_COMPONENT} CONFIGURATIONS Debug)
|
||||||
|
ENDIF(MSVC AND DYNAMIC_OPENSCENEGRAPH)
|
||||||
ELSE(WIN32)
|
ELSE(WIN32)
|
||||||
INSTALL(TARGETS ${TARGET_TARGETNAME}
|
INSTALL(TARGETS ${TARGET_TARGETNAME}
|
||||||
RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT}
|
RUNTIME DESTINATION bin COMPONENT ${PACKAGE_COMPONENT}
|
||||||
@@ -341,7 +367,7 @@ ENDMACRO(SETUP_PLUGIN)
|
|||||||
|
|
||||||
MACRO(SETUP_EXE IS_COMMANDLINE_APP)
|
MACRO(SETUP_EXE IS_COMMANDLINE_APP)
|
||||||
#MESSAGE("in -->SETUP_EXE<-- ${TARGET_NAME}-->${TARGET_SRC} <--> ${TARGET_H}<--")
|
#MESSAGE("in -->SETUP_EXE<-- ${TARGET_NAME}-->${TARGET_SRC} <--> ${TARGET_H}<--")
|
||||||
IF(GL3_FOUND)
|
IF(GLCORE_FOUND)
|
||||||
INCLUDE_DIRECTORIES( ${GLCORE_INCLUDE_DIR} )
|
INCLUDE_DIRECTORIES( ${GLCORE_INCLUDE_DIR} )
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
@@ -403,6 +429,9 @@ MACRO(SETUP_EXE IS_COMMANDLINE_APP)
|
|||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES XCODE_ATTRIBUTE_WARNING_CFLAGS "")
|
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES XCODE_ATTRIBUTE_WARNING_CFLAGS "")
|
||||||
|
IF(OSG_BUILD_PLATFORM_IPHONE OR OSG_BUILD_PLATFORM_IPHONE_SIMULATOR)
|
||||||
|
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES XCODE_ATTRIBUTE_ENABLE_BITCODE ${IPHONE_ENABLE_BITCODE})
|
||||||
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
SETUP_LINK_LIBRARIES()
|
SETUP_LINK_LIBRARIES()
|
||||||
@@ -428,6 +457,10 @@ MACRO(SETUP_APPLICATION APPLICATION_NAME)
|
|||||||
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin BUNDLE DESTINATION bin)
|
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin BUNDLE DESTINATION bin)
|
||||||
ELSE(APPLE)
|
ELSE(APPLE)
|
||||||
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin COMPONENT openscenegraph )
|
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION bin COMPONENT openscenegraph )
|
||||||
|
IF(MSVC)
|
||||||
|
INSTALL(FILES ${CMAKE_BINARY_DIR}/bin/${TARGET_NAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION bin COMPONENT openscenegraph CONFIGURATIONS RelWithDebInfo)
|
||||||
|
INSTALL(FILES ${CMAKE_BINARY_DIR}/bin/${TARGET_NAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION bin COMPONENT openscenegraph CONFIGURATIONS Debug)
|
||||||
|
ENDIF(MSVC)
|
||||||
ENDIF(APPLE)
|
ENDIF(APPLE)
|
||||||
|
|
||||||
ENDMACRO(SETUP_APPLICATION)
|
ENDMACRO(SETUP_APPLICATION)
|
||||||
@@ -457,6 +490,10 @@ MACRO(SETUP_EXAMPLE EXAMPLE_NAME)
|
|||||||
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin BUNDLE DESTINATION share/OpenSceneGraph/bin )
|
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin BUNDLE DESTINATION share/OpenSceneGraph/bin )
|
||||||
ELSE(APPLE)
|
ELSE(APPLE)
|
||||||
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples )
|
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples )
|
||||||
|
IF(MSVC)
|
||||||
|
INSTALL(FILES ${CMAKE_BINARY_DIR}/bin/${TARGET_NAME}${CMAKE_RELWITHDEBINFO_POSTFIX}.pdb DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples CONFIGURATIONS RelWithDebInfo)
|
||||||
|
INSTALL(FILES ${CMAKE_BINARY_DIR}/bin/${TARGET_NAME}${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION share/OpenSceneGraph/bin COMPONENT openscenegraph-examples CONFIGURATIONS Debug)
|
||||||
|
ENDIF(MSVC)
|
||||||
ENDIF(APPLE)
|
ENDIF(APPLE)
|
||||||
|
|
||||||
ENDMACRO(SETUP_EXAMPLE)
|
ENDMACRO(SETUP_EXAMPLE)
|
||||||
|
|||||||
73
LICENSE.txt
73
LICENSE.txt
@@ -1,8 +1,8 @@
|
|||||||
OpenSceneGraph Public License, Version 0.0
|
OpenSceneGraph Public License, Version 1.0
|
||||||
==========================================
|
==========================================
|
||||||
|
|
||||||
Copyright (C) 2002 Robert Osfield.
|
Copyright (C) 2018 Robert Osfield.
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this licence document, but changing it is not allowed.
|
of this licence document, but changing it is not allowed.
|
||||||
|
|
||||||
@@ -12,18 +12,19 @@
|
|||||||
This library is free software; you can redistribute it and/or modify it
|
This library is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the OpenSceneGraph Public License (OSGPL) version 0.0
|
under the terms of the OpenSceneGraph Public License (OSGPL) version 0.0
|
||||||
or later.
|
or later.
|
||||||
|
|
||||||
Notes: the OSGPL is based on the LGPL, with the 4 exceptions laid
|
Notes: the OSGPL is based on the LGPL-2.1-only WITH WxWindows-exception-3.1,
|
||||||
out in the wxWindows section below. The LGPL is contained in the
|
with the 4 exceptions laid out in the wxWindows section below. The LGPL is
|
||||||
final section of this license.
|
contained in the final section of this license.
|
||||||
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
wxWindows Library Licence, Version 3
|
|
||||||
====================================
|
|
||||||
|
|
||||||
Copyright (C) 1998 Julian Smart, Robert Roebling [, ...]
|
wxWindows Library Licence, Version 3.1
|
||||||
|
======================================
|
||||||
|
|
||||||
|
Copyright (c) 1998-2005 Julian Smart, Robert Roebling et al
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this licence document, but changing it is not allowed.
|
of this licence document, but changing it is not allowed.
|
||||||
@@ -43,20 +44,20 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU Library General Public Licence
|
You should have received a copy of the GNU Library General Public Licence
|
||||||
along with this software, usually in a file named COPYING.LIB. If not,
|
along with this software, usually in a file named COPYING.LIB. If not,
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
Boston, MA 02111-1307 USA.
|
Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
EXCEPTION NOTICE
|
EXCEPTION NOTICE
|
||||||
|
|
||||||
1. As a special exception, the copyright holders of this library give
|
1. As a special exception, the copyright holders of this library give
|
||||||
permission for additional uses of the text contained in this release of
|
permission for additional uses of the text contained in this release of
|
||||||
the library as licenced under the wxWindows Library Licence, applying
|
the library as licenced under the wxWindows Library Licence, applying
|
||||||
either version 3 of the Licence, or (at your option) any later version of
|
either version 3.1 of the Licence, or (at your option) any later version of
|
||||||
the Licence as published by the copyright holders of version 3 of the
|
the Licence as published by the copyright holders of version
|
||||||
Licence document.
|
3.1 of the Licence document.
|
||||||
|
|
||||||
2. The exception is that you may use, copy, link, modify and distribute
|
2. The exception is that you may use, copy, link, modify and distribute
|
||||||
under the user's own terms, binary object code versions of works based
|
under your own terms, binary object code versions of works based
|
||||||
on the Library.
|
on the Library.
|
||||||
|
|
||||||
3. If you copy code from files distributed under the terms of the GNU
|
3. If you copy code from files distributed under the terms of the GNU
|
||||||
@@ -71,11 +72,13 @@
|
|||||||
choice whether to permit this exception to apply to your modifications.
|
choice whether to permit this exception to apply to your modifications.
|
||||||
If you do not wish that, you must delete the exception notice from such
|
If you do not wish that, you must delete the exception notice from such
|
||||||
code and/or adjust the licensing conditions notice accordingly.
|
code and/or adjust the licensing conditions notice accordingly.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
Version 2.1, February 1999
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 2.1, February 1999
|
||||||
|
|
||||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
@@ -86,7 +89,7 @@
|
|||||||
as the successor of the GNU Library Public License, version 2, hence
|
as the successor of the GNU Library Public License, version 2, hence
|
||||||
the version number 2.1.]
|
the version number 2.1.]
|
||||||
|
|
||||||
Preamble
|
Preamble
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
The licenses for most software are designed to take away your
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
@@ -131,7 +134,7 @@ modified by someone else and passed on, the recipients should know
|
|||||||
that what they have is not the original version, so that the original
|
that what they have is not the original version, so that the original
|
||||||
author's reputation will not be affected by problems that might be
|
author's reputation will not be affected by problems that might be
|
||||||
introduced by others.
|
introduced by others.
|
||||||
|
|
||||||
Finally, software patents pose a constant threat to the existence of
|
Finally, software patents pose a constant threat to the existence of
|
||||||
any free program. We wish to make sure that a company cannot
|
any free program. We wish to make sure that a company cannot
|
||||||
effectively restrict the users of a free program by obtaining a
|
effectively restrict the users of a free program by obtaining a
|
||||||
@@ -187,8 +190,8 @@ modification follow. Pay close attention to the difference between a
|
|||||||
"work based on the library" and a "work that uses the library". The
|
"work based on the library" and a "work that uses the library". The
|
||||||
former contains code derived from the library, whereas the latter must
|
former contains code derived from the library, whereas the latter must
|
||||||
be combined with the library in order to run.
|
be combined with the library in order to run.
|
||||||
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
0. This License Agreement applies to any software library or other
|
0. This License Agreement applies to any software library or other
|
||||||
@@ -222,7 +225,7 @@ such a program is covered only if its contents constitute a work based
|
|||||||
on the Library (independent of the use of the Library in a tool for
|
on the Library (independent of the use of the Library in a tool for
|
||||||
writing it). Whether that is true depends on what the Library does
|
writing it). Whether that is true depends on what the Library does
|
||||||
and what the program that uses the Library does.
|
and what the program that uses the Library does.
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Library's
|
1. You may copy and distribute verbatim copies of the Library's
|
||||||
complete source code as you receive it, in any medium, provided that
|
complete source code as you receive it, in any medium, provided that
|
||||||
you conspicuously and appropriately publish on each copy an
|
you conspicuously and appropriately publish on each copy an
|
||||||
@@ -234,7 +237,7 @@ Library.
|
|||||||
You may charge a fee for the physical act of transferring a copy,
|
You may charge a fee for the physical act of transferring a copy,
|
||||||
and you may at your option offer warranty protection in exchange for a
|
and you may at your option offer warranty protection in exchange for a
|
||||||
fee.
|
fee.
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Library or any portion
|
2. You may modify your copy or copies of the Library or any portion
|
||||||
of it, thus forming a work based on the Library, and copy and
|
of it, thus forming a work based on the Library, and copy and
|
||||||
distribute such modifications or work under the terms of Section 1
|
distribute such modifications or work under the terms of Section 1
|
||||||
@@ -292,7 +295,7 @@ instead of to this License. (If a newer version than version 2 of the
|
|||||||
ordinary GNU General Public License has appeared, then you can specify
|
ordinary GNU General Public License has appeared, then you can specify
|
||||||
that version instead if you wish.) Do not make any other change in
|
that version instead if you wish.) Do not make any other change in
|
||||||
these notices.
|
these notices.
|
||||||
|
|
||||||
Once this change is made in a given copy, it is irreversible for
|
Once this change is made in a given copy, it is irreversible for
|
||||||
that copy, so the ordinary GNU General Public License applies to all
|
that copy, so the ordinary GNU General Public License applies to all
|
||||||
subsequent copies and derivative works made from that copy.
|
subsequent copies and derivative works made from that copy.
|
||||||
@@ -343,7 +346,7 @@ Library will still fall under Section 6.)
|
|||||||
distribute the object code for the work under the terms of Section 6.
|
distribute the object code for the work under the terms of Section 6.
|
||||||
Any executables containing that work also fall under Section 6,
|
Any executables containing that work also fall under Section 6,
|
||||||
whether or not they are linked directly with the Library itself.
|
whether or not they are linked directly with the Library itself.
|
||||||
|
|
||||||
6. As an exception to the Sections above, you may also combine or
|
6. As an exception to the Sections above, you may also combine or
|
||||||
link a "work that uses the Library" with the Library to produce a
|
link a "work that uses the Library" with the Library to produce a
|
||||||
work containing portions of the Library, and distribute that work
|
work containing portions of the Library, and distribute that work
|
||||||
@@ -405,7 +408,7 @@ restrictions of other proprietary libraries that do not normally
|
|||||||
accompany the operating system. Such a contradiction means you cannot
|
accompany the operating system. Such a contradiction means you cannot
|
||||||
use both them and the Library together in an executable that you
|
use both them and the Library together in an executable that you
|
||||||
distribute.
|
distribute.
|
||||||
|
|
||||||
7. You may place library facilities that are a work based on the
|
7. You may place library facilities that are a work based on the
|
||||||
Library side-by-side in a single library together with other library
|
Library side-by-side in a single library together with other library
|
||||||
facilities not covered by this License, and distribute such a combined
|
facilities not covered by this License, and distribute such a combined
|
||||||
@@ -446,7 +449,7 @@ subject to these terms and conditions. You may not impose any further
|
|||||||
restrictions on the recipients' exercise of the rights granted herein.
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
You are not responsible for enforcing compliance by third parties with
|
You are not responsible for enforcing compliance by third parties with
|
||||||
this License.
|
this License.
|
||||||
|
|
||||||
11. If, as a consequence of a court judgment or allegation of patent
|
11. If, as a consequence of a court judgment or allegation of patent
|
||||||
infringement or for any other reason (not limited to patent issues),
|
infringement or for any other reason (not limited to patent issues),
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
@@ -498,7 +501,7 @@ conditions either of that version or of any later version published by
|
|||||||
the Free Software Foundation. If the Library does not specify a
|
the Free Software Foundation. If the Library does not specify a
|
||||||
license version number, you may choose any version ever published by
|
license version number, you may choose any version ever published by
|
||||||
the Free Software Foundation.
|
the Free Software Foundation.
|
||||||
|
|
||||||
14. If you wish to incorporate parts of the Library into other free
|
14. If you wish to incorporate parts of the Library into other free
|
||||||
programs whose distribution conditions are incompatible with these,
|
programs whose distribution conditions are incompatible with these,
|
||||||
write to the author to ask for permission. For software which is
|
write to the author to ask for permission. For software which is
|
||||||
@@ -508,7 +511,7 @@ decision will be guided by the two goals of preserving the free status
|
|||||||
of all derivatives of our free software and of promoting the sharing
|
of all derivatives of our free software and of promoting the sharing
|
||||||
and reuse of software generally.
|
and reuse of software generally.
|
||||||
|
|
||||||
NO WARRANTY
|
NO WARRANTY
|
||||||
|
|
||||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||||
@@ -531,8 +534,8 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
|||||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
DAMAGES.
|
DAMAGES.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
How to Apply These Terms to Your New Libraries
|
How to Apply These Terms to Your New Libraries
|
||||||
|
|
||||||
If you develop a new library, and you want it to be of the greatest
|
If you develop a new library, and you want it to be of the greatest
|
||||||
|
|||||||
129
NEWS.txt
129
NEWS.txt
@@ -1,9 +1,98 @@
|
|||||||
OSG News
|
OSG News
|
||||||
========
|
========
|
||||||
|
|
||||||
|
OpenSceneGraph 3.6 release
|
||||||
|
PERTHSHIRE, Scotland - 7th April 2018 - OpenSceneGraph Professional Services announces the release of OpenSceneGraph 3.6.0, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. The OpenSceneGraph is written entirely in Standard C++ and built upon OpenGL (1.2 to 4.6) and OpenGL ES (1.0 to 3.0), and offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modelling markets. OpenSceneGraph 3.6 runs on all Microsoft Windows platforms, Apple OS/X, iOS, GNU/Linux, Android, Solaris, HP-UX, AIX and FreeBSD operating systems.
|
||||||
|
|
||||||
|
Updates include:
|
||||||
|
|
||||||
|
* OpenThreads::Affinity introduced to enable setting of processor affinity on viewer and database threads
|
||||||
|
* osgText rewritten to improve visual quality, add signed distance field support and full GLES2/3 and GL3/4 support
|
||||||
|
* Added VertexArrayObject support, enable full OpenGL Core Profile support under OSX.
|
||||||
|
* Added OpenCASCADE plugin
|
||||||
|
* Added STEP (.stp) plugin
|
||||||
|
* Improvements to FBX and COLLADA loaders
|
||||||
|
* Improvements to gles plugin to provide better Sketchfab support
|
||||||
|
* Added osgemscripten example
|
||||||
|
* Improvements to osgAnimation
|
||||||
|
* NodeVisitor ValueMap for storing values that can be stored and accessed across frames, such as update, event and cull traversals
|
||||||
|
* ShapeDrawable rewritten as an osg::Geometry to improve performance and flexibility
|
||||||
|
* Added osg::MultiDrawArrays support
|
||||||
|
* Added osgdeferred example that illustrates how to implement deferred rendering
|
||||||
|
* Added MultiDrawIndirect support
|
||||||
|
* Moved glDispatchCompute control out of osg::Program into a dedicated osg::DispatchCompute class to improve control of compute shaders
|
||||||
|
* KdTree support added for PolytopeIntersector, and ability to work with points, lines and polygons
|
||||||
|
* osgQt has been moved out to it's own dedicated osgQt github repository
|
||||||
|
* CMake build support for iOS bitcode builds
|
||||||
|
* CoverityScan testing introduced, fixes bring defect density to 0.0 per 1,0000 lines of code!
|
||||||
|
* Support for Codedoc automated documentation
|
||||||
|
* Support for Travis automated build system
|
||||||
|
|
||||||
|
|
||||||
|
Downloads and Licensing:
|
||||||
|
|
||||||
|
OpenSceneGraph is open-source, so full source code is provided, and can be copied, modified and used free of charge for commercial and non-commercial use. Access to the source allows end users greater flexibility in how they develop, debug and deploy their applications. They gain productivity and freedom by being able to leverage the tool chain in accordance with their own release cycles. Downloads of binaries and source can be found at http://www.openscenegraph.org/index.php/download-section/stable-releases and at our github repository https://github.com/openscenegraph/OpenSceneGraph/.
|
||||||
|
|
||||||
|
OpenSceneGraph is released under the OpenSceneGraph Public License, which is based on the Lesser GNU Public License (LGPL), permitting the software to be used free of charge across the full spectrum of commercial and open-source applications. Furthermore, it allows both static and dynamic linking of the OpenSceneGraph libraries without restricting the licensing of the user's software. Further details http://www.openscenegraph.org/index.php/about/licensing
|
||||||
|
|
||||||
|
|
||||||
|
Professional support and services:
|
||||||
|
|
||||||
|
OpenSceneGraph project is backed up with professional services by OpenSceneGraph Professional Services, based in Scotland, and a range of Contractors from around the world http://www.openscenegraph.org/index.php/support/professional-support. For enquires email robert@openscenegraph.com. Services available include:
|
||||||
|
|
||||||
|
Confidential Professional Support
|
||||||
|
Bespoke development
|
||||||
|
Consultancy
|
||||||
|
Training
|
||||||
|
|
||||||
|
|
||||||
|
Community support and contributions:
|
||||||
|
|
||||||
|
The diverse and growing community of over 5000 developers is centred around the public osg-users mailing list/forum, where members discuss how best to use OpenSceneGraph, provide mutual support, and coordinate development of new features and bug fixes. Members of this community come from many different countries with backgrounds ranging from some of the world's largest aerospace companies, game companies, and visual simulation specialists to university researchers, students and hobbyists.
|
||||||
|
|
||||||
|
The OpenSceneGraph project owes a great deal to the community for its development and support, in particular we wish to thank the 568 individuals from around the world that have directly contributed to the development and refinement of the OpenSceneGraph code base.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
OpenSceneGraph 3.4 release introduces shader composition, new osgUI library, displacement mapping, volume rendering, lua scripting support and much more
|
||||||
|
PERTHSHIRE, Scotland - 12th August 2015 - OpenSceneGraph Professional Services announces the release of OpenSceneGraph 3.4, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. OpenSceneGraph 3.4 written entirely in Standard C++ and built upon OpenGL, offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modelling markets - a real-time visualization tool which eclipses commercial scene graph toolkits in functionality, stability and performance. OpenSceneGraph 3.4 runs on all Microsoft Windows platforms, Apple OS/X, iOS, GNU/Linux, Android, IRIX, Solaris, HP-UX, AIX and FreeBSD operating systems.
|
||||||
|
Updates include:
|
||||||
|
|
||||||
|
* New #pragma(tic) composition shader functionality built into the core OSG that provides a easy to use yet flexible scheme for controlling and composing shaders at runtime levering GLSL support for #define and #pragma.
|
||||||
|
* New osgTerrain::DisplacementMappingTechnique to uses vertex, geometry and fragment shader based displacement mapping technique that dramatically lowers the CPU and GPU memory footprint and bandwidth needs for the same visual quality. The new scheme enables paged terrain that work robustly on smaller hardware, or with far higher loads without framedrops. This new technique levels #pragma(tic) shader composition to enable one to toggle on/off features in the shaders at runtime in a way that is as convenient to use as toggle modes in a fixed function pipeline scene graph.
|
||||||
|
* New osgVolume::MultipassTechique that uses multipass rendering and shaders to enable seamless mixing of traditional 3D geometry and volumes, support for geometry hulls that constrain where the volume should be rendered as well as improving the ray tracing shaders so that they are both faster and have higher visual quality than the previous generation of ray traced shaders supported by OSG-3.2 releases and before.
|
||||||
|
* New osgDB::Classiterface class that provides an easy to use mechanism for introspection of scene graph classes, allowing one to get, set properties and invoke methods in a generic way, making the task of integrating 3rd prarty tools such as scripting languages straight forward.
|
||||||
|
* New Lua scripting support via a plugin that integrates Lua 5.2.3 and the OSG via the OSG's native serialization codes.
|
||||||
|
* New osgUI NodeKit, that enables User Interface elements to be placed directly into 3D scene graph. The classes are fully scriptable so you create create UI and behaviours all within lua scripts.
|
||||||
|
* Improvements to OpenGL ES 1.1, ES 2.0 and ES3.0 support, including platform specific extensions
|
||||||
|
* Improvements to OpenGL 4.x support with a range of new extensions support
|
||||||
|
* Updates to osgQt to support Qt5 and provide better support for Qt4
|
||||||
|
|
||||||
|
Downloads and Licensing:
|
||||||
|
|
||||||
|
OpenSceneGraph is open-source, so full source code is provided, and can be copied, modified and used free of charge for commercial and non-commercial use. Access to the source allows end users greater flexibility in how they develop, debug and deploy their applications. They gain productivity and freedom by being able to leverage the tool chain in accordance with their own release cycles. Downloads of binaries and source can be found in the Downloads section of the openscenegraph.org website.
|
||||||
|
|
||||||
|
OpenSceneGraph is released under the OpenSceneGraph Public License, which is based on the Lesser GNU Public License (LGPL), permitting the software to be used free of charge across the full spectrum of commercial and open-source applications. Furthermore, it allows both static and dynamic linking of the OpenSceneGraph libraries without restricting the licensing of the user's software.
|
||||||
|
Professional support and services
|
||||||
|
|
||||||
|
OpenSceneGraph project is backed up with professional services by OpenSceneGraph Professional Services, based in Scotland, and a range of Contractors from around the world. Services available include:
|
||||||
|
|
||||||
|
Confidential Professional Support
|
||||||
|
Bespoke development
|
||||||
|
Consultancy
|
||||||
|
Training
|
||||||
|
|
||||||
|
Community support and contributions:
|
||||||
|
|
||||||
|
The diverse and growing community of over 5000 developers is centred around the public osg-users mailing list/forum, where members discuss how best to use OpenSceneGraph, provide mutual support, and coordinate development of new features and bug fixes. Members of this community come from many different countries with backgrounds ranging from some of the world's largest aerospace companies, game companies, and visual simulation specialists to university researchers, students and hobbyists.
|
||||||
|
|
||||||
|
The OpenSceneGraph project owes a great deal to the community for its development and support, in particular we wish to thank the 550 individuals from around the world that have directly contributed to the development and refinement of the OpenSceneGraph code base.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
= !OpenSceneGraph 3.2 release improves support iOS and Android, supports a range of new OpenGL features much more.
|
= !OpenSceneGraph 3.2 release improves support iOS and Android, supports a range of new OpenGL features much more.
|
||||||
|
|
||||||
PERTHSHIRE, Scotland - 24th July 2013 - !OpenSceneGraph Professional Services announces the release of !OpenSceneGraph 3.2, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. !OpenSceneGraph 3.2 written entirely in Standard C++ and built upon OpenGL, offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modeling markets - a real-time visualization tool which eclipses commercial scene graph toolkits in functionality, stability and performance. !OpenSceneGraph 3.2 runs on all Microsoft Windows platforms, Apple OS/X, IOS, GNU/Linux, Android, IRIX, Solaris, HP-UX, AIX and FreeBSD operating systems.
|
PERTHSHIRE, Scotland - 24th July 2013 - !OpenSceneGraph Professional Services announces the release of !OpenSceneGraph 3.2, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. !OpenSceneGraph 3.2 written entirely in Standard C++ and built upon OpenGL, offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modelling markets - a real-time visualization tool which eclipses commercial scene graph toolkits in functionality, stability and performance. !OpenSceneGraph 3.2 runs on all Microsoft Windows platforms, Apple OS/X, iOS, GNU/Linux, Android, IRIX, Solaris, HP-UX, AIX and FreeBSD operating systems.
|
||||||
|
|
||||||
=== Open-source development delivers industry-leading features and performance ===
|
=== Open-source development delivers industry-leading features and performance ===
|
||||||
The !OpenSceneGraph 3.2 release is the culmination of 14 years of work by the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs in both the desktop and mobile space.
|
The !OpenSceneGraph 3.2 release is the culmination of 14 years of work by the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs in both the desktop and mobile space.
|
||||||
@@ -17,7 +106,7 @@ The !OpenSceneGraph 3.2 release is the culmination of 14 years of work by the op
|
|||||||
* New OpenGL extensions support including compute shaders, tessellation shaders, integer array formats and associated Vec* classes, primitive restart
|
* New OpenGL extensions support including compute shaders, tessellation shaders, integer array formats and associated Vec* classes, primitive restart
|
||||||
* Improvements to osgManipulator NodeKit that introduce new manipulators and improve flexibility and customizability
|
* Improvements to osgManipulator NodeKit that introduce new manipulators and improve flexibility and customizability
|
||||||
* Updates to osgQt to support Qt5 and provide better support for Qt4
|
* Updates to osgQt to support Qt5 and provide better support for Qt4
|
||||||
* New osgGA::Device base class for recieving from and sending events to both real and virtual devices in a generic, extensible way
|
* New osgGA::Device base class for receiving from and sending events to both real and virtual devices in a generic, extensible way
|
||||||
* New ZeroConf, RestHTTP and OSC plugins to enable remote control of applications such as controlling desktop systems from tablets and phones
|
* New ZeroConf, RestHTTP and OSC plugins to enable remote control of applications such as controlling desktop systems from tablets and phones
|
||||||
* Improvements to osgVolume NodeKit and DICOM plugin for better medical visualization
|
* Improvements to osgVolume NodeKit and DICOM plugin for better medical visualization
|
||||||
* New TrackVis .trk track files plugin for the visualization of brain scans.
|
* New TrackVis .trk track files plugin for the visualization of brain scans.
|
||||||
@@ -54,7 +143,7 @@ The !OpenSceneGraph project owes a great deal to the community for its developme
|
|||||||
|
|
||||||
= !OpenSceneGraph 3.0 release adds support OpenGL ES 1.1, OpenGL ES 2.0, OpenGL 3.x to 4.0, support for Andoid and IOS platforms and much more.
|
= !OpenSceneGraph 3.0 release adds support OpenGL ES 1.1, OpenGL ES 2.0, OpenGL 3.x to 4.0, support for Andoid and IOS platforms and much more.
|
||||||
|
|
||||||
PERTHSHIRE, Scotland - 28th June 2011 - !OpenSceneGraph Professional Services announces the release of !OpenSceneGraph 3.0, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. !OpenSceneGraph 3.0 written entirely in Standard C++ and built upon OpenGL, offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modeling markets - a real-time visualization tool which eclipses commercial scene graph toolkits in functionality, stability and performance. !OpenSceneGraph 3.0 runs on all Microsoft Windows platforms, Apple OS/X, IOS, GNU/Linux, Android, IRIX, Solaris, HP-UX, AIX and FreeBSD operating systems.
|
PERTHSHIRE, Scotland - 28th June 2011 - !OpenSceneGraph Professional Services announces the release of !OpenSceneGraph 3.0, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. !OpenSceneGraph 3.0 written entirely in Standard C++ and built upon OpenGL, offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modelling markets - a real-time visualization tool which eclipses commercial scene graph toolkits in functionality, stability and performance. !OpenSceneGraph 3.0 runs on all Microsoft Windows platforms, Apple OS/X, iOS, GNU/Linux, Android, IRIX, Solaris, HP-UX, AIX and FreeBSD operating systems.
|
||||||
|
|
||||||
=== Open-source development delivers industry-leading features and performance ===
|
=== Open-source development delivers industry-leading features and performance ===
|
||||||
The !OpenSceneGraph 3.0 release is the culmination of 12 years of work by the lead developers and the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs.
|
The !OpenSceneGraph 3.0 release is the culmination of 12 years of work by the lead developers and the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs.
|
||||||
@@ -109,7 +198,7 @@ The !OpenSceneGraph project owes a great deal to the community for its developme
|
|||||||
|
|
||||||
= !OpenSceneGraph 2.8 release adds osgAnimation and osgVolume libraries, DICOM support, LispSM shadowing and much more. =
|
= !OpenSceneGraph 2.8 release adds osgAnimation and osgVolume libraries, DICOM support, LispSM shadowing and much more. =
|
||||||
|
|
||||||
PERTHSHIRE, Scotland - 12th February 2009 - !OpenSceneGraph Professional Services announces the release of !OpenSceneGraph 2.8, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. !OpenSceneGraph 2.8 written entirely in Standard C++ and built upon OpenGL, offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modeling markets - a real-time visualization tool which eclipses commercial scene graph toolkits in functionality, stability and performance. !OpenSceneGraph 2.8 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and FreeBSD operating systems.
|
PERTHSHIRE, Scotland - 12th February 2009 - !OpenSceneGraph Professional Services announces the release of !OpenSceneGraph 2.8, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. !OpenSceneGraph 2.8 written entirely in Standard C++ and built upon OpenGL, offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modelling markets - a real-time visualization tool which eclipses commercial scene graph toolkits in functionality, stability and performance. !OpenSceneGraph 2.8 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and FreeBSD operating systems.
|
||||||
|
|
||||||
=== Open-source development delivers industry-leading features and performance ===
|
=== Open-source development delivers industry-leading features and performance ===
|
||||||
The !OpenSceneGraph 2.8 release is the culmination of 10 years of work by the lead developers and the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs.
|
The !OpenSceneGraph 2.8 release is the culmination of 10 years of work by the lead developers and the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs.
|
||||||
@@ -180,7 +269,7 @@ About !OpenSceneGraph Professional Services:[[BR]]
|
|||||||
|
|
||||||
= !OpenSceneGraph 2.6 release adds osgWidget library, KdTree intersections, Anti-aliased FBOsand much more. =
|
= !OpenSceneGraph 2.6 release adds osgWidget library, KdTree intersections, Anti-aliased FBOsand much more. =
|
||||||
|
|
||||||
PERTHSHIRE, Scotland - 5th August 2008 - !OpenSceneGraph Professional Services announces the release of !OpenSceneGraph 2.6, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. !OpenSceneGraph 2.6 written entirely in Standard C++ and built upon OpenGL, offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modeling markets - a real-time visualization tool which eclipses commercial scene graph toolkits in functionality, stability and performance. !OpenSceneGraph 2.6 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and FreeBSD operating systems.
|
PERTHSHIRE, Scotland - 5th August 2008 - !OpenSceneGraph Professional Services announces the release of !OpenSceneGraph 2.6, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. !OpenSceneGraph 2.6 written entirely in Standard C++ and built upon OpenGL, offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modelling markets - a real-time visualization tool which eclipses commercial scene graph toolkits in functionality, stability and performance. !OpenSceneGraph 2.6 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and FreeBSD operating systems.
|
||||||
|
|
||||||
=== Open-source development delivers industry-leading features and performance ===
|
=== Open-source development delivers industry-leading features and performance ===
|
||||||
The !OpenSceneGraph 2.6 release is the culmination of 9 years of work by the lead developers and the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs.
|
The !OpenSceneGraph 2.6 release is the culmination of 9 years of work by the lead developers and the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs.
|
||||||
@@ -249,7 +338,7 @@ About !OpenSceneGraph Professional Services:[[BR]]
|
|||||||
|
|
||||||
= !OpenSceneGraph 2.4 release adds geometry shaders, multiple render targets, support for terrabyte scale terrain databases, writing to !OpenFlight and much more. =
|
= !OpenSceneGraph 2.4 release adds geometry shaders, multiple render targets, support for terrabyte scale terrain databases, writing to !OpenFlight and much more. =
|
||||||
|
|
||||||
PERTHSHIRE, Scotland - 25th April 2008 - !OpenSceneGraph Professional Services announces the release of !OpenSceneGraph 2.4, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. !OpenSceneGraph 2.4 written entirely in Standard C++ and built upon OpenGL, offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modeling markets - a real-time visualization tool which eclipses commercial scene graph toolkits in functionality, stability and performance. !OpenSceneGraph 2.4 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and FreeBSD operating systems.
|
PERTHSHIRE, Scotland - 25th April 2008 - !OpenSceneGraph Professional Services announces the release of !OpenSceneGraph 2.4, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. !OpenSceneGraph 2.4 written entirely in Standard C++ and built upon OpenGL, offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modelling markets - a real-time visualization tool which eclipses commercial scene graph toolkits in functionality, stability and performance. !OpenSceneGraph 2.4 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and FreeBSD operating systems.
|
||||||
|
|
||||||
=== Open-source development delivers industry-leading features and performance ===
|
=== Open-source development delivers industry-leading features and performance ===
|
||||||
The !OpenSceneGraph 2.4 release is the culmination of 9 years of work by the lead developers and the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs.
|
The !OpenSceneGraph 2.4 release is the culmination of 9 years of work by the lead developers and the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs.
|
||||||
@@ -305,7 +394,7 @@ About !OpenSceneGraph Professional Services:[[BR]]
|
|||||||
|
|
||||||
= OpenSceneGraph 2.2 release adds support for advanced displays, soft and parallel split shadow maps and easier builds =
|
= OpenSceneGraph 2.2 release adds support for advanced displays, soft and parallel split shadow maps and easier builds =
|
||||||
|
|
||||||
PERTHSHIRE, Scotland - 4th October 2007 - !OpenSceneGraph Professional Services announces the release of !OpenSceneGraph 2.2, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. !OpenSceneGraph 2.2 written entirely in Standard C++ and built upon OpenGL, offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modeling markets - a real-time visualization tool which eclipses commercial scene graph toolkits in functionality, stability and performance. !OpenSceneGraph 2.2 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and !FreeBSD operating systems.
|
PERTHSHIRE, Scotland - 4th October 2007 - !OpenSceneGraph Professional Services announces the release of !OpenSceneGraph 2.2, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. !OpenSceneGraph 2.2 written entirely in Standard C++ and built upon OpenGL, offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modelling markets - a real-time visualization tool which eclipses commercial scene graph toolkits in functionality, stability and performance. !OpenSceneGraph 2.2 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and !FreeBSD operating systems.
|
||||||
|
|
||||||
=== Open-source development delivers industry-leading features and performance ===
|
=== Open-source development delivers industry-leading features and performance ===
|
||||||
The !OpenSceneGraph 2.2 release is the culmination of 8 years of work by the lead developers and the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs.
|
The !OpenSceneGraph 2.2 release is the culmination of 8 years of work by the lead developers and the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs.
|
||||||
@@ -362,7 +451,7 @@ About !OpenSceneGraph Professional Services:[[BR]]
|
|||||||
|
|
||||||
!!![=OpenSceneGraph=] 2.0 release improves ease-of-use and scalability, introducing new osgViewer, osgShadow and osgManipulator libraries, new build system, improved multi-core, multi-GPU support.
|
!!![=OpenSceneGraph=] 2.0 release improves ease-of-use and scalability, introducing new osgViewer, osgShadow and osgManipulator libraries, new build system, improved multi-core, multi-GPU support.
|
||||||
|
|
||||||
PERTHSHIRE, Scotland - 15th June 2007 - [=OpenSceneGraph=] Professional Services announces the release of [=OpenSceneGraph=] 2.0, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. [=OpenSceneGraph=] 2.0, written entirely in Standard C++ and built upon [=OpenGL=], offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modeling markets a real-time visualization tool which rivals established commercial scene graph toolkits in functionality and performance. [=OpenSceneGraph=] 2.0 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and [=FreeBSD=] operating systems.
|
PERTHSHIRE, Scotland - 15th June 2007 - [=OpenSceneGraph=] Professional Services announces the release of [=OpenSceneGraph=] 2.0, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. [=OpenSceneGraph=] 2.0, written entirely in Standard C++ and built upon [=OpenGL=], offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modelling markets a real-time visualization tool which rivals established commercial scene graph toolkits in functionality and performance. [=OpenSceneGraph=] 2.0 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and [=FreeBSD=] operating systems.
|
||||||
|
|
||||||
!!!Open-source development delivers industry-leading features and performance
|
!!!Open-source development delivers industry-leading features and performance
|
||||||
The [=OpenSceneGraph=] 2.0 release is the culmination of 8 years of work by the lead developers and the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs.
|
The [=OpenSceneGraph=] 2.0 release is the culmination of 8 years of work by the lead developers and the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs.
|
||||||
@@ -420,7 +509,7 @@ Project Lead and Proprietor [=OpenSceneGraph=] Professional Services
|
|||||||
|
|
||||||
!!![=OpenSceneGraph=] 1.2 release introduces Windows 64bit and AIX support, COLLADA support, processor affinity and texture atlas builder.
|
!!![=OpenSceneGraph=] 1.2 release introduces Windows 64bit and AIX support, COLLADA support, processor affinity and texture atlas builder.
|
||||||
|
|
||||||
PERTHSHIRE, Scotland - 12th September 2006 - [=OpenSceneGraph=] Professional Services announces the release of [=OpenSceneGraph=] 1.2, the industry's leading open source scene graph technology, designed to accelerate application development and improve 3D graphics performance. [=OpenSceneGraph=] 1.2, written entirely in Standard C++ and built upon [=OpenGL=], offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modeling markets a real time visualization tool which rivals established commercial scene graph toolkits in functionality and performance. [=OpenSceneGraph=] 1.2 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and [=FreeBSD=] operating systems.
|
PERTHSHIRE, Scotland - 12th September 2006 - [=OpenSceneGraph=] Professional Services announces the release of [=OpenSceneGraph=] 1.2, the industry's leading open source scene graph technology, designed to accelerate application development and improve 3D graphics performance. [=OpenSceneGraph=] 1.2, written entirely in Standard C++ and built upon [=OpenGL=], offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modelling markets a real time visualization tool which rivals established commercial scene graph toolkits in functionality and performance. [=OpenSceneGraph=] 1.2 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and [=FreeBSD=] operating systems.
|
||||||
|
|
||||||
The [=OpenSceneGraph=]-1.2 release introduces:
|
The [=OpenSceneGraph=]-1.2 release introduces:
|
||||||
|
|
||||||
@@ -445,7 +534,7 @@ Project Lead and Proprietor [=OpenSceneGraph=] Professional Services
|
|||||||
!!!OpenSceneGraph 1.1 release introduces peformance and scalability improvements, full OpenGL Shading Language support and new OpenFlight 16.1, TerrPagea2.2 and Quake3 loaders.
|
!!!OpenSceneGraph 1.1 release introduces peformance and scalability improvements, full OpenGL Shading Language support and new OpenFlight 16.1, TerrPagea2.2 and Quake3 loaders.
|
||||||
|
|
||||||
AYRSHIRE, Scotland - July 19th 2006 - [=OpenSceneGraph=] Professional Services announces the release of [=OpenSceneGraph=] 1.1,
|
AYRSHIRE, Scotland - July 19th 2006 - [=OpenSceneGraph=] Professional Services announces the release of [=OpenSceneGraph=] 1.1,
|
||||||
the industry's leading open-source graphics library with [=OpenGL=] 2.0 and [=OpenGL=] Shading Language support. [=OpenSceneGraph=] is designed to accelerate application development and improve 3D graphics performance. [=OpenSceneGraph=] 1.1, written entirely in Standard C++ and built upon [=OpenGL=], offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modeling markets a real time visualization tool which rivals established commercial scene graph toolkits in functionality and performance. [=OpenSceneGraph=] 1.1 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris and [=FreeBSD=] operating systems.
|
the industry's leading open-source graphics library with [=OpenGL=] 2.0 and [=OpenGL=] Shading Language support. [=OpenSceneGraph=] is designed to accelerate application development and improve 3D graphics performance. [=OpenSceneGraph=] 1.1, written entirely in Standard C++ and built upon [=OpenGL=], offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modelling markets a real time visualization tool which rivals established commercial scene graph toolkits in functionality and performance. [=OpenSceneGraph=] 1.1 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris and [=FreeBSD=] operating systems.
|
||||||
|
|
||||||
The OpenSceneGraph-1.1 release introduces:
|
The OpenSceneGraph-1.1 release introduces:
|
||||||
|
|
||||||
@@ -472,7 +561,7 @@ Project Lead and Proprietor [=OpenSceneGraph=] Professional Services
|
|||||||
|
|
||||||
!!!High performance open-source graphics toolkit [=OpenSceneGraph=] hits 1.0!
|
!!!High performance open-source graphics toolkit [=OpenSceneGraph=] hits 1.0!
|
||||||
|
|
||||||
AYRSHIRE, Scotland - December 9th, 2005 - [=OpenSceneGraph=] Professional Services announces the release of [=OpenSceneGraph=] 1.0, the industry's leading open-source graphics library with [=OpenGL=] 2.0 and [=OpenGL=] Shading Language support. [=OpenSceneGraph=] is designed to accelerate application development and improve 3D graphics performance. [=OpenSceneGraph=] 1.0, written entirely in Standard C++ and built upon [=OpenGL=], offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modeling markets a real time visualization tool which rivals established commercial scene graph toolkits in functionality and performance. [=OpenSceneGraph=] 1.0 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris and [=FreeBSD=] operating systems.
|
AYRSHIRE, Scotland - December 9th, 2005 - [=OpenSceneGraph=] Professional Services announces the release of [=OpenSceneGraph=] 1.0, the industry's leading open-source graphics library with [=OpenGL=] 2.0 and [=OpenGL=] Shading Language support. [=OpenSceneGraph=] is designed to accelerate application development and improve 3D graphics performance. [=OpenSceneGraph=] 1.0, written entirely in Standard C++ and built upon [=OpenGL=], offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modelling markets a real time visualization tool which rivals established commercial scene graph toolkits in functionality and performance. [=OpenSceneGraph=] 1.0 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris and [=FreeBSD=] operating systems.
|
||||||
|
|
||||||
->''"3Dlabs congratulates the [=OpenSceneGraph=] development community on the release of [=OpenSceneGraph=] 1.0. [=OpenSceneGraph=] is a shining example of how open-source projects can deliver commercial-quality products with outstanding performance and a ton of cutting-edge features. 3Dlabs committed engineering resources to [=OpenSceneGraph=] to help implement full support of programmable shader technology through [=OpenGL=] Shading Language. It is gratifying to see the excitement that developers have for this important cross-platform, real-time visualization library."'''\\
|
->''"3Dlabs congratulates the [=OpenSceneGraph=] development community on the release of [=OpenSceneGraph=] 1.0. [=OpenSceneGraph=] is a shining example of how open-source projects can deliver commercial-quality products with outstanding performance and a ton of cutting-edge features. 3Dlabs committed engineering resources to [=OpenSceneGraph=] to help implement full support of programmable shader technology through [=OpenGL=] Shading Language. It is gratifying to see the excitement that developers have for this important cross-platform, real-time visualization library."'''\\
|
||||||
Randi Rost, director of developer relations at 3Dlabs, http://developer.3Dlabs.com/
|
Randi Rost, director of developer relations at 3Dlabs, http://developer.3Dlabs.com/
|
||||||
@@ -599,7 +688,7 @@ osgpbuffer also example now uses Producer's pbuffer support making it portable a
|
|||||||
|
|
||||||
API refinements, bug fixes and performance improvements:
|
API refinements, bug fixes and performance improvements:
|
||||||
|
|
||||||
There have been many bug fixes, a number of performance improvements and API cleanups that have occured throughout the 0.9.8 - 0.9.9, too many separate items to enumerate here. Together with the above new features they all go to making the OpenSceneGraph-0.9.9 the most robust, high performance and feature rich version so far, and sets the stage for the upcoming 1.0.
|
There have been many bug fixes, a number of performance improvements and API cleanups that have occurred throughout the 0.9.8 - 0.9.9, too many separate items to enumerate here. Together with the above new features they all go to making the OpenSceneGraph-0.9.9 the most robust, high performance and feature rich version so far, and sets the stage for the upcoming 1.0.
|
||||||
|
|
||||||
We would like to thank the following engineers for their contributions in the 0.9.8 - 0.9.9.9 time frame (in alphabetic order):
|
We would like to thank the following engineers for their contributions in the 0.9.8 - 0.9.9.9 time frame (in alphabetic order):
|
||||||
Alberto Farre, Bob Kuehne, Brede Johansen, Carlo Camporesi, Chris Hanson, Don Burns, Donn Mielcarek, Don Tidrow, Farshid Lashkari, Frederic Marmond, Garrett Potts, Igor Kravtchenko, James French, Jan Ciger, John Grant, Joakim Simonsson, Joran Jessurun, Jason Daly, Kevin Moiule, Leandro Motta Barros, Marco Jez, Mason Menninger, Mike Weiblen, Nathan Monteleone, Norman Vine, Olaf Flebbe, Paul Melis, Per Fahlberg, Rainer Oder, Randall Hopper, Reinhard Sainitzer, Robert Osfield, Ruben, Sebastien Grignard, Stephan Huber, Terry Welsh, Thom DeCarlo, Tony Horrobin, Tree, Tugkan Calapoglu, Vivek Rajan, Waltice and Yuzhong Shen
|
Alberto Farre, Bob Kuehne, Brede Johansen, Carlo Camporesi, Chris Hanson, Don Burns, Donn Mielcarek, Don Tidrow, Farshid Lashkari, Frederic Marmond, Garrett Potts, Igor Kravtchenko, James French, Jan Ciger, John Grant, Joakim Simonsson, Joran Jessurun, Jason Daly, Kevin Moiule, Leandro Motta Barros, Marco Jez, Mason Menninger, Mike Weiblen, Nathan Monteleone, Norman Vine, Olaf Flebbe, Paul Melis, Per Fahlberg, Rainer Oder, Randall Hopper, Reinhard Sainitzer, Robert Osfield, Ruben, Sebastien Grignard, Stephan Huber, Terry Welsh, Thom DeCarlo, Tony Horrobin, Tree, Tugkan Calapoglu, Vivek Rajan, Waltice and Yuzhong Shen
|
||||||
@@ -618,7 +707,7 @@ OpenProducer - http://www.andesengineering.com/Producer/index.html
|
|||||||
OpenThreads - http://openthreads.sf.net
|
OpenThreads - http://openthreads.sf.net
|
||||||
xine-lib - http://xinehq.de/
|
xine-lib - http://xinehq.de/
|
||||||
|
|
||||||
OpenSceneGraph Commericial Support, Training and Consultancy links:
|
OpenSceneGraph Commercial Support, Training and Consultancy links:
|
||||||
|
|
||||||
OpenSceneGraph Professional Services - http://www.openscenegraph.com
|
OpenSceneGraph Professional Services - http://www.openscenegraph.com
|
||||||
Andes Engineering - http://www.andesengineering.com
|
Andes Engineering - http://www.andesengineering.com
|
||||||
@@ -632,7 +721,7 @@ Andes Engineering - http://www.andesengineering.com
|
|||||||
|
|
||||||
>>> Support for database archives, improved pager, 3d compressed textures
|
>>> Support for database archives, improved pager, 3d compressed textures
|
||||||
|
|
||||||
Release 0.9.8 reflects a continuation of the prior committment to release
|
Release 0.9.8 reflects a continuation of the prior commitment to release
|
||||||
often, arriving only two short months after 0.9.7. This contrasts sharply
|
often, arriving only two short months after 0.9.7. This contrasts sharply
|
||||||
to the long period between 0.9.6-2 and 0.9.7. The following set of
|
to the long period between 0.9.6-2 and 0.9.7. The following set of
|
||||||
improvements and features are part of the 0.9.8 release.
|
improvements and features are part of the 0.9.8 release.
|
||||||
@@ -1047,7 +1136,7 @@ Andes Engineering - http://www.andesengineering.com
|
|||||||
has now been moved to a freetype plug-in which is dynamically loaded on demand,
|
has now been moved to a freetype plug-in which is dynamically loaded on demand,
|
||||||
with the core osgText library providing a default font when the plug-in is
|
with the core osgText library providing a default font when the plug-in is
|
||||||
unavailable. Moving the freetype dependency out of the osgText library makes
|
unavailable. Moving the freetype dependency out of the osgText library makes
|
||||||
it just dependant on OpenGL and Standard C++ like the rest of the core libraries,
|
it just dependent on OpenGL and Standard C++ like the rest of the core libraries,
|
||||||
allowing osgText to compile by default on all platforms.
|
allowing osgText to compile by default on all platforms.
|
||||||
|
|
||||||
Improved thread safety has also been achieved in the core osg and osgUtil libraries
|
Improved thread safety has also been achieved in the core osg and osgUtil libraries
|
||||||
@@ -1472,9 +1561,9 @@ Andes Engineering - http://www.andesengineering.com
|
|||||||
|
|
||||||
Scene graph optimization has been added which can boost performance
|
Scene graph optimization has been added which can boost performance
|
||||||
on some database by as much as an order of magnititude, this is
|
on some database by as much as an order of magnititude, this is
|
||||||
particularily noticable in .flt based databases. Display list performance
|
particularly noticeable in .flt based databases. Display list performance
|
||||||
has also been boosted on NVidia based machines thanks to changing the
|
has also been boosted on NVidia based machines thanks to changing the
|
||||||
compilation and execution of display list into two seperate operations.
|
compilation and execution of display list into two separate operations.
|
||||||
|
|
||||||
App callbacks are now supported on all Nodes, and there now a proper
|
App callbacks are now supported on all Nodes, and there now a proper
|
||||||
app traversal which can be used to animate the scene.
|
app traversal which can be used to animate the scene.
|
||||||
@@ -1524,7 +1613,7 @@ Andes Engineering - http://www.andesengineering.com
|
|||||||
the core scene graph library making extremely easy to take advantage of
|
the core scene graph library making extremely easy to take advantage of
|
||||||
this advanced rendering techinque - normally only seen in research papers.
|
this advanced rendering techinque - normally only seen in research papers.
|
||||||
Check out osgimpostor demo to see how easy it is to add osg::Impostor
|
Check out osgimpostor demo to see how easy it is to add osg::Impostor
|
||||||
nodes to your own models. Impostors are particularily effective are
|
nodes to your own models. Impostors are particularly effective are
|
||||||
reducing scene complexity whilest minimizing the visual impact, making it
|
reducing scene complexity whilest minimizing the visual impact, making it
|
||||||
ideal for scenes with large numbers of complex objects such as a city
|
ideal for scenes with large numbers of complex objects such as a city
|
||||||
scene, or a dense forest.
|
scene, or a dense forest.
|
||||||
@@ -1535,7 +1624,7 @@ Andes Engineering - http://www.andesengineering.com
|
|||||||
|
|
||||||
The cool thing about both the osgreflect and osgimpostor demos is that
|
The cool thing about both the osgreflect and osgimpostor demos is that
|
||||||
there is no hardwiring to achieve the results, the scene graph stores
|
there is no hardwiring to achieve the results, the scene graph stores
|
||||||
all the information neccessary to specify the number and type of rendering
|
all the information necessary to specify the number and type of rendering
|
||||||
passes, and the framework handles the rest behind the scenes. This also
|
passes, and the framework handles the rest behind the scenes. This also
|
||||||
makes it very easy to add these advanced rendering techinques to your
|
makes it very easy to add these advanced rendering techinques to your
|
||||||
own applications as everything is cleanly encapsulated with
|
own applications as everything is cleanly encapsulated with
|
||||||
@@ -1547,7 +1636,7 @@ Andes Engineering - http://www.andesengineering.com
|
|||||||
web or your own.
|
web or your own.
|
||||||
|
|
||||||
osg::Camera has been totally revamped and now supports asymetric
|
osg::Camera has been totally revamped and now supports asymetric
|
||||||
and othographics projections in addition to the symetrical perspective
|
and othographics projections in addition to the symmetrical perspective
|
||||||
projections.
|
projections.
|
||||||
|
|
||||||
And finally, support for texture subloading has been added to osg::Texture
|
And finally, support for texture subloading has been added to osg::Texture
|
||||||
|
|||||||
119
README.md
Normal file
119
README.md
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
[](https://travis-ci.org/openscenegraph/OpenSceneGraph)
|
||||||
|
[](https://scan.coverity.com/projects/openscenegraph-openscenegraph)
|
||||||
|
[](https://codedocs.xyz/openscenegraph/OpenSceneGraph/)
|
||||||
|
[ABI Tracker](https://abi-laboratory.pro/tracker/timeline/openscenegraph/ "ABI Tracker")
|
||||||
|
|
||||||
|
# Introduction
|
||||||
|
|
||||||
|
Welcome to the OpenSceneGraph (OSG).
|
||||||
|
|
||||||
|
For up-to-date information on the project, in-depth details on how to compile and run libraries and examples, see the documentation on the OpenSceneGraph website:
|
||||||
|
|
||||||
|
http://www.openscenegraph.org/index.php/documentation
|
||||||
|
|
||||||
|
For support subscribe to our public mailing list or forum, details at:
|
||||||
|
|
||||||
|
http://www.openscenegraph.org/index.php/support
|
||||||
|
|
||||||
|
For the impatient, we've included quick build instructions below, these are are broken down is three parts:
|
||||||
|
|
||||||
|
1) General notes on building the OpenSceneGraph
|
||||||
|
2) macOS release notes
|
||||||
|
3) iOS release notes
|
||||||
|
|
||||||
|
If details below are not sufficient then head over to the openscenegraph.org to the Documentation/GettingStarted and Documentation/PlatformSpecifics sections for more indepth instructions.
|
||||||
|
|
||||||
|
Robert Osfield.
|
||||||
|
Project Lead.
|
||||||
|
29th June 2018.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Section 1. How to build OpenSceneGraph
|
||||||
|
|
||||||
|
The OpenSceneGraph uses the CMake build system to generate a platform-specific build environment. CMake reads the `CMakeLists.txt` files that you'll find throughout the OpenSceneGraph directories, checks for installed dependencies and then generates files for the selected build system.
|
||||||
|
|
||||||
|
If you don't already have CMake installed on your system you can grab it from http://www.cmake.org, use version 2.8.0 or later. Details on the OpenSceneGraph's CMake build can be found at:
|
||||||
|
|
||||||
|
http://www.openscenegraph.org/projects/osg/wiki/Build/CMake
|
||||||
|
|
||||||
|
Under Unix-like systems (i.e. Linux, IRIX, Solaris, Free-BSD, HP-UX, AIX, macOS) use the `cmake` or `ccmake` command-line utils. Note that `cmake .` defaults to building Release to ensure that you get the best performance from your final libraries/applications.
|
||||||
|
|
||||||
|
cd OpenSceneGraph
|
||||||
|
cmake .
|
||||||
|
make
|
||||||
|
sudo make install
|
||||||
|
|
||||||
|
Alternatively, you can create an out-of-source build directory and run cmake or ccmake from there. The advantage to this approach is that the temporary files created by CMake won't clutter the OpenSceneGraph source directory, and also makes it possible to have multiple independent build targets by creating multiple build directories. In a directory alongside the OpenSceneGraph use:
|
||||||
|
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake ../OpenSceneGraph
|
||||||
|
make
|
||||||
|
sudo make install
|
||||||
|
|
||||||
|
Under Windows use the GUI tool CMakeSetup to build your VisualStudio files. The following page on our wiki dedicated to the CMake build system should help guide you through the process:
|
||||||
|
|
||||||
|
http://www.openscenegraph.org/index.php/documentation/platform-specifics/windows
|
||||||
|
|
||||||
|
Under macOS you can either use the CMake build system above, or use the Xcode projects that you will find in the OpenSceneGraph/Xcode directory. See release notes on macOS CMake build below.
|
||||||
|
|
||||||
|
For further details on compilation, installation and platform-specific information read "Getting Started" guide:
|
||||||
|
|
||||||
|
http://www.openscenegraph.org/index.php/documentation/10-getting-started
|
||||||
|
|
||||||
|
|
||||||
|
## Section 2. Release notes on macOS build, by Eric Sokolowski et al.
|
||||||
|
|
||||||
|
There are two ways to compile OpenSceneGraph under macOS. The recommended way is to use CMake to generate Xcode project files and then use Xcode to build the library. The default project will be able to build Debug or Release libraries, examples, and sample applications.
|
||||||
|
|
||||||
|
The alternative is to build OpenSceneGraph from the command line using `make` or `ninja` using the instructions for Unix-like systems above.
|
||||||
|
|
||||||
|
Here are some key settings to consider when using CMake:
|
||||||
|
|
||||||
|
- BUILD_OSG_EXAMPLES - By default this is turned off. Turn this setting on to compile many great example programs.
|
||||||
|
- CMAKE_OSX_ARCHITECTURES - Xcode can create applications, executables, libraries, and frameworks that can be run on more than one architecture. Use this setting to indicate the architectures on which to build OSG. x86_64 is the only supported value for OS versions > 10.7.
|
||||||
|
- OSG_BUILD_APPLICATION_BUNDLES - Normally only executable binaries are created for the examples and sample applications. Turn this option on if you want to create real macOS .app bundles. There are caveats to creating `.app` bundles, see below.
|
||||||
|
- OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX - By default macOS uses the `imageio` plugin instead of the plugins for the individual file types (e.g. `jpg`, `gif`, etc.) to load image file types. The `imageio` plugin can handle all popular file formats through the ImageIO framework.
|
||||||
|
- OSG_WINDOWING_SYSTEM - You have the choice to use Cocoa, Carbon, or X11 when building applications on macOS. Cocoa is the default for OS versions >= 10.5. Carbon and X11 are no longer actively supported, either by Apple or the OSG community.
|
||||||
|
|
||||||
|
|
||||||
|
### APPLICATION BUNDLES (.app bundles)
|
||||||
|
|
||||||
|
The example programs when built as application bundles only contain the executable file. They do not contain the dependent libraries as would a normal bundle, so they are not generally portable to other machines.
|
||||||
|
They also do not know where to find plugins. An environmental variable OSG_LIBRARY_PATH may be set to point to the location where the plugin .so files are located. OSG_FILE_PATH may be set to point to the location where data files are located. Setting OSG_FILE_PATH to the OpenSceneGraph-Data directory is very useful when testing OSG by running the example programs.
|
||||||
|
|
||||||
|
Many of the example programs use command-line arguments. When double-clicking on an application (or using the equivalent "open" command on the command line) only those examples and applications that do not require command-line arguments will successfully run. The executable file within the .app bundle can be run from the command-line if command-line arguments are needed.
|
||||||
|
|
||||||
|
|
||||||
|
## Section 3. Release notes on iOS build, by Thomas Hogarth
|
||||||
|
|
||||||
|
With CMake, XCode and the iOS sdk installed you can generate an iOS XCode project using the following command line:
|
||||||
|
|
||||||
|
export THIRDPARTY_PATH=/path/to/my/3rdParty
|
||||||
|
cmake ./ -G Xcode -DOSG_BUILD_PLATFORM_IPHONE:BOOL=ON \
|
||||||
|
-DIPHONE_SDKVER="10.2" \
|
||||||
|
-DIPHONE_VERSION_MIN="8.0" \
|
||||||
|
-DOPENGL_PROFILE:STRING=GLES2 \
|
||||||
|
-DBUILD_OSG_APPLICATIONS:BOOL=OFF \
|
||||||
|
-DBUILD_OSG_EXAMPLES:BOOL=ON \
|
||||||
|
-DOSG_WINDOWING_SYSTEM:STRING=IOS \
|
||||||
|
-DOSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX="imageio" \
|
||||||
|
-DDYNAMIC_OPENSCENEGRAPH:BOOL=OFF \
|
||||||
|
-DDYNAMIC_OPENTHREADS:BOOL=OFF \
|
||||||
|
-DCURL_INCLUDE_DIR:PATH="$THIRDPARTY_PATH/curl-ios-device/include" \
|
||||||
|
-DCURL_LIBRARY:PATH="$THIRDPARTY_PATH/curl-ios-device/lib/libcurl.a" \
|
||||||
|
-DFREETYPE_INCLUDE_DIR_freetype2:PATH="$THIRDPARTY_PATH/freetype-ios-universal/include/freetype" \
|
||||||
|
-DFREETYPE_INCLUDE_DIR_ft2build:PATH="$THIRDPARTY_PATH/freetype-ios-universal/include" \
|
||||||
|
-DFREETYPE_LIBRARY:PATH="$THIRDPARTY_PATH/freetype-ios-universal/lib/libFreeType_iphone_universal.a" \
|
||||||
|
-DTIFF_INCLUDE_DIR:PATH="$THIRDPARTY_PATH/tiff-ios-device/include" \
|
||||||
|
-DTIFF_LIBRARY:PATH="$THIRDPARTY_PATH/tiff-ios-device/lib/libtiff.a" \
|
||||||
|
-DGDAL_INCLUDE_DIR:PATH="$THIRDPARTY_PATH/gdal-ios-device/include" \
|
||||||
|
-DGDAL_LIBRARY:PATH="$THIRDPARTY_PATH/gdal-ios-device/lib/libgdal.a"
|
||||||
|
|
||||||
|
|
||||||
|
Be sure to set the THIRDPARTY_PATH to the path containing your thirdparty dependencies. Set IPHONE_SDKVER to the version of the iOS sdk you have installed, in this instance 10.2. IPHONE_VERSION_MIN controls the base sdk used by xcode, and lastly set OPENGL_PROFILE to the version of GLES you want to use.
|
||||||
|
|
||||||
|
Once this completes an XCode project will have been generated in the osg root folder. Open the generated Xcode project, select the example_osgViewerIPhone target. In 'General' tab set a development team. In the 'Build Settings' tab search for 'Other Linker Flags', then for each target type (debug, release etc) that you want to use open the list of arguments and delete the 'OpenGL' line and the '-framework' line above it. This is because cmake has tried to add the desktop OpenGL library which we don't want.
|
||||||
|
|
||||||
|
Once this is done you should be able to build and deploy the `example_osgViewerIPhone` target on your device.
|
||||||
209
README.txt
209
README.txt
@@ -1,209 +0,0 @@
|
|||||||
Welcome to the OpenSceneGraph (OSG).
|
|
||||||
|
|
||||||
For up-to-date information on the project, in-depth details on how to
|
|
||||||
compile and run libraries and examples, see the documentation on the
|
|
||||||
OpenSceneGraph website:
|
|
||||||
|
|
||||||
http://www.openscenegraph.org/index.php/documentation
|
|
||||||
|
|
||||||
For support subscribe to our public mailing list or forum, details at:
|
|
||||||
|
|
||||||
http://www.openscenegraph.org/index.php/support
|
|
||||||
|
|
||||||
For the impatient, we've included quick build instructions below, these
|
|
||||||
are are broken down is three parts:
|
|
||||||
|
|
||||||
1) General notes on building the OpenSceneGraph
|
|
||||||
2) OSX release notes
|
|
||||||
3) iOS release notes
|
|
||||||
|
|
||||||
If details below are not sufficient then head over to the openscenegraph.org
|
|
||||||
to the Documentation/GettingStarted and Documentation/PlatformSpecifics sections for
|
|
||||||
more indepth instructions.
|
|
||||||
|
|
||||||
Robert Osfield.
|
|
||||||
Project Lead.
|
|
||||||
3rd July 2015.
|
|
||||||
|
|
||||||
--
|
|
||||||
|
|
||||||
Section 1. How to build the OpenSceneGraph
|
|
||||||
==========================================
|
|
||||||
|
|
||||||
The OpenSceneGraph uses the CMake build system to generate a
|
|
||||||
platform-specific build environment. CMake reads the CMakeLists.txt
|
|
||||||
files that you'll find throughout the OpenSceneGraph directories,
|
|
||||||
checks for installed dependenciesand then generates the appropriate
|
|
||||||
build system.
|
|
||||||
|
|
||||||
If you don't already have CMake installed on your system you can grab
|
|
||||||
it from http://www.cmake.org, use version 2.4.6 or later. Details on the
|
|
||||||
OpenSceneGraph's CMake build can be found at:
|
|
||||||
|
|
||||||
http://www.openscenegraph.org/projects/osg/wiki/Build/CMake
|
|
||||||
|
|
||||||
Under unices (i.e. Linux, IRIX, Solaris, Free-BSD, HP-Ux, AIX, OSX)
|
|
||||||
use the cmake or ccmake command-line utils. Note that cmake . defaults
|
|
||||||
to building Release to ensure that you get the best performance from
|
|
||||||
your final libraries/applications.
|
|
||||||
|
|
||||||
cd OpenSceneGraph
|
|
||||||
cmake .
|
|
||||||
make
|
|
||||||
sudo make install
|
|
||||||
|
|
||||||
Alternatively, you can create an out-of-source build directory and run
|
|
||||||
cmake or ccmake from there. The advantage to this approach is that the
|
|
||||||
temporary files created by CMake won't clutter the OpenSceneGraph
|
|
||||||
source directory, and also makes it possible to have multiple
|
|
||||||
independent build targets by creating multiple build directories. In a
|
|
||||||
directory alongside the OpenSceneGraph use:
|
|
||||||
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake ../OpenSceneGraph
|
|
||||||
make
|
|
||||||
sudo make install
|
|
||||||
|
|
||||||
Under Windows use the GUI tool CMakeSetup to build your VisualStudio
|
|
||||||
files. The following page on our wiki dedicated to the CMake build
|
|
||||||
system should help guide you through the process:
|
|
||||||
|
|
||||||
http://www.openscenegraph.org/index.php/documentation/platform-specifics/windows
|
|
||||||
|
|
||||||
Under OSX you can either use the CMake build system above, or use the
|
|
||||||
Xcode projects that you will find in the OpenSceneGraph/Xcode
|
|
||||||
directory. See release notes on OSX CMake build below.
|
|
||||||
|
|
||||||
For further details on compilation, installation and platform-specific
|
|
||||||
information read "Getting Started" guide:
|
|
||||||
|
|
||||||
http://www.openscenegraph.org/index.php/documentation/10-getting-started
|
|
||||||
|
|
||||||
|
|
||||||
Section 2. Release notes on OSX build, by Eric Sokolowsky, August 5, 2008
|
|
||||||
=========================================================================
|
|
||||||
|
|
||||||
There are several ways to compile OpenSceneGraph under OSX. The
|
|
||||||
recommended way is to use CMake 2.6 to generate Xcode projects, then use
|
|
||||||
Xcode to build the library. The default project will be able to build
|
|
||||||
Debug or Release libraries, examples, and sample applications. Here are
|
|
||||||
some key settings to consider when using CMake:
|
|
||||||
|
|
||||||
BUILD_OSG_EXAMPLES - By default this is turned off. Turn this setting on
|
|
||||||
to compile many great example programs.
|
|
||||||
|
|
||||||
CMAKE_OSX_ARCHITECTURES - Xcode can create applications, executables,
|
|
||||||
libraries, and frameworks that can be run on more than one architecture.
|
|
||||||
Use this setting to indicate the architectures on which to build OSG.
|
|
||||||
Possibilities include ppc, ppc64, i386, and x86_64. Building OSG using
|
|
||||||
either of the 64-bit options (ppc64 and x86_64) has its own caveats
|
|
||||||
below.
|
|
||||||
|
|
||||||
OSG_BUILD_APPLICATION_BUNDLES - Normally only executable binaries are
|
|
||||||
created for the examples and sample applications. Turn this option on if
|
|
||||||
you want to create real OSX .app bundles. There are caveats to creating
|
|
||||||
.app bundles, see below.
|
|
||||||
|
|
||||||
OSG_WINDOWING_SYSTEM - You have the choice to use Carbon or X11 when
|
|
||||||
building applications on OSX. Under Leopard and later, X11 applications,
|
|
||||||
when started, will automatically launch X11 when needed. However,
|
|
||||||
full-screen X11 applications will still show the menu bar at the top of
|
|
||||||
the screen. Since many parts of the Carbon user interface are not
|
|
||||||
64-bit, X11 is the only supported option for OSX applications compiled
|
|
||||||
for ppc64 or x86_64.
|
|
||||||
|
|
||||||
There is an Xcode directory in the base of the OSG software
|
|
||||||
distribution, but its future is limited, and will be discontinued once
|
|
||||||
the CMake project generator completely implements its functionality.
|
|
||||||
|
|
||||||
|
|
||||||
APPLICATION BUNDLES (.app bundles)
|
|
||||||
|
|
||||||
The example programs when built as application bundles only contain the
|
|
||||||
executable file. They do not contain the dependent libraries as would a
|
|
||||||
normal bundle, so they are not generally portable to other machines.
|
|
||||||
They also do not know where to find plugins. An environmental variable
|
|
||||||
OSG_LIBRARY_PATH may be set to point to the location where the plugin
|
|
||||||
.so files are located. OSG_FILE_PATH may be set to point to the location
|
|
||||||
where data files are located. Setting OSG_FILE_PATH to the
|
|
||||||
OpenSceneGraph-Data directory is very useful when testing OSG by running
|
|
||||||
the example programs.
|
|
||||||
|
|
||||||
Many of the example programs use command-line arguments. When
|
|
||||||
double-clicking on an application (or using the equivalent "open"
|
|
||||||
command on the command line) only those examples and applications that
|
|
||||||
do not require command-line arguments will successfully run. The
|
|
||||||
executable file within the .app bundle can be run from the command-line
|
|
||||||
if command-line arguments are needed.
|
|
||||||
|
|
||||||
|
|
||||||
64-BIT APPLICATION SUPPORT
|
|
||||||
|
|
||||||
OpenSceneGraph will not compile successfully when OSG_WINDOWING_SYSTEM is
|
|
||||||
Carbon and either x86_64 or ppc64 is selected under CMAKE_OSX_ARCHITECTURES,
|
|
||||||
as Carbon is a 32bit only API. A version of the osgviewer library written in
|
|
||||||
Cocoa is needed. However, OSG may be compiled under 64-bits if the X11
|
|
||||||
windowing system is selected. However, Two parts of the OSG default
|
|
||||||
distribution will not work with 64-bit X11: the osgviewerWX example
|
|
||||||
program and the osgdb_qt (Quicktime) plugin. These must be removed from
|
|
||||||
the Xcode project after Cmake generates it in order to compile with
|
|
||||||
64-bit architectures. The lack of the latter means that images such as
|
|
||||||
jpeg, tiff, png, and gif will not work, nor will animations dependent on
|
|
||||||
Quicktime. A new ImageIO-based plugin is being developed to handle the
|
|
||||||
still images, and a QTKit plugin will need to be developed to handle
|
|
||||||
animations.
|
|
||||||
|
|
||||||
|
|
||||||
Section 3. Release notes on iOS build, by Thomas Hoghart
|
|
||||||
=========================================================
|
|
||||||
|
|
||||||
* Run CMake with either OSG_BUILD_PLATFORM_IPHONE or OSG_BUILD_PLATFORM_IPHONE_SIMULATOR set:
|
|
||||||
$ mkdir build-iOS ; cd build-iOS
|
|
||||||
$ ccmake -DOSG_BUILD_PLATFORM_IPHONE_SIMULATOR=YES -G Xcode ..
|
|
||||||
* Check that CMAKE_OSX_ARCHITECTURE is i386 for the simulator or armv6;armv7 for the device
|
|
||||||
* Disable DYNAMIC_OPENSCENEGRAPH, DYNAMIC_OPENTHREADS
|
|
||||||
This will give us the static build we need for iPhone.
|
|
||||||
* Disable OSG_GL1_AVAILABLE, OSG_GL2_AVAILABLE, OSG_GL3_AVAILABLE,
|
|
||||||
OSG_GL_DISPLAYLISTS_AVAILABLE, OSG_GL_VERTEX_FUNCS_AVAILABLE
|
|
||||||
* Enable OSG_GLES1_AVAILABLE *OR* OSG_GLES2_AVAILABLE *OR* OSG_GLES3_AVAILABLE (GLES3 will enable GLES2 features)
|
|
||||||
* Ensure OSG_WINDOWING_SYSTEM is set to IOS
|
|
||||||
* Change FREETYPE include and library paths to an iPhone version
|
|
||||||
(OpenFrameworks has one bundled with its distribution)
|
|
||||||
* Ensure that CMake_OSX_SYSROOT points to your iOS SDK.
|
|
||||||
* Generate the Xcode project
|
|
||||||
* Open the Xcode project
|
|
||||||
$ open OpenSceneGraph.xcodeproj
|
|
||||||
* Under Sources -> osgDB, select FileUtils.cpp and open the 'Get Info' panel, change File Type
|
|
||||||
to source.cpp.objcpp
|
|
||||||
|
|
||||||
Here's an example for the command-line:
|
|
||||||
$ cmake -G Xcode \
|
|
||||||
-D OSG_BUILD_PLATFORM_IPHONE:BOOL=ON \
|
|
||||||
-D CMAKE_CXX_FLAGS:STRING="-ftree-vectorize -fvisibility-inlines-hidden -mno-thumb -arch armv6 -pipe -no-cpp-precomp -miphoneos-version-min=3.1 -mno-thumb" \
|
|
||||||
-D BUILD_OSG_APPLICATIONS:BOOL=OFF \
|
|
||||||
-D OSG_BUILD_FRAMEWORKS:BOOL=OFF \
|
|
||||||
-D OSG_WINDOWING_SYSTEM:STRING=IOS \
|
|
||||||
-D OSG_BUILD_PLATFORM_IPHONE:BOOL=ON \
|
|
||||||
-D CMAKE_OSX_ARCHITECTURES:STRING="armv6;armv7" \
|
|
||||||
-D CMAKE_OSX_SYSROOT:STRING=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk \
|
|
||||||
-D OSG_GL1_AVAILABLE:BOOL=OFF \
|
|
||||||
-D OSG_GL2_AVAILABLE:BOOL=OFF \
|
|
||||||
-D OSG_GLES1_AVAILABLE:BOOL=ON \
|
|
||||||
-D OSG_GL_DISPLAYLISTS_AVAILABLE:BOOL=OFF \
|
|
||||||
-D OSG_GL_FIXED_FUNCTION_AVAILABLE:BOOL=ON \
|
|
||||||
-D OSG_GL_LIBRARY_STATIC:BOOL=OFF \
|
|
||||||
-D OSG_GL_MATRICES_AVAILABLE:BOOL=ON \
|
|
||||||
-D OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE:BOOL=ON \
|
|
||||||
-D OSG_GL_VERTEX_FUNCS_AVAILABLE:BOOL=OFF \
|
|
||||||
-D DYNAMIC_OPENSCENEGRAPH:BOOL=OFF \
|
|
||||||
-D DYNAMIC_OPENTHREADS:BOOL=OFF .
|
|
||||||
|
|
||||||
|
|
||||||
Known issues:
|
|
||||||
* When Linking final app against ive plugin, you need to add -lz to
|
|
||||||
the 'Other linker flags' list.
|
|
||||||
* Apps and exes don't get created
|
|
||||||
* You can only select Simulator, or Device projects. In the XCode
|
|
||||||
project you will see both types but the sdk they link will
|
|
||||||
be the same.
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
*
|
*
|
||||||
* This application is open source and may be redistributed and/or modified
|
* This application is open source and may be redistributed and/or modified
|
||||||
* freely and without restriction, both in commercial and non commercial applications,
|
* freely and without restriction, both in commercial and non commercial applications,
|
||||||
* as long as this copyright notice is maintained.
|
* as long as this copyright notice is maintained.
|
||||||
*
|
*
|
||||||
* This application is distributed in the hope that it will be useful,
|
* This application is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
@@ -26,12 +26,12 @@ int main( int argc, char **argv )
|
|||||||
{
|
{
|
||||||
// use an ArgumentParser object to manage the program arguments.
|
// use an ArgumentParser object to manage the program arguments.
|
||||||
osg::ArgumentParser arguments(&argc,argv);
|
osg::ArgumentParser arguments(&argc,argv);
|
||||||
|
|
||||||
// set up the usage document, in case we need to print out how to use this program.
|
// set up the usage document, in case we need to print out how to use this program.
|
||||||
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
|
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
|
||||||
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is an application for collecting a set of separate files into a single archive file that can be later read in OSG applications..");
|
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is an application for collecting a set of separate files into a single archive file that can be later read in OSG applications..");
|
||||||
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
|
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
|
||||||
|
|
||||||
// if user request help write it out to cout.
|
// if user request help write it out to cout.
|
||||||
if (arguments.read("-h") || arguments.read("--help"))
|
if (arguments.read("-h") || arguments.read("--help"))
|
||||||
{
|
{
|
||||||
@@ -49,14 +49,14 @@ int main( int argc, char **argv )
|
|||||||
{
|
{
|
||||||
insert = true;
|
insert = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool extract = false;
|
bool extract = false;
|
||||||
while (arguments.read("-e") || arguments.read("--extract"))
|
while (arguments.read("-e") || arguments.read("--extract"))
|
||||||
{
|
{
|
||||||
extract = true;
|
extract = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool list = false;
|
bool list = false;
|
||||||
while (arguments.read("-l") || arguments.read("--list"))
|
while (arguments.read("-l") || arguments.read("--list"))
|
||||||
{
|
{
|
||||||
list = true;
|
list = true;
|
||||||
@@ -93,7 +93,7 @@ int main( int argc, char **argv )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// any option left unread are converted into errors to write out later.
|
// any option left unread are converted into errors to write out later.
|
||||||
arguments.reportRemainingOptionsAsUnrecognized();
|
arguments.reportRemainingOptionsAsUnrecognized();
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ int main( int argc, char **argv )
|
|||||||
arguments.writeErrorMessages(std::cout);
|
arguments.writeErrorMessages(std::cout);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (archiveFilename.empty())
|
if (archiveFilename.empty())
|
||||||
{
|
{
|
||||||
std::cout<<"Please specify an archive name using --archive filename"<<std::endl;
|
std::cout<<"Please specify an archive name using --archive filename"<<std::endl;
|
||||||
@@ -115,7 +115,7 @@ int main( int argc, char **argv )
|
|||||||
std::cout<<"Please specify an operation on the archive, either --insert, --extract or --list"<<std::endl;
|
std::cout<<"Please specify an operation on the archive, either --insert, --extract or --list"<<std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (insert && extract)
|
if (insert && extract)
|
||||||
{
|
{
|
||||||
std::cout<<"Cannot insert and extract files from the archive at one time, please use either --insert or --extract."<<std::endl;
|
std::cout<<"Cannot insert and extract files from the archive at one time, please use either --insert or --extract."<<std::endl;
|
||||||
@@ -127,7 +127,7 @@ int main( int argc, char **argv )
|
|||||||
if (insert)
|
if (insert)
|
||||||
{
|
{
|
||||||
archive = osgDB::openArchive(archiveFilename, osgDB::Archive::WRITE);
|
archive = osgDB::openArchive(archiveFilename, osgDB::Archive::WRITE);
|
||||||
|
|
||||||
if (archive.valid())
|
if (archive.valid())
|
||||||
{
|
{
|
||||||
for (FileNameList::iterator itr=files.begin();
|
for (FileNameList::iterator itr=files.begin();
|
||||||
@@ -135,7 +135,7 @@ int main( int argc, char **argv )
|
|||||||
++itr)
|
++itr)
|
||||||
{
|
{
|
||||||
std::cout<<"reading "<<*itr<<std::endl;
|
std::cout<<"reading "<<*itr<<std::endl;
|
||||||
osg::ref_ptr<osg::Object> obj = osgDB::readObjectFile(*itr);
|
osg::ref_ptr<osg::Object> obj = osgDB::readRefObjectFile(*itr);
|
||||||
if (obj.valid())
|
if (obj.valid())
|
||||||
{
|
{
|
||||||
std::cout<<" write to archive "<<*itr<<std::endl;
|
std::cout<<" write to archive "<<*itr<<std::endl;
|
||||||
@@ -152,10 +152,10 @@ int main( int argc, char **argv )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
archive = osgDB::openArchive(archiveFilename, osgDB::Archive::READ);
|
archive = osgDB::openArchive(archiveFilename, osgDB::Archive::READ);
|
||||||
|
|
||||||
if (extract && archive.valid())
|
if (extract && archive.valid())
|
||||||
{
|
{
|
||||||
for (FileNameList::iterator itr=files.begin();
|
for (FileNameList::iterator itr=files.begin();
|
||||||
@@ -175,7 +175,7 @@ int main( int argc, char **argv )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (list && archive.valid())
|
if (list && archive.valid())
|
||||||
{
|
{
|
||||||
std::cout<<"List of files in archive:"<<std::endl;
|
std::cout<<"List of files in archive:"<<std::endl;
|
||||||
osgDB::Archive::FileNameList fileNames;
|
osgDB::Archive::FileNameList fileNames;
|
||||||
if (archive->getFileNames(fileNames))
|
if (archive->getFileNames(fileNames))
|
||||||
@@ -187,11 +187,11 @@ int main( int argc, char **argv )
|
|||||||
std::cout<<" "<<*itr<<std::endl;
|
std::cout<<" "<<*itr<<std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout<<std::endl;
|
std::cout<<std::endl;
|
||||||
std::cout<<"Master file "<<archive->getMasterFileName()<<std::endl;
|
std::cout<<"Master file "<<archive->getMasterFileName()<<std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
osg::ref_ptr<osg::State> state = new osg::State;
|
osg::ref_ptr<osg::State> state = new osg::State;
|
||||||
|
state->initializeExtensionProcs();
|
||||||
|
|
||||||
for(TextureSet::iterator itr=_textureSet.begin();
|
for(TextureSet::iterator itr=_textureSet.begin();
|
||||||
itr!=_textureSet.end();
|
itr!=_textureSet.end();
|
||||||
@@ -624,13 +625,19 @@ int main( int argc, char **argv )
|
|||||||
while (arguments.read("-e",ext))
|
while (arguments.read("-e",ext))
|
||||||
{
|
{
|
||||||
std::string libName = osgDB::Registry::instance()->createLibraryNameForExtension(ext);
|
std::string libName = osgDB::Registry::instance()->createLibraryNameForExtension(ext);
|
||||||
osgDB::Registry::instance()->loadLibrary(libName);
|
if (osgDB::Registry::instance()->loadLibrary(libName)==osgDB::Registry::NOT_LOADED)
|
||||||
|
{
|
||||||
|
OSG_NOTICE<<"Unable to load library : "<<libName<<std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string libName;
|
std::string libName;
|
||||||
while (arguments.read("-l",libName))
|
while (arguments.read("-l",libName))
|
||||||
{
|
{
|
||||||
osgDB::Registry::instance()->loadLibrary(libName);
|
if (osgDB::Registry::instance()->loadLibrary(libName)==osgDB::Registry::NOT_LOADED)
|
||||||
|
{
|
||||||
|
OSG_NOTICE<<"Unable to load library : "<<libName<<std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while (arguments.read("-o",str))
|
while (arguments.read("-o",str))
|
||||||
@@ -733,7 +740,7 @@ int main( int argc, char **argv )
|
|||||||
while(arguments.read("--addMissingColours") || arguments.read("--addMissingColors")) { addMissingColours = true; }
|
while(arguments.read("--addMissingColours") || arguments.read("--addMissingColors")) { addMissingColours = true; }
|
||||||
|
|
||||||
bool do_overallNormal = false;
|
bool do_overallNormal = false;
|
||||||
while(arguments.read("--overallNormal") || arguments.read("--overallNormal")) { do_overallNormal = true; }
|
while(arguments.read("--overallNormal")) { do_overallNormal = true; }
|
||||||
|
|
||||||
bool enableObjectCache = false;
|
bool enableObjectCache = false;
|
||||||
while(arguments.read("--enable-object-cache")) { enableObjectCache = true; }
|
while(arguments.read("--enable-object-cache")) { enableObjectCache = true; }
|
||||||
@@ -771,7 +778,7 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
osg::Timer_t startTick = osg::Timer::instance()->tick();
|
osg::Timer_t startTick = osg::Timer::instance()->tick();
|
||||||
|
|
||||||
osg::ref_ptr<osg::Node> root = osgDB::readNodeFiles(fileNames);
|
osg::ref_ptr<osg::Node> root = osgDB::readRefNodeFiles(fileNames);
|
||||||
|
|
||||||
if (root.valid())
|
if (root.valid())
|
||||||
{
|
{
|
||||||
@@ -816,7 +823,7 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
if (internalFormatMode != osg::Texture::USE_IMAGE_DATA_FORMAT)
|
if (internalFormatMode != osg::Texture::USE_IMAGE_DATA_FORMAT)
|
||||||
{
|
{
|
||||||
std::string ext = osgDB::getFileExtension(fileNameOut);
|
ext = osgDB::getFileExtension(fileNameOut);
|
||||||
CompressTexturesVisitor ctv(internalFormatMode);
|
CompressTexturesVisitor ctv(internalFormatMode);
|
||||||
root->accept(ctv);
|
root->accept(ctv);
|
||||||
ctv.compress();
|
ctv.compress();
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
*
|
*
|
||||||
* This application is open source and may be redistributed and/or modified
|
* This application is open source and may be redistributed and/or modified
|
||||||
* freely and without restriction, both in commercial and non commercial applications,
|
* freely and without restriction, both in commercial and non commercial applications,
|
||||||
* as long as this copyright notice is maintained.
|
* as long as this copyright notice is maintained.
|
||||||
*
|
*
|
||||||
* This application is distributed in the hope that it will be useful,
|
* This application is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
@@ -32,7 +32,10 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
static bool s_ExitApplication = false;
|
#include <OpenThreads/Atomic>
|
||||||
|
|
||||||
|
static OpenThreads::Atomic s_ExitApplication;
|
||||||
|
static OpenThreads::Atomic s_SigValue;
|
||||||
|
|
||||||
struct Extents
|
struct Extents
|
||||||
{
|
{
|
||||||
@@ -46,20 +49,20 @@ struct Extents
|
|||||||
_maxLevel(maxLevel),
|
_maxLevel(maxLevel),
|
||||||
_min(minX, minY),
|
_min(minX, minY),
|
||||||
_max(maxX, maxY) {}
|
_max(maxX, maxY) {}
|
||||||
|
|
||||||
Extents(const Extents& extents):
|
Extents(const Extents& extents):
|
||||||
_maxLevel(extents._maxLevel),
|
_maxLevel(extents._maxLevel),
|
||||||
_min(extents._min),
|
_min(extents._min),
|
||||||
_max(extents._max) {}
|
_max(extents._max) {}
|
||||||
|
|
||||||
Extents& operator = (const Extents& rhs)
|
Extents& operator = (const Extents& rhs)
|
||||||
{
|
{
|
||||||
if (&rhs == this) return *this;
|
if (&rhs == this) return *this;
|
||||||
|
|
||||||
_maxLevel = rhs._maxLevel;
|
_maxLevel = rhs._maxLevel;
|
||||||
_min = rhs._min;
|
_min = rhs._min;
|
||||||
_max = rhs._max;
|
_max = rhs._max;
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,10 +72,10 @@ struct Extents
|
|||||||
osg::notify(osg::INFO)<<" _maxLevel="<<_maxLevel<<", _min="<<_min<<" _max="<<_max<<std::endl;
|
osg::notify(osg::INFO)<<" _maxLevel="<<_maxLevel<<", _min="<<_min<<" _max="<<_max<<std::endl;
|
||||||
|
|
||||||
if (level>_maxLevel) return false;
|
if (level>_maxLevel) return false;
|
||||||
|
|
||||||
osg::Vec2d union_min, union_max;
|
osg::Vec2d union_min, union_max;
|
||||||
|
|
||||||
// handle mins
|
// handle mins
|
||||||
if (_min.x()!=DBL_MAX && in_min.x()!=DBL_MAX)
|
if (_min.x()!=DBL_MAX && in_min.x()!=DBL_MAX)
|
||||||
{
|
{
|
||||||
// both _min.x() and in_min.x() are defined so use max of two
|
// both _min.x() and in_min.x() are defined so use max of two
|
||||||
@@ -95,7 +98,7 @@ struct Extents
|
|||||||
union_min.y() = _min.y()<in_min.y() ? _min.y() : in_min.y();
|
union_min.y() = _min.y()<in_min.y() ? _min.y() : in_min.y();
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle maxs
|
// handle maxs
|
||||||
if (_max.x()!=-DBL_MAX && in_max.x()!=-DBL_MAX)
|
if (_max.x()!=-DBL_MAX && in_max.x()!=-DBL_MAX)
|
||||||
{
|
{
|
||||||
// both _max.x() and in_max.x() are defined so use max of two
|
// both _max.x() and in_max.x() are defined so use max of two
|
||||||
@@ -121,7 +124,7 @@ struct Extents
|
|||||||
bool result = union_min.x()<union_max.x() && union_min.y()<union_max.y() ;
|
bool result = union_min.x()<union_max.x() && union_min.y()<union_max.y() ;
|
||||||
|
|
||||||
osg::notify(osg::INFO)<<" union_min="<<union_min<<" union_max="<<union_max<<" result = "<<result<<std::endl;
|
osg::notify(osg::INFO)<<" union_min="<<union_min<<" union_max="<<union_max<<" result = "<<result<<std::endl;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,7 +143,7 @@ public:
|
|||||||
_currentLevel(0) {}
|
_currentLevel(0) {}
|
||||||
|
|
||||||
void setFileCache(osgDB::FileCache* fileCache) { _fileCache = fileCache; }
|
void setFileCache(osgDB::FileCache* fileCache) { _fileCache = fileCache; }
|
||||||
|
|
||||||
void addExtents(unsigned int maxLevel, double minX, double minY, double maxX, double maxY)
|
void addExtents(unsigned int maxLevel, double minX, double minY, double maxX, double maxY)
|
||||||
{
|
{
|
||||||
_extentsList.push_back(Extents(maxLevel, minX, minY, maxX, maxY));
|
_extentsList.push_back(Extents(maxLevel, minX, minY, maxX, maxY));
|
||||||
@@ -154,16 +157,16 @@ public:
|
|||||||
void apply(osg::CoordinateSystemNode& cs)
|
void apply(osg::CoordinateSystemNode& cs)
|
||||||
{
|
{
|
||||||
_csnStack.push_back(&cs);
|
_csnStack.push_back(&cs);
|
||||||
|
|
||||||
if (!s_ExitApplication) traverse(cs);
|
if (!s_ExitApplication) traverse(cs);
|
||||||
|
|
||||||
_csnStack.pop_back();
|
_csnStack.pop_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
void apply(osg::Group& group)
|
void apply(osg::Group& group)
|
||||||
{
|
{
|
||||||
if (s_ExitApplication) return;
|
if (s_ExitApplication) return;
|
||||||
|
|
||||||
osgTerrain::TerrainTile* terrainTile = dynamic_cast<osgTerrain::TerrainTile*>(&group);
|
osgTerrain::TerrainTile* terrainTile = dynamic_cast<osgTerrain::TerrainTile*>(&group);
|
||||||
osgTerrain::Locator* locator = terrainTile ? terrainTile->getLocator() : 0;
|
osgTerrain::Locator* locator = terrainTile ? terrainTile->getLocator() : 0;
|
||||||
if (locator)
|
if (locator)
|
||||||
@@ -196,7 +199,7 @@ public:
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
traverse(group);
|
traverse(group);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,11 +220,11 @@ public:
|
|||||||
void apply(osg::PagedLOD& plod)
|
void apply(osg::PagedLOD& plod)
|
||||||
{
|
{
|
||||||
if (s_ExitApplication) return;
|
if (s_ExitApplication) return;
|
||||||
|
|
||||||
++_currentLevel;
|
++_currentLevel;
|
||||||
|
|
||||||
initBound();
|
initBound();
|
||||||
|
|
||||||
// first compute the bounds of this subgraph
|
// first compute the bounds of this subgraph
|
||||||
for(unsigned int i=0; i<plod.getNumFileNames(); ++i)
|
for(unsigned int i=0; i<plod.getNumFileNames(); ++i)
|
||||||
{
|
{
|
||||||
@@ -230,7 +233,7 @@ public:
|
|||||||
traverse(plod);
|
traverse(plod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (intersects())
|
if (intersects())
|
||||||
{
|
{
|
||||||
for(unsigned int i=0; i<plod.getNumFileNames(); ++i)
|
for(unsigned int i=0; i<plod.getNumFileNames(); ++i)
|
||||||
@@ -239,7 +242,7 @@ public:
|
|||||||
if (!plod.getFileName(i).empty())
|
if (!plod.getFileName(i).empty())
|
||||||
{
|
{
|
||||||
std::string filename;
|
std::string filename;
|
||||||
if (!plod.getDatabasePath().empty())
|
if (!plod.getDatabasePath().empty())
|
||||||
{
|
{
|
||||||
filename = plod.getDatabasePath() + plod.getFileName(i);
|
filename = plod.getDatabasePath() + plod.getFileName(i);
|
||||||
}
|
}
|
||||||
@@ -255,10 +258,10 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
--_currentLevel;
|
--_currentLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
void apply(osg::Geode& geode)
|
void apply(osg::Geode& geode)
|
||||||
{
|
{
|
||||||
for(unsigned int i=0; i<geode.getNumDrawables(); ++i)
|
for(unsigned int i=0; i<geode.getNumDrawables(); ++i)
|
||||||
@@ -271,10 +274,10 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Node* readNodeFileAndWriteToCache(const std::string& filename)
|
osg::ref_ptr<osg::Node> readNodeFileAndWriteToCache(const std::string& filename)
|
||||||
{
|
{
|
||||||
osg::Node* node = 0;
|
osg::ref_ptr<osg::Node> node = 0;
|
||||||
if (_fileCache.valid() )
|
if (_fileCache.valid() )
|
||||||
{
|
{
|
||||||
if (_fileCache->existsInCache(filename))
|
if (_fileCache->existsInCache(filename))
|
||||||
@@ -286,7 +289,7 @@ public:
|
|||||||
{
|
{
|
||||||
osg::notify(osg::NOTICE)<<"reading : "<<filename<<std::endl;
|
osg::notify(osg::NOTICE)<<"reading : "<<filename<<std::endl;
|
||||||
|
|
||||||
node = osgDB::readNodeFile(filename);
|
node = osgDB::readRefNodeFile(filename);
|
||||||
if (node)
|
if (node)
|
||||||
{
|
{
|
||||||
osg::notify(osg::NOTICE)<<"write to FileCache : "<<filename<<std::endl;
|
osg::notify(osg::NOTICE)<<"write to FileCache : "<<filename<<std::endl;
|
||||||
@@ -298,7 +301,7 @@ public:
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
osg::notify(osg::NOTICE)<<"reading : "<<filename<<std::endl;
|
osg::notify(osg::NOTICE)<<"reading : "<<filename<<std::endl;
|
||||||
node = osgDB::readNodeFile(filename);
|
node = osgDB::readRefNodeFile(filename);
|
||||||
}
|
}
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
@@ -307,18 +310,18 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
inline void pushMatrix(osg::Matrix& matrix) { _matrixStack.push_back(matrix); }
|
inline void pushMatrix(osg::Matrix& matrix) { _matrixStack.push_back(matrix); }
|
||||||
|
|
||||||
inline void popMatrix() { _matrixStack.pop_back(); }
|
inline void popMatrix() { _matrixStack.pop_back(); }
|
||||||
|
|
||||||
void convertXYZToLatLongHeight(osg::EllipsoidModel* em, osg::Vec3d& v)
|
void convertXYZToLatLongHeight(osg::EllipsoidModel* em, osg::Vec3d& v)
|
||||||
{
|
{
|
||||||
em->convertXYZToLatLongHeight(v.x(), v.y(), v.z(),
|
em->convertXYZToLatLongHeight(v.x(), v.y(), v.z(),
|
||||||
v.y(), v.x(), v.z());
|
v.y(), v.x(), v.z());
|
||||||
|
|
||||||
v.x() = osg::RadiansToDegrees(v.x());
|
v.x() = osg::RadiansToDegrees(v.x());
|
||||||
v.y() = osg::RadiansToDegrees(v.y());
|
v.y() = osg::RadiansToDegrees(v.y());
|
||||||
}
|
}
|
||||||
|
|
||||||
void initBound()
|
void initBound()
|
||||||
{
|
{
|
||||||
_min.set(DBL_MAX, DBL_MAX);
|
_min.set(DBL_MAX, DBL_MAX);
|
||||||
@@ -332,16 +335,16 @@ protected:
|
|||||||
if (v.x() > _max.x()) _max.x() = v.x();
|
if (v.x() > _max.x()) _max.x() = v.x();
|
||||||
if (v.y() > _max.y()) _max.y() = v.y();
|
if (v.y() > _max.y()) _max.y() = v.y();
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateBound(osg::Vec3Array& vertices)
|
void updateBound(osg::Vec3Array& vertices)
|
||||||
{
|
{
|
||||||
// set up matrix
|
// set up matrix
|
||||||
osg::Matrix matrix;
|
osg::Matrix matrix;
|
||||||
if (!_matrixStack.empty()) matrix = _matrixStack.back();
|
if (!_matrixStack.empty()) matrix = _matrixStack.back();
|
||||||
|
|
||||||
// set up ellipsoid model
|
// set up ellipsoid model
|
||||||
osg::EllipsoidModel* em = !_csnStack.empty() ? _csnStack.back()->getEllipsoidModel() : 0;
|
osg::EllipsoidModel* em = !_csnStack.empty() ? _csnStack.back()->getEllipsoidModel() : 0;
|
||||||
|
|
||||||
for(osg::Vec3Array::iterator itr = vertices.begin();
|
for(osg::Vec3Array::iterator itr = vertices.begin();
|
||||||
itr != vertices.end();
|
itr != vertices.end();
|
||||||
++itr)
|
++itr)
|
||||||
@@ -352,7 +355,7 @@ protected:
|
|||||||
updateBound(v);
|
updateBound(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool intersects()
|
bool intersects()
|
||||||
{
|
{
|
||||||
osg::notify(osg::INFO)<<"intersects() _min = "<<_min<<" _max = "<<_max<<std::endl;
|
osg::notify(osg::INFO)<<"intersects() _min = "<<_min<<" _max = "<<_max<<std::endl;
|
||||||
@@ -362,7 +365,7 @@ protected:
|
|||||||
{
|
{
|
||||||
if (itr->intersects(_currentLevel, _min, _max)) return true;
|
if (itr->intersects(_currentLevel, _min, _max)) return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -376,15 +379,15 @@ protected:
|
|||||||
unsigned int _currentLevel;
|
unsigned int _currentLevel;
|
||||||
MatrixStack _matrixStack;
|
MatrixStack _matrixStack;
|
||||||
CSNStack _csnStack;
|
CSNStack _csnStack;
|
||||||
|
|
||||||
osg::Vec2d _min;
|
osg::Vec2d _min;
|
||||||
osg::Vec2d _max;
|
osg::Vec2d _max;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void signalHandler(int sig)
|
static void signalHandler(int sig)
|
||||||
{
|
{
|
||||||
printf("\nCaught signal %d, requesting exit...\n\n",sig);
|
s_SigValue.exchange(sig);
|
||||||
s_ExitApplication = true;
|
s_ExitApplication.exchange(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main( int argc, char **argv )
|
int main( int argc, char **argv )
|
||||||
@@ -403,7 +406,7 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
// use an ArgumentParser object to manage the program arguments.
|
// use an ArgumentParser object to manage the program arguments.
|
||||||
osg::ArgumentParser arguments(&argc,argv);
|
osg::ArgumentParser arguments(&argc,argv);
|
||||||
|
|
||||||
// set up the usage document, in case we need to print out how to use this program.
|
// set up the usage document, in case we need to print out how to use this program.
|
||||||
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
|
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
|
||||||
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is an application for collecting a set of separate files into a single archive file that can be later read in OSG applications..");
|
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is an application for collecting a set of separate files into a single archive file that can be later read in OSG applications..");
|
||||||
@@ -412,21 +415,21 @@ int main( int argc, char **argv )
|
|||||||
arguments.getApplicationUsage()->addCommandLineOption("-e level minX minY maxX maxY","Read down to <level> across the extents minX, minY to maxY, maxY. Note, for geocentric datase X and Y are longitude and latitude respectively.");
|
arguments.getApplicationUsage()->addCommandLineOption("-e level minX minY maxX maxY","Read down to <level> across the extents minX, minY to maxY, maxY. Note, for geocentric datase X and Y are longitude and latitude respectively.");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("-c directory","Shorthand for --file-cache directory.");
|
arguments.getApplicationUsage()->addCommandLineOption("-c directory","Shorthand for --file-cache directory.");
|
||||||
arguments.getApplicationUsage()->addCommandLineOption("--file-cache directory","Set directory as to place cache download files.");
|
arguments.getApplicationUsage()->addCommandLineOption("--file-cache directory","Set directory as to place cache download files.");
|
||||||
|
|
||||||
// if user request help write it out to cout.
|
// if user request help write it out to cout.
|
||||||
if (arguments.read("-h") || arguments.read("--help"))
|
if (arguments.read("-h") || arguments.read("--help"))
|
||||||
{
|
{
|
||||||
arguments.getApplicationUsage()->write(std::cout);
|
arguments.getApplicationUsage()->write(std::cout);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadDataVisitor ldv;
|
LoadDataVisitor ldv;
|
||||||
|
|
||||||
std::string fileCachePath;
|
std::string fileCachePath;
|
||||||
while(arguments.read("--file-cache",fileCachePath) || arguments.read("-c",fileCachePath)) {}
|
while(arguments.read("--file-cache",fileCachePath) || arguments.read("-c",fileCachePath)) {}
|
||||||
|
|
||||||
if (fileCachePath.empty())
|
if (fileCachePath.empty())
|
||||||
{
|
{
|
||||||
const char* env_fileCachePath = getenv("OSG_FILE_CACHE");
|
const char* env_fileCachePath = getenv("OSG_FILE_CACHE");
|
||||||
if (env_fileCachePath)
|
if (env_fileCachePath)
|
||||||
{
|
{
|
||||||
@@ -439,7 +442,7 @@ int main( int argc, char **argv )
|
|||||||
std::cout<<"No path to the file cache defined, please set OSG_FILE_PATH env var, or use --file-cache <directory> to set a suitable directory for the file cache."<<std::endl;
|
std::cout<<"No path to the file cache defined, please set OSG_FILE_PATH env var, or use --file-cache <directory> to set a suitable directory for the file cache."<<std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ldv.setFileCache(new osgDB::FileCache(fileCachePath));
|
ldv.setFileCache(new osgDB::FileCache(fileCachePath));
|
||||||
|
|
||||||
unsigned int maxLevels = 0;
|
unsigned int maxLevels = 0;
|
||||||
@@ -447,14 +450,14 @@ int main( int argc, char **argv )
|
|||||||
{
|
{
|
||||||
ldv.addExtents(maxLevels);
|
ldv.addExtents(maxLevels);
|
||||||
}
|
}
|
||||||
|
|
||||||
double minX, maxX, minY, maxY;
|
double minX, maxX, minY, maxY;
|
||||||
while(arguments.read("-e",maxLevels, minX, minY, maxX, maxY))
|
while(arguments.read("-e",maxLevels, minX, minY, maxX, maxY))
|
||||||
{
|
{
|
||||||
ldv.addExtents(maxLevels, minX, minY, maxX, maxY);
|
ldv.addExtents(maxLevels, minX, minY, maxX, maxY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string filename;
|
std::string filename;
|
||||||
for(int i=1; i<arguments.argc(); ++i)
|
for(int i=1; i<arguments.argc(); ++i)
|
||||||
{
|
{
|
||||||
@@ -464,26 +467,26 @@ int main( int argc, char **argv )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filename.empty())
|
if (filename.empty())
|
||||||
{
|
{
|
||||||
std::cout<<"No file to load specified."<<std::endl;
|
std::cout<<"No file to load specified."<<std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::ref_ptr<osg::Node> loadedModel = ldv.readNodeFileAndWriteToCache(filename);
|
osg::ref_ptr<osg::Node> loadedModel = ldv.readNodeFileAndWriteToCache(filename);
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
{
|
{
|
||||||
std::cout<<"No data loaded, please specify a database to load"<<std::endl;
|
std::cout<<"No data loaded, please specify a database to load"<<std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
loadedModel->accept(ldv);
|
loadedModel->accept(ldv);
|
||||||
|
|
||||||
if (s_ExitApplication)
|
if (s_ExitApplication)
|
||||||
{
|
{
|
||||||
std::cout<<"osgfilecache cleanly exited in response to signal."<<std::endl;
|
std::cout<<"osgfilecache exited in response to signal : "<<s_SigValue<<std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -260,7 +260,31 @@ const char* invalidNames[] =
|
|||||||
"PushStackValueVisitor",
|
"PushStackValueVisitor",
|
||||||
"RayIntersector",
|
"RayIntersector",
|
||||||
"OpenSceneGraph-Data",
|
"OpenSceneGraph-Data",
|
||||||
"Node"
|
"Node",
|
||||||
|
"AlphaFunc",
|
||||||
|
"CompositeViewer",
|
||||||
|
"OpenSceneGraph-3",
|
||||||
|
"DisplaySettings::SHADER_NONE",
|
||||||
|
"CodeDocs",
|
||||||
|
"Mon",
|
||||||
|
"Tue",
|
||||||
|
"Wed",
|
||||||
|
"Fri",
|
||||||
|
"Sat",
|
||||||
|
"Sun",
|
||||||
|
"I",
|
||||||
|
"TriangleFunctor",
|
||||||
|
"PrimitiveFunctor",
|
||||||
|
"OpenMW",
|
||||||
|
"StreamOperator",
|
||||||
|
"SceneLoader",
|
||||||
|
"OpenGL",
|
||||||
|
"FindLIBLAS",
|
||||||
|
"PissedCapslock",
|
||||||
|
"MinGW",
|
||||||
|
"Haojia521",
|
||||||
|
"Github",
|
||||||
|
"It"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -483,7 +507,9 @@ TypoCorrection typoCorrections[] =
|
|||||||
{"Janik", "Jannik"},
|
{"Janik", "Jannik"},
|
||||||
{"Viganò", "Vigan<EFBFBD>"},
|
{"Viganò", "Vigan<EFBFBD>"},
|
||||||
{"Vigano", "Vigan<EFBFBD>"},
|
{"Vigano", "Vigan<EFBFBD>"},
|
||||||
{"Frashud", "Farshid"}
|
{"Frashud", "Farshid"},
|
||||||
|
{"Dannahauer","Dannahauer"},
|
||||||
|
{"Sando","Sandro"}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -497,6 +523,18 @@ struct NameCorrection
|
|||||||
|
|
||||||
NameCorrection nameCorrections[] =
|
NameCorrection nameCorrections[] =
|
||||||
{
|
{
|
||||||
|
{"LaurensVoerman","GetScalarValue",
|
||||||
|
"Laurens", "Voerman"},
|
||||||
|
{"LaurensVoerman","Meta_Shape",
|
||||||
|
"Laurens", "Voerman"},
|
||||||
|
{"LaurensVoerman","OpenCascade",
|
||||||
|
"Laurens", "Voerman"},
|
||||||
|
{"LaurensVoerman","Fri",
|
||||||
|
"Laurens", "Voerman"},
|
||||||
|
{"LaurensVoerman","",
|
||||||
|
"Laurens", "Voerman"},
|
||||||
|
{"Laurens","Loerman",
|
||||||
|
"Laurens", "Voerman"},
|
||||||
{"FrancoisTigeot","",
|
{"FrancoisTigeot","",
|
||||||
"Francois", "Tigeot"},
|
"Francois", "Tigeot"},
|
||||||
{"Juan","Manuel",
|
{"Juan","Manuel",
|
||||||
@@ -672,7 +710,9 @@ NameCorrection nameCorrections[] =
|
|||||||
{"WeSee", "",
|
{"WeSee", "",
|
||||||
"Alois", "Wismer"},
|
"Alois", "Wismer"},
|
||||||
{"We", "See",
|
{"We", "See",
|
||||||
"Alois", "Wismer"}
|
"Alois", "Wismer"},
|
||||||
|
{"AnyOldName3", "",
|
||||||
|
"Chris", "Djali"}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -74,23 +74,19 @@ int main(int argc, char** argv)
|
|||||||
std::string url, username, password;
|
std::string url, username, password;
|
||||||
while(arguments.read("--login",url, username, password))
|
while(arguments.read("--login",url, username, password))
|
||||||
{
|
{
|
||||||
if (!osgDB::Registry::instance()->getAuthenticationMap())
|
osgDB::Registry::instance()->getOrCreateAuthenticationMap()->addAuthenticationDetails(
|
||||||
{
|
url,
|
||||||
osgDB::Registry::instance()->setAuthenticationMap(new osgDB::AuthenticationMap);
|
new osgDB::AuthenticationDetails(username, password)
|
||||||
osgDB::Registry::instance()->getAuthenticationMap()->addAuthenticationDetails(
|
);
|
||||||
url,
|
|
||||||
new osgDB::AuthenticationDetails(username, password)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string device;
|
std::string device;
|
||||||
while(arguments.read("--device", device))
|
while(arguments.read("--device", device))
|
||||||
{
|
{
|
||||||
osg::ref_ptr<osgGA::Device> dev = osgDB::readFile<osgGA::Device>(device);
|
osg::ref_ptr<osgGA::Device> dev = osgDB::readRefFile<osgGA::Device>(device);
|
||||||
if (dev.valid())
|
if (dev.valid())
|
||||||
{
|
{
|
||||||
viewer.addDevice(dev.get());
|
viewer.addDevice(dev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,7 +148,7 @@ int main(int argc, char** argv)
|
|||||||
viewer.addEventHandler(new osgViewer::ScreenCaptureHandler);
|
viewer.addEventHandler(new osgViewer::ScreenCaptureHandler);
|
||||||
|
|
||||||
// load the data
|
// load the data
|
||||||
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
|
osg::ref_ptr<osg::Node> loadedModel = osgDB::readRefNodeFiles(arguments);
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
{
|
{
|
||||||
std::cout << arguments.getApplicationName() <<": No data loaded" << std::endl;
|
std::cout << arguments.getApplicationName() <<": No data loaded" << std::endl;
|
||||||
@@ -172,9 +168,9 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
// optimize the scene graph, remove redundant nodes and state etc.
|
// optimize the scene graph, remove redundant nodes and state etc.
|
||||||
osgUtil::Optimizer optimizer;
|
osgUtil::Optimizer optimizer;
|
||||||
optimizer.optimize(loadedModel.get());
|
optimizer.optimize(loadedModel);
|
||||||
|
|
||||||
viewer.setSceneData( loadedModel.get() );
|
viewer.setSceneData(loadedModel);
|
||||||
|
|
||||||
viewer.realize();
|
viewer.realize();
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
*
|
*
|
||||||
* This software is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the GNU General Public License (GPL) version 2.0.
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* The full license is in LICENSE.txt file included with this distribution,.
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This software is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* include LICENSE.txt for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Cluster.h"
|
#include "Cluster.h"
|
||||||
@@ -15,6 +16,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
#if !defined (WIN32) || defined(__CYGWIN__)
|
#if !defined (WIN32) || defined(__CYGWIN__)
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
@@ -33,7 +35,7 @@
|
|||||||
#if defined(__linux)
|
#if defined(__linux)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <linux/sockios.h>
|
#include <linux/sockios.h>
|
||||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/sockio.h>
|
#include <sys/sockio.h>
|
||||||
#elif defined(__sgi)
|
#elif defined(__sgi)
|
||||||
@@ -41,6 +43,8 @@
|
|||||||
#include <net/soioctl.h>
|
#include <net/soioctl.h>
|
||||||
#elif defined(__CYGWIN__)
|
#elif defined(__CYGWIN__)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#elif defined (__GNU__)
|
||||||
|
#include <unistd.h>
|
||||||
#elif defined(__sun)
|
#elif defined(__sun)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/sockio.h>
|
#include <sys/sockio.h>
|
||||||
@@ -288,14 +292,23 @@ bool Receiver::init( void )
|
|||||||
perror( "Socket" );
|
perror( "Socket" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int result = 0;
|
||||||
|
|
||||||
#if defined (WIN32) && !defined(__CYGWIN__)
|
#if defined (WIN32) && !defined(__CYGWIN__)
|
||||||
// const BOOL on = TRUE;
|
// const BOOL on = TRUE;
|
||||||
// setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, (const char*) &on, sizeof(int));
|
// setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, (const char*) &on, sizeof(int));
|
||||||
#else
|
#else
|
||||||
int on = 1;
|
int on = 1;
|
||||||
setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
|
result = setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (result)
|
||||||
|
{
|
||||||
|
OSG_NOTICE<<"Warning: Reciever::init() setsockopt(..) failed, errno="<<errno<<std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// struct sockaddr_in saddr;
|
// struct sockaddr_in saddr;
|
||||||
saddr.sin_family = AF_INET;
|
saddr.sin_family = AF_INET;
|
||||||
saddr.sin_port = htons( _port );
|
saddr.sin_port = htons( _port );
|
||||||
@@ -338,7 +351,7 @@ void Receiver::sync( void )
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__linux) || defined(__FreeBSD__) || defined( __APPLE__ ) || \
|
#if defined(__linux) || defined(__FreeBSD__) || defined( __APPLE__ ) || \
|
||||||
defined(__DragonFly__)
|
defined(__DragonFly__) || defined(__FreeBSD_kernel__) || defined(__GNU__)
|
||||||
socklen_t
|
socklen_t
|
||||||
#else
|
#else
|
||||||
int
|
int
|
||||||
@@ -355,11 +368,17 @@ void Receiver::sync( void )
|
|||||||
|
|
||||||
#if defined (WIN32) && !defined(__CYGWIN__)
|
#if defined (WIN32) && !defined(__CYGWIN__)
|
||||||
// saddr.sin_port = htons( _port );
|
// saddr.sin_port = htons( _port );
|
||||||
recvfrom( _so, (char *)_buffer, _buffer_size, 0, (sockaddr*)&saddr, &size );
|
int result = recvfrom( _so, (char *)_buffer, _buffer_size, 0, (sockaddr*)&saddr, &size );
|
||||||
// recvfrom(sock_Receive, szMessage, 256, 0, (sockaddr*)&addr_Cli, &clilen)
|
// recvfrom(sock_Receive, szMessage, 256, 0, (sockaddr*)&addr_Cli, &clilen)
|
||||||
//int err = WSAGetLastError ();
|
//int err = WSAGetLastError ();
|
||||||
//int *dum = (int*) _buffer;
|
//int *dum = (int*) _buffer;
|
||||||
|
|
||||||
|
if (result<0)
|
||||||
|
{
|
||||||
|
OSG_NOTICE<<"Warning: Receiver::sync() recvfrom(..) failed, errno="<<errno<<std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
while( select( _so+1, &fdset, 0L, 0L, &tv ) )
|
while( select( _so+1, &fdset, 0L, 0L, &tv ) )
|
||||||
{
|
{
|
||||||
if( FD_ISSET( _so, &fdset ) )
|
if( FD_ISSET( _so, &fdset ) )
|
||||||
@@ -368,7 +387,13 @@ void Receiver::sync( void )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
recvfrom( _so, (caddr_t)_buffer, _buffer_size, 0, 0, &size );
|
int result = recvfrom( _so, (caddr_t)_buffer, _buffer_size, 0, 0, &size );
|
||||||
|
if (result<0)
|
||||||
|
{
|
||||||
|
OSG_NOTICE<<"Warning: Receiver::sync() recvfrom(..) failed, errno="<<errno<<std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
while( select( _so+1, &fdset, 0L, 0L, &tv ) )
|
while( select( _so+1, &fdset, 0L, 0L, &tv ) )
|
||||||
{
|
{
|
||||||
if( FD_ISSET( _so, &fdset ) )
|
if( FD_ISSET( _so, &fdset ) )
|
||||||
@@ -427,21 +452,26 @@ bool Broadcaster::init( void )
|
|||||||
int on = 1;
|
int on = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int result = 0;
|
||||||
|
|
||||||
#if defined (WIN32) && !defined(__CYGWIN__)
|
#if defined (WIN32) && !defined(__CYGWIN__)
|
||||||
setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, (const char *) &on, sizeof(int));
|
result = setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, (const char *) &on, sizeof(int));
|
||||||
#else
|
#else
|
||||||
setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
|
result = setsockopt( _so, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (result) return false;
|
||||||
|
|
||||||
saddr.sin_family = AF_INET;
|
saddr.sin_family = AF_INET;
|
||||||
saddr.sin_port = htons( _port );
|
saddr.sin_port = htons( _port );
|
||||||
if( _address == 0 )
|
if( _address == 0 )
|
||||||
{
|
{
|
||||||
#if defined (WIN32) && !defined(__CYGWIN__)
|
#if defined (WIN32) && !defined(__CYGWIN__)
|
||||||
setsockopt( _so, SOL_SOCKET, SO_BROADCAST, (const char *) &on, sizeof(int));
|
result = setsockopt( _so, SOL_SOCKET, SO_BROADCAST, (const char *) &on, sizeof(int));
|
||||||
#else
|
#else
|
||||||
setsockopt( _so, SOL_SOCKET, SO_BROADCAST, &on, sizeof(on));
|
result = setsockopt( _so, SOL_SOCKET, SO_BROADCAST, &on, sizeof(on));
|
||||||
#endif
|
#endif
|
||||||
|
if (result) return false;
|
||||||
|
|
||||||
#if !defined (WIN32) || defined(__CYGWIN__)
|
#if !defined (WIN32) || defined(__CYGWIN__)
|
||||||
struct ifreq ifr;
|
struct ifreq ifr;
|
||||||
@@ -512,14 +542,19 @@ void Broadcaster::sync( void )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int result = 0;
|
||||||
#if defined (WIN32) && !defined(__CYGWIN__)
|
#if defined (WIN32) && !defined(__CYGWIN__)
|
||||||
unsigned int size = sizeof( SOCKADDR_IN );
|
unsigned int size = sizeof( SOCKADDR_IN );
|
||||||
sendto( _so, (const char *)_buffer, _buffer_size, 0, (struct sockaddr *)&saddr, size );
|
result = sendto( _so, (const char *)_buffer, _buffer_size, 0, (struct sockaddr *)&saddr, size );
|
||||||
// int err = WSAGetLastError ();
|
// int err = WSAGetLastError ();
|
||||||
// int *dum = (int*) _buffer;
|
// int *dum = (int*) _buffer;
|
||||||
#else
|
#else
|
||||||
unsigned int size = sizeof( struct sockaddr_in );
|
unsigned int size = sizeof( struct sockaddr_in );
|
||||||
sendto( _so, (const void *)_buffer, _buffer_size, 0, (struct sockaddr *)&saddr, size );
|
result = sendto( _so, (const void *)_buffer, _buffer_size, 0, (struct sockaddr *)&saddr, size );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (result)
|
||||||
|
{
|
||||||
|
OSG_NOTICE<<"Warning: sentTo(...) failed : errno="<<errno<<std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
*
|
*
|
||||||
* This software is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the GNU General Public License (GPL) version 2.0.
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* The full license is in LICENSE.txt file included with this distribution,.
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This software is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* include LICENSE.txt for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CLUSTER_H
|
#ifndef CLUSTER_H
|
||||||
@@ -43,7 +44,7 @@ class Receiver
|
|||||||
// Define what port to listen and bind to
|
// Define what port to listen and bind to
|
||||||
void setPort( const short port );
|
void setPort( const short port );
|
||||||
|
|
||||||
// Sync does a blocking wait to recieve next message
|
// Sync does a blocking wait to receive next message
|
||||||
void sync( void );
|
void sync( void );
|
||||||
|
|
||||||
private :
|
private :
|
||||||
@@ -141,7 +142,7 @@ class CameraPacket {
|
|||||||
void writeEventQueue(osgViewer::Viewer& viewer);
|
void writeEventQueue(osgViewer::Viewer& viewer);
|
||||||
|
|
||||||
void setMasterKilled(const bool flag) { _masterKilled = flag; }
|
void setMasterKilled(const bool flag) { _masterKilled = flag; }
|
||||||
const bool getMasterKilled() const { return _masterKilled; }
|
bool getMasterKilled() const { return _masterKilled; }
|
||||||
|
|
||||||
unsigned int _byte_order;
|
unsigned int _byte_order;
|
||||||
bool _masterKilled;
|
bool _masterKilled;
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
*
|
*
|
||||||
* This software is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the GNU General Public License (GPL) version 2.0.
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* The full license is in LICENSE.txt file included with this distribution,.
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This software is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* include LICENSE.txt for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ExportHTML.h"
|
#include "ExportHTML.h"
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
*
|
*
|
||||||
* This software is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the GNU General Public License (GPL) version 2.0.
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* The full license is in LICENSE.txt file included with this distribution,.
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This software is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* include LICENSE.txt for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef EXPORTHTML_H
|
#ifndef EXPORTHTML_H
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
*
|
*
|
||||||
* This software is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the GNU General Public License (GPL) version 2.0.
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* The full license is in LICENSE.txt file included with this distribution,.
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This software is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* include LICENSE.txt for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "PointsEventHandler.h"
|
#include "PointsEventHandler.h"
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
*
|
*
|
||||||
* This software is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the GNU General Public License (GPL) version 2.0.
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* The full license is in LICENSE.txt file included with this distribution,.
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This software is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* include LICENSE.txt for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef POINTSEVENTHANDLER
|
#ifndef POINTSEVENTHANDLER
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
*
|
*
|
||||||
* This software is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the GNU General Public License (GPL) version 2.0.
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* The full license is in LICENSE.txt file included with this distribution,.
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This software is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* include LICENSE.txt for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ReadShowFile.h"
|
#include "ReadShowFile.h"
|
||||||
@@ -215,24 +216,24 @@ osg::ref_ptr<osg::Node> p3d::readShowFiles(osg::ArgumentParser& arguments,const
|
|||||||
std::string filename;
|
std::string filename;
|
||||||
while (arguments.read("--image",filename))
|
while (arguments.read("--image",filename))
|
||||||
{
|
{
|
||||||
osg::ref_ptr<osg::Image> image = readImageFile(filename.c_str(), local_options.get());
|
osg::ref_ptr<osg::Image> image = readRefImageFile(filename.c_str(), local_options.get());
|
||||||
if (image.valid()) nodeList.push_back(osg::createGeodeForImage(image.get()));
|
if (image.valid()) nodeList.push_back(osg::createGeodeForImage(image));
|
||||||
}
|
}
|
||||||
|
|
||||||
while (arguments.read("--movie",filename))
|
while (arguments.read("--movie",filename))
|
||||||
{
|
{
|
||||||
osg::ref_ptr<osg::Image> image = readImageFile(filename.c_str(), local_options.get());
|
osg::ref_ptr<osg::Image> image = readRefImageFile(filename.c_str(), local_options.get());
|
||||||
osg::ref_ptr<osg::ImageStream> imageStream = dynamic_cast<osg::ImageStream*>(image.get());
|
osg::ImageStream* imageStream = dynamic_cast<osg::ImageStream*>(image.get());
|
||||||
if (image.valid())
|
if (imageStream)
|
||||||
{
|
{
|
||||||
imageStream->play();
|
imageStream->play();
|
||||||
nodeList.push_back(osg::createGeodeForImage(imageStream.get()));
|
nodeList.push_back(osg::createGeodeForImage(imageStream));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while (arguments.read("--dem",filename))
|
while (arguments.read("--dem",filename))
|
||||||
{
|
{
|
||||||
osg::HeightField* hf = readHeightFieldFile(filename.c_str(), local_options.get());
|
osg::ref_ptr<osg::HeightField> hf = readRefHeightFieldFile(filename.c_str(), local_options.get());
|
||||||
if (hf)
|
if (hf)
|
||||||
{
|
{
|
||||||
osg::Geode* geode = new osg::Geode;
|
osg::Geode* geode = new osg::Geode;
|
||||||
@@ -247,7 +248,7 @@ osg::ref_ptr<osg::Node> p3d::readShowFiles(osg::ArgumentParser& arguments,const
|
|||||||
if (!arguments.isOption(pos))
|
if (!arguments.isOption(pos))
|
||||||
{
|
{
|
||||||
// not an option so assume string is a filename.
|
// not an option so assume string is a filename.
|
||||||
osg::Node *node = osgDB::readNodeFile( arguments[pos], local_options.get());
|
osg::ref_ptr<osg::Node> node = osgDB::readRefNodeFile( arguments[pos], local_options.get());
|
||||||
|
|
||||||
if(node)
|
if(node)
|
||||||
{
|
{
|
||||||
@@ -256,7 +257,7 @@ osg::ref_ptr<osg::Node> p3d::readShowFiles(osg::ArgumentParser& arguments,const
|
|||||||
nodeList.push_back(node);
|
nodeList.push_back(node);
|
||||||
|
|
||||||
// make sure that this presentation isn't cached
|
// make sure that this presentation isn't cached
|
||||||
osgDB::Registry::instance()->removeFromObjectCache( arguments[pos] );
|
osgDB::Registry::instance()->removeFromObjectCache( arguments[pos], local_options.get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
*
|
*
|
||||||
* This software is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the GNU General Public License (GPL) version 2.0.
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* The full license is in LICENSE.txt file included with this distribution,.
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
*
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
* This software is distributed in the hope that it will be useful,
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* include LICENSE.txt for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef P3D_READFILE
|
#ifndef P3D_READFILE
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
*
|
*
|
||||||
* This software is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the GNU General Public License (GPL) version 2.0.
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* The full license is in LICENSE.txt file included with this distribution,.
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
*
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
* This software is distributed in the hope that it will be useful,
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* include LICENSE.txt for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <osgViewer/Viewer>
|
#include <osgViewer/Viewer>
|
||||||
@@ -33,7 +34,7 @@ SDLIntegration::SDLIntegration()
|
|||||||
atexit(SDL_Quit);
|
atexit(SDL_Quit);
|
||||||
|
|
||||||
int numJoysticks = SDL_NumJoysticks();
|
int numJoysticks = SDL_NumJoysticks();
|
||||||
|
|
||||||
if (_verbose)
|
if (_verbose)
|
||||||
{
|
{
|
||||||
std::cout<<"number of joysticks "<<numJoysticks<<std::endl;
|
std::cout<<"number of joysticks "<<numJoysticks<<std::endl;
|
||||||
@@ -42,9 +43,9 @@ SDLIntegration::SDLIntegration()
|
|||||||
std::cout<<"Joystick name '"<<SDL_JoystickName(i)<<"'"<<std::endl;
|
std::cout<<"Joystick name '"<<SDL_JoystickName(i)<<"'"<<std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_joystick = numJoysticks>0 ? SDL_JoystickOpen(0) : 0;
|
_joystick = numJoysticks>0 ? SDL_JoystickOpen(0) : 0;
|
||||||
|
|
||||||
_numAxes = _joystick ? SDL_JoystickNumAxes(_joystick) : 0;
|
_numAxes = _joystick ? SDL_JoystickNumAxes(_joystick) : 0;
|
||||||
_numBalls = _joystick ? SDL_JoystickNumBalls(_joystick) : 0;
|
_numBalls = _joystick ? SDL_JoystickNumBalls(_joystick) : 0;
|
||||||
_numHats = _joystick ? SDL_JoystickNumHats(_joystick) : 0;
|
_numHats = _joystick ? SDL_JoystickNumHats(_joystick) : 0;
|
||||||
@@ -57,13 +58,13 @@ SDLIntegration::SDLIntegration()
|
|||||||
std::cout<<"numHats = "<<_numHats<<std::endl;
|
std::cout<<"numHats = "<<_numHats<<std::endl;
|
||||||
std::cout<<"numButtons = "<<_numButtons<<std::endl;
|
std::cout<<"numButtons = "<<_numButtons<<std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
addMouseButtonMapping(4, 1); // left
|
addMouseButtonMapping(4, 1); // left
|
||||||
addMouseButtonMapping(5, 3); // right
|
addMouseButtonMapping(5, 3); // right
|
||||||
addMouseButtonMapping(6, 2); // middle
|
addMouseButtonMapping(6, 2); // middle
|
||||||
|
|
||||||
addKeyMapping(10, ' '); // R2
|
addKeyMapping(10, ' '); // R2
|
||||||
|
|
||||||
addKeyMapping(0, '1'); // 1
|
addKeyMapping(0, '1'); // 1
|
||||||
addKeyMapping(1, '2'); // 2
|
addKeyMapping(1, '2'); // 2
|
||||||
addKeyMapping(2, '3'); // 3
|
addKeyMapping(2, '3'); // 3
|
||||||
@@ -88,7 +89,7 @@ void SDLIntegration::capture(ValueList& axisValues, ValueList& buttonValues) con
|
|||||||
if (_joystick)
|
if (_joystick)
|
||||||
{
|
{
|
||||||
SDL_JoystickUpdate();
|
SDL_JoystickUpdate();
|
||||||
|
|
||||||
axisValues.resize(_numAxes);
|
axisValues.resize(_numAxes);
|
||||||
for(int ai=0; ai<_numAxes; ++ai)
|
for(int ai=0; ai<_numAxes; ++ai)
|
||||||
{
|
{
|
||||||
@@ -107,21 +108,21 @@ void SDLIntegration::update(osgViewer::Viewer& viewer)
|
|||||||
{
|
{
|
||||||
if (_joystick)
|
if (_joystick)
|
||||||
{
|
{
|
||||||
|
|
||||||
ValueList newAxisValues;
|
ValueList newAxisValues;
|
||||||
ValueList newButtonValues;
|
ValueList newButtonValues;
|
||||||
|
|
||||||
capture(newAxisValues, newButtonValues);
|
capture(newAxisValues, newButtonValues);
|
||||||
|
|
||||||
unsigned int mouseXaxis = 0;
|
unsigned int mouseXaxis = 0;
|
||||||
unsigned int mouseYaxis = 1;
|
unsigned int mouseYaxis = 1;
|
||||||
|
|
||||||
float prev_mx = (float)_axisValues[mouseXaxis]/32767.0f;
|
float prev_mx = (float)_axisValues[mouseXaxis]/32767.0f;
|
||||||
float prev_my = -(float)_axisValues[mouseYaxis]/32767.0f;
|
float prev_my = -(float)_axisValues[mouseYaxis]/32767.0f;
|
||||||
|
|
||||||
float mx = (float)newAxisValues[mouseXaxis]/32767.0f;
|
float mx = (float)newAxisValues[mouseXaxis]/32767.0f;
|
||||||
float my = -(float)newAxisValues[mouseYaxis]/32767.0f;
|
float my = -(float)newAxisValues[mouseYaxis]/32767.0f;
|
||||||
|
|
||||||
|
|
||||||
osgGA::EventQueue* eq = viewer.getEventQueue();
|
osgGA::EventQueue* eq = viewer.getEventQueue();
|
||||||
double time = eq ? eq->getTime() : 0.0;
|
double time = eq ? eq->getTime() : 0.0;
|
||||||
@@ -145,7 +146,7 @@ void SDLIntegration::update(osgViewer::Viewer& viewer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int bi=0; bi<_numButtons; ++bi)
|
for(int bi=0; bi<_numButtons; ++bi)
|
||||||
{
|
{
|
||||||
if (newButtonValues[bi]!=_buttonValues[bi])
|
if (newButtonValues[bi]!=_buttonValues[bi])
|
||||||
@@ -171,11 +172,11 @@ void SDLIntegration::update(osgViewer::Viewer& viewer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_axisValues.swap(newAxisValues);
|
_axisValues.swap(newAxisValues);
|
||||||
_buttonValues.swap(newButtonValues);
|
_buttonValues.swap(newButtonValues);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
*
|
*
|
||||||
* This software is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the GNU General Public License (GPL) version 2.0.
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* The full license is in LICENSE.txt file included with this distribution,.
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
*
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
* This software is distributed in the hope that it will be useful,
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* include LICENSE.txt for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SDLINTEGRATION
|
#ifndef SDLINTEGRATION
|
||||||
@@ -31,12 +32,12 @@ class SDLIntegration
|
|||||||
typedef std::map<int, int> ButtonMap;
|
typedef std::map<int, int> ButtonMap;
|
||||||
|
|
||||||
void update(osgViewer::Viewer& viewer);
|
void update(osgViewer::Viewer& viewer);
|
||||||
|
|
||||||
void addMouseButtonMapping(int joystickButton, int mouseButton)
|
void addMouseButtonMapping(int joystickButton, int mouseButton)
|
||||||
{
|
{
|
||||||
_mouseButtonMap[joystickButton] = mouseButton;
|
_mouseButtonMap[joystickButton] = mouseButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
int getMouseButtonMapping(int joystickButton)
|
int getMouseButtonMapping(int joystickButton)
|
||||||
{
|
{
|
||||||
ButtonMap::const_iterator itr = _mouseButtonMap.find(joystickButton);
|
ButtonMap::const_iterator itr = _mouseButtonMap.find(joystickButton);
|
||||||
@@ -48,16 +49,16 @@ class SDLIntegration
|
|||||||
{
|
{
|
||||||
_keyMap[joystickButton] = key;
|
_keyMap[joystickButton] = key;
|
||||||
}
|
}
|
||||||
|
|
||||||
int getKeyMapping(int joystickButton)
|
int getKeyMapping(int joystickButton)
|
||||||
{
|
{
|
||||||
ButtonMap::const_iterator itr = _keyMap.find(joystickButton);
|
ButtonMap::const_iterator itr = _keyMap.find(joystickButton);
|
||||||
if (itr != _keyMap.end()) return itr->second;
|
if (itr != _keyMap.end()) return itr->second;
|
||||||
else return -1;
|
else return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
void capture(ValueList& axisValues, ValueList& buttonValues) const;
|
void capture(ValueList& axisValues, ValueList& buttonValues) const;
|
||||||
|
|
||||||
SDL_Joystick* _joystick;
|
SDL_Joystick* _joystick;
|
||||||
@@ -66,7 +67,7 @@ class SDLIntegration
|
|||||||
int _numHats;
|
int _numHats;
|
||||||
int _numButtons;
|
int _numButtons;
|
||||||
bool _verbose;
|
bool _verbose;
|
||||||
|
|
||||||
ValueList _axisValues;
|
ValueList _axisValues;
|
||||||
ValueList _buttonValues;
|
ValueList _buttonValues;
|
||||||
ButtonMap _mouseButtonMap;
|
ButtonMap _mouseButtonMap;
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
*
|
*
|
||||||
* This software is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the GNU General Public License (GPL) version 2.0.
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* The full license is in LICENSE.txt file included with this distribution,.
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This software is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* include LICENSE.txt for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ShowEventHandler.h"
|
#include "ShowEventHandler.h"
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
*
|
*
|
||||||
* This software is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the GNU General Public License (GPL) version 2.0.
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* The full license is in LICENSE.txt file included with this distribution,.
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This software is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* include LICENSE.txt for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SHOWEVENTHANDLER
|
#ifndef SHOWEVENTHANDLER
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
*
|
*
|
||||||
* This software is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the GNU General Public License (GPL) version 2.0.
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* The full license is in LICENSE.txt file included with this distribution,.
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This software is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* include LICENSE.txt for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <osgDB/FileNameUtils>
|
#include <osgDB/FileNameUtils>
|
||||||
@@ -86,7 +87,7 @@ bool SpellChecker::isCorrect(const std::string& word) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SpellChecker::WordList SpellChecker::suggest(const std::string& word) const
|
SpellChecker::WordList SpellChecker::suggest(const std::string& /*word*/) const
|
||||||
{
|
{
|
||||||
return WordList();
|
return WordList();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
*
|
*
|
||||||
* This software is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the GNU General Public License (GPL) version 2.0.
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* The full license is in LICENSE.txt file included with this distribution,.
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This software is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* include LICENSE.txt for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SPELLCHCKER_H
|
#ifndef SPELLCHCKER_H
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
||||||
*
|
*
|
||||||
* This software is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the GNU General Public License (GPL) version 2.0.
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* The full license is in LICENSE.txt file included with this distribution,.
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This software is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* include LICENSE.txt for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <osg/Geometry>
|
#include <osg/Geometry>
|
||||||
@@ -137,7 +138,7 @@ class ForwardToDeviceEventHandler : public osgGA::GUIEventHandler {
|
|||||||
public:
|
public:
|
||||||
ForwardToDeviceEventHandler(osgGA::Device* device, bool format_mouse_events) : osgGA::GUIEventHandler(), _device(device), _forwardMouseEvents(format_mouse_events) {}
|
ForwardToDeviceEventHandler(osgGA::Device* device, bool format_mouse_events) : osgGA::GUIEventHandler(), _device(device), _forwardMouseEvents(format_mouse_events) {}
|
||||||
|
|
||||||
virtual bool handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa, osg::Object *, osg::NodeVisitor *)
|
virtual bool handle (const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& /*aa*/, osg::Object *, osg::NodeVisitor *)
|
||||||
{
|
{
|
||||||
switch (ea.getEventType())
|
switch (ea.getEventType())
|
||||||
{
|
{
|
||||||
@@ -180,7 +181,7 @@ class DumpEventHandler : public osgGA::GUIEventHandler {
|
|||||||
public:
|
public:
|
||||||
DumpEventHandler() : osgGA::GUIEventHandler() {}
|
DumpEventHandler() : osgGA::GUIEventHandler() {}
|
||||||
|
|
||||||
virtual bool handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa, osg::Object *, osg::NodeVisitor *)
|
virtual bool handle (const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& /*aa*/, osg::Object *, osg::NodeVisitor *)
|
||||||
{
|
{
|
||||||
switch (ea.getEventType())
|
switch (ea.getEventType())
|
||||||
{
|
{
|
||||||
@@ -266,7 +267,7 @@ void processLoadedModel(osg::ref_ptr<osg::Node>& loadedModel, int optimizer_opti
|
|||||||
|
|
||||||
void addDeviceTo(osgViewer::Viewer& viewer, const std::string& device_name, bool forward_mouse_events)
|
void addDeviceTo(osgViewer::Viewer& viewer, const std::string& device_name, bool forward_mouse_events)
|
||||||
{
|
{
|
||||||
osg::ref_ptr<osgGA::Device> dev = osgDB::readFile<osgGA::Device>(device_name);
|
osg::ref_ptr<osgGA::Device> dev = osgDB::readRefFile<osgGA::Device>(device_name);
|
||||||
if (dev.valid())
|
if (dev.valid())
|
||||||
{
|
{
|
||||||
OSG_INFO << "Adding Device : " << device_name << std::endl;
|
OSG_INFO << "Adding Device : " << device_name << std::endl;
|
||||||
@@ -317,7 +318,7 @@ int main( int argc, char **argv )
|
|||||||
if (arguments.read("-devices") || arguments.read("--devices"))
|
if (arguments.read("-devices") || arguments.read("--devices"))
|
||||||
{
|
{
|
||||||
// Force load QuickTime plugin, probe video capability, exit
|
// Force load QuickTime plugin, probe video capability, exit
|
||||||
osgDB::readImageFile("devices.live");
|
osgDB::readRefImageFile("devices.live");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,14 +337,10 @@ int main( int argc, char **argv )
|
|||||||
std::string url, username, password;
|
std::string url, username, password;
|
||||||
while(arguments.read("--login",url, username, password))
|
while(arguments.read("--login",url, username, password))
|
||||||
{
|
{
|
||||||
if (!osgDB::Registry::instance()->getAuthenticationMap())
|
osgDB::Registry::instance()->getOrCreateAuthenticationMap()->addAuthenticationDetails(
|
||||||
{
|
url,
|
||||||
osgDB::Registry::instance()->setAuthenticationMap(new osgDB::AuthenticationMap);
|
new osgDB::AuthenticationDetails(username, password)
|
||||||
osgDB::Registry::instance()->getAuthenticationMap()->addAuthenticationDetails(
|
);
|
||||||
url,
|
|
||||||
new osgDB::AuthenticationDetails(username, password)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -451,7 +448,7 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
osg::ref_ptr<osgDB::Options> device_options = new osgDB::Options("documentRegisteredHandlers");
|
osg::ref_ptr<osgDB::Options> device_options = new osgDB::Options("documentRegisteredHandlers");
|
||||||
|
|
||||||
osg::ref_ptr<osgGA::Device> rest_http_device = osgDB::readFile<osgGA::Device>(server_address+":"+server_port+"/"+document_root+".resthttp", device_options.get());
|
osg::ref_ptr<osgGA::Device> rest_http_device = osgDB::readRefFile<osgGA::Device>(server_address+":"+server_port+"/"+document_root+".resthttp", device_options.get());
|
||||||
if (rest_http_device.valid())
|
if (rest_http_device.valid())
|
||||||
{
|
{
|
||||||
viewer.addDevice(rest_http_device.get());
|
viewer.addDevice(rest_http_device.get());
|
||||||
@@ -847,12 +844,11 @@ int main( int argc, char **argv )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Timer_t startOfFrameTick = osg::Timer::instance()->tick();
|
|
||||||
double targetFrameTime = 1.0/targetFrameRate;
|
double targetFrameTime = 1.0/targetFrameRate;
|
||||||
|
|
||||||
if (exportName.empty())
|
if (exportName.empty())
|
||||||
{
|
{
|
||||||
// objects for managing the broadcasting and recieving of camera packets.
|
// objects for managing the broadcasting and receiving of camera packets.
|
||||||
CameraPacket cp;
|
CameraPacket cp;
|
||||||
Broadcaster bc;
|
Broadcaster bc;
|
||||||
Receiver rc;
|
Receiver rc;
|
||||||
@@ -864,116 +860,117 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
while( !viewer.done() && !masterKilled)
|
while( !viewer.done() && !masterKilled)
|
||||||
{
|
{
|
||||||
// wait for all cull and draw threads to complete.
|
osg::Timer_t startFrameTick = osg::Timer::instance()->tick();
|
||||||
viewer.advance();
|
|
||||||
|
|
||||||
osg::Timer_t currentTick = osg::Timer::instance()->tick();
|
if (viewer.getRunFrameScheme()!=osgViewer::ViewerBase::ON_DEMAND || seh->checkNeedToDoFrame())
|
||||||
double deltaTime = osg::Timer::instance()->delta_s(startOfFrameTick, currentTick);
|
|
||||||
|
|
||||||
|
|
||||||
if (deltaTime<targetFrameTime)
|
|
||||||
{
|
{
|
||||||
OpenThreads::Thread::microSleep(static_cast<unsigned int>((targetFrameTime-deltaTime)*1000000.0));
|
// do the normal frame.
|
||||||
}
|
|
||||||
|
|
||||||
startOfFrameTick = osg::Timer::instance()->tick();
|
// wait for all cull and draw threads to complete.
|
||||||
|
viewer.advance();
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (kmcb)
|
if (kmcb)
|
||||||
{
|
|
||||||
double time = kmcb->getTime();
|
|
||||||
viewer.getFrameStamp()->setReferenceTime(time);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef USE_SDL
|
|
||||||
sdlIntegration.update(viewer);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (P3DApplicationType==MASTER)
|
|
||||||
{
|
|
||||||
// take camera zero as the guide.
|
|
||||||
osg::Matrix modelview(viewer.getCamera()->getViewMatrix());
|
|
||||||
|
|
||||||
cp.setPacket(modelview,viewer.getFrameStamp());
|
|
||||||
|
|
||||||
// cp.readEventQueue(viewer);
|
|
||||||
|
|
||||||
scratchPad.reset();
|
|
||||||
scratchPad.write(cp);
|
|
||||||
|
|
||||||
scratchPad.reset();
|
|
||||||
scratchPad.read(cp);
|
|
||||||
|
|
||||||
bc.setBuffer(scratchPad.startPtr(), scratchPad.numBytes());
|
|
||||||
|
|
||||||
std::cout << "bc.sync()"<<scratchPad.numBytes()<<std::endl;
|
|
||||||
|
|
||||||
bc.sync();
|
|
||||||
}
|
|
||||||
else if (P3DApplicationType==SLAVE)
|
|
||||||
{
|
|
||||||
rc.setBuffer(scratchPad.startPtr(), scratchPad.numBytes());
|
|
||||||
|
|
||||||
rc.sync();
|
|
||||||
|
|
||||||
scratchPad.reset();
|
|
||||||
scratchPad.read(cp);
|
|
||||||
|
|
||||||
// cp.writeEventQueue(viewer);
|
|
||||||
|
|
||||||
if (cp.getMasterKilled())
|
|
||||||
{
|
{
|
||||||
std::cout << "Received master killed."<<std::endl;
|
double time = kmcb->getTime();
|
||||||
// break out of while (!done) loop since we've now want to shut down.
|
viewer.getFrameStamp()->setReferenceTime(time);
|
||||||
masterKilled = true;
|
|
||||||
}
|
}
|
||||||
}
|
#endif
|
||||||
|
|
||||||
// update the scene by traversing it with the update visitor which will
|
#ifdef USE_SDL
|
||||||
// call all node update callbacks and animations.
|
sdlIntegration.update(viewer);
|
||||||
viewer.eventTraversal();
|
#endif
|
||||||
|
|
||||||
if (seh->getRequestReload())
|
if (P3DApplicationType==MASTER)
|
||||||
{
|
|
||||||
OSG_INFO<<"Reload requested"<<std::endl;
|
|
||||||
seh->setRequestReload(false);
|
|
||||||
int previous_ActiveSlide = seh->getActiveSlide();
|
|
||||||
int previous_ActiveLayer = seh->getActiveLayer();
|
|
||||||
|
|
||||||
// reset time so any event key generate
|
|
||||||
|
|
||||||
loadedModel = p3d::readShowFiles(arguments,cacheAllOption.get());
|
|
||||||
processLoadedModel(loadedModel, optimizer_options, cursorFileName);
|
|
||||||
|
|
||||||
if (!loadedModel)
|
|
||||||
{
|
{
|
||||||
return 0;
|
// take camera zero as the guide.
|
||||||
|
osg::Matrix modelview(viewer.getCamera()->getViewMatrix());
|
||||||
|
|
||||||
|
cp.setPacket(modelview,viewer.getFrameStamp());
|
||||||
|
|
||||||
|
// cp.readEventQueue(viewer);
|
||||||
|
|
||||||
|
scratchPad.reset();
|
||||||
|
scratchPad.write(cp);
|
||||||
|
|
||||||
|
scratchPad.reset();
|
||||||
|
scratchPad.read(cp);
|
||||||
|
|
||||||
|
bc.setBuffer(scratchPad.startPtr(), scratchPad.numBytes());
|
||||||
|
|
||||||
|
std::cout << "bc.sync()"<<scratchPad.numBytes()<<std::endl;
|
||||||
|
|
||||||
|
bc.sync();
|
||||||
|
}
|
||||||
|
else if (P3DApplicationType==SLAVE)
|
||||||
|
{
|
||||||
|
rc.setBuffer(scratchPad.startPtr(), scratchPad.numBytes());
|
||||||
|
|
||||||
|
rc.sync();
|
||||||
|
|
||||||
|
scratchPad.reset();
|
||||||
|
scratchPad.read(cp);
|
||||||
|
|
||||||
|
// cp.writeEventQueue(viewer);
|
||||||
|
|
||||||
|
if (cp.getMasterKilled())
|
||||||
|
{
|
||||||
|
std::cout << "Received master killed."<<std::endl;
|
||||||
|
// break out of while (!done) loop since we've now want to shut down.
|
||||||
|
masterKilled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
viewer.setSceneData(loadedModel.get());
|
// update the scene by traversing it with the update visitor which will
|
||||||
seh->set(loadedModel.get());
|
// call all node update callbacks and animations.
|
||||||
seh->selectSlide(previous_ActiveSlide, previous_ActiveLayer);
|
viewer.eventTraversal();
|
||||||
|
|
||||||
continue;
|
if (seh->getRequestReload())
|
||||||
|
{
|
||||||
|
OSG_INFO<<"Reload requested"<<std::endl;
|
||||||
|
seh->setRequestReload(false);
|
||||||
|
int previous_ActiveSlide = seh->getActiveSlide();
|
||||||
|
int previous_ActiveLayer = seh->getActiveLayer();
|
||||||
|
|
||||||
|
// reset time so any event key generate
|
||||||
|
|
||||||
|
loadedModel = p3d::readShowFiles(arguments,cacheAllOption.get());
|
||||||
|
processLoadedModel(loadedModel, optimizer_options, cursorFileName);
|
||||||
|
|
||||||
|
if (!loadedModel)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
viewer.setSceneData(loadedModel.get());
|
||||||
|
seh->set(loadedModel.get());
|
||||||
|
seh->selectSlide(previous_ActiveSlide, previous_ActiveLayer);
|
||||||
|
|
||||||
|
continue;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// update the scene by traversing it with the update visitor which will
|
||||||
|
// call all node update callbacks and animations.
|
||||||
|
viewer.updateTraversal();
|
||||||
|
|
||||||
|
if (P3DApplicationType==SLAVE)
|
||||||
|
{
|
||||||
|
osg::Matrix modelview;
|
||||||
|
cp.getModelView(modelview,camera_offset);
|
||||||
|
|
||||||
|
viewer.getCamera()->setViewMatrix(modelview);
|
||||||
|
}
|
||||||
|
|
||||||
|
// fire off the cull and draw traversals of the scene.
|
||||||
|
if(!masterKilled)
|
||||||
|
viewer.renderingTraversals();
|
||||||
}
|
}
|
||||||
|
|
||||||
// update the scene by traversing it with the update visitor which will
|
// work out if we need to force a sleep to hold back the frame rate
|
||||||
// call all node update callbacks and animations.
|
osg::Timer_t endFrameTick = osg::Timer::instance()->tick();
|
||||||
viewer.updateTraversal();
|
double frameTime = osg::Timer::instance()->delta_s(startFrameTick, endFrameTick);
|
||||||
|
if (frameTime < targetFrameTime) OpenThreads::Thread::microSleep(static_cast<unsigned int>(1000000.0*(targetFrameTime-frameTime)));
|
||||||
if (P3DApplicationType==SLAVE)
|
|
||||||
{
|
|
||||||
osg::Matrix modelview;
|
|
||||||
cp.getModelView(modelview,camera_offset);
|
|
||||||
|
|
||||||
viewer.getCamera()->setViewMatrix(modelview);
|
|
||||||
}
|
|
||||||
|
|
||||||
// fire off the cull and draw traversals of the scene.
|
|
||||||
if(!masterKilled)
|
|
||||||
viewer.renderingTraversals();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
1
debian_scripts/postinst
Executable file
1
debian_scripts/postinst
Executable file
@@ -0,0 +1 @@
|
|||||||
|
ldconfig
|
||||||
@@ -39,6 +39,7 @@ OPTIMIZE_OUTPUT_FOR_C = NO
|
|||||||
OPTIMIZE_OUTPUT_JAVA = NO
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
OPTIMIZE_FOR_FORTRAN = NO
|
OPTIMIZE_FOR_FORTRAN = NO
|
||||||
OPTIMIZE_OUTPUT_VHDL = NO
|
OPTIMIZE_OUTPUT_VHDL = NO
|
||||||
|
EXTENSION_MAPPING = no_extension=C++
|
||||||
BUILTIN_STL_SUPPORT = NO
|
BUILTIN_STL_SUPPORT = NO
|
||||||
CPP_CLI_SUPPORT = NO
|
CPP_CLI_SUPPORT = NO
|
||||||
SIP_SUPPORT = NO
|
SIP_SUPPORT = NO
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ OPTIMIZE_OUTPUT_FOR_C = NO
|
|||||||
OPTIMIZE_OUTPUT_JAVA = NO
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
OPTIMIZE_FOR_FORTRAN = NO
|
OPTIMIZE_FOR_FORTRAN = NO
|
||||||
OPTIMIZE_OUTPUT_VHDL = NO
|
OPTIMIZE_OUTPUT_VHDL = NO
|
||||||
|
EXTENSION_MAPPING = no_extension=C++
|
||||||
BUILTIN_STL_SUPPORT = NO
|
BUILTIN_STL_SUPPORT = NO
|
||||||
CPP_CLI_SUPPORT = NO
|
CPP_CLI_SUPPORT = NO
|
||||||
SIP_SUPPORT = NO
|
SIP_SUPPORT = NO
|
||||||
@@ -98,15 +99,16 @@ INPUT = ${OpenSceneGraph_SOURCE_DIR}/include/osg \
|
|||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgGA \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgGA \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgManipulator \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgManipulator \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgParticle \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgParticle \
|
||||||
|
${OpenSceneGraph_SOURCE_DIR}/include/osgPresentation \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgShadow \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgShadow \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgSim \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgSim \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgTerrain \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgTerrain \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgText \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgText \
|
||||||
|
${OpenSceneGraph_SOURCE_DIR}/include/osgUI \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgUtil \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgUtil \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgViewer \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgViewer \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgVolume \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgVolume \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgWidget \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgWidget \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgQt \
|
|
||||||
${OpenSceneGraph_SOURCE_DIR}/doc/Doxyfiles/auto_Mainpage
|
${OpenSceneGraph_SOURCE_DIR}/doc/Doxyfiles/auto_Mainpage
|
||||||
INPUT_ENCODING = UTF-8
|
INPUT_ENCODING = UTF-8
|
||||||
FILE_PATTERNS = *include* \
|
FILE_PATTERNS = *include* \
|
||||||
|
|||||||
@@ -169,6 +169,25 @@ OPTIMIZE_OUTPUT_FOR_C = NO
|
|||||||
|
|
||||||
OPTIMIZE_OUTPUT_JAVA = NO
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
|
|
||||||
|
# Doxygen selects the parser to use depending on the extension of the files it
|
||||||
|
# parses. With this tag you can assign which parser to use for a given
|
||||||
|
# extension. Doxygen has a built-in mapping, but you can override or extend it
|
||||||
|
# using this tag. The format is ext=language, where ext is a file extension, and
|
||||||
|
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
|
||||||
|
# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
|
||||||
|
# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
|
||||||
|
# Fortran. In the later case the parser tries to guess whether the code is fixed
|
||||||
|
# or free formatted code, this is the default for Fortran type files), VHDL. For
|
||||||
|
# instance to make doxygen treat .inc files as Fortran files (default is PHP),
|
||||||
|
# and .f files as C (default is Fortran), use: inc=Fortran f=C.
|
||||||
|
#
|
||||||
|
# Note: For files without extension you can use no_extension as a placeholder.
|
||||||
|
#
|
||||||
|
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
|
||||||
|
# the files are not read by doxygen.
|
||||||
|
|
||||||
|
EXTENSION_MAPPING = no_extension=C++
|
||||||
|
|
||||||
# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
|
# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
|
||||||
# the same type (for instance a group of public functions) to be put as a
|
# the same type (for instance a group of public functions) to be put as a
|
||||||
# subgroup of that type (e.g. under the Public Functions section). Set it to
|
# subgroup of that type (e.g. under the Public Functions section). Set it to
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ OPTIMIZE_OUTPUT_FOR_C = NO
|
|||||||
OPTIMIZE_OUTPUT_JAVA = NO
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
OPTIMIZE_FOR_FORTRAN = NO
|
OPTIMIZE_FOR_FORTRAN = NO
|
||||||
OPTIMIZE_OUTPUT_VHDL = NO
|
OPTIMIZE_OUTPUT_VHDL = NO
|
||||||
|
EXTENSION_MAPPING = no_extension=C++
|
||||||
BUILTIN_STL_SUPPORT = NO
|
BUILTIN_STL_SUPPORT = NO
|
||||||
CPP_CLI_SUPPORT = NO
|
CPP_CLI_SUPPORT = NO
|
||||||
SIP_SUPPORT = NO
|
SIP_SUPPORT = NO
|
||||||
@@ -88,15 +89,16 @@ INPUT = ${OpenSceneGraph_SOURCE_DIR}/include/osg \
|
|||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgGA \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgGA \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgManipulator \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgManipulator \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgParticle \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgParticle \
|
||||||
|
${OpenSceneGraph_SOURCE_DIR}/include/osgPresentation \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgShadow \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgShadow \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgSim \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgSim \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgTerrain \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgTerrain \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgText \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgText \
|
||||||
|
${OpenSceneGraph_SOURCE_DIR}/include/osgUI \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgUtil \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgUtil \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgViewer \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgViewer \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgVolume \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgVolume \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgWidget \
|
${OpenSceneGraph_SOURCE_DIR}/include/osgWidget \
|
||||||
${OpenSceneGraph_SOURCE_DIR}/include/osgQt \
|
|
||||||
${OpenSceneGraph_SOURCE_DIR}/doc/Doxyfiles/auto_Mainpage
|
${OpenSceneGraph_SOURCE_DIR}/doc/Doxyfiles/auto_Mainpage
|
||||||
INPUT_ENCODING = UTF-8
|
INPUT_ENCODING = UTF-8
|
||||||
FILE_PATTERNS = *include* \
|
FILE_PATTERNS = *include* \
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ CREATE_SUBDIRS = NO
|
|||||||
OUTPUT_LANGUAGE = English
|
OUTPUT_LANGUAGE = English
|
||||||
BRIEF_MEMBER_DESC = YES
|
BRIEF_MEMBER_DESC = YES
|
||||||
REPEAT_BRIEF = YES
|
REPEAT_BRIEF = YES
|
||||||
ABBREVIATE_BRIEF =
|
ABBREVIATE_BRIEF =
|
||||||
ALWAYS_DETAILED_SEC = NO
|
ALWAYS_DETAILED_SEC = NO
|
||||||
INLINE_INHERITED_MEMB = NO
|
INLINE_INHERITED_MEMB = NO
|
||||||
FULL_PATH_NAMES = YES
|
FULL_PATH_NAMES = YES
|
||||||
STRIP_FROM_PATH = "${OpenSceneGraph_SOURCE_DIR}/include/"
|
STRIP_FROM_PATH = "${OpenSceneGraph_SOURCE_DIR}/include/"
|
||||||
STRIP_FROM_INC_PATH =
|
STRIP_FROM_INC_PATH =
|
||||||
SHORT_NAMES = YES
|
SHORT_NAMES = YES
|
||||||
JAVADOC_AUTOBRIEF = YES
|
JAVADOC_AUTOBRIEF = YES
|
||||||
QT_AUTOBRIEF = NO
|
QT_AUTOBRIEF = NO
|
||||||
@@ -24,11 +24,12 @@ MULTILINE_CPP_IS_BRIEF = NO
|
|||||||
INHERIT_DOCS = YES
|
INHERIT_DOCS = YES
|
||||||
SEPARATE_MEMBER_PAGES = NO
|
SEPARATE_MEMBER_PAGES = NO
|
||||||
TAB_SIZE = 8
|
TAB_SIZE = 8
|
||||||
ALIASES =
|
ALIASES =
|
||||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||||
OPTIMIZE_OUTPUT_JAVA = NO
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
OPTIMIZE_FOR_FORTRAN = NO
|
OPTIMIZE_FOR_FORTRAN = NO
|
||||||
OPTIMIZE_OUTPUT_VHDL = NO
|
OPTIMIZE_OUTPUT_VHDL = NO
|
||||||
|
EXTENSION_MAPPING = no_extension=C++
|
||||||
BUILTIN_STL_SUPPORT = NO
|
BUILTIN_STL_SUPPORT = NO
|
||||||
CPP_CLI_SUPPORT = NO
|
CPP_CLI_SUPPORT = NO
|
||||||
SIP_SUPPORT = NO
|
SIP_SUPPORT = NO
|
||||||
@@ -36,7 +37,6 @@ IDL_PROPERTY_SUPPORT = YES
|
|||||||
DISTRIBUTE_GROUP_DOC = NO
|
DISTRIBUTE_GROUP_DOC = NO
|
||||||
SUBGROUPING = YES
|
SUBGROUPING = YES
|
||||||
TYPEDEF_HIDES_STRUCT = NO
|
TYPEDEF_HIDES_STRUCT = NO
|
||||||
SYMBOL_CACHE_SIZE = 0
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Build related configuration options
|
# Build related configuration options
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@@ -63,13 +63,13 @@ GENERATE_TODOLIST = YES
|
|||||||
GENERATE_TESTLIST = YES
|
GENERATE_TESTLIST = YES
|
||||||
GENERATE_BUGLIST = YES
|
GENERATE_BUGLIST = YES
|
||||||
GENERATE_DEPRECATEDLIST= YES
|
GENERATE_DEPRECATEDLIST= YES
|
||||||
ENABLED_SECTIONS =
|
ENABLED_SECTIONS =
|
||||||
MAX_INITIALIZER_LINES = 30
|
MAX_INITIALIZER_LINES = 30
|
||||||
SHOW_USED_FILES = YES
|
SHOW_USED_FILES = YES
|
||||||
SHOW_FILES = YES
|
SHOW_FILES = YES
|
||||||
SHOW_NAMESPACES = YES
|
SHOW_NAMESPACES = YES
|
||||||
FILE_VERSION_FILTER =
|
FILE_VERSION_FILTER =
|
||||||
LAYOUT_FILE =
|
LAYOUT_FILE =
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to warning and progress messages
|
# configuration options related to warning and progress messages
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@@ -79,26 +79,27 @@ WARN_IF_UNDOCUMENTED = YES
|
|||||||
WARN_IF_DOC_ERROR = YES
|
WARN_IF_DOC_ERROR = YES
|
||||||
WARN_NO_PARAMDOC = NO
|
WARN_NO_PARAMDOC = NO
|
||||||
WARN_FORMAT = "$file:$line: $text"
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
WARN_LOGFILE =
|
WARN_LOGFILE =
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to the input files
|
# configuration options related to the input files
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
INPUT = "${OpenSceneGraph_SOURCE_DIR}/include/osg" \
|
INPUT = "${OpenSceneGraph_SOURCE_DIR}/include/osg" \
|
||||||
|
"${OpenSceneGraph_SOURCE_DIR}/include/osgAnimation" \
|
||||||
"${OpenSceneGraph_SOURCE_DIR}/include/osgDB" \
|
"${OpenSceneGraph_SOURCE_DIR}/include/osgDB" \
|
||||||
"${OpenSceneGraph_SOURCE_DIR}/include/osgFX" \
|
"${OpenSceneGraph_SOURCE_DIR}/include/osgFX" \
|
||||||
"${OpenSceneGraph_SOURCE_DIR}/include/osgGA" \
|
"${OpenSceneGraph_SOURCE_DIR}/include/osgGA" \
|
||||||
"${OpenSceneGraph_SOURCE_DIR}/include/osgManipulator" \
|
"${OpenSceneGraph_SOURCE_DIR}/include/osgManipulator" \
|
||||||
"${OpenSceneGraph_SOURCE_DIR}/include/osgParticle" \
|
"${OpenSceneGraph_SOURCE_DIR}/include/osgParticle" \
|
||||||
|
"${OpenSceneGraph_SOURCE_DIR}/include/osgPresentation" \
|
||||||
"${OpenSceneGraph_SOURCE_DIR}/include/osgShadow" \
|
"${OpenSceneGraph_SOURCE_DIR}/include/osgShadow" \
|
||||||
"${OpenSceneGraph_SOURCE_DIR}/include/osgSim" \
|
"${OpenSceneGraph_SOURCE_DIR}/include/osgSim" \
|
||||||
"${OpenSceneGraph_SOURCE_DIR}/include/osgTerrain" \
|
"${OpenSceneGraph_SOURCE_DIR}/include/osgTerrain" \
|
||||||
"${OpenSceneGraph_SOURCE_DIR}/include/osgText" \
|
"${OpenSceneGraph_SOURCE_DIR}/include/osgText" \
|
||||||
|
"${OpenSceneGraph_SOURCE_DIR}/include/osgUI" \
|
||||||
"${OpenSceneGraph_SOURCE_DIR}/include/osgUtil" \
|
"${OpenSceneGraph_SOURCE_DIR}/include/osgUtil" \
|
||||||
"${OpenSceneGraph_SOURCE_DIR}/include/osgViewer" \
|
"${OpenSceneGraph_SOURCE_DIR}/include/osgViewer" \
|
||||||
"${OpenSceneGraph_SOURCE_DIR}/include/osgVolume" \
|
"${OpenSceneGraph_SOURCE_DIR}/include/osgVolume" \
|
||||||
"${OpenSceneGraph_SOURCE_DIR}/include/osgWidget" \
|
"${OpenSceneGraph_SOURCE_DIR}/include/osgWidget"
|
||||||
"${OpenSceneGraph_SOURCE_DIR}/include/osgQt" \
|
|
||||||
"${OpenSceneGraph_SOURCE_DIR}/include/osgAnimation"
|
|
||||||
INPUT_ENCODING = UTF-8
|
INPUT_ENCODING = UTF-8
|
||||||
FILE_PATTERNS = *include* \
|
FILE_PATTERNS = *include* \
|
||||||
*.cpp
|
*.cpp
|
||||||
@@ -106,13 +107,13 @@ RECURSIVE = YES
|
|||||||
EXCLUDE = .svn
|
EXCLUDE = .svn
|
||||||
EXCLUDE_SYMLINKS = NO
|
EXCLUDE_SYMLINKS = NO
|
||||||
EXCLUDE_PATTERNS = */.svn/*
|
EXCLUDE_PATTERNS = */.svn/*
|
||||||
EXCLUDE_SYMBOLS =
|
EXCLUDE_SYMBOLS =
|
||||||
EXAMPLE_PATH =
|
EXAMPLE_PATH =
|
||||||
EXAMPLE_PATTERNS =
|
EXAMPLE_PATTERNS =
|
||||||
EXAMPLE_RECURSIVE = NO
|
EXAMPLE_RECURSIVE = NO
|
||||||
IMAGE_PATH =
|
IMAGE_PATH =
|
||||||
INPUT_FILTER =
|
INPUT_FILTER =
|
||||||
FILTER_PATTERNS =
|
FILTER_PATTERNS =
|
||||||
FILTER_SOURCE_FILES = NO
|
FILTER_SOURCE_FILES = NO
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to source browsing
|
# configuration options related to source browsing
|
||||||
@@ -130,16 +131,16 @@ VERBATIM_HEADERS = YES
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
ALPHABETICAL_INDEX = YES
|
ALPHABETICAL_INDEX = YES
|
||||||
COLS_IN_ALPHA_INDEX = 2
|
COLS_IN_ALPHA_INDEX = 2
|
||||||
IGNORE_PREFIX =
|
IGNORE_PREFIX =
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to the HTML output
|
# configuration options related to the HTML output
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
GENERATE_HTML = YES
|
GENERATE_HTML = YES
|
||||||
HTML_OUTPUT = OpenSceneGraphReferenceDocs
|
HTML_OUTPUT = OpenSceneGraphReferenceDocs
|
||||||
HTML_FILE_EXTENSION = .html
|
HTML_FILE_EXTENSION = .html
|
||||||
HTML_HEADER =
|
HTML_HEADER =
|
||||||
HTML_FOOTER = "${OpenSceneGraph_SOURCE_DIR}/doc/Doxyfiles/custom_Footer.html"
|
HTML_FOOTER = "${OpenSceneGraph_SOURCE_DIR}/doc/Doxyfiles/custom_Footer.html"
|
||||||
HTML_STYLESHEET =
|
HTML_STYLESHEET =
|
||||||
HTML_DYNAMIC_SECTIONS = NO
|
HTML_DYNAMIC_SECTIONS = NO
|
||||||
GENERATE_DOCSET = NO
|
GENERATE_DOCSET = NO
|
||||||
DOCSET_FEEDNAME = "Doxygen generated docs"
|
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||||
@@ -148,14 +149,14 @@ GENERATE_HTMLHELP = ${GENERATE_HTMLHELP}
|
|||||||
CHM_FILE = "../${CMAKE_PROJECT_NAME}ReferenceDocs-${OPENSCENEGRAPH_VERSION}.chm"
|
CHM_FILE = "../${CMAKE_PROJECT_NAME}ReferenceDocs-${OPENSCENEGRAPH_VERSION}.chm"
|
||||||
HHC_LOCATION = "${HTML_HELP_COMPILER}"
|
HHC_LOCATION = "${HTML_HELP_COMPILER}"
|
||||||
GENERATE_CHI = NO
|
GENERATE_CHI = NO
|
||||||
CHM_INDEX_ENCODING =
|
CHM_INDEX_ENCODING =
|
||||||
BINARY_TOC = NO
|
BINARY_TOC = NO
|
||||||
TOC_EXPAND = NO
|
TOC_EXPAND = NO
|
||||||
GENERATE_QHP = NO
|
GENERATE_QHP = NO
|
||||||
QCH_FILE =
|
QCH_FILE =
|
||||||
QHP_NAMESPACE = org.doxygen.Project
|
QHP_NAMESPACE = org.doxygen.Project
|
||||||
QHP_VIRTUAL_FOLDER = doc
|
QHP_VIRTUAL_FOLDER = doc
|
||||||
QHG_LOCATION =
|
QHG_LOCATION =
|
||||||
DISABLE_INDEX = NO
|
DISABLE_INDEX = NO
|
||||||
ENUM_VALUES_PER_LINE = 4
|
ENUM_VALUES_PER_LINE = 4
|
||||||
GENERATE_TREEVIEW = NO
|
GENERATE_TREEVIEW = NO
|
||||||
@@ -170,8 +171,8 @@ LATEX_CMD_NAME = latex
|
|||||||
MAKEINDEX_CMD_NAME = makeindex
|
MAKEINDEX_CMD_NAME = makeindex
|
||||||
COMPACT_LATEX = NO
|
COMPACT_LATEX = NO
|
||||||
PAPER_TYPE = a4wide
|
PAPER_TYPE = a4wide
|
||||||
EXTRA_PACKAGES =
|
EXTRA_PACKAGES =
|
||||||
LATEX_HEADER =
|
LATEX_HEADER =
|
||||||
PDF_HYPERLINKS = NO
|
PDF_HYPERLINKS = NO
|
||||||
USE_PDFLATEX = NO
|
USE_PDFLATEX = NO
|
||||||
LATEX_BATCHMODE = NO
|
LATEX_BATCHMODE = NO
|
||||||
@@ -183,8 +184,8 @@ GENERATE_RTF = NO
|
|||||||
RTF_OUTPUT = rtf
|
RTF_OUTPUT = rtf
|
||||||
COMPACT_RTF = NO
|
COMPACT_RTF = NO
|
||||||
RTF_HYPERLINKS = NO
|
RTF_HYPERLINKS = NO
|
||||||
RTF_STYLESHEET_FILE =
|
RTF_STYLESHEET_FILE =
|
||||||
RTF_EXTENSIONS_FILE =
|
RTF_EXTENSIONS_FILE =
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to the man page output
|
# configuration options related to the man page output
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@@ -197,8 +198,6 @@ MAN_LINKS = NO
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
GENERATE_XML = NO
|
GENERATE_XML = NO
|
||||||
XML_OUTPUT = xml
|
XML_OUTPUT = xml
|
||||||
XML_SCHEMA =
|
|
||||||
XML_DTD =
|
|
||||||
XML_PROGRAMLISTING = YES
|
XML_PROGRAMLISTING = YES
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options for the AutoGen Definitions output
|
# configuration options for the AutoGen Definitions output
|
||||||
@@ -210,37 +209,36 @@ GENERATE_AUTOGEN_DEF = NO
|
|||||||
GENERATE_PERLMOD = NO
|
GENERATE_PERLMOD = NO
|
||||||
PERLMOD_LATEX = NO
|
PERLMOD_LATEX = NO
|
||||||
PERLMOD_PRETTY = YES
|
PERLMOD_PRETTY = YES
|
||||||
PERLMOD_MAKEVAR_PREFIX =
|
PERLMOD_MAKEVAR_PREFIX =
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration options related to the preprocessor
|
# Configuration options related to the preprocessor
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
ENABLE_PREPROCESSING = YES
|
ENABLE_PREPROCESSING = YES
|
||||||
MACRO_EXPANSION = NO
|
MACRO_EXPANSION = NO
|
||||||
EXPAND_ONLY_PREDEF = NO
|
EXPAND_ONLY_PREDEF = NO
|
||||||
SEARCH_INCLUDES = YES
|
SEARCH_INCLUDES = YES
|
||||||
INCLUDE_PATH =
|
INCLUDE_PATH =
|
||||||
INCLUDE_FILE_PATTERNS =
|
INCLUDE_FILE_PATTERNS =
|
||||||
PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
|
PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
|
||||||
EXPAND_AS_DEFINED =
|
EXPAND_AS_DEFINED =
|
||||||
SKIP_FUNCTION_MACROS = YES
|
SKIP_FUNCTION_MACROS = YES
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration::additions related to external references
|
# Configuration::additions related to external references
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
TAGFILES =
|
TAGFILES =
|
||||||
GENERATE_TAGFILE = ${GENERATE_TAGFILE}
|
GENERATE_TAGFILE = ${GENERATE_TAGFILE}
|
||||||
ALLEXTERNALS = NO
|
ALLEXTERNALS = NO
|
||||||
EXTERNAL_GROUPS = YES
|
EXTERNAL_GROUPS = YES
|
||||||
PERL_PATH = /usr/bin/perl
|
PERL_PATH = /usr/bin/perl
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration options related to the dot tool
|
# Configuration options related to the dot tool
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
CLASS_DIAGRAMS = YES
|
CLASS_DIAGRAMS = YES
|
||||||
MSCGEN_PATH =
|
MSCGEN_PATH =
|
||||||
HIDE_UNDOC_RELATIONS = YES
|
HIDE_UNDOC_RELATIONS = YES
|
||||||
HAVE_DOT = YES
|
HAVE_DOT = YES
|
||||||
DOT_FONTNAME = FreeSans
|
|
||||||
DOT_FONTSIZE = 10
|
DOT_FONTSIZE = 10
|
||||||
DOT_FONTPATH =
|
DOT_FONTPATH =
|
||||||
CLASS_GRAPH = YES
|
CLASS_GRAPH = YES
|
||||||
COLLABORATION_GRAPH = NO
|
COLLABORATION_GRAPH = NO
|
||||||
GROUP_GRAPHS = YES
|
GROUP_GRAPHS = YES
|
||||||
@@ -254,7 +252,7 @@ GRAPHICAL_HIERARCHY = YES
|
|||||||
DIRECTORY_GRAPH = YES
|
DIRECTORY_GRAPH = YES
|
||||||
DOT_IMAGE_FORMAT = png
|
DOT_IMAGE_FORMAT = png
|
||||||
DOT_PATH = "${DOXYGEN_DOT_PATH}"
|
DOT_PATH = "${DOXYGEN_DOT_PATH}"
|
||||||
DOTFILE_DIRS =
|
DOTFILE_DIRS =
|
||||||
DOT_GRAPH_MAX_NODES = 50
|
DOT_GRAPH_MAX_NODES = 50
|
||||||
MAX_DOT_GRAPH_DEPTH = 0
|
MAX_DOT_GRAPH_DEPTH = 0
|
||||||
DOT_TRANSPARENT = YES
|
DOT_TRANSPARENT = YES
|
||||||
@@ -262,6 +260,6 @@ DOT_MULTI_TARGETS = NO
|
|||||||
GENERATE_LEGEND = YES
|
GENERATE_LEGEND = YES
|
||||||
DOT_CLEANUP = YES
|
DOT_CLEANUP = YES
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration::additions related to the search engine
|
# Configuration::additions related to the search engine
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
SEARCHENGINE = ${SEARCHENGINE}
|
SEARCHENGINE = ${SEARCHENGINE}
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ CREATE_SUBDIRS = NO
|
|||||||
OUTPUT_LANGUAGE = English
|
OUTPUT_LANGUAGE = English
|
||||||
BRIEF_MEMBER_DESC = YES
|
BRIEF_MEMBER_DESC = YES
|
||||||
REPEAT_BRIEF = YES
|
REPEAT_BRIEF = YES
|
||||||
ABBREVIATE_BRIEF =
|
ABBREVIATE_BRIEF =
|
||||||
ALWAYS_DETAILED_SEC = NO
|
ALWAYS_DETAILED_SEC = NO
|
||||||
INLINE_INHERITED_MEMB = NO
|
INLINE_INHERITED_MEMB = NO
|
||||||
FULL_PATH_NAMES = YES
|
FULL_PATH_NAMES = YES
|
||||||
STRIP_FROM_PATH = "${OpenSceneGraph_SOURCE_DIR}/include/"
|
STRIP_FROM_PATH = "${OpenSceneGraph_SOURCE_DIR}/include/"
|
||||||
STRIP_FROM_INC_PATH =
|
STRIP_FROM_INC_PATH =
|
||||||
SHORT_NAMES = YES
|
SHORT_NAMES = YES
|
||||||
JAVADOC_AUTOBRIEF = YES
|
JAVADOC_AUTOBRIEF = YES
|
||||||
QT_AUTOBRIEF = NO
|
QT_AUTOBRIEF = NO
|
||||||
@@ -24,11 +24,12 @@ MULTILINE_CPP_IS_BRIEF = NO
|
|||||||
INHERIT_DOCS = YES
|
INHERIT_DOCS = YES
|
||||||
SEPARATE_MEMBER_PAGES = NO
|
SEPARATE_MEMBER_PAGES = NO
|
||||||
TAB_SIZE = 8
|
TAB_SIZE = 8
|
||||||
ALIASES =
|
ALIASES =
|
||||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||||
OPTIMIZE_OUTPUT_JAVA = NO
|
OPTIMIZE_OUTPUT_JAVA = NO
|
||||||
OPTIMIZE_FOR_FORTRAN = NO
|
OPTIMIZE_FOR_FORTRAN = NO
|
||||||
OPTIMIZE_OUTPUT_VHDL = NO
|
OPTIMIZE_OUTPUT_VHDL = NO
|
||||||
|
EXTENSION_MAPPING = no_extension=C++
|
||||||
BUILTIN_STL_SUPPORT = NO
|
BUILTIN_STL_SUPPORT = NO
|
||||||
CPP_CLI_SUPPORT = NO
|
CPP_CLI_SUPPORT = NO
|
||||||
SIP_SUPPORT = NO
|
SIP_SUPPORT = NO
|
||||||
@@ -36,7 +37,6 @@ IDL_PROPERTY_SUPPORT = YES
|
|||||||
DISTRIBUTE_GROUP_DOC = NO
|
DISTRIBUTE_GROUP_DOC = NO
|
||||||
SUBGROUPING = YES
|
SUBGROUPING = YES
|
||||||
TYPEDEF_HIDES_STRUCT = NO
|
TYPEDEF_HIDES_STRUCT = NO
|
||||||
SYMBOL_CACHE_SIZE = 0
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Build related configuration options
|
# Build related configuration options
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@@ -63,13 +63,13 @@ GENERATE_TODOLIST = YES
|
|||||||
GENERATE_TESTLIST = YES
|
GENERATE_TESTLIST = YES
|
||||||
GENERATE_BUGLIST = YES
|
GENERATE_BUGLIST = YES
|
||||||
GENERATE_DEPRECATEDLIST= YES
|
GENERATE_DEPRECATEDLIST= YES
|
||||||
ENABLED_SECTIONS =
|
ENABLED_SECTIONS =
|
||||||
MAX_INITIALIZER_LINES = 30
|
MAX_INITIALIZER_LINES = 30
|
||||||
SHOW_USED_FILES = YES
|
SHOW_USED_FILES = YES
|
||||||
SHOW_FILES = YES
|
SHOW_FILES = YES
|
||||||
SHOW_NAMESPACES = YES
|
SHOW_NAMESPACES = YES
|
||||||
FILE_VERSION_FILTER =
|
FILE_VERSION_FILTER =
|
||||||
LAYOUT_FILE =
|
LAYOUT_FILE =
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to warning and progress messages
|
# configuration options related to warning and progress messages
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@@ -79,7 +79,7 @@ WARN_IF_UNDOCUMENTED = YES
|
|||||||
WARN_IF_DOC_ERROR = YES
|
WARN_IF_DOC_ERROR = YES
|
||||||
WARN_NO_PARAMDOC = NO
|
WARN_NO_PARAMDOC = NO
|
||||||
WARN_FORMAT = "$file:$line: $text"
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
WARN_LOGFILE =
|
WARN_LOGFILE =
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to the input files
|
# configuration options related to the input files
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@@ -91,13 +91,13 @@ RECURSIVE = YES
|
|||||||
EXCLUDE = .svn
|
EXCLUDE = .svn
|
||||||
EXCLUDE_SYMLINKS = NO
|
EXCLUDE_SYMLINKS = NO
|
||||||
EXCLUDE_PATTERNS = */.svn/*
|
EXCLUDE_PATTERNS = */.svn/*
|
||||||
EXCLUDE_SYMBOLS =
|
EXCLUDE_SYMBOLS =
|
||||||
EXAMPLE_PATH =
|
EXAMPLE_PATH =
|
||||||
EXAMPLE_PATTERNS =
|
EXAMPLE_PATTERNS =
|
||||||
EXAMPLE_RECURSIVE = NO
|
EXAMPLE_RECURSIVE = NO
|
||||||
IMAGE_PATH =
|
IMAGE_PATH =
|
||||||
INPUT_FILTER =
|
INPUT_FILTER =
|
||||||
FILTER_PATTERNS =
|
FILTER_PATTERNS =
|
||||||
FILTER_SOURCE_FILES = NO
|
FILTER_SOURCE_FILES = NO
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to source browsing
|
# configuration options related to source browsing
|
||||||
@@ -115,16 +115,16 @@ VERBATIM_HEADERS = YES
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
ALPHABETICAL_INDEX = YES
|
ALPHABETICAL_INDEX = YES
|
||||||
COLS_IN_ALPHA_INDEX = 2
|
COLS_IN_ALPHA_INDEX = 2
|
||||||
IGNORE_PREFIX =
|
IGNORE_PREFIX =
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to the HTML output
|
# configuration options related to the HTML output
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
GENERATE_HTML = YES
|
GENERATE_HTML = YES
|
||||||
HTML_OUTPUT = OpenThreadsReferenceDocs
|
HTML_OUTPUT = OpenThreadsReferenceDocs
|
||||||
HTML_FILE_EXTENSION = .html
|
HTML_FILE_EXTENSION = .html
|
||||||
HTML_HEADER =
|
HTML_HEADER =
|
||||||
HTML_FOOTER = "${OpenSceneGraph_SOURCE_DIR}/doc/Doxyfiles/custom_Footer.html"
|
HTML_FOOTER = "${OpenSceneGraph_SOURCE_DIR}/doc/Doxyfiles/custom_Footer.html"
|
||||||
HTML_STYLESHEET =
|
HTML_STYLESHEET =
|
||||||
HTML_DYNAMIC_SECTIONS = NO
|
HTML_DYNAMIC_SECTIONS = NO
|
||||||
GENERATE_DOCSET = NO
|
GENERATE_DOCSET = NO
|
||||||
DOCSET_FEEDNAME = "Doxygen generated docs"
|
DOCSET_FEEDNAME = "Doxygen generated docs"
|
||||||
@@ -133,14 +133,14 @@ GENERATE_HTMLHELP = ${GENERATE_HTMLHELP}
|
|||||||
CHM_FILE = "../OpenThreadsReferenceDocs-${OPENSCENEGRAPH_VERSION}.chm"
|
CHM_FILE = "../OpenThreadsReferenceDocs-${OPENSCENEGRAPH_VERSION}.chm"
|
||||||
HHC_LOCATION = "${HTML_HELP_COMPILER}"
|
HHC_LOCATION = "${HTML_HELP_COMPILER}"
|
||||||
GENERATE_CHI = NO
|
GENERATE_CHI = NO
|
||||||
CHM_INDEX_ENCODING =
|
CHM_INDEX_ENCODING =
|
||||||
BINARY_TOC = NO
|
BINARY_TOC = NO
|
||||||
TOC_EXPAND = NO
|
TOC_EXPAND = NO
|
||||||
GENERATE_QHP = NO
|
GENERATE_QHP = NO
|
||||||
QCH_FILE =
|
QCH_FILE =
|
||||||
QHP_NAMESPACE = org.doxygen.Project
|
QHP_NAMESPACE = org.doxygen.Project
|
||||||
QHP_VIRTUAL_FOLDER = doc
|
QHP_VIRTUAL_FOLDER = doc
|
||||||
QHG_LOCATION =
|
QHG_LOCATION =
|
||||||
DISABLE_INDEX = NO
|
DISABLE_INDEX = NO
|
||||||
ENUM_VALUES_PER_LINE = 4
|
ENUM_VALUES_PER_LINE = 4
|
||||||
GENERATE_TREEVIEW = NO
|
GENERATE_TREEVIEW = NO
|
||||||
@@ -155,8 +155,8 @@ LATEX_CMD_NAME = latex
|
|||||||
MAKEINDEX_CMD_NAME = makeindex
|
MAKEINDEX_CMD_NAME = makeindex
|
||||||
COMPACT_LATEX = NO
|
COMPACT_LATEX = NO
|
||||||
PAPER_TYPE = a4wide
|
PAPER_TYPE = a4wide
|
||||||
EXTRA_PACKAGES =
|
EXTRA_PACKAGES =
|
||||||
LATEX_HEADER =
|
LATEX_HEADER =
|
||||||
PDF_HYPERLINKS = NO
|
PDF_HYPERLINKS = NO
|
||||||
USE_PDFLATEX = NO
|
USE_PDFLATEX = NO
|
||||||
LATEX_BATCHMODE = NO
|
LATEX_BATCHMODE = NO
|
||||||
@@ -168,8 +168,8 @@ GENERATE_RTF = NO
|
|||||||
RTF_OUTPUT = rtf
|
RTF_OUTPUT = rtf
|
||||||
COMPACT_RTF = NO
|
COMPACT_RTF = NO
|
||||||
RTF_HYPERLINKS = NO
|
RTF_HYPERLINKS = NO
|
||||||
RTF_STYLESHEET_FILE =
|
RTF_STYLESHEET_FILE =
|
||||||
RTF_EXTENSIONS_FILE =
|
RTF_EXTENSIONS_FILE =
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to the man page output
|
# configuration options related to the man page output
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@@ -182,8 +182,6 @@ MAN_LINKS = NO
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
GENERATE_XML = NO
|
GENERATE_XML = NO
|
||||||
XML_OUTPUT = xml
|
XML_OUTPUT = xml
|
||||||
XML_SCHEMA =
|
|
||||||
XML_DTD =
|
|
||||||
XML_PROGRAMLISTING = YES
|
XML_PROGRAMLISTING = YES
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options for the AutoGen Definitions output
|
# configuration options for the AutoGen Definitions output
|
||||||
@@ -195,37 +193,36 @@ GENERATE_AUTOGEN_DEF = NO
|
|||||||
GENERATE_PERLMOD = NO
|
GENERATE_PERLMOD = NO
|
||||||
PERLMOD_LATEX = NO
|
PERLMOD_LATEX = NO
|
||||||
PERLMOD_PRETTY = YES
|
PERLMOD_PRETTY = YES
|
||||||
PERLMOD_MAKEVAR_PREFIX =
|
PERLMOD_MAKEVAR_PREFIX =
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration options related to the preprocessor
|
# Configuration options related to the preprocessor
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
ENABLE_PREPROCESSING = YES
|
ENABLE_PREPROCESSING = YES
|
||||||
MACRO_EXPANSION = NO
|
MACRO_EXPANSION = NO
|
||||||
EXPAND_ONLY_PREDEF = NO
|
EXPAND_ONLY_PREDEF = NO
|
||||||
SEARCH_INCLUDES = YES
|
SEARCH_INCLUDES = YES
|
||||||
INCLUDE_PATH =
|
INCLUDE_PATH =
|
||||||
INCLUDE_FILE_PATTERNS =
|
INCLUDE_FILE_PATTERNS =
|
||||||
PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
|
PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
|
||||||
EXPAND_AS_DEFINED =
|
EXPAND_AS_DEFINED =
|
||||||
SKIP_FUNCTION_MACROS = YES
|
SKIP_FUNCTION_MACROS = YES
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration::additions related to external references
|
# Configuration::additions related to external references
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
TAGFILES =
|
TAGFILES =
|
||||||
GENERATE_TAGFILE = ${GENERATE_TAGFILE}
|
GENERATE_TAGFILE = ${GENERATE_TAGFILE}
|
||||||
ALLEXTERNALS = NO
|
ALLEXTERNALS = NO
|
||||||
EXTERNAL_GROUPS = YES
|
EXTERNAL_GROUPS = YES
|
||||||
PERL_PATH = /usr/bin/perl
|
PERL_PATH = /usr/bin/perl
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration options related to the dot tool
|
# Configuration options related to the dot tool
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
CLASS_DIAGRAMS = YES
|
CLASS_DIAGRAMS = YES
|
||||||
MSCGEN_PATH =
|
MSCGEN_PATH =
|
||||||
HIDE_UNDOC_RELATIONS = YES
|
HIDE_UNDOC_RELATIONS = YES
|
||||||
HAVE_DOT = YES
|
HAVE_DOT = YES
|
||||||
DOT_FONTNAME = FreeSans
|
|
||||||
DOT_FONTSIZE = 10
|
DOT_FONTSIZE = 10
|
||||||
DOT_FONTPATH =
|
DOT_FONTPATH =
|
||||||
CLASS_GRAPH = YES
|
CLASS_GRAPH = YES
|
||||||
COLLABORATION_GRAPH = NO
|
COLLABORATION_GRAPH = NO
|
||||||
GROUP_GRAPHS = YES
|
GROUP_GRAPHS = YES
|
||||||
@@ -238,8 +235,8 @@ CALLER_GRAPH = NO
|
|||||||
GRAPHICAL_HIERARCHY = YES
|
GRAPHICAL_HIERARCHY = YES
|
||||||
DIRECTORY_GRAPH = YES
|
DIRECTORY_GRAPH = YES
|
||||||
DOT_IMAGE_FORMAT = png
|
DOT_IMAGE_FORMAT = png
|
||||||
DOT_PATH =
|
DOT_PATH =
|
||||||
DOTFILE_DIRS =
|
DOTFILE_DIRS =
|
||||||
DOT_GRAPH_MAX_NODES = 50
|
DOT_GRAPH_MAX_NODES = 50
|
||||||
MAX_DOT_GRAPH_DEPTH = 0
|
MAX_DOT_GRAPH_DEPTH = 0
|
||||||
DOT_TRANSPARENT = YES
|
DOT_TRANSPARENT = YES
|
||||||
@@ -247,6 +244,6 @@ DOT_MULTI_TARGETS = NO
|
|||||||
GENERATE_LEGEND = YES
|
GENERATE_LEGEND = YES
|
||||||
DOT_CLEANUP = YES
|
DOT_CLEANUP = YES
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration::additions related to the search engine
|
# Configuration::additions related to the search engine
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
SEARCHENGINE = ${SEARCHENGINE}
|
SEARCHENGINE = ${SEARCHENGINE}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ ELSE(ANDROID)
|
|||||||
|
|
||||||
IF(DYNAMIC_OPENSCENEGRAPH)
|
IF(DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
|
||||||
|
ADD_SUBDIRECTORY(osgsimpleMDI)
|
||||||
ADD_SUBDIRECTORY(osg2cpp)
|
ADD_SUBDIRECTORY(osg2cpp)
|
||||||
ADD_SUBDIRECTORY(osganalysis)
|
ADD_SUBDIRECTORY(osganalysis)
|
||||||
ADD_SUBDIRECTORY(osganimate)
|
ADD_SUBDIRECTORY(osganimate)
|
||||||
@@ -36,7 +37,7 @@ IF(DYNAMIC_OPENSCENEGRAPH)
|
|||||||
ADD_SUBDIRECTORY(osgcompositeviewer)
|
ADD_SUBDIRECTORY(osgcompositeviewer)
|
||||||
ADD_SUBDIRECTORY(osgcopy)
|
ADD_SUBDIRECTORY(osgcopy)
|
||||||
ADD_SUBDIRECTORY(osgcubemap)
|
ADD_SUBDIRECTORY(osgcubemap)
|
||||||
ADD_SUBDIRECTORY(osgdelaunay)
|
ADD_SUBDIRECTORY(osgdeferred)
|
||||||
ADD_SUBDIRECTORY(osgcluster)
|
ADD_SUBDIRECTORY(osgcluster)
|
||||||
ADD_SUBDIRECTORY(osgdatabaserevisions)
|
ADD_SUBDIRECTORY(osgdatabaserevisions)
|
||||||
ADD_SUBDIRECTORY(osgdepthpartition)
|
ADD_SUBDIRECTORY(osgdepthpartition)
|
||||||
@@ -54,7 +55,6 @@ IF(DYNAMIC_OPENSCENEGRAPH)
|
|||||||
ADD_SUBDIRECTORY(osghangglide)
|
ADD_SUBDIRECTORY(osghangglide)
|
||||||
ADD_SUBDIRECTORY(osghud)
|
ADD_SUBDIRECTORY(osghud)
|
||||||
ADD_SUBDIRECTORY(osgimagesequence)
|
ADD_SUBDIRECTORY(osgimagesequence)
|
||||||
ADD_SUBDIRECTORY(osgimpostor)
|
|
||||||
ADD_SUBDIRECTORY(osgintersection)
|
ADD_SUBDIRECTORY(osgintersection)
|
||||||
ADD_SUBDIRECTORY(osgkdtree)
|
ADD_SUBDIRECTORY(osgkdtree)
|
||||||
ADD_SUBDIRECTORY(osgkeyboard)
|
ADD_SUBDIRECTORY(osgkeyboard)
|
||||||
@@ -69,6 +69,7 @@ IF(DYNAMIC_OPENSCENEGRAPH)
|
|||||||
ADD_SUBDIRECTORY(osggpx)
|
ADD_SUBDIRECTORY(osggpx)
|
||||||
ADD_SUBDIRECTORY(osggraphicscost)
|
ADD_SUBDIRECTORY(osggraphicscost)
|
||||||
ADD_SUBDIRECTORY(osgmanipulator)
|
ADD_SUBDIRECTORY(osgmanipulator)
|
||||||
|
ADD_SUBDIRECTORY(osgimpostor)
|
||||||
ADD_SUBDIRECTORY(osgmovie)
|
ADD_SUBDIRECTORY(osgmovie)
|
||||||
ADD_SUBDIRECTORY(osgmultiplemovies)
|
ADD_SUBDIRECTORY(osgmultiplemovies)
|
||||||
ADD_SUBDIRECTORY(osgmultiplerendertargets)
|
ADD_SUBDIRECTORY(osgmultiplerendertargets)
|
||||||
@@ -76,6 +77,7 @@ IF(DYNAMIC_OPENSCENEGRAPH)
|
|||||||
ADD_SUBDIRECTORY(osgmultitexturecontrol)
|
ADD_SUBDIRECTORY(osgmultitexturecontrol)
|
||||||
ADD_SUBDIRECTORY(osgmultitouch)
|
ADD_SUBDIRECTORY(osgmultitouch)
|
||||||
ADD_SUBDIRECTORY(osgmultiviewpaging)
|
ADD_SUBDIRECTORY(osgmultiviewpaging)
|
||||||
|
ADD_SUBDIRECTORY(osgobjectcache)
|
||||||
ADD_SUBDIRECTORY(osgoccluder)
|
ADD_SUBDIRECTORY(osgoccluder)
|
||||||
ADD_SUBDIRECTORY(osgocclusionquery)
|
ADD_SUBDIRECTORY(osgocclusionquery)
|
||||||
ADD_SUBDIRECTORY(osgoit)
|
ADD_SUBDIRECTORY(osgoit)
|
||||||
@@ -97,12 +99,15 @@ IF(DYNAMIC_OPENSCENEGRAPH)
|
|||||||
ADD_SUBDIRECTORY(osgreflect)
|
ADD_SUBDIRECTORY(osgreflect)
|
||||||
ADD_SUBDIRECTORY(osgrobot)
|
ADD_SUBDIRECTORY(osgrobot)
|
||||||
ADD_SUBDIRECTORY(osgSSBO)
|
ADD_SUBDIRECTORY(osgSSBO)
|
||||||
|
ADD_SUBDIRECTORY(osgsampler)
|
||||||
ADD_SUBDIRECTORY(osgscalarbar)
|
ADD_SUBDIRECTORY(osgscalarbar)
|
||||||
ADD_SUBDIRECTORY(osgscribe)
|
ADD_SUBDIRECTORY(osgscribe)
|
||||||
ADD_SUBDIRECTORY(osgsequence)
|
ADD_SUBDIRECTORY(osgsequence)
|
||||||
ADD_SUBDIRECTORY(osgshaders)
|
ADD_SUBDIRECTORY(osgshaders)
|
||||||
|
ADD_SUBDIRECTORY(osgshaderpipeline)
|
||||||
ADD_SUBDIRECTORY(osgshadercomposition)
|
ADD_SUBDIRECTORY(osgshadercomposition)
|
||||||
ADD_SUBDIRECTORY(osgshadergen)
|
ADD_SUBDIRECTORY(osgshadergen)
|
||||||
|
ADD_SUBDIRECTORY(osgshadermultiviewport)
|
||||||
ADD_SUBDIRECTORY(osgshaderterrain)
|
ADD_SUBDIRECTORY(osgshaderterrain)
|
||||||
# ADD_SUBDIRECTORY(osgshadercompositor)
|
# ADD_SUBDIRECTORY(osgshadercompositor)
|
||||||
ADD_SUBDIRECTORY(osgshadow)
|
ADD_SUBDIRECTORY(osgshadow)
|
||||||
@@ -163,10 +168,9 @@ IF(DYNAMIC_OPENSCENEGRAPH)
|
|||||||
ADD_SUBDIRECTORY(osgwidgettable)
|
ADD_SUBDIRECTORY(osgwidgettable)
|
||||||
ADD_SUBDIRECTORY(osgwidgetwindow)
|
ADD_SUBDIRECTORY(osgwidgetwindow)
|
||||||
ADD_SUBDIRECTORY(osguserdata)
|
ADD_SUBDIRECTORY(osguserdata)
|
||||||
|
|
||||||
# GL3/GL4 example
|
# GL3/GL4 example
|
||||||
ADD_SUBDIRECTORY(osgsimplegl3)
|
ADD_SUBDIRECTORY(osgsimplegl3)
|
||||||
|
ADD_SUBDIRECTORY(osgbindlesstext)
|
||||||
IF(OSG_CPP_EXCEPTIONS_AVAILABLE)
|
IF(OSG_CPP_EXCEPTIONS_AVAILABLE)
|
||||||
ADD_SUBDIRECTORY(osgunittests)
|
ADD_SUBDIRECTORY(osgunittests)
|
||||||
ADD_SUBDIRECTORY(osgmemorytest)
|
ADD_SUBDIRECTORY(osgmemorytest)
|
||||||
@@ -189,10 +193,6 @@ IF(DYNAMIC_OPENSCENEGRAPH)
|
|||||||
|
|
||||||
ADD_SUBDIRECTORY(osgpdf)
|
ADD_SUBDIRECTORY(osgpdf)
|
||||||
|
|
||||||
IF (GLUT_FOUND)
|
|
||||||
ADD_SUBDIRECTORY(osgviewerGLUT)
|
|
||||||
ENDIF(GLUT_FOUND)
|
|
||||||
|
|
||||||
IF (SDL_FOUND)
|
IF (SDL_FOUND)
|
||||||
ADD_SUBDIRECTORY(osgviewerSDL)
|
ADD_SUBDIRECTORY(osgviewerSDL)
|
||||||
ENDIF(SDL_FOUND)
|
ENDIF(SDL_FOUND)
|
||||||
@@ -211,20 +211,6 @@ IF(DYNAMIC_OPENSCENEGRAPH)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF ( (QT4_FOUND OR Qt5Widgets_FOUND) AND NOT OSG_GLES1_AVAILABLE AND NOT OSG_GLES2_AVAILABLE AND NOT OSG_GL3_AVAILABLE)
|
|
||||||
|
|
||||||
IF ( QT4_FOUND OR Qt5Widgets_FOUND)
|
|
||||||
ADD_SUBDIRECTORY(osgviewerQt)
|
|
||||||
ADD_SUBDIRECTORY(osgqfont)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF ( (QT4_FOUND AND QT_QTWEBKIT_FOUND) OR Qt5WebKitWidgets_FOUND )
|
|
||||||
ADD_SUBDIRECTORY(osgQtWidgets)
|
|
||||||
ADD_SUBDIRECTORY(osgQtBrowser)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF (FLTK_FOUND AND FLTK_GL_LIBRARY)
|
IF (FLTK_FOUND AND FLTK_GL_LIBRARY)
|
||||||
ADD_SUBDIRECTORY(osgviewerFLTK)
|
ADD_SUBDIRECTORY(osgviewerFLTK)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
@@ -268,4 +254,3 @@ ELSE(DYNAMIC_OPENSCENEGRAPH)
|
|||||||
ENDIF(DYNAMIC_OPENSCENEGRAPH)
|
ENDIF(DYNAMIC_OPENSCENEGRAPH)
|
||||||
|
|
||||||
ENDIF(ANDROID)
|
ENDIF(ANDROID)
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ int main( int argc, char **argv )
|
|||||||
std::string filename;
|
std::string filename;
|
||||||
if (arguments.read("--shader",filename))
|
if (arguments.read("--shader",filename))
|
||||||
{
|
{
|
||||||
osg::ref_ptr<osg::Shader> shader = osgDB::readShaderFile(filename);
|
osg::ref_ptr<osg::Shader> shader = osgDB::readRefShaderFile(filename);
|
||||||
if (shader.valid())
|
if (shader.valid())
|
||||||
{
|
{
|
||||||
std::string name = osgDB::getStrippedName(filename);
|
std::string name = osgDB::getStrippedName(filename);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
android:versionCode="1"
|
android:versionCode="1"
|
||||||
android:versionName="1.0">
|
android:versionName="1.0">
|
||||||
<uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8"></uses-sdk>
|
<uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8"></uses-sdk>
|
||||||
<uses-feature android:glEsVersion="0x00010001"/> <!-- OpenGL min requierements (1.1) -->
|
<uses-feature android:glEsVersion="0x00010001"/> <!-- OpenGL min requirements (1.1) -->
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
|
|
||||||
<application android:label="@string/app_name" android:icon="@drawable/osg">
|
<application android:label="@string/app_name" android:icon="@drawable/osg">
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ void OsgMainApp::loadModels(){
|
|||||||
newModel = _vModelsToLoad[i];
|
newModel = _vModelsToLoad[i];
|
||||||
osg::notify(osg::ALWAYS)<<"Loading: "<<newModel.filename<<std::endl;
|
osg::notify(osg::ALWAYS)<<"Loading: "<<newModel.filename<<std::endl;
|
||||||
|
|
||||||
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile(newModel.filename);
|
osg::ref_ptr<osg::Node> loadedModel = osgDB::readRefNodeFile(newModel.filename);
|
||||||
if (loadedModel == 0) {
|
if (loadedModel == 0) {
|
||||||
osg::notify(osg::ALWAYS)<<"Model not loaded"<<std::endl;
|
osg::notify(osg::ALWAYS)<<"Model not loaded"<<std::endl;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
android:versionCode="1"
|
android:versionCode="1"
|
||||||
android:versionName="1.0">
|
android:versionName="1.0">
|
||||||
<uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8"></uses-sdk>
|
<uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8"></uses-sdk>
|
||||||
<uses-feature android:glEsVersion="0x00020000"/> <!-- OpenGL min requierements (2.0) -->
|
<uses-feature android:glEsVersion="0x00020000"/> <!-- OpenGL min requirements (2.0) -->
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
|
|
||||||
<application android:label="@string/app_name" android:icon="@drawable/osg">
|
<application android:label="@string/app_name" android:icon="@drawable/osg">
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ void OsgMainApp::loadModels(){
|
|||||||
newModel = _vModelsToLoad[i];
|
newModel = _vModelsToLoad[i];
|
||||||
osg::notify(osg::ALWAYS)<<"Loading: "<<newModel.filename<<std::endl;
|
osg::notify(osg::ALWAYS)<<"Loading: "<<newModel.filename<<std::endl;
|
||||||
|
|
||||||
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile(newModel.filename);
|
osg::ref_ptr<osg::Node> loadedModel = osgDB::readRefNodeFile(newModel.filename);
|
||||||
if (loadedModel == 0) {
|
if (loadedModel == 0) {
|
||||||
osg::notify(osg::ALWAYS)<<"Model not loaded"<<std::endl;
|
osg::notify(osg::ALWAYS)<<"Model not loaded"<<std::endl;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
24
examples/osgCMakeExample/CMakeLists.txt
Normal file
24
examples/osgCMakeExample/CMakeLists.txt
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
SET(PROJECT_NAME osgCMakeExample)
|
||||||
|
|
||||||
|
PROJECT(${PROJECT_NAME})
|
||||||
|
|
||||||
|
FIND_PACKAGE(OpenThreads)
|
||||||
|
FIND_PACKAGE(osg)
|
||||||
|
FIND_PACKAGE(osgDB)
|
||||||
|
FIND_PACKAGE(osgUtil)
|
||||||
|
FIND_PACKAGE(osgGA)
|
||||||
|
FIND_PACKAGE(osgViewer)
|
||||||
|
|
||||||
|
SET(SOURCES
|
||||||
|
main.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
INCLUDE_DIRECTORIES(${OPENTHREADS_INCLUDE_DIR} ${OSG_INCLUDE_DIR})
|
||||||
|
|
||||||
|
LINK_DIRECTORIES(${OSG_LIB_DIR})
|
||||||
|
|
||||||
|
ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCES})
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${OSG_LIBRARIES} ${OSGVIEWER_LIBRARIES} ${OSGUTIL_LIBRARIES} ${OSGDB_LIBRARIES} ${OSGGA_LIBRARIES} ${OPENTHREADS_LIBRARIES})
|
||||||
183
examples/osgCMakeExample/main.cpp
Normal file
183
examples/osgCMakeExample/main.cpp
Normal file
@@ -0,0 +1,183 @@
|
|||||||
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield
|
||||||
|
*
|
||||||
|
* This application is open source and may be redistributed and/or modified
|
||||||
|
* freely and without restriction, both in commercial and non commercial applications,
|
||||||
|
* as long as this copyright notice is maintained.
|
||||||
|
*
|
||||||
|
* This application 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <osgDB/ReadFile>
|
||||||
|
#include <osgUtil/Optimizer>
|
||||||
|
#include <osg/CoordinateSystemNode>
|
||||||
|
|
||||||
|
#include <osg/Switch>
|
||||||
|
#include <osg/Types>
|
||||||
|
#include <osgText/Text>
|
||||||
|
|
||||||
|
#include <osgViewer/Viewer>
|
||||||
|
#include <osgViewer/ViewerEventHandlers>
|
||||||
|
|
||||||
|
#include <osgGA/TrackballManipulator>
|
||||||
|
#include <osgGA/FlightManipulator>
|
||||||
|
#include <osgGA/DriveManipulator>
|
||||||
|
#include <osgGA/KeySwitchMatrixManipulator>
|
||||||
|
#include <osgGA/StateSetManipulator>
|
||||||
|
#include <osgGA/AnimationPathManipulator>
|
||||||
|
#include <osgGA/TerrainManipulator>
|
||||||
|
#include <osgGA/SphericalManipulator>
|
||||||
|
|
||||||
|
#include <osgGA/Device>
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
// use an ArgumentParser object to manage the program arguments.
|
||||||
|
osg::ArgumentParser arguments(&argc,argv);
|
||||||
|
|
||||||
|
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
|
||||||
|
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the standard OpenSceneGraph example which loads and visualises 3d models.");
|
||||||
|
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
|
||||||
|
arguments.getApplicationUsage()->addCommandLineOption("--image <filename>","Load an image and render it on a quad");
|
||||||
|
arguments.getApplicationUsage()->addCommandLineOption("--dem <filename>","Load an image/DEM and render it on a HeightField");
|
||||||
|
arguments.getApplicationUsage()->addCommandLineOption("--login <url> <username> <password>","Provide authentication information for http file access.");
|
||||||
|
arguments.getApplicationUsage()->addCommandLineOption("-p <filename>","Play specified camera path animation file, previously saved with 'z' key.");
|
||||||
|
arguments.getApplicationUsage()->addCommandLineOption("--speed <factor>","Speed factor for animation playing (1 == normal speed).");
|
||||||
|
arguments.getApplicationUsage()->addCommandLineOption("--device <device-name>","add named device to the viewer");
|
||||||
|
|
||||||
|
osgViewer::Viewer viewer(arguments);
|
||||||
|
|
||||||
|
unsigned int helpType = 0;
|
||||||
|
if ((helpType = arguments.readHelpType()))
|
||||||
|
{
|
||||||
|
arguments.getApplicationUsage()->write(std::cout, helpType);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// report any errors if they have occurred when parsing the program arguments.
|
||||||
|
if (arguments.errors())
|
||||||
|
{
|
||||||
|
arguments.writeErrorMessages(std::cout);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (arguments.argc()<=1)
|
||||||
|
{
|
||||||
|
arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string url, username, password;
|
||||||
|
while(arguments.read("--login",url, username, password))
|
||||||
|
{
|
||||||
|
if (!osgDB::Registry::instance()->getAuthenticationMap())
|
||||||
|
{
|
||||||
|
osgDB::Registry::instance()->setAuthenticationMap(new osgDB::AuthenticationMap);
|
||||||
|
osgDB::Registry::instance()->getAuthenticationMap()->addAuthenticationDetails(
|
||||||
|
url,
|
||||||
|
new osgDB::AuthenticationDetails(username, password)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string device;
|
||||||
|
while(arguments.read("--device", device))
|
||||||
|
{
|
||||||
|
osg::ref_ptr<osgGA::Device> dev = osgDB::readRefFile<osgGA::Device>(device);
|
||||||
|
if (dev.valid())
|
||||||
|
{
|
||||||
|
viewer.addDevice(dev);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// set up the camera manipulators.
|
||||||
|
{
|
||||||
|
osg::ref_ptr<osgGA::KeySwitchMatrixManipulator> keyswitchManipulator = new osgGA::KeySwitchMatrixManipulator;
|
||||||
|
|
||||||
|
keyswitchManipulator->addMatrixManipulator( '1', "Trackball", new osgGA::TrackballManipulator() );
|
||||||
|
keyswitchManipulator->addMatrixManipulator( '2', "Flight", new osgGA::FlightManipulator() );
|
||||||
|
keyswitchManipulator->addMatrixManipulator( '3', "Drive", new osgGA::DriveManipulator() );
|
||||||
|
keyswitchManipulator->addMatrixManipulator( '4', "Terrain", new osgGA::TerrainManipulator() );
|
||||||
|
keyswitchManipulator->addMatrixManipulator( '5', "Orbit", new osgGA::OrbitManipulator() );
|
||||||
|
keyswitchManipulator->addMatrixManipulator( '6', "FirstPerson", new osgGA::FirstPersonManipulator() );
|
||||||
|
keyswitchManipulator->addMatrixManipulator( '7', "Spherical", new osgGA::SphericalManipulator() );
|
||||||
|
|
||||||
|
std::string pathfile;
|
||||||
|
double animationSpeed = 1.0;
|
||||||
|
while(arguments.read("--speed",animationSpeed) ) {}
|
||||||
|
char keyForAnimationPath = '8';
|
||||||
|
while (arguments.read("-p",pathfile))
|
||||||
|
{
|
||||||
|
osgGA::AnimationPathManipulator* apm = new osgGA::AnimationPathManipulator(pathfile);
|
||||||
|
if (apm || !apm->valid())
|
||||||
|
{
|
||||||
|
apm->setTimeScale(animationSpeed);
|
||||||
|
|
||||||
|
unsigned int num = keyswitchManipulator->getNumMatrixManipulators();
|
||||||
|
keyswitchManipulator->addMatrixManipulator( keyForAnimationPath, "Path", apm );
|
||||||
|
keyswitchManipulator->selectMatrixManipulator(num);
|
||||||
|
++keyForAnimationPath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
viewer.setCameraManipulator( keyswitchManipulator.get() );
|
||||||
|
}
|
||||||
|
|
||||||
|
// add the state manipulator
|
||||||
|
viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) );
|
||||||
|
|
||||||
|
// add the thread model handler
|
||||||
|
viewer.addEventHandler(new osgViewer::ThreadingHandler);
|
||||||
|
|
||||||
|
// add the window size toggle handler
|
||||||
|
viewer.addEventHandler(new osgViewer::WindowSizeHandler);
|
||||||
|
|
||||||
|
// add the stats handler
|
||||||
|
viewer.addEventHandler(new osgViewer::StatsHandler);
|
||||||
|
|
||||||
|
// add the help handler
|
||||||
|
viewer.addEventHandler(new osgViewer::HelpHandler(arguments.getApplicationUsage()));
|
||||||
|
|
||||||
|
// add the record camera path handler
|
||||||
|
viewer.addEventHandler(new osgViewer::RecordCameraPathHandler);
|
||||||
|
|
||||||
|
// add the LOD Scale handler
|
||||||
|
viewer.addEventHandler(new osgViewer::LODScaleHandler);
|
||||||
|
|
||||||
|
// add the screen capture handler
|
||||||
|
viewer.addEventHandler(new osgViewer::ScreenCaptureHandler);
|
||||||
|
|
||||||
|
// load the data
|
||||||
|
osg::ref_ptr<osg::Node> loadedModel = osgDB::readRefNodeFiles(arguments);
|
||||||
|
if (!loadedModel)
|
||||||
|
{
|
||||||
|
std::cout << arguments.getApplicationName() <<": No data loaded" << std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// any option left unread are converted into errors to write out later.
|
||||||
|
arguments.reportRemainingOptionsAsUnrecognized();
|
||||||
|
|
||||||
|
// report any errors if they have occurred when parsing the program arguments.
|
||||||
|
if (arguments.errors())
|
||||||
|
{
|
||||||
|
arguments.writeErrorMessages(std::cout);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// optimize the scene graph, remove redundant nodes and state etc.
|
||||||
|
osgUtil::Optimizer optimizer;
|
||||||
|
optimizer.optimize(loadedModel);
|
||||||
|
|
||||||
|
viewer.setSceneData(loadedModel);
|
||||||
|
|
||||||
|
viewer.realize();
|
||||||
|
|
||||||
|
return viewer.run();
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
SET(TARGET_SRC
|
|
||||||
osgQtBrowser.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
|
||||||
# Remove -pedantic flag as it barfs on Qt headers
|
|
||||||
STRING(REGEX REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
if ( QT4_FOUND )
|
|
||||||
SET(TARGET_EXTERNAL_LIBRARIES ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${QT_QTWEBKIT_LIBRARY})
|
|
||||||
INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTOPENGL_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTWEBKIT_INCLUDE_DIR} )
|
|
||||||
endif( QT4_FOUND )
|
|
||||||
|
|
||||||
SET(TARGET_ADDED_LIBRARIES osgWidget osgQt)
|
|
||||||
|
|
||||||
#### end var setup ###
|
|
||||||
SET ( EXAMPLE_NAME osgQtBrowser )
|
|
||||||
SETUP_EXAMPLE(${EXAMPLE_NAME})
|
|
||||||
|
|
||||||
IF ( Qt5Widgets_FOUND )
|
|
||||||
qt5_use_modules( example_${EXAMPLE_NAME} Widgets OpenGL WebKitWidgets )
|
|
||||||
ENDIF( Qt5Widgets_FOUND )
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,145 +0,0 @@
|
|||||||
/* OpenSceneGraph example, osgcompositeviewer.
|
|
||||||
*
|
|
||||||
* 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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
#include <osg/Notify>
|
|
||||||
#include <osg/io_utils>
|
|
||||||
|
|
||||||
#include <osg/ArgumentParser>
|
|
||||||
#include <osgDB/WriteFile>
|
|
||||||
#include <osgGA/TrackballManipulator>
|
|
||||||
#include <osgGA/StateSetManipulator>
|
|
||||||
#include <osgViewer/Viewer>
|
|
||||||
#include <osgViewer/ViewerEventHandlers>
|
|
||||||
#include <osgWidget/Browser>
|
|
||||||
|
|
||||||
#include <QtGlobal>
|
|
||||||
#if QT_VERSION >= 0x050000
|
|
||||||
# include <QtWebKitWidgets>
|
|
||||||
#else
|
|
||||||
# include <QtWebKit>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <QWebSettings>
|
|
||||||
|
|
||||||
#include <QGraphicsScene>
|
|
||||||
#include <QGraphicsView>
|
|
||||||
#include <QApplication>
|
|
||||||
#include <QPainter>
|
|
||||||
#include <QtEvents>
|
|
||||||
|
|
||||||
#include <osgQt/QGraphicsViewAdapter>
|
|
||||||
#include <osgQt/QWebViewImage>
|
|
||||||
|
|
||||||
|
|
||||||
// Thread that runs the viewer's frame loop as we can't run Qt in the background...
|
|
||||||
class ViewerFrameThread : public OpenThreads::Thread
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
ViewerFrameThread(osgViewer::ViewerBase* viewerBase, bool doQApplicationExit):
|
|
||||||
_viewerBase(viewerBase),
|
|
||||||
_doQApplicationExit(doQApplicationExit) {}
|
|
||||||
|
|
||||||
~ViewerFrameThread()
|
|
||||||
{
|
|
||||||
if (isRunning())
|
|
||||||
{
|
|
||||||
cancel();
|
|
||||||
join();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int cancel()
|
|
||||||
{
|
|
||||||
_viewerBase->setDone(true);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void run()
|
|
||||||
{
|
|
||||||
int result = _viewerBase->run();
|
|
||||||
|
|
||||||
if (_doQApplicationExit) QApplication::exit(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
osg::ref_ptr<osgViewer::ViewerBase> _viewerBase;
|
|
||||||
bool _doQApplicationExit;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
// Qt requires that we construct the global QApplication before creating any widgets.
|
|
||||||
QApplication app(argc, argv);
|
|
||||||
|
|
||||||
// use an ArgumentParser object to manage the program arguments.
|
|
||||||
osg::ArgumentParser arguments(&argc,argv);
|
|
||||||
|
|
||||||
bool useFrameLoopThread = false;
|
|
||||||
if (arguments.read("--no-frame-thread")) useFrameLoopThread = false;
|
|
||||||
if (arguments.read("--frame-thread")) useFrameLoopThread = true;
|
|
||||||
|
|
||||||
osg::ref_ptr<osgQt::QWebViewImage> image = new osgQt::QWebViewImage;
|
|
||||||
|
|
||||||
if (arguments.argc()>1) image->navigateTo((arguments[1]));
|
|
||||||
else image->navigateTo("http://www.youtube.com/");
|
|
||||||
|
|
||||||
osgWidget::GeometryHints hints(osg::Vec3(0.0f,0.0f,0.0f),
|
|
||||||
osg::Vec3(1.0f,0.0f,0.0f),
|
|
||||||
osg::Vec3(0.0f,0.0f,1.0f),
|
|
||||||
osg::Vec4(1.0f,1.0f,1.0f,1.0f),
|
|
||||||
osgWidget::GeometryHints::RESIZE_HEIGHT_TO_MAINTAINCE_ASPECT_RATIO);
|
|
||||||
|
|
||||||
|
|
||||||
osg::ref_ptr<osgWidget::Browser> browser = new osgWidget::Browser;
|
|
||||||
browser->assign(image.get(), hints);
|
|
||||||
|
|
||||||
// image->focusBrowser(true);
|
|
||||||
|
|
||||||
osg::ref_ptr<osgViewer::Viewer> viewer = new osgViewer::Viewer(arguments);
|
|
||||||
viewer->setSceneData(browser.get());
|
|
||||||
viewer->setCameraManipulator(new osgGA::TrackballManipulator());
|
|
||||||
viewer->addEventHandler(new osgViewer::StatsHandler);
|
|
||||||
viewer->addEventHandler(new osgViewer::WindowSizeHandler);
|
|
||||||
|
|
||||||
if (useFrameLoopThread)
|
|
||||||
{
|
|
||||||
// create a thread to run the viewer's frame loop
|
|
||||||
ViewerFrameThread viewerThread(viewer.get(), true);
|
|
||||||
viewerThread.startThread();
|
|
||||||
|
|
||||||
// now start the standard Qt event loop, then exists when the viewerThead sends the QApplication::exit() signal.
|
|
||||||
return QApplication::exec();
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// run the frame loop, interleaving Qt and the main OSG frame loop
|
|
||||||
while(!viewer->done())
|
|
||||||
{
|
|
||||||
// process Qt events - this handles both events and paints the browser image
|
|
||||||
QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
|
|
||||||
|
|
||||||
viewer->frame();
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
SET(TARGET_SRC
|
|
||||||
osgQtWidgets.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
|
||||||
# Remove -pedantic flag as it barfs on Qt headers
|
|
||||||
STRING(REGEX REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
if ( QT4_FOUND )
|
|
||||||
SET(TARGET_EXTERNAL_LIBRARIES ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${QT_QTWEBKIT_LIBRARY})
|
|
||||||
INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTOPENGL_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTWEBKIT_INCLUDE_DIR} )
|
|
||||||
endif( QT4_FOUND )
|
|
||||||
|
|
||||||
SET(TARGET_ADDED_LIBRARIES osgWidget osgQt)
|
|
||||||
|
|
||||||
#### end var setup ###
|
|
||||||
SET ( EXAMPLE_NAME osgQtWidgets )
|
|
||||||
SETUP_EXAMPLE(${EXAMPLE_NAME})
|
|
||||||
|
|
||||||
IF ( Qt5Widgets_FOUND )
|
|
||||||
qt5_use_modules( example_${EXAMPLE_NAME} OpenGL WebKitWidgets )
|
|
||||||
ENDIF( Qt5Widgets_FOUND )
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -10,7 +10,7 @@
|
|||||||
#include <osg/StateAttributeCallback>
|
#include <osg/StateAttributeCallback>
|
||||||
#include <osg/Texture2D>
|
#include <osg/Texture2D>
|
||||||
#include <osg/Geometry>
|
#include <osg/Geometry>
|
||||||
#include <osg/Geode>
|
#include <osg/DispatchCompute>
|
||||||
#include <osgDB/ReadFile>
|
#include <osgDB/ReadFile>
|
||||||
#include <osgGA/StateSetManipulator>
|
#include <osgGA/StateSetManipulator>
|
||||||
#include <osgViewer/Viewer>
|
#include <osgViewer/Viewer>
|
||||||
@@ -119,7 +119,6 @@ enum BufferOffset
|
|||||||
|
|
||||||
const int __numDataValuesPerChannel = OFFSET_END;
|
const int __numDataValuesPerChannel = OFFSET_END;
|
||||||
const int __numChannels = 4;
|
const int __numChannels = 4;
|
||||||
const float __particleRenderScaleMultiplier = 0.3;
|
|
||||||
|
|
||||||
//512x512x4x7 = 7.340.032 floats in SSBO on GPU
|
//512x512x4x7 = 7.340.032 floats in SSBO on GPU
|
||||||
const int NUM_ELEMENTS_X = 512;
|
const int NUM_ELEMENTS_X = 512;
|
||||||
@@ -143,7 +142,7 @@ enum Channel
|
|||||||
class ShaderStorageBufferCallback : public osg::StateAttributeCallback
|
class ShaderStorageBufferCallback : public osg::StateAttributeCallback
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void operator() (osg::StateAttribute* attr, osg::NodeVisitor* nv)
|
void operator() (osg::StateAttribute* /*attr*/, osg::NodeVisitor* /*nv*/)
|
||||||
{
|
{
|
||||||
//if you need to process the data in your app-code , better leaving it on GPU and processing there, uploading per frame will make it slow
|
//if you need to process the data in your app-code , better leaving it on GPU and processing there, uploading per frame will make it slow
|
||||||
#if 0
|
#if 0
|
||||||
@@ -168,6 +167,7 @@ class ComputeNode : public osg::PositionAttitudeTransform
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
osg::ref_ptr<osg::DispatchCompute> _DispatchCompute;
|
||||||
osg::ref_ptr<osg::Program> _computeProgram;
|
osg::ref_ptr<osg::Program> _computeProgram;
|
||||||
osg::ref_ptr<osg::Shader> _computeShader; //compute and write position data in SSBO
|
osg::ref_ptr<osg::Shader> _computeShader; //compute and write position data in SSBO
|
||||||
|
|
||||||
@@ -201,15 +201,12 @@ public:
|
|||||||
|
|
||||||
ComputeNode()
|
ComputeNode()
|
||||||
{
|
{
|
||||||
const char* envOsgFilePath = getenv("OSG_FILE_PATH");
|
_computeShaderSourcePath = "shaders/osgssboComputeShader.cs";
|
||||||
std::stringstream computeshaderpath; computeshaderpath << envOsgFilePath << "/shaders/osgssboComputeShader.cs";
|
_vertexShaderSourcePath = "shaders/osgssboVertexShader.vs";
|
||||||
_computeShaderSourcePath = computeshaderpath.str();
|
_geometryShaderSourcePath = "shaders/osgssboGeometryShader.gs";
|
||||||
std::stringstream vertexshaderpath; vertexshaderpath << envOsgFilePath << "/shaders/osgssboVertexShader.vs";
|
_fragmentShaderSourcePath = "shaders/osgssboFragmentShader.fs";
|
||||||
_vertexShaderSourcePath = vertexshaderpath.str();
|
_DispatchCompute=new osg::DispatchCompute();
|
||||||
std::stringstream geometryshaderpath; geometryshaderpath << envOsgFilePath << "/shaders/osgssboGeometryShader.gs";
|
addChild(_DispatchCompute);
|
||||||
_geometryShaderSourcePath = geometryshaderpath.str();
|
|
||||||
std::stringstream fragmentshaderpath; fragmentshaderpath << envOsgFilePath << "/shaders/osgssboFragmentShader.fs";
|
|
||||||
_fragmentShaderSourcePath = fragmentshaderpath.str();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -244,7 +241,7 @@ public:
|
|||||||
if (_computeNode->_computeShader.valid())
|
if (_computeNode->_computeShader.valid())
|
||||||
{
|
{
|
||||||
runningSource = _computeNode->_computeShader->getShaderSource();
|
runningSource = _computeNode->_computeShader->getShaderSource();
|
||||||
reloadedshader = osg::Shader::readShaderFile(osg::Shader::COMPUTE, _computeNode->_computeShaderSourcePath);
|
reloadedshader = osgDB::readRefShaderFile(osg::Shader::COMPUTE, _computeNode->_computeShaderSourcePath);
|
||||||
|
|
||||||
reloadedstring = reloadedshader->getShaderSource();
|
reloadedstring = reloadedshader->getShaderSource();
|
||||||
if (!osgDB::equalCaseInsensitive(runningSource.c_str(), reloadedstring.c_str()))
|
if (!osgDB::equalCaseInsensitive(runningSource.c_str(), reloadedstring.c_str()))
|
||||||
@@ -259,7 +256,7 @@ public:
|
|||||||
{
|
{
|
||||||
|
|
||||||
runningSource = _computeNode->_vertexShader->getShaderSource();
|
runningSource = _computeNode->_vertexShader->getShaderSource();
|
||||||
reloadedshader = osg::Shader::readShaderFile(osg::Shader::VERTEX, _computeNode->_vertexShaderSourcePath);
|
reloadedshader = osgDB::readRefShaderFile(osg::Shader::VERTEX, _computeNode->_vertexShaderSourcePath);
|
||||||
|
|
||||||
reloadedstring = reloadedshader->getShaderSource();
|
reloadedstring = reloadedshader->getShaderSource();
|
||||||
if (!osgDB::equalCaseInsensitive(runningSource.c_str(), reloadedstring.c_str()))
|
if (!osgDB::equalCaseInsensitive(runningSource.c_str(), reloadedstring.c_str()))
|
||||||
@@ -275,7 +272,7 @@ public:
|
|||||||
if (_computeNode->_geometryShader.valid())
|
if (_computeNode->_geometryShader.valid())
|
||||||
{
|
{
|
||||||
runningSource = _computeNode->_geometryShader->getShaderSource();
|
runningSource = _computeNode->_geometryShader->getShaderSource();
|
||||||
reloadedshader = osg::Shader::readShaderFile(osg::Shader::GEOMETRY, _computeNode->_geometryShaderSourcePath);
|
reloadedshader = osgDB::readRefShaderFile(osg::Shader::GEOMETRY, _computeNode->_geometryShaderSourcePath);
|
||||||
|
|
||||||
reloadedstring = reloadedshader->getShaderSource();
|
reloadedstring = reloadedshader->getShaderSource();
|
||||||
if (!osgDB::equalCaseInsensitive(runningSource.c_str(), reloadedstring.c_str()))
|
if (!osgDB::equalCaseInsensitive(runningSource.c_str(), reloadedstring.c_str()))
|
||||||
@@ -289,7 +286,7 @@ public:
|
|||||||
if (_computeNode->_fragmentShader.valid())
|
if (_computeNode->_fragmentShader.valid())
|
||||||
{
|
{
|
||||||
runningSource = _computeNode->_fragmentShader->getShaderSource();
|
runningSource = _computeNode->_fragmentShader->getShaderSource();
|
||||||
reloadedshader = osg::Shader::readShaderFile(osg::Shader::FRAGMENT, _computeNode->_fragmentShaderSourcePath);
|
reloadedshader = osgDB::readRefShaderFile(osg::Shader::FRAGMENT, _computeNode->_fragmentShaderSourcePath);
|
||||||
|
|
||||||
reloadedstring = reloadedshader->getShaderSource();
|
reloadedstring = reloadedshader->getShaderSource();
|
||||||
if (!osgDB::equalCaseInsensitive(runningSource.c_str(), reloadedstring.c_str()))
|
if (!osgDB::equalCaseInsensitive(runningSource.c_str(), reloadedstring.c_str()))
|
||||||
@@ -312,7 +309,7 @@ public:
|
|||||||
//set OSG_FILE_PATH for loading axes.osgt
|
//set OSG_FILE_PATH for loading axes.osgt
|
||||||
void ComputeNode::addHelperGeometry()
|
void ComputeNode::addHelperGeometry()
|
||||||
{
|
{
|
||||||
_helperNode = osgDB::readNodeFile("axes.osgt");
|
_helperNode = osgDB::readRefNodeFile("axes.osgt");
|
||||||
|
|
||||||
if (_helperNode.valid())
|
if (_helperNode.valid())
|
||||||
{
|
{
|
||||||
@@ -465,8 +462,8 @@ void ComputeNode::addDataMonitor(osg::Vec3 placement, osg::Vec3 relativePlacemen
|
|||||||
ss->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
|
ss->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
|
||||||
|
|
||||||
//add a label
|
//add a label
|
||||||
osgText::Text* text = new osgText::Text;
|
osg::ref_ptr<osgText::Text> text = new osgText::Text;
|
||||||
osgText::Font* font = osgText::readFontFile("fonts/arial.ttf");
|
osg::ref_ptr<osgText::Font> font = osgText::readRefFontFile("fonts/arial.ttf");
|
||||||
text->setFont(font);
|
text->setFont(font);
|
||||||
text->setColor(osg::Vec4(1, 1, 1, 1));
|
text->setColor(osg::Vec4(1, 1, 1, 1));
|
||||||
text->setCharacterSize(0.1*scale);
|
text->setCharacterSize(0.1*scale);
|
||||||
@@ -474,7 +471,6 @@ void ComputeNode::addDataMonitor(osg::Vec3 placement, osg::Vec3 relativePlacemen
|
|||||||
pat->setName(labelCaption);
|
pat->setName(labelCaption);
|
||||||
text->setText(pat->getName());
|
text->setText(pat->getName());
|
||||||
text->setBackdropType(osgText::Text::OUTLINE);
|
text->setBackdropType(osgText::Text::OUTLINE);
|
||||||
text->setBackdropImplementation(osgText::Text::POLYGON_OFFSET);
|
|
||||||
text->setBackdropOffset(0.05f);
|
text->setBackdropOffset(0.05f);
|
||||||
text->setBackdropColor(osg::Vec4(0.0f, 0.0f, 0.0f, 1.0f));
|
text->setBackdropColor(osg::Vec4(0.0f, 0.0f, 0.0f, 1.0f));
|
||||||
|
|
||||||
@@ -501,9 +497,9 @@ osg::Image* createSpotLightImage(const osg::Vec4& centerColour, const osg::Vec4&
|
|||||||
{
|
{
|
||||||
float dx = (float(c) - mid)*div;
|
float dx = (float(c) - mid)*div;
|
||||||
float dy = (float(r) - mid)*div;
|
float dy = (float(r) - mid)*div;
|
||||||
float r = powf(1.0f - sqrtf(dx*dx + dy*dy), power);
|
float pr = powf(1.0f - sqrtf(dx*dx + dy*dy), power);
|
||||||
if (r < 0.0f) r = 0.0f;
|
if (pr < 0.0f) pr = 0.0f;
|
||||||
osg::Vec4 color = centerColour*r + backgroudColour*(1.0f - r);
|
osg::Vec4 color = centerColour*pr + backgroudColour*(1.0f - pr);
|
||||||
*ptr++ = (unsigned char)((color[0])*255.0f);
|
*ptr++ = (unsigned char)((color[0])*255.0f);
|
||||||
*ptr++ = (unsigned char)((color[1])*255.0f);
|
*ptr++ = (unsigned char)((color[1])*255.0f);
|
||||||
*ptr++ = (unsigned char)((color[2])*255.0f);
|
*ptr++ = (unsigned char)((color[2])*255.0f);
|
||||||
@@ -519,13 +515,13 @@ void ComputeNode::addComputationResultsRenderTree()
|
|||||||
|
|
||||||
_computationResultsRenderProgram = new osg::Program;
|
_computationResultsRenderProgram = new osg::Program;
|
||||||
|
|
||||||
_vertexShader = osg::Shader::readShaderFile(osg::Shader::VERTEX, _vertexShaderSourcePath);
|
_vertexShader = osgDB::readRefShaderFile(osg::Shader::VERTEX, _vertexShaderSourcePath);
|
||||||
_computationResultsRenderProgram->addShader(_vertexShader.get());
|
_computationResultsRenderProgram->addShader(_vertexShader.get());
|
||||||
|
|
||||||
_geometryShader = osg::Shader::readShaderFile(osg::Shader::GEOMETRY, _geometryShaderSourcePath);
|
_geometryShader = osgDB::readRefShaderFile(osg::Shader::GEOMETRY, _geometryShaderSourcePath);
|
||||||
_computationResultsRenderProgram->addShader(_geometryShader.get());
|
_computationResultsRenderProgram->addShader(_geometryShader.get());
|
||||||
|
|
||||||
_fragmentShader = osg::Shader::readShaderFile(osg::Shader::FRAGMENT, _fragmentShaderSourcePath);
|
_fragmentShader = osgDB::readRefShaderFile(osg::Shader::FRAGMENT, _fragmentShaderSourcePath);
|
||||||
_computationResultsRenderProgram->addShader(_fragmentShader.get());
|
_computationResultsRenderProgram->addShader(_fragmentShader.get());
|
||||||
|
|
||||||
|
|
||||||
@@ -629,8 +625,8 @@ void ComputeNode::initComputingSetup()
|
|||||||
{
|
{
|
||||||
|
|
||||||
_computeProgram = new osg::Program;
|
_computeProgram = new osg::Program;
|
||||||
_computeProgram->setComputeGroups((NUM_ELEMENTS_X / WORK_GROUP_SIZE) <= 1 ? 1 : (NUM_ELEMENTS_X / WORK_GROUP_SIZE), (NUM_ELEMENTS_Y / WORK_GROUP_SIZE) <= 1 ? 1 : (NUM_ELEMENTS_Y / WORK_GROUP_SIZE), 1);
|
_DispatchCompute->setComputeGroups((NUM_ELEMENTS_X / WORK_GROUP_SIZE) <= 1 ? 1 : (NUM_ELEMENTS_X / WORK_GROUP_SIZE), (NUM_ELEMENTS_Y / WORK_GROUP_SIZE) <= 1 ? 1 : (NUM_ELEMENTS_Y / WORK_GROUP_SIZE), 1);
|
||||||
_computeShader = osg::Shader::readShaderFile(osg::Shader::COMPUTE, _computeShaderSourcePath);
|
_computeShader = osgDB::readRefShaderFile(osg::Shader::COMPUTE, _computeShaderSourcePath);
|
||||||
_computeProgram->addShader(_computeShader.get());
|
_computeProgram->addShader(_computeShader.get());
|
||||||
|
|
||||||
setDataVariance(osg::Object::DYNAMIC);
|
setDataVariance(osg::Object::DYNAMIC);
|
||||||
@@ -774,7 +770,7 @@ void ComputeNode::initComputingSetup()
|
|||||||
_dataArray->setBufferObject(_ssbo.get());
|
_dataArray->setBufferObject(_ssbo.get());
|
||||||
|
|
||||||
|
|
||||||
_ssbb = new osg::ShaderStorageBufferBinding(0, _ssbo.get(), 0, blockSize);
|
_ssbb = new osg::ShaderStorageBufferBinding(0, _dataArray.get(), 0, blockSize);
|
||||||
statesetComputation->setAttributeAndModes(_ssbb.get(), osg::StateAttribute::ON);
|
statesetComputation->setAttributeAndModes(_ssbb.get(), osg::StateAttribute::ON);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
#include <osgViewer/Viewer>
|
#include <osgViewer/Viewer>
|
||||||
#include <osgViewer/ViewerEventHandlers>
|
#include <osgViewer/ViewerEventHandlers>
|
||||||
|
|
||||||
|
#include <osg/ContextData>
|
||||||
|
|
||||||
#include <osgDB/ReadFile>
|
#include <osgDB/ReadFile>
|
||||||
#include <osgDB/WriteFile>
|
#include <osgDB/WriteFile>
|
||||||
#include <osgDB/FileNameUtils>
|
#include <osgDB/FileNameUtils>
|
||||||
@@ -102,9 +104,9 @@ public:
|
|||||||
{
|
{
|
||||||
if (!stateset) return;
|
if (!stateset) return;
|
||||||
|
|
||||||
for(unsigned int i=0; i<stateset->getNumTextureAttributeLists(); ++i)
|
for(unsigned int ti=0; ti<stateset->getNumTextureAttributeLists(); ++ti)
|
||||||
{
|
{
|
||||||
osg::StateAttribute* sa = stateset->getTextureAttribute(i, osg::StateAttribute::TEXTURE);
|
osg::StateAttribute* sa = stateset->getTextureAttribute(ti, osg::StateAttribute::TEXTURE);
|
||||||
osg::Texture* texture = dynamic_cast<osg::Texture*>(sa);
|
osg::Texture* texture = dynamic_cast<osg::Texture*>(sa);
|
||||||
if (texture)
|
if (texture)
|
||||||
{
|
{
|
||||||
@@ -254,9 +256,7 @@ public:
|
|||||||
{
|
{
|
||||||
OSG_NOTICE<<"Reallocating Arrays"<<std::endl;
|
OSG_NOTICE<<"Reallocating Arrays"<<std::endl;
|
||||||
|
|
||||||
typedef std::vector< osg::ref_ptr<osg::Array> > ArrayVector;
|
|
||||||
typedef std::vector< osg::ref_ptr<osg::Geometry> > GeometryVector;
|
typedef std::vector< osg::ref_ptr<osg::Geometry> > GeometryVector;
|
||||||
ArrayVector newArrays;
|
|
||||||
GeometryVector newGeometries;
|
GeometryVector newGeometries;
|
||||||
for(GeometryMap::iterator itr = _geometryMap.begin();
|
for(GeometryMap::iterator itr = _geometryMap.begin();
|
||||||
itr != _geometryMap.end();
|
itr != _geometryMap.end();
|
||||||
@@ -393,8 +393,6 @@ public:
|
|||||||
while (arguments.read("--dl")) { modifyDrawableSettings = true; useDisplayLists = true; }
|
while (arguments.read("--dl")) { modifyDrawableSettings = true; useDisplayLists = true; }
|
||||||
|
|
||||||
while (arguments.read("-s", simplificatioRatio)) {}
|
while (arguments.read("-s", simplificatioRatio)) {}
|
||||||
while (arguments.read("--tristripper")) { useTriStripVisitor=true; }
|
|
||||||
while (arguments.read("--no-tristripper")) { useTriStripVisitor=false; }
|
|
||||||
while (arguments.read("--smoother")) { useSmoothingVisitor=true; }
|
while (arguments.read("--smoother")) { useSmoothingVisitor=true; }
|
||||||
while (arguments.read("--no-smoother")) { useSmoothingVisitor=false; }
|
while (arguments.read("--no-smoother")) { useSmoothingVisitor=false; }
|
||||||
|
|
||||||
@@ -426,7 +424,6 @@ public:
|
|||||||
OSG_NOTICE<<"Running simplifier with simplification ratio="<<simplificatioRatio<<std::endl;
|
OSG_NOTICE<<"Running simplifier with simplification ratio="<<simplificatioRatio<<std::endl;
|
||||||
float maxError = 4.0f;
|
float maxError = 4.0f;
|
||||||
osgUtil::Simplifier simplifier(simplificatioRatio, maxError);
|
osgUtil::Simplifier simplifier(simplificatioRatio, maxError);
|
||||||
simplifier.setDoTriStrip(useTriStripVisitor);
|
|
||||||
simplifier.setSmoothing(useSmoothingVisitor);
|
simplifier.setSmoothing(useSmoothingVisitor);
|
||||||
node->accept(simplifier);
|
node->accept(simplifier);
|
||||||
}
|
}
|
||||||
@@ -504,7 +501,7 @@ protected:
|
|||||||
optimizeVertexOrder = false;
|
optimizeVertexOrder = false;
|
||||||
|
|
||||||
reallocateMemory = false;
|
reallocateMemory = false;
|
||||||
|
|
||||||
modifyTextureSettings = false;
|
modifyTextureSettings = false;
|
||||||
buildImageMipmaps = false;
|
buildImageMipmaps = false;
|
||||||
compressImages = false;
|
compressImages = false;
|
||||||
@@ -524,22 +521,23 @@ protected:
|
|||||||
bool optimizeVertexOrder;
|
bool optimizeVertexOrder;
|
||||||
|
|
||||||
bool reallocateMemory;
|
bool reallocateMemory;
|
||||||
|
|
||||||
bool modifyTextureSettings;
|
bool modifyTextureSettings;
|
||||||
bool buildImageMipmaps;
|
bool buildImageMipmaps;
|
||||||
bool compressImages;
|
bool compressImages;
|
||||||
bool disableMipmaps;
|
bool disableMipmaps;
|
||||||
|
|
||||||
};
|
};
|
||||||
//
|
//
|
||||||
class DatabasePagingOperation : public osg::Operation, public osgUtil::IncrementalCompileOperation::CompileCompletedCallback
|
class DatabasePagingOperation : public osg::Operation, public osgUtil::IncrementalCompileOperation::CompileCompletedCallback
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DatabasePagingOperation(const std::string& filename,
|
DatabasePagingOperation(const std::string& filename,
|
||||||
const std::string& outputFilename,
|
const std::string& outputFilename,
|
||||||
SceneGraphProcessor* sceneGraphProcessor,
|
SceneGraphProcessor* sceneGraphProcessor,
|
||||||
osgUtil::IncrementalCompileOperation* ico):
|
osgUtil::IncrementalCompileOperation* ico):
|
||||||
|
osg::Referenced(true),
|
||||||
Operation("DatabasePaging Operation", false),
|
Operation("DatabasePaging Operation", false),
|
||||||
_filename(filename),
|
_filename(filename),
|
||||||
_outputFilename(outputFilename),
|
_outputFilename(outputFilename),
|
||||||
@@ -549,12 +547,12 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void operator () (osg::Object* object)
|
virtual void operator () (osg::Object* /*object*/)
|
||||||
{
|
{
|
||||||
osg::notify(osg::NOTICE)<<"LoadAndCompileOperation "<<_filename<<std::endl;
|
osg::notify(osg::NOTICE)<<"LoadAndCompileOperation "<<_filename<<std::endl;
|
||||||
|
|
||||||
_modelReadyToMerge = false;
|
_modelReadyToMerge = false;
|
||||||
_loadedModel = osgDB::readNodeFile(_filename);
|
_loadedModel = osgDB::readRefNodeFile(_filename);
|
||||||
|
|
||||||
if (_loadedModel.valid())
|
if (_loadedModel.valid())
|
||||||
{
|
{
|
||||||
@@ -569,7 +567,7 @@ public:
|
|||||||
if (!_outputFilename.empty())
|
if (!_outputFilename.empty())
|
||||||
{
|
{
|
||||||
OSG_NOTICE<<"Writing out file "<<_outputFilename<<std::endl;
|
OSG_NOTICE<<"Writing out file "<<_outputFilename<<std::endl;
|
||||||
|
|
||||||
osgDB::writeNodeFile(*_loadedModel, _outputFilename);
|
osgDB::writeNodeFile(*_loadedModel, _outputFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -593,7 +591,7 @@ public:
|
|||||||
osg::notify(osg::NOTICE)<<"done LoadAndCompileOperation "<<_filename<<std::endl;
|
osg::notify(osg::NOTICE)<<"done LoadAndCompileOperation "<<_filename<<std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool compileCompleted(osgUtil::IncrementalCompileOperation::CompileSet* compileSet)
|
virtual bool compileCompleted(osgUtil::IncrementalCompileOperation::CompileSet* /*compileSet*/)
|
||||||
{
|
{
|
||||||
OSG_NOTICE<<"compileCompleted"<<std::endl;
|
OSG_NOTICE<<"compileCompleted"<<std::endl;
|
||||||
_modelReadyToMerge = true;
|
_modelReadyToMerge = true;
|
||||||
@@ -611,14 +609,13 @@ public:
|
|||||||
class TexturePoolHandler : public osgGA::GUIEventHandler
|
class TexturePoolHandler : public osgGA::GUIEventHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa)
|
virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& /*aa*/)
|
||||||
{
|
{
|
||||||
if (ea.getEventType() == osgGA::GUIEventAdapter::KEYUP)
|
if (ea.getEventType() == osgGA::GUIEventAdapter::KEYUP)
|
||||||
{
|
{
|
||||||
if (ea.getKey()=='r')
|
if (ea.getKey()=='r')
|
||||||
{
|
{
|
||||||
osg::Texture::getTextureObjectManager(0)->reportStats(osg::notify(osg::NOTICE));
|
osg::getOrCreateContextData(0)->reportStats(osg::notify(osg::NOTICE));
|
||||||
osg::GLBufferObjectManager::getGLBufferObjectManager(0)->reportStats(osg::notify(osg::NOTICE));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -630,8 +627,7 @@ struct ReportStatsAnimationCompletedCallback : public osgGA::AnimationPathManipu
|
|||||||
virtual void completed(const osgGA::AnimationPathManipulator*)
|
virtual void completed(const osgGA::AnimationPathManipulator*)
|
||||||
{
|
{
|
||||||
OSG_NOTICE<<"Animation completed"<<std::endl;
|
OSG_NOTICE<<"Animation completed"<<std::endl;
|
||||||
osg::Texture::getTextureObjectManager(0)->reportStats(osg::notify(osg::NOTICE));
|
osg::getOrCreateContextData(0)->reportStats(osg::notify(osg::NOTICE));
|
||||||
osg::GLBufferObjectManager::getGLBufferObjectManager(0)->reportStats(osg::notify(osg::NOTICE));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -663,7 +659,7 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
apm->setTimeScale(animationSpeed);
|
apm->setTimeScale(animationSpeed);
|
||||||
apm->setAnimationCompletedCallback(new ReportStatsAnimationCompletedCallback());
|
apm->setAnimationCompletedCallback(new ReportStatsAnimationCompletedCallback());
|
||||||
|
|
||||||
unsigned int num = keyswitchManipulator->getNumMatrixManipulators();
|
unsigned int num = keyswitchManipulator->getNumMatrixManipulators();
|
||||||
keyswitchManipulator->addMatrixManipulator( keyForAnimationPath, "Path", apm );
|
keyswitchManipulator->addMatrixManipulator( keyForAnimationPath, "Path", apm );
|
||||||
keyswitchManipulator->selectMatrixManipulator(num);
|
keyswitchManipulator->selectMatrixManipulator(num);
|
||||||
@@ -674,7 +670,7 @@ int main(int argc, char** argv)
|
|||||||
viewer.setCameraManipulator( keyswitchManipulator.get() );
|
viewer.setCameraManipulator( keyswitchManipulator.get() );
|
||||||
}
|
}
|
||||||
|
|
||||||
// set up event handlers
|
// set up event handlers
|
||||||
{
|
{
|
||||||
viewer.addEventHandler( new osgViewer::StatsHandler());
|
viewer.addEventHandler( new osgViewer::StatsHandler());
|
||||||
viewer.addEventHandler( new osgViewer::WindowSizeHandler() );
|
viewer.addEventHandler( new osgViewer::WindowSizeHandler() );
|
||||||
@@ -781,8 +777,8 @@ int main(int argc, char** argv)
|
|||||||
modelIndex<fileNames.size() &&
|
modelIndex<fileNames.size() &&
|
||||||
(currentTime-timeOfLastMerge)>timeBetweenMerges)
|
(currentTime-timeOfLastMerge)>timeBetweenMerges)
|
||||||
{
|
{
|
||||||
std::string filename = fileNames[modelIndex++];
|
filename = fileNames[modelIndex++];
|
||||||
std::string outputFilename = outputPostfix.empty() ? std::string() : osgDB::getStrippedName(filename)+outputPostfix;
|
outputFilename = outputPostfix.empty() ? std::string() : osgDB::getStrippedName(filename)+outputPostfix;
|
||||||
|
|
||||||
databasePagingOperation = new DatabasePagingOperation(
|
databasePagingOperation = new DatabasePagingOperation(
|
||||||
filename,
|
filename,
|
||||||
@@ -796,7 +792,7 @@ int main(int argc, char** argv)
|
|||||||
if (databasePagingOperation.get() && databasePagingOperation->_modelReadyToMerge)
|
if (databasePagingOperation.get() && databasePagingOperation->_modelReadyToMerge)
|
||||||
{
|
{
|
||||||
OSG_NOTICE<<"Merging subgraph"<<std::endl;
|
OSG_NOTICE<<"Merging subgraph"<<std::endl;
|
||||||
|
|
||||||
timeOfLastMerge = currentTime;
|
timeOfLastMerge = currentTime;
|
||||||
|
|
||||||
group->removeChildren(0,group->getNumChildren());
|
group->removeChildren(0,group->getNumChildren());
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include <osgDB/Registry>
|
#include <osgDB/Registry>
|
||||||
#include <osgDB/ReadFile>
|
#include <osgDB/ReadFile>
|
||||||
|
#include <osgDB/WriteFile>
|
||||||
|
|
||||||
#include <osgGA/TrackballManipulator>
|
#include <osgGA/TrackballManipulator>
|
||||||
#include <osgGA/FlightManipulator>
|
#include <osgGA/FlightManipulator>
|
||||||
@@ -136,9 +137,9 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
|
|||||||
|
|
||||||
osg::AnimationPath* animationPath = createAnimationPath(center,radius,animationLength);
|
osg::AnimationPath* animationPath = createAnimationPath(center,radius,animationLength);
|
||||||
|
|
||||||
osg::Group* model = new osg::Group;
|
osg::ref_ptr<osg::Group> model = new osg::Group;
|
||||||
|
|
||||||
osg::Node* glider = osgDB::readNodeFile("glider.osgt");
|
osg::ref_ptr<osg::Node> glider = osgDB::readRefNodeFile("glider.osgt");
|
||||||
if (glider)
|
if (glider)
|
||||||
{
|
{
|
||||||
const osg::BoundingSphere& bs = glider->getBound();
|
const osg::BoundingSphere& bs = glider->getBound();
|
||||||
@@ -146,7 +147,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
|
|||||||
float size = radius/bs.radius()*0.3f;
|
float size = radius/bs.radius()*0.3f;
|
||||||
osg::MatrixTransform* positioned = new osg::MatrixTransform;
|
osg::MatrixTransform* positioned = new osg::MatrixTransform;
|
||||||
positioned->setDataVariance(osg::Object::STATIC);
|
positioned->setDataVariance(osg::Object::STATIC);
|
||||||
positioned->setMatrix(osg::Matrix::translate(-bs.center())*
|
positioned ->setMatrix(osg::Matrix::translate(-bs.center())*
|
||||||
osg::Matrix::scale(size,size,size)*
|
osg::Matrix::scale(size,size,size)*
|
||||||
osg::Matrix::rotate(osg::inDegrees(-90.0f),0.0f,0.0f,1.0f));
|
osg::Matrix::rotate(osg::inDegrees(-90.0f),0.0f,0.0f,1.0f));
|
||||||
|
|
||||||
@@ -159,7 +160,7 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
|
|||||||
model->addChild(xform);
|
model->addChild(xform);
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Node* cessna = osgDB::readNodeFile("cessna.osgt");
|
osg::ref_ptr<osg::Node> cessna = osgDB::readRefNodeFile("cessna.osgt");
|
||||||
if (cessna)
|
if (cessna)
|
||||||
{
|
{
|
||||||
const osg::BoundingSphere& bs = cessna->getBound();
|
const osg::BoundingSphere& bs = cessna->getBound();
|
||||||
@@ -173,26 +174,30 @@ osg::Node* createMovingModel(const osg::Vec3& center, float radius)
|
|||||||
|
|
||||||
positioned->addChild(cessna);
|
positioned->addChild(cessna);
|
||||||
|
|
||||||
osg::MatrixTransform* xform = new osg::MatrixTransform;
|
osg::ref_ptr<osg::MatrixTransform> xform = new osg::MatrixTransform;
|
||||||
xform->setUpdateCallback(new osg::AnimationPathCallback(animationPath,0.0f,2.0));
|
xform->setUpdateCallback(new osg::AnimationPathCallback(animationPath,0.0f,2.0));
|
||||||
xform->addChild(positioned);
|
xform->addChild(positioned);
|
||||||
|
|
||||||
model->addChild(xform);
|
model->addChild(xform);
|
||||||
}
|
}
|
||||||
|
|
||||||
return model;
|
#ifndef OSG_GLES2_AVAILABLE
|
||||||
|
model->getOrCreateStateSet()->setMode(GL_NORMALIZE, osg::StateAttribute::ON);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return model.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Node* createModel(bool overlay, osgSim::OverlayNode::OverlayTechnique technique)
|
osg::ref_ptr<osg::Group> createModel(bool overlay, osgSim::OverlayNode::OverlayTechnique technique)
|
||||||
{
|
{
|
||||||
osg::Vec3 center(0.0f,0.0f,0.0f);
|
osg::Vec3 center(0.0f,0.0f,0.0f);
|
||||||
float radius = 100.0f;
|
float radius = 100.0f;
|
||||||
|
|
||||||
osg::Group* root = new osg::Group;
|
osg::ref_ptr<osg::Group> root = new osg::Group;
|
||||||
|
|
||||||
float baseHeight = center.z()-radius*0.5;
|
float baseHeight = center.z()-radius*0.5;
|
||||||
osg::Node* baseModel = createBase(osg::Vec3(center.x(), center.y(), baseHeight),radius);
|
osg::ref_ptr<osg::Node> baseModel = createBase(osg::Vec3(center.x(), center.y(), baseHeight),radius);
|
||||||
osg::Node* movingModel = createMovingModel(center,radius*0.8f);
|
osg::ref_ptr<osg::Node> movingModel = createMovingModel(center,radius*0.8f);
|
||||||
|
|
||||||
if (overlay)
|
if (overlay)
|
||||||
{
|
{
|
||||||
@@ -232,14 +237,14 @@ int main( int argc, char **argv )
|
|||||||
osgViewer::Viewer viewer;
|
osgViewer::Viewer viewer;
|
||||||
|
|
||||||
// load the nodes from the commandline arguments.
|
// load the nodes from the commandline arguments.
|
||||||
osg::Node* model = createModel(overlay, technique);
|
osg::ref_ptr<osg::Group> model = createModel(overlay, technique);
|
||||||
if (!model)
|
if (!model)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// tilt the scene so the default eye position is looking down on the model.
|
// tilt the scene so the default eye position is looking down on the model.
|
||||||
osg::MatrixTransform* rootnode = new osg::MatrixTransform;
|
osg::ref_ptr<osg::MatrixTransform> rootnode = new osg::MatrixTransform;
|
||||||
rootnode->setMatrix(osg::Matrix::rotate(osg::inDegrees(30.0f),1.0f,0.0f,0.0f));
|
rootnode->setMatrix(osg::Matrix::rotate(osg::inDegrees(30.0f),1.0f,0.0f,0.0f));
|
||||||
rootnode->addChild(model);
|
rootnode->addChild(model);
|
||||||
|
|
||||||
@@ -247,6 +252,13 @@ int main( int argc, char **argv )
|
|||||||
osgUtil::Optimizer optimzer;
|
osgUtil::Optimizer optimzer;
|
||||||
optimzer.optimize(rootnode);
|
optimzer.optimize(rootnode);
|
||||||
|
|
||||||
|
std::string filename;
|
||||||
|
if (arguments.read("-o",filename))
|
||||||
|
{
|
||||||
|
osgDB::writeNodeFile(*rootnode, filename);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
// set the scene to render
|
// set the scene to render
|
||||||
viewer.setSceneData(rootnode);
|
viewer.setSceneData(rootnode);
|
||||||
|
|
||||||
|
|||||||
@@ -317,7 +317,8 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int, char**)
|
||||||
|
{
|
||||||
osgViewer::Viewer viewer;
|
osgViewer::Viewer viewer;
|
||||||
|
|
||||||
osgWidget::WindowManager* wm = new osgWidget::WindowManager(
|
osgWidget::WindowManager* wm = new osgWidget::WindowManager(
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
/* -*-c++-*-
|
/* -*-c++-*-
|
||||||
* Copyright (C) 2009 Cedric Pinson <cedric.pinson@plopbyte.net>
|
* Copyright (C) 2009 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||||
*
|
*
|
||||||
* This library is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* (at your option) any later version. The full license is in LICENSE file
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
* included with this distribution, and on the openscenegraph.org website.
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This library is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* OpenSceneGraph Public License for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -28,6 +28,8 @@
|
|||||||
#include <osgAnimation/BasicAnimationManager>
|
#include <osgAnimation/BasicAnimationManager>
|
||||||
#include <osgAnimation/RigGeometry>
|
#include <osgAnimation/RigGeometry>
|
||||||
#include <osgAnimation/RigTransformHardware>
|
#include <osgAnimation/RigTransformHardware>
|
||||||
|
#include <osgAnimation/MorphGeometry>
|
||||||
|
#include <osgAnimation/MorphTransformHardware>
|
||||||
#include <osgAnimation/AnimationManagerBase>
|
#include <osgAnimation/AnimationManagerBase>
|
||||||
#include <osgAnimation/BoneMapVisitor>
|
#include <osgAnimation/BoneMapVisitor>
|
||||||
|
|
||||||
@@ -40,89 +42,100 @@ static unsigned int getRandomValueinRange(unsigned int v)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
osg::ref_ptr<osg::Program> program;
|
osg::ref_ptr<osg::Program> CommonProgram;
|
||||||
// show how to override the default RigTransformHardware for customized usage
|
// show how to override the default RigTransformHardware for customized usage
|
||||||
struct MyRigTransformHardware : public osgAnimation::RigTransformHardware
|
struct MyRigTransformHardware : public osgAnimation::RigTransformHardware
|
||||||
{
|
{
|
||||||
|
int _maxmatrix;
|
||||||
void operator()(osgAnimation::RigGeometry& geom)
|
MyRigTransformHardware() : _maxmatrix(99){}
|
||||||
|
virtual bool init(osgAnimation::RigGeometry& rig)
|
||||||
{
|
{
|
||||||
if (_needInit)
|
if(_perVertexInfluences.empty())
|
||||||
if (!init(geom))
|
{
|
||||||
return;
|
prepareData(rig);
|
||||||
computeMatrixPaletteUniform(geom.getMatrixFromSkeletonToGeometry(), geom.getInvMatrixFromSkeletonToGeometry());
|
|
||||||
}
|
|
||||||
|
|
||||||
bool init(osgAnimation::RigGeometry& geom)
|
|
||||||
{
|
|
||||||
osg::Vec3Array* pos = dynamic_cast<osg::Vec3Array*>(geom.getVertexArray());
|
|
||||||
if (!pos) {
|
|
||||||
osg::notify(osg::WARN) << "RigTransformHardware no vertex array in the geometry " << geom.getName() << std::endl;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if(!rig.getSkeleton())
|
||||||
if (!geom.getSkeleton()) {
|
|
||||||
osg::notify(osg::WARN) << "RigTransformHardware no skeleting set in geometry " << geom.getName() << std::endl;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
osgAnimation::BoneMapVisitor mapVisitor;
|
osgAnimation::BoneMapVisitor mapVisitor;
|
||||||
geom.getSkeleton()->accept(mapVisitor);
|
rig.getSkeleton()->accept(mapVisitor);
|
||||||
osgAnimation::BoneMap bm = mapVisitor.getBoneMap();
|
osgAnimation::BoneMap boneMap = mapVisitor.getBoneMap();
|
||||||
|
|
||||||
if (!createPalette(pos->size(),bm, geom.getVertexInfluenceSet().getVertexToBoneList()))
|
if (!buildPalette(boneMap,rig) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int attribIndex = 11;
|
osg::Geometry& source = *rig.getSourceGeometry();
|
||||||
int nbAttribs = getNumVertexAttrib();
|
osg::Vec3Array* positionSrc = dynamic_cast<osg::Vec3Array*>(source.getVertexArray());
|
||||||
|
|
||||||
// use a global program for all avatar
|
if (!positionSrc)
|
||||||
if (!program.valid()) {
|
{
|
||||||
program = new osg::Program;
|
OSG_WARN << "RigTransformHardware no vertex array in the geometry " << rig.getName() << std::endl;
|
||||||
program->setName("HardwareSkinning");
|
return false;
|
||||||
if (!_shader.valid())
|
}
|
||||||
_shader = osg::Shader::readShaderFile(osg::Shader::VERTEX,"shaders/skinning.vert");
|
|
||||||
|
|
||||||
if (!_shader.valid()) {
|
// copy shallow from source geometry to rig
|
||||||
osg::notify(osg::WARN) << "RigTransformHardware can't load VertexShader" << std::endl;
|
rig.copyFrom(source);
|
||||||
|
|
||||||
|
osg::ref_ptr<osg::Shader> vertexshader;
|
||||||
|
osg::ref_ptr<osg::StateSet> stateset = rig.getOrCreateStateSet();
|
||||||
|
if(!CommonProgram.valid())
|
||||||
|
{
|
||||||
|
CommonProgram = new osg::Program;
|
||||||
|
CommonProgram->setName("HardwareSkinning");
|
||||||
|
|
||||||
|
//set default source if _shader is not user set
|
||||||
|
if (!vertexshader.valid())
|
||||||
|
{
|
||||||
|
vertexshader = osgDB::readRefShaderFile(osg::Shader::VERTEX,"skinning.vert");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!vertexshader.valid())
|
||||||
|
{
|
||||||
|
OSG_WARN << "RigTransformHardware can't load VertexShader" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// replace max matrix by the value from uniform
|
// replace max matrix by the value from uniform
|
||||||
{
|
{
|
||||||
std::string str = _shader->getShaderSource();
|
std::string str = vertexshader->getShaderSource();
|
||||||
std::string toreplace = std::string("MAX_MATRIX");
|
std::string toreplace = std::string("MAX_MATRIX");
|
||||||
std::size_t start = str.find(toreplace);
|
std::size_t start = str.find(toreplace);
|
||||||
std::stringstream ss;
|
if (std::string::npos != start)
|
||||||
ss << getMatrixPaletteUniform()->getNumElements();
|
{
|
||||||
str.replace(start, toreplace.size(), ss.str());
|
std::stringstream ss;
|
||||||
_shader->setShaderSource(str);
|
ss << _maxmatrix;//getMatrixPaletteUniform()->getNumElements();
|
||||||
osg::notify(osg::INFO) << "Shader " << str << std::endl;
|
str.replace(start, toreplace.size(), ss.str());
|
||||||
|
vertexshader->setShaderSource(str);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OSG_WARN<< "MAX_MATRIX not found in Shader! " << str << std::endl;
|
||||||
|
}
|
||||||
|
OSG_INFO << "Shader " << str << std::endl;
|
||||||
}
|
}
|
||||||
|
CommonProgram->addShader(vertexshader.get());
|
||||||
program->addShader(_shader.get());
|
}
|
||||||
|
|
||||||
for (int i = 0; i < nbAttribs; i++)
|
unsigned int nbAttribs = getNumVertexAttrib();
|
||||||
{
|
for (unsigned int i = 0; i < nbAttribs; i++)
|
||||||
std::stringstream ss;
|
|
||||||
ss << "boneWeight" << i;
|
|
||||||
program->addBindAttribLocation(ss.str(), attribIndex + i);
|
|
||||||
|
|
||||||
osg::notify(osg::INFO) << "set vertex attrib " << ss.str() << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (int i = 0; i < nbAttribs; i++)
|
|
||||||
{
|
{
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << "boneWeight" << i;
|
ss << "boneWeight" << i;
|
||||||
geom.setVertexAttribArray(attribIndex + i, getVertexAttrib(i));
|
CommonProgram->addBindAttribLocation(ss.str(), _minAttribIndex + i);
|
||||||
|
rig.setVertexAttribArray(_minAttribIndex + i, getVertexAttrib(i));
|
||||||
|
OSG_INFO << "set vertex attrib " << ss.str() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::ref_ptr<osg::StateSet> ss = new osg::StateSet;
|
|
||||||
ss->addUniform(getMatrixPaletteUniform());
|
stateset->removeUniform("nbBonesPerVertex");
|
||||||
ss->addUniform(new osg::Uniform("nbBonesPerVertex", getNumBonesPerVertex()));
|
stateset->addUniform(new osg::Uniform("nbBonesPerVertex",_bonesPerVertex));
|
||||||
ss->setAttributeAndModes(program.get());
|
|
||||||
geom.setStateSet(ss.get());
|
stateset->removeUniform("matrixPalette");
|
||||||
|
stateset->addUniform(_uniformMatrixPalette);
|
||||||
|
|
||||||
|
stateset->setAttribute(CommonProgram.get());
|
||||||
|
|
||||||
_needInit = false;
|
_needInit = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -133,8 +146,9 @@ struct MyRigTransformHardware : public osgAnimation::RigTransformHardware
|
|||||||
struct SetupRigGeometry : public osg::NodeVisitor
|
struct SetupRigGeometry : public osg::NodeVisitor
|
||||||
{
|
{
|
||||||
bool _hardware;
|
bool _hardware;
|
||||||
SetupRigGeometry( bool hardware = true) : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN), _hardware(hardware) {}
|
|
||||||
|
|
||||||
|
SetupRigGeometry( bool hardware = true) : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN), _hardware(hardware) {}
|
||||||
|
|
||||||
void apply(osg::Geode& geode)
|
void apply(osg::Geode& geode)
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < geode.getNumDrawables(); i++)
|
for (unsigned int i = 0; i < geode.getNumDrawables(); i++)
|
||||||
@@ -142,10 +156,15 @@ struct SetupRigGeometry : public osg::NodeVisitor
|
|||||||
}
|
}
|
||||||
void apply(osg::Drawable& geom)
|
void apply(osg::Drawable& geom)
|
||||||
{
|
{
|
||||||
if (_hardware) {
|
if (_hardware)
|
||||||
|
{
|
||||||
osgAnimation::RigGeometry* rig = dynamic_cast<osgAnimation::RigGeometry*>(&geom);
|
osgAnimation::RigGeometry* rig = dynamic_cast<osgAnimation::RigGeometry*>(&geom);
|
||||||
if (rig)
|
if (rig)
|
||||||
|
{
|
||||||
rig->setRigTransformImplementation(new MyRigTransformHardware);
|
rig->setRigTransformImplementation(new MyRigTransformHardware);
|
||||||
|
osgAnimation::MorphGeometry *morph=dynamic_cast<osgAnimation::MorphGeometry*>(rig->getSourceGeometry());
|
||||||
|
if(morph)morph->setMorphTransformImplementation(new osgAnimation::MorphTransformHardware);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@@ -169,11 +188,12 @@ osg::Group* createCharacterInstance(osg::Group* character, bool hardware)
|
|||||||
osgAnimation::BasicAnimationManager* anim = dynamic_cast<osgAnimation::BasicAnimationManager*>(animationManager);
|
osgAnimation::BasicAnimationManager* anim = dynamic_cast<osgAnimation::BasicAnimationManager*>(animationManager);
|
||||||
const osgAnimation::AnimationList& list = animationManager->getAnimationList();
|
const osgAnimation::AnimationList& list = animationManager->getAnimationList();
|
||||||
int v = getRandomValueinRange(list.size());
|
int v = getRandomValueinRange(list.size());
|
||||||
if (list[v]->getName() == std::string("MatIpo_ipo")) {
|
if (list[v]->getName() == std::string("MatIpo_ipo"))
|
||||||
|
{
|
||||||
anim->playAnimation(list[v].get());
|
anim->playAnimation(list[v].get());
|
||||||
v = (v + 1)%list.size();
|
v = (v + 1)%list.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
anim->playAnimation(list[v].get());
|
anim->playAnimation(list[v].get());
|
||||||
|
|
||||||
SetupRigGeometry switcher(hardware);
|
SetupRigGeometry switcher(hardware);
|
||||||
@@ -193,12 +213,15 @@ int main (int argc, char* argv[])
|
|||||||
|
|
||||||
bool hardware = true;
|
bool hardware = true;
|
||||||
int maxChar = 10;
|
int maxChar = 10;
|
||||||
while (psr.read("--software")) { hardware = false; }
|
while (psr.read("--software"))
|
||||||
|
{
|
||||||
|
hardware = false;
|
||||||
|
}
|
||||||
while (psr.read("--number", maxChar)) {}
|
while (psr.read("--number", maxChar)) {}
|
||||||
|
|
||||||
|
osg::ref_ptr<osg::Node> node = osgDB::readRefNodeFiles(psr);
|
||||||
osg::ref_ptr<osg::Group> root = dynamic_cast<osg::Group*>(osgDB::readNodeFiles(psr));
|
osg::ref_ptr<osg::Group> root = dynamic_cast<osg::Group*>(node.get());
|
||||||
if (!root)
|
if (!root)
|
||||||
{
|
{
|
||||||
std::cout << psr.getApplicationName() <<": No data loaded" << std::endl;
|
std::cout << psr.getApplicationName() <<": No data loaded" << std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
@@ -206,7 +229,7 @@ int main (int argc, char* argv[])
|
|||||||
|
|
||||||
{
|
{
|
||||||
osgAnimation::AnimationManagerBase* animationManager = dynamic_cast<osgAnimation::AnimationManagerBase*>(root->getUpdateCallback());
|
osgAnimation::AnimationManagerBase* animationManager = dynamic_cast<osgAnimation::AnimationManagerBase*>(root->getUpdateCallback());
|
||||||
if(!animationManager)
|
if(!animationManager)
|
||||||
{
|
{
|
||||||
osg::notify(osg::FATAL) << "no AnimationManagerBase found, updateCallback need to animate elements" << std::endl;
|
osg::notify(osg::FATAL) << "no AnimationManagerBase found, updateCallback need to animate elements" << std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
@@ -218,13 +241,13 @@ int main (int argc, char* argv[])
|
|||||||
|
|
||||||
// add the state manipulator
|
// add the state manipulator
|
||||||
viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) );
|
viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) );
|
||||||
|
|
||||||
// add the thread model handler
|
// add the thread model handler
|
||||||
viewer.addEventHandler(new osgViewer::ThreadingHandler);
|
viewer.addEventHandler(new osgViewer::ThreadingHandler);
|
||||||
|
|
||||||
// add the window size toggle handler
|
// add the window size toggle handler
|
||||||
viewer.addEventHandler(new osgViewer::WindowSizeHandler);
|
viewer.addEventHandler(new osgViewer::WindowSizeHandler);
|
||||||
|
|
||||||
// add the stats handler
|
// add the stats handler
|
||||||
viewer.addEventHandler(new osgViewer::StatsHandler);
|
viewer.addEventHandler(new osgViewer::StatsHandler);
|
||||||
|
|
||||||
@@ -243,9 +266,10 @@ int main (int argc, char* argv[])
|
|||||||
|
|
||||||
double xChar = maxChar;
|
double xChar = maxChar;
|
||||||
double yChar = xChar * 9.0/16;
|
double yChar = xChar * 9.0/16;
|
||||||
for (double i = 0.0; i < xChar; i++) {
|
for (double i = 0.0; i < xChar; i++)
|
||||||
for (double j = 0.0; j < yChar; j++) {
|
{
|
||||||
|
for (double j = 0.0; j < yChar; j++)
|
||||||
|
{
|
||||||
osg::ref_ptr<osg::Group> c = createCharacterInstance(root.get(), hardware);
|
osg::ref_ptr<osg::Group> c = createCharacterInstance(root.get(), hardware);
|
||||||
osg::MatrixTransform* tr = new osg::MatrixTransform;
|
osg::MatrixTransform* tr = new osg::MatrixTransform;
|
||||||
tr->setMatrix(osg::Matrix::translate( 2.0 * (i - xChar * .5),
|
tr->setMatrix(osg::Matrix::translate( 2.0 * (i - xChar * .5),
|
||||||
@@ -257,7 +281,6 @@ int main (int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
std::cout << "created " << xChar * yChar << " instance" << std::endl;
|
std::cout << "created " << xChar * yChar << " instance" << std::endl;
|
||||||
|
|
||||||
|
|
||||||
return viewer.run();
|
return viewer.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
/* -*-c++-*-
|
/* -*-c++-*-
|
||||||
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
||||||
*
|
*
|
||||||
* This library is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* (at your option) any later version. The full license is in LICENSE file
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
* included with this distribution, and on the openscenegraph.org website.
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This library is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* OpenSceneGraph Public License for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
public:
|
public:
|
||||||
META_Object(osgAnimation, AnimtkUpdateCallback);
|
META_Object(osgAnimation, AnimtkUpdateCallback);
|
||||||
|
|
||||||
AnimtkUpdateCallback()
|
AnimtkUpdateCallback()
|
||||||
{
|
{
|
||||||
_sampler = new osgAnimation::Vec3CubicBezierSampler;
|
_sampler = new osgAnimation::Vec3CubicBezierSampler;
|
||||||
_playing = false;
|
_playing = false;
|
||||||
@@ -41,6 +41,7 @@
|
|||||||
}
|
}
|
||||||
AnimtkUpdateCallback(const AnimtkUpdateCallback& val, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY):
|
AnimtkUpdateCallback(const AnimtkUpdateCallback& val, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY):
|
||||||
osg::Object(val, copyop),
|
osg::Object(val, copyop),
|
||||||
|
osg::Callback(val, copyop),
|
||||||
osg::NodeCallback(val, copyop),
|
osg::NodeCallback(val, copyop),
|
||||||
_sampler(val._sampler),
|
_sampler(val._sampler),
|
||||||
_startTime(val._startTime),
|
_startTime(val._startTime),
|
||||||
@@ -52,16 +53,16 @@
|
|||||||
|
|
||||||
/** Callback method called by the NodeVisitor when visiting a node.*/
|
/** Callback method called by the NodeVisitor when visiting a node.*/
|
||||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||||
{
|
{
|
||||||
if (nv->getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR &&
|
if (nv->getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR &&
|
||||||
nv->getFrameStamp() &&
|
nv->getFrameStamp() &&
|
||||||
nv->getFrameStamp()->getFrameNumber() != _lastUpdate)
|
nv->getFrameStamp()->getFrameNumber() != _lastUpdate)
|
||||||
{
|
{
|
||||||
|
|
||||||
_lastUpdate = nv->getFrameStamp()->getFrameNumber();
|
_lastUpdate = nv->getFrameStamp()->getFrameNumber();
|
||||||
_currentTime = osg::Timer::instance()->tick();
|
_currentTime = osg::Timer::instance()->tick();
|
||||||
|
|
||||||
if (_playing && _sampler.get() && _sampler->getKeyframeContainer())
|
if (_playing && _sampler.get() && _sampler->getKeyframeContainer())
|
||||||
{
|
{
|
||||||
osg::MatrixTransform* transform = dynamic_cast<osg::MatrixTransform*>(node);
|
osg::MatrixTransform* transform = dynamic_cast<osg::MatrixTransform*>(node);
|
||||||
if (transform) {
|
if (transform) {
|
||||||
@@ -97,7 +98,7 @@ class AnimtkStateSetUpdateCallback : public osg::StateSet::Callback
|
|||||||
public:
|
public:
|
||||||
META_Object(osgAnimation, AnimtkStateSetUpdateCallback);
|
META_Object(osgAnimation, AnimtkStateSetUpdateCallback);
|
||||||
|
|
||||||
AnimtkStateSetUpdateCallback()
|
AnimtkStateSetUpdateCallback()
|
||||||
{
|
{
|
||||||
_sampler = new osgAnimation::Vec4LinearSampler;
|
_sampler = new osgAnimation::Vec4LinearSampler;
|
||||||
_playing = false;
|
_playing = false;
|
||||||
@@ -106,6 +107,7 @@ public:
|
|||||||
|
|
||||||
AnimtkStateSetUpdateCallback(const AnimtkStateSetUpdateCallback& val, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY):
|
AnimtkStateSetUpdateCallback(const AnimtkStateSetUpdateCallback& val, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY):
|
||||||
osg::Object(val, copyop),
|
osg::Object(val, copyop),
|
||||||
|
osg::Callback(val, copyop),
|
||||||
osg::StateSet::Callback(val, copyop),
|
osg::StateSet::Callback(val, copyop),
|
||||||
_sampler(val._sampler),
|
_sampler(val._sampler),
|
||||||
_startTime(val._startTime),
|
_startTime(val._startTime),
|
||||||
@@ -117,19 +119,19 @@ public:
|
|||||||
|
|
||||||
/** Callback method called by the NodeVisitor when visiting a node.*/
|
/** Callback method called by the NodeVisitor when visiting a node.*/
|
||||||
virtual void operator()(osg::StateSet* state, osg::NodeVisitor* nv)
|
virtual void operator()(osg::StateSet* state, osg::NodeVisitor* nv)
|
||||||
{
|
{
|
||||||
if (state &&
|
if (state &&
|
||||||
nv->getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR &&
|
nv->getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR &&
|
||||||
nv->getFrameStamp() &&
|
nv->getFrameStamp() &&
|
||||||
nv->getFrameStamp()->getFrameNumber() != _lastUpdate) {
|
nv->getFrameStamp()->getFrameNumber() != _lastUpdate) {
|
||||||
|
|
||||||
_lastUpdate = nv->getFrameStamp()->getFrameNumber();
|
_lastUpdate = nv->getFrameStamp()->getFrameNumber();
|
||||||
_currentTime = osg::Timer::instance()->tick();
|
_currentTime = osg::Timer::instance()->tick();
|
||||||
|
|
||||||
if (_playing && _sampler.get() && _sampler->getKeyframeContainer())
|
if (_playing && _sampler.get() && _sampler->getKeyframeContainer())
|
||||||
{
|
{
|
||||||
osg::Material* material = dynamic_cast<osg::Material*>(state->getAttribute(osg::StateAttribute::MATERIAL));
|
osg::Material* material = dynamic_cast<osg::Material*>(state->getAttribute(osg::StateAttribute::MATERIAL));
|
||||||
if (material)
|
if (material)
|
||||||
{
|
{
|
||||||
osg::Vec4 result;
|
osg::Vec4 result;
|
||||||
float t = osg::Timer::instance()->delta_s(_startTime, _currentTime);
|
float t = osg::Timer::instance()->delta_s(_startTime, _currentTime);
|
||||||
@@ -155,7 +157,7 @@ public:
|
|||||||
|
|
||||||
// This won't really give good results in any situation, but it does demonstrate
|
// This won't really give good results in any situation, but it does demonstrate
|
||||||
// on possible "fast" usage...
|
// on possible "fast" usage...
|
||||||
class MakePathTimeCallback: public AnimtkUpdateCallback
|
class MakePathTimeCallback: public AnimtkUpdateCallback
|
||||||
{
|
{
|
||||||
osg::ref_ptr<osg::Geode> _geode;
|
osg::ref_ptr<osg::Geode> _geode;
|
||||||
float _lastAdd;
|
float _lastAdd;
|
||||||
@@ -168,11 +170,11 @@ public:
|
|||||||
_addSeconds(0.08f) {
|
_addSeconds(0.08f) {
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||||
{
|
{
|
||||||
float t = osg::Timer::instance()->delta_s(_startTime, _currentTime);
|
float t = osg::Timer::instance()->delta_s(_startTime, _currentTime);
|
||||||
|
|
||||||
if(_lastAdd + _addSeconds <= t && t <= 8.0f)
|
if(_lastAdd + _addSeconds <= t && t <= 8.0f)
|
||||||
{
|
{
|
||||||
osg::Vec3 pos;
|
osg::Vec3 pos;
|
||||||
|
|
||||||
@@ -190,7 +192,7 @@ public:
|
|||||||
|
|
||||||
// This will give great results if you DO NOT have VSYNC enabled and can generate
|
// This will give great results if you DO NOT have VSYNC enabled and can generate
|
||||||
// decent FPS.
|
// decent FPS.
|
||||||
class MakePathDistanceCallback: public AnimtkUpdateCallback
|
class MakePathDistanceCallback: public AnimtkUpdateCallback
|
||||||
{
|
{
|
||||||
osg::ref_ptr<osg::Geode> _geode;
|
osg::ref_ptr<osg::Geode> _geode;
|
||||||
osg::Vec3 _lastAdd;
|
osg::Vec3 _lastAdd;
|
||||||
@@ -203,7 +205,7 @@ public:
|
|||||||
_threshold(0.5f),
|
_threshold(0.5f),
|
||||||
_count(0) {}
|
_count(0) {}
|
||||||
|
|
||||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||||
{
|
{
|
||||||
static bool countReported = false;
|
static bool countReported = false;
|
||||||
|
|
||||||
@@ -215,13 +217,13 @@ public:
|
|||||||
|
|
||||||
osg::Vec3 distance = _lastAdd - pos;
|
osg::Vec3 distance = _lastAdd - pos;
|
||||||
|
|
||||||
if(t <= 8.0f && distance.length() >= _threshold)
|
if(t <= 8.0f && distance.length() >= _threshold)
|
||||||
{
|
{
|
||||||
_geode->addDrawable(new osg::ShapeDrawable(new osg::Sphere(pos, 0.25f)));
|
_geode->addDrawable(new osg::ShapeDrawable(new osg::Sphere(pos, 0.25f)));
|
||||||
_lastAdd = pos;
|
_lastAdd = pos;
|
||||||
_count++;
|
_count++;
|
||||||
}
|
}
|
||||||
else if(t > 8.0f)
|
else if(t > 8.0f)
|
||||||
{
|
{
|
||||||
if(!countReported) std::cout << "Created " << _count << " nodes." << std::endl;
|
if(!countReported) std::cout << "Created " << _count << " nodes." << std::endl;
|
||||||
countReported = true;
|
countReported = true;
|
||||||
@@ -231,13 +233,13 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
osg::StateSet* setupStateSet()
|
osg::StateSet* setupStateSet()
|
||||||
{
|
{
|
||||||
osg::StateSet* st = new osg::StateSet();
|
osg::StateSet* st = new osg::StateSet();
|
||||||
|
|
||||||
st->setAttributeAndModes(new osg::Material(), true);
|
st->setAttributeAndModes(new osg::Material(), true);
|
||||||
st->setMode(GL_BLEND, true);
|
st->setMode(GL_BLEND, true);
|
||||||
|
|
||||||
AnimtkStateSetUpdateCallback* callback = new AnimtkStateSetUpdateCallback();
|
AnimtkStateSetUpdateCallback* callback = new AnimtkStateSetUpdateCallback();
|
||||||
osgAnimation::Vec4KeyframeContainer* keys = callback->_sampler->getOrCreateKeyframeContainer();
|
osgAnimation::Vec4KeyframeContainer* keys = callback->_sampler->getOrCreateKeyframeContainer();
|
||||||
keys->push_back(osgAnimation::Vec4Keyframe(0, osg::Vec4(1,0,0,1)));
|
keys->push_back(osgAnimation::Vec4Keyframe(0, osg::Vec4(1,0,0,1)));
|
||||||
@@ -248,11 +250,11 @@ osg::StateSet* setupStateSet()
|
|||||||
keys->push_back(osgAnimation::Vec4Keyframe(10, osg::Vec4(1,0,0,1)));
|
keys->push_back(osgAnimation::Vec4Keyframe(10, osg::Vec4(1,0,0,1)));
|
||||||
callback->start();
|
callback->start();
|
||||||
st->setUpdateCallback(callback);
|
st->setUpdateCallback(callback);
|
||||||
|
|
||||||
return st;
|
return st;
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::MatrixTransform* setupAnimtkNode(osg::Geode* staticGeode)
|
osg::MatrixTransform* setupAnimtkNode(osg::Geode* staticGeode)
|
||||||
{
|
{
|
||||||
osg::Vec3 v[5];
|
osg::Vec3 v[5];
|
||||||
|
|
||||||
@@ -300,20 +302,20 @@ osg::MatrixTransform* setupAnimtkNode(osg::Geode* staticGeode)
|
|||||||
node->setUpdateCallback(callback);
|
node->setUpdateCallback(callback);
|
||||||
|
|
||||||
osg::Geode* geode = new osg::Geode();
|
osg::Geode* geode = new osg::Geode();
|
||||||
|
|
||||||
geode->setStateSet(setupStateSet());
|
geode->setStateSet(setupStateSet());
|
||||||
geode->addDrawable(new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0.0f, 0.0f, 0.0f), 2)));
|
geode->addDrawable(new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0.0f, 0.0f, 0.0f), 2)));
|
||||||
|
|
||||||
node->addChild(geode);
|
node->addChild(geode);
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
osg::ArgumentParser arguments(&argc, argv);
|
osg::ArgumentParser arguments(&argc, argv);
|
||||||
osgViewer::Viewer viewer(arguments);
|
osgViewer::Viewer viewer(arguments);
|
||||||
|
|
||||||
osgGA::TrackballManipulator* tbm = new osgGA::TrackballManipulator();
|
osgGA::TrackballManipulator* tbm = new osgGA::TrackballManipulator();
|
||||||
|
|
||||||
viewer.setCameraManipulator(tbm);
|
viewer.setCameraManipulator(tbm);
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
/* -*-c++-*-
|
/* -*-c++-*-
|
||||||
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
||||||
*
|
*
|
||||||
* This library is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* (at your option) any later version. The full license is in LICENSE file
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
* included with this distribution, and on the openscenegraph.org website.
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This library is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* OpenSceneGraph Public License for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -33,11 +33,11 @@ struct GeometryFinder : public osg::NodeVisitor
|
|||||||
{
|
{
|
||||||
osg::ref_ptr<osg::Geometry> _geom;
|
osg::ref_ptr<osg::Geometry> _geom;
|
||||||
GeometryFinder() : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {}
|
GeometryFinder() : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {}
|
||||||
void apply(osg::Geode& geode)
|
void apply(osg::Geode& geode)
|
||||||
{
|
{
|
||||||
if (_geom.valid())
|
if (_geom.valid())
|
||||||
return;
|
return;
|
||||||
for (unsigned int i = 0; i < geode.getNumDrawables(); i++)
|
for (unsigned int i = 0; i < geode.getNumDrawables(); i++)
|
||||||
{
|
{
|
||||||
osg::Geometry* geom = dynamic_cast<osg::Geometry*>(geode.getDrawable(i));
|
osg::Geometry* geom = dynamic_cast<osg::Geometry*>(geode.getDrawable(i));
|
||||||
if (geom) {
|
if (geom) {
|
||||||
@@ -50,7 +50,7 @@ struct GeometryFinder : public osg::NodeVisitor
|
|||||||
|
|
||||||
osg::ref_ptr<osg::Geometry> getShape(const std::string& name)
|
osg::ref_ptr<osg::Geometry> getShape(const std::string& name)
|
||||||
{
|
{
|
||||||
osg::ref_ptr<osg::Node> shape0 = osgDB::readNodeFile(name);
|
osg::ref_ptr<osg::Node> shape0 = osgDB::readRefNodeFile(name);
|
||||||
if (shape0)
|
if (shape0)
|
||||||
{
|
{
|
||||||
GeometryFinder finder;
|
GeometryFinder finder;
|
||||||
@@ -104,10 +104,12 @@ int main (int argc, char* argv[])
|
|||||||
|
|
||||||
osg::Group* scene = new osg::Group;
|
osg::Group* scene = new osg::Group;
|
||||||
scene->addUpdateCallback(bam);
|
scene->addUpdateCallback(bam);
|
||||||
|
|
||||||
osg::Geode* geode = new osg::Geode;
|
osg::Geode* geode = new osg::Geode;
|
||||||
geode->addDrawable(morph);
|
geode->addDrawable(morph);
|
||||||
geode->addUpdateCallback(new osgAnimation::UpdateMorph("MorphNodeCallback"));
|
osgAnimation::UpdateMorph* morphupdate=new osgAnimation::UpdateMorph("MorphNodeCallback");
|
||||||
|
morphupdate->addTarget("MorphNodeCallback");
|
||||||
|
geode->addUpdateCallback(morphupdate);
|
||||||
scene->addChild(geode);
|
scene->addChild(geode);
|
||||||
|
|
||||||
viewer.addEventHandler(new osgViewer::StatsHandler());
|
viewer.addEventHandler(new osgViewer::StatsHandler());
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ public:
|
|||||||
}
|
}
|
||||||
AnimtkUpdateCallback(const AnimtkUpdateCallback& val, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY):
|
AnimtkUpdateCallback(const AnimtkUpdateCallback& val, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY):
|
||||||
osg::Object(val, copyop),
|
osg::Object(val, copyop),
|
||||||
|
osg::Callback(val, copyop),
|
||||||
osg::NodeCallback(val, copyop),
|
osg::NodeCallback(val, copyop),
|
||||||
_sampler(val._sampler),
|
_sampler(val._sampler),
|
||||||
_startTime(val._startTime),
|
_startTime(val._startTime),
|
||||||
@@ -98,6 +99,7 @@ public:
|
|||||||
|
|
||||||
AnimtkStateSetUpdateCallback(const AnimtkStateSetUpdateCallback& val, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY):
|
AnimtkStateSetUpdateCallback(const AnimtkStateSetUpdateCallback& val, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY):
|
||||||
osg::Object(val, copyop),
|
osg::Object(val, copyop),
|
||||||
|
osg::Callback(val, copyop),
|
||||||
osg::StateSet::Callback(val, copyop),
|
osg::StateSet::Callback(val, copyop),
|
||||||
_sampler(val._sampler),
|
_sampler(val._sampler),
|
||||||
_startTime(val._startTime),
|
_startTime(val._startTime),
|
||||||
|
|||||||
@@ -134,13 +134,10 @@ void initVertexMap(osgAnimation::Bone* b0,
|
|||||||
osgAnimation::RigGeometry* geom,
|
osgAnimation::RigGeometry* geom,
|
||||||
osg::Vec3Array* array)
|
osg::Vec3Array* array)
|
||||||
{
|
{
|
||||||
osgAnimation::VertexInfluenceSet vertexesInfluences;
|
|
||||||
osgAnimation::VertexInfluenceMap* vim = new osgAnimation::VertexInfluenceMap;
|
osgAnimation::VertexInfluenceMap* vim = new osgAnimation::VertexInfluenceMap;
|
||||||
|
|
||||||
(*vim)[b0->getName()].setName(b0->getName());
|
(*vim)[b0->getName()].setName(b0->getName());
|
||||||
(*vim)[b1->getName()].setName(b1->getName());
|
(*vim)[b1->getName()].setName(b1->getName());
|
||||||
(*vim)[b2->getName()].setName(b2->getName());
|
(*vim)[b2->getName()].setName(b2->getName());
|
||||||
|
|
||||||
for (int i = 0; i < (int)array->size(); i++)
|
for (int i = 0; i < (int)array->size(); i++)
|
||||||
{
|
{
|
||||||
float val = (*array)[i][0];
|
float val = (*array)[i][0];
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
struct NoseBegin : public osgAnimation::Action::Callback
|
struct NoseBegin : public osgAnimation::Action::Callback
|
||||||
{
|
{
|
||||||
virtual void operator()(osgAnimation::Action* action, osgAnimation::ActionVisitor* nv)
|
virtual void operator()(osgAnimation::Action* action, osgAnimation::ActionVisitor* /*nv*/)
|
||||||
{
|
{
|
||||||
std::cout << "sacrebleu, it scratches my nose, let me scratch it" << std::endl;
|
std::cout << "sacrebleu, it scratches my nose, let me scratch it" << std::endl;
|
||||||
std::cout << "process NoseBegin call back " << action->getName() << std::endl << std::endl;
|
std::cout << "process NoseBegin call back " << action->getName() << std::endl << std::endl;
|
||||||
@@ -47,7 +47,7 @@ struct NoseBegin : public osgAnimation::Action::Callback
|
|||||||
|
|
||||||
struct NoseEnd : public osgAnimation::Action::Callback
|
struct NoseEnd : public osgAnimation::Action::Callback
|
||||||
{
|
{
|
||||||
virtual void operator()(osgAnimation::Action* action, osgAnimation::ActionVisitor* nv)
|
virtual void operator()(osgAnimation::Action* action, osgAnimation::ActionVisitor* /*nv*/)
|
||||||
{
|
{
|
||||||
std::cout << "shhhrt shrrrrt shhhhhhrrrrt, haaa it's better"<< std::endl;
|
std::cout << "shhhrt shrrrrt shhhhhhrrrrt, haaa it's better"<< std::endl;
|
||||||
std::cout << "process NoseEnd call back " << action->getName() << std::endl << std::endl;
|
std::cout << "process NoseEnd call back " << action->getName() << std::endl << std::endl;
|
||||||
@@ -129,7 +129,7 @@ struct ExampleTimelineUsage : public osgGA::GUIEventHandler
|
|||||||
if (_releaseKey) // we hit a key and release it execute an action
|
if (_releaseKey) // we hit a key and release it execute an action
|
||||||
{
|
{
|
||||||
osgAnimation::Timeline* tml = _manager->getTimeline();
|
osgAnimation::Timeline* tml = _manager->getTimeline();
|
||||||
// dont play if already playing
|
// don't play if already playing
|
||||||
if (!tml->isActive(_scratchNose.get()))
|
if (!tml->isActive(_scratchNose.get()))
|
||||||
{
|
{
|
||||||
// add this animation on top of two other
|
// add this animation on top of two other
|
||||||
@@ -163,7 +163,8 @@ int main (int argc, char* argv[])
|
|||||||
file = psr[1];
|
file = psr[1];
|
||||||
|
|
||||||
// replace the manager
|
// replace the manager
|
||||||
osg::Group* root = dynamic_cast<osg::Group*>(osgDB::readNodeFile(file));
|
osg::ref_ptr<osg::Node> loadedmodel = osgDB::readRefNodeFile(file);
|
||||||
|
osg::Group* root = dynamic_cast<osg::Group*>(loadedmodel.get());
|
||||||
if (!root) {
|
if (!root) {
|
||||||
osg::notify(osg::FATAL) << "can't read file " << file << std::endl;
|
osg::notify(osg::FATAL) << "can't read file " << file << std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
/* -*-c++-*-
|
/* -*-c++-*-
|
||||||
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
||||||
*
|
*
|
||||||
* This library is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* (at your option) any later version. The full license is in LICENSE file
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
* included with this distribution, and on the openscenegraph.org website.
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This library is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* OpenSceneGraph Public License for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -24,18 +24,18 @@
|
|||||||
#include <osgDB/ReadFile>
|
#include <osgDB/ReadFile>
|
||||||
#include <osgAnimation/BasicAnimationManager>
|
#include <osgAnimation/BasicAnimationManager>
|
||||||
|
|
||||||
class AnimtkViewerModelController
|
class AnimtkViewerModelController
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::vector<std::string> AnimationMapVector;
|
typedef std::vector<std::string> AnimationMapVector;
|
||||||
|
|
||||||
static AnimtkViewerModelController& instance()
|
static AnimtkViewerModelController& instance()
|
||||||
{
|
{
|
||||||
static AnimtkViewerModelController avmc;
|
static AnimtkViewerModelController avmc;
|
||||||
return avmc;
|
return avmc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool setModel(osgAnimation::BasicAnimationManager* model)
|
static bool setModel(osgAnimation::BasicAnimationManager* model)
|
||||||
{
|
{
|
||||||
AnimtkViewerModelController& self = instance();
|
AnimtkViewerModelController& self = instance();
|
||||||
self._model = model;
|
self._model = model;
|
||||||
@@ -48,7 +48,7 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool list()
|
bool list()
|
||||||
{
|
{
|
||||||
std::cout << "Animation List:" << std::endl;
|
std::cout << "Animation List:" << std::endl;
|
||||||
for(osgAnimation::AnimationMap::iterator it = _map.begin(); it != _map.end(); it++)
|
for(osgAnimation::AnimationMap::iterator it = _map.begin(); it != _map.end(); it++)
|
||||||
@@ -56,9 +56,9 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool play()
|
bool play()
|
||||||
{
|
{
|
||||||
if(_focus < _amv.size())
|
if(_focus < _amv.size())
|
||||||
{
|
{
|
||||||
std::cout << "Play " << _amv[_focus] << std::endl;
|
std::cout << "Play " << _amv[_focus] << std::endl;
|
||||||
_model->playAnimation(_map[_amv[_focus]].get());
|
_model->playAnimation(_map[_amv[_focus]].get());
|
||||||
@@ -68,44 +68,44 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool stop()
|
bool stop()
|
||||||
{
|
{
|
||||||
if(_focus < _amv.size())
|
if(_focus < _amv.size())
|
||||||
{
|
{
|
||||||
std::cout << "Stop " << _amv[_focus] << std::endl;
|
std::cout << "Stop " << _amv[_focus] << std::endl;
|
||||||
_model->stopAnimation(_map[_amv[_focus]].get());
|
_model->stopAnimation(_map[_amv[_focus]].get());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool next()
|
bool next()
|
||||||
{
|
{
|
||||||
_focus = (_focus + 1) % _map.size();
|
_focus = (_focus + 1) % _map.size();
|
||||||
std::cout << "Current now is " << _amv[_focus] << std::endl;
|
std::cout << "Current now is " << _amv[_focus] << std::endl;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool previous()
|
bool previous()
|
||||||
{
|
{
|
||||||
_focus = (_map.size() + _focus - 1) % _map.size();
|
_focus = (_map.size() + _focus - 1) % _map.size();
|
||||||
std::cout << "Current now is " << _amv[_focus] << std::endl;
|
std::cout << "Current now is " << _amv[_focus] << std::endl;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool playByName(const std::string& name)
|
bool playByName(const std::string& name)
|
||||||
{
|
{
|
||||||
for(unsigned int i = 0; i < _amv.size(); i++) if(_amv[i] == name) _focus = i;
|
for(unsigned int i = 0; i < _amv.size(); i++) if(_amv[i] == name) _focus = i;
|
||||||
_model->playAnimation(_map[name].get());
|
_model->playAnimation(_map[name].get());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& getCurrentAnimationName() const
|
const std::string& getCurrentAnimationName() const
|
||||||
{
|
{
|
||||||
return _amv[_focus];
|
return _amv[_focus];
|
||||||
}
|
}
|
||||||
|
|
||||||
const AnimationMapVector& getAnimationMap() const
|
const AnimationMapVector& getAnimationMap() const
|
||||||
{
|
{
|
||||||
return _amv;
|
return _amv;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,7 +127,8 @@ int main(int argc, char** argv)
|
|||||||
osgViewer::Viewer viewer(arguments);
|
osgViewer::Viewer viewer(arguments);
|
||||||
osg::ref_ptr<osg::Group> group = new osg::Group();
|
osg::ref_ptr<osg::Group> group = new osg::Group();
|
||||||
|
|
||||||
osg::Group* node = dynamic_cast<osg::Group*>(osgDB::readNodeFiles(arguments)); //dynamic_cast<osgAnimation::AnimationManager*>(osgDB::readNodeFile(psr[1]));
|
osg::ref_ptr<osg::Node> loadedmodel = osgDB::readRefNodeFiles(arguments);
|
||||||
|
osg::Group* node = dynamic_cast<osg::Group*>(loadedmodel.get());
|
||||||
if(!node)
|
if(!node)
|
||||||
{
|
{
|
||||||
std::cout << arguments.getApplicationName() <<": No data loaded" << std::endl;
|
std::cout << arguments.getApplicationName() <<": No data loaded" << std::endl;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* -*-c++-*-
|
/* -*-c++-*-
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
@@ -31,7 +31,7 @@ class AnimtkViewerGUI: public osgWidget::WindowManager {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
osgWidget::Widget* _createButton(const std::string&);
|
osgWidget::Widget* _createButton(const std::string&);
|
||||||
|
|
||||||
bool _buttonPush(osgWidget::Event&);
|
bool _buttonPush(osgWidget::Event&);
|
||||||
bool _listMouseHover(osgWidget::Event&);
|
bool _listMouseHover(osgWidget::Event&);
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
/* -*-c++-*-
|
/* -*-c++-*-
|
||||||
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
||||||
*
|
*
|
||||||
* This library is open source and may be redistributed and/or modified under
|
* This library is open source and may be redistributed and/or modified under
|
||||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||||
* (at your option) any later version. The full license is in LICENSE file
|
* (at your option) any later version. The full license is in LICENSE file
|
||||||
* included with this distribution, and on the openscenegraph.org website.
|
* included with this distribution, and on the openscenegraph.org website.
|
||||||
*
|
*
|
||||||
* This library is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* OpenSceneGraph Public License for more details.
|
* OpenSceneGraph Public License for more details.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
const std::string IMAGE_PATH = "osgWidget/";
|
const std::string IMAGE_PATH = "osgWidget/";
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
struct Sampler: public osg::Drawable::UpdateCallback
|
struct Sampler: public osg::DrawableUpdateCallback
|
||||||
{
|
{
|
||||||
T _motion;
|
T _motion;
|
||||||
Sampler() {
|
Sampler() {
|
||||||
@@ -35,28 +35,28 @@ struct Sampler: public osg::Drawable::UpdateCallback
|
|||||||
|
|
||||||
typedef Sampler<osgAnimation::OutQuadMotion> WidgetSampler;
|
typedef Sampler<osgAnimation::OutQuadMotion> WidgetSampler;
|
||||||
|
|
||||||
struct ButtonFunctor: public WidgetSampler
|
struct ButtonFunctor: public WidgetSampler
|
||||||
{
|
{
|
||||||
float _direction;
|
float _direction;
|
||||||
float _previous;
|
float _previous;
|
||||||
|
|
||||||
const float _speed;
|
const float _speed;
|
||||||
|
|
||||||
ButtonFunctor(): _speed(5) { _direction = -_speed; _previous = 0;}
|
ButtonFunctor(): _speed(5) { _direction = -_speed; _previous = 0;}
|
||||||
|
|
||||||
bool enter(osgWidget::Event&)
|
bool enter(osgWidget::Event&)
|
||||||
{
|
{
|
||||||
_direction = _speed;
|
_direction = _speed;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool leave(osgWidget::Event&)
|
bool leave(osgWidget::Event&)
|
||||||
{
|
{
|
||||||
_direction = -_speed;
|
_direction = -_speed;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void update(osg::NodeVisitor* nv , osg::Drawable* geom)
|
void update(osg::NodeVisitor* nv , osg::Drawable* geom)
|
||||||
{
|
{
|
||||||
const osg::FrameStamp* f = nv->getFrameStamp();
|
const osg::FrameStamp* f = nv->getFrameStamp();
|
||||||
float dt = f->getSimulationTime() - _previous;
|
float dt = f->getSimulationTime() - _previous;
|
||||||
@@ -67,7 +67,7 @@ struct ButtonFunctor: public WidgetSampler
|
|||||||
void update(float t, osgWidget::Widget* w)
|
void update(float t, osgWidget::Widget* w)
|
||||||
{
|
{
|
||||||
if (!w) return;
|
if (!w) return;
|
||||||
_motion.update(t*_direction);
|
_motion.update(t*_direction);
|
||||||
float val = _motion.getValue()*0.5;
|
float val = _motion.getValue()*0.5;
|
||||||
val += 0.5;
|
val += 0.5;
|
||||||
if (val >= 1.0)
|
if (val >= 1.0)
|
||||||
@@ -76,7 +76,7 @@ struct ButtonFunctor: public WidgetSampler
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LabelFunctor: public WidgetSampler
|
struct LabelFunctor: public WidgetSampler
|
||||||
{
|
{
|
||||||
float _previous;
|
float _previous;
|
||||||
bool _active;
|
bool _active;
|
||||||
@@ -86,7 +86,7 @@ struct LabelFunctor: public WidgetSampler
|
|||||||
osgAnimation::OutCubicMotion _scaleSampler;
|
osgAnimation::OutCubicMotion _scaleSampler;
|
||||||
|
|
||||||
LabelFunctor():
|
LabelFunctor():
|
||||||
_fadeOutTime(1.5f)
|
_fadeOutTime(1.5f)
|
||||||
{
|
{
|
||||||
_previous = 0.0f;
|
_previous = 0.0f;
|
||||||
_active = false;
|
_active = false;
|
||||||
@@ -94,7 +94,7 @@ struct LabelFunctor: public WidgetSampler
|
|||||||
_scaleSampler = osgAnimation::OutCubicMotion(0.5, 1.0, 1.0);
|
_scaleSampler = osgAnimation::OutCubicMotion(0.5, 1.0, 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setActive(bool active)
|
void setActive(bool active)
|
||||||
{
|
{
|
||||||
_active = active;
|
_active = active;
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ struct LabelFunctor: public WidgetSampler
|
|||||||
_scaleSampler.reset();
|
_scaleSampler.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void update(osg::NodeVisitor* nv , osg::Drawable* geom)
|
void update(osg::NodeVisitor* nv , osg::Drawable* geom)
|
||||||
{
|
{
|
||||||
const osg::FrameStamp* f = nv->getFrameStamp();
|
const osg::FrameStamp* f = nv->getFrameStamp();
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ struct LabelFunctor: public WidgetSampler
|
|||||||
updateScale(dt, dynamic_cast<osgWidget::Label*>(geom));
|
updateScale(dt, dynamic_cast<osgWidget::Label*>(geom));
|
||||||
}
|
}
|
||||||
|
|
||||||
void update(float t, osgWidget::Label* w)
|
void update(float t, osgWidget::Label* w)
|
||||||
{
|
{
|
||||||
if(!w) return;
|
if(!w) return;
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ struct LabelFunctor: public WidgetSampler
|
|||||||
w->setFontColor(osg::Vec4(0.0f, 0.0f, 0.0f, (1.0f - val) * 0.7f));
|
w->setFontColor(osg::Vec4(0.0f, 0.0f, 0.0f, (1.0f - val) * 0.7f));
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateScale(float t, osgWidget::Label* w)
|
void updateScale(float t, osgWidget::Label* w)
|
||||||
{
|
{
|
||||||
_scaleSampler.update(t);
|
_scaleSampler.update(t);
|
||||||
float val = _scaleSampler.getValue();
|
float val = _scaleSampler.getValue();
|
||||||
@@ -146,14 +146,14 @@ struct LabelFunctor: public WidgetSampler
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct ListFunctor: public osg::NodeCallback
|
struct ListFunctor: public osg::NodeCallback
|
||||||
{
|
{
|
||||||
float _previous;
|
float _previous;
|
||||||
int _direction;
|
int _direction;
|
||||||
|
|
||||||
osgAnimation::InQuadMotion _transformSampler;
|
osgAnimation::InQuadMotion _transformSampler;
|
||||||
|
|
||||||
ListFunctor()
|
ListFunctor()
|
||||||
{
|
{
|
||||||
_direction = 1;
|
_direction = 1;
|
||||||
_previous = 0;
|
_previous = 0;
|
||||||
@@ -161,14 +161,14 @@ struct ListFunctor: public osg::NodeCallback
|
|||||||
_transformSampler.update(1.0f);
|
_transformSampler.update(1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void toggleShown()
|
void toggleShown()
|
||||||
{
|
{
|
||||||
if(_direction == 1) _direction = -1;
|
if(_direction == 1) _direction = -1;
|
||||||
|
|
||||||
else _direction = 1;
|
else _direction = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||||
{
|
{
|
||||||
const osg::FrameStamp* f = nv->getFrameStamp();
|
const osg::FrameStamp* f = nv->getFrameStamp();
|
||||||
|
|
||||||
@@ -195,13 +195,13 @@ struct ListFunctor: public osg::NodeCallback
|
|||||||
};
|
};
|
||||||
|
|
||||||
// This is a temporary hack to "prevent" dragging on Widgets and Windows.
|
// This is a temporary hack to "prevent" dragging on Widgets and Windows.
|
||||||
bool eatDrag(osgWidget::Event&)
|
bool eatDrag(osgWidget::Event&)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimtkViewerGUI::AnimtkViewerGUI(osgViewer::View* view, float w, float h, unsigned int mask):
|
AnimtkViewerGUI::AnimtkViewerGUI(osgViewer::View* view, float w, float h, unsigned int mask):
|
||||||
osgWidget::WindowManager(view, w, h, mask, 0)
|
osgWidget::WindowManager(view, w, h, mask, 0)
|
||||||
{
|
{
|
||||||
_createButtonBox();
|
_createButtonBox();
|
||||||
_createLabelBox();
|
_createLabelBox();
|
||||||
@@ -226,10 +226,10 @@ AnimtkViewerGUI::AnimtkViewerGUI(osgViewer::View* view, float w, float h, unsign
|
|||||||
_buttonBox->resizeAdd(0.0f, 10.0f);
|
_buttonBox->resizeAdd(0.0f, 10.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
osgWidget::Widget* AnimtkViewerGUI::_createButton(const std::string& name)
|
osgWidget::Widget* AnimtkViewerGUI::_createButton(const std::string& name)
|
||||||
{
|
{
|
||||||
osgWidget::Widget* b = new osgWidget::Widget(name, 64.0f, 64.0f);
|
osgWidget::Widget* b = new osgWidget::Widget(name, 64.0f, 64.0f);
|
||||||
|
|
||||||
if(!b) return 0;
|
if(!b) return 0;
|
||||||
|
|
||||||
b->setImage(IMAGE_PATH + name + ".png", true);
|
b->setImage(IMAGE_PATH + name + ".png", true);
|
||||||
@@ -237,7 +237,7 @@ osgWidget::Widget* AnimtkViewerGUI::_createButton(const std::string& name)
|
|||||||
|
|
||||||
ButtonFunctor* bt = new ButtonFunctor();
|
ButtonFunctor* bt = new ButtonFunctor();
|
||||||
b->setUpdateCallback(bt);
|
b->setUpdateCallback(bt);
|
||||||
|
|
||||||
b->addCallback(new osgWidget::Callback(&ButtonFunctor::enter, bt, osgWidget::EVENT_MOUSE_ENTER));
|
b->addCallback(new osgWidget::Callback(&ButtonFunctor::enter, bt, osgWidget::EVENT_MOUSE_ENTER));
|
||||||
b->addCallback(new osgWidget::Callback(&ButtonFunctor::leave, bt, osgWidget::EVENT_MOUSE_LEAVE));
|
b->addCallback(new osgWidget::Callback(&ButtonFunctor::leave, bt, osgWidget::EVENT_MOUSE_LEAVE));
|
||||||
b->addCallback(new osgWidget::Callback(&AnimtkViewerGUI::_buttonPush, this, osgWidget::EVENT_MOUSE_PUSH));
|
b->addCallback(new osgWidget::Callback(&AnimtkViewerGUI::_buttonPush, this, osgWidget::EVENT_MOUSE_PUSH));
|
||||||
@@ -246,7 +246,7 @@ osgWidget::Widget* AnimtkViewerGUI::_createButton(const std::string& name)
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AnimtkViewerGUI::_listMouseHover(osgWidget::Event& ev)
|
bool AnimtkViewerGUI::_listMouseHover(osgWidget::Event& ev)
|
||||||
{
|
{
|
||||||
osgWidget::Label* l = dynamic_cast<osgWidget::Label*>(ev.getWidget());
|
osgWidget::Label* l = dynamic_cast<osgWidget::Label*>(ev.getWidget());
|
||||||
|
|
||||||
@@ -259,13 +259,13 @@ bool AnimtkViewerGUI::_listMouseHover(osgWidget::Event& ev)
|
|||||||
else if(ev.type == osgWidget::EVENT_MOUSE_PUSH) {
|
else if(ev.type == osgWidget::EVENT_MOUSE_PUSH) {
|
||||||
AnimtkViewerModelController::instance().playByName(ev.getWidget()->getName());
|
AnimtkViewerModelController::instance().playByName(ev.getWidget()->getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
else return false;
|
else return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AnimtkViewerGUI::_buttonPush(osgWidget::Event& ev)
|
bool AnimtkViewerGUI::_buttonPush(osgWidget::Event& ev)
|
||||||
{
|
{
|
||||||
if(!ev.getWidget()) return false;
|
if(!ev.getWidget()) return false;
|
||||||
|
|
||||||
@@ -285,7 +285,7 @@ bool AnimtkViewerGUI::_buttonPush(osgWidget::Event& ev)
|
|||||||
|
|
||||||
else if(name == "stop") mc.stop();
|
else if(name == "stop") mc.stop();
|
||||||
|
|
||||||
else if(name == "next")
|
else if(name == "next")
|
||||||
{
|
{
|
||||||
mc.next();
|
mc.next();
|
||||||
|
|
||||||
@@ -293,21 +293,21 @@ bool AnimtkViewerGUI::_buttonPush(osgWidget::Event& ev)
|
|||||||
l->setLabel(mc.getCurrentAnimationName());
|
l->setLabel(mc.getCurrentAnimationName());
|
||||||
lf->setActive(true);
|
lf->setActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(name == "back")
|
else if(name == "back")
|
||||||
{
|
{
|
||||||
mc.previous();
|
mc.previous();
|
||||||
|
|
||||||
l->setFontColor(osg::Vec4(0.0f, 0.0f, 0.0f, 0.7f));
|
l->setFontColor(osg::Vec4(0.0f, 0.0f, 0.0f, 0.7f));
|
||||||
l->setLabel(mc.getCurrentAnimationName());
|
l->setLabel(mc.getCurrentAnimationName());
|
||||||
lf->setActive(true);
|
lf->setActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(name == "pause")
|
else if(name == "pause")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(name == "open")
|
else if(name == "open")
|
||||||
{
|
{
|
||||||
ListFunctor* lsf = dynamic_cast<ListFunctor*>(_listBox->getUpdateCallback());
|
ListFunctor* lsf = dynamic_cast<ListFunctor*>(_listBox->getUpdateCallback());
|
||||||
|
|
||||||
@@ -321,7 +321,7 @@ bool AnimtkViewerGUI::_buttonPush(osgWidget::Event& ev)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimtkViewerGUI::_createButtonBox()
|
void AnimtkViewerGUI::_createButtonBox()
|
||||||
{
|
{
|
||||||
_buttonBox = new osgWidget::Box("buttonBox", osgWidget::Box::HORIZONTAL);
|
_buttonBox = new osgWidget::Box("buttonBox", osgWidget::Box::HORIZONTAL);
|
||||||
|
|
||||||
@@ -345,12 +345,12 @@ void AnimtkViewerGUI::_createButtonBox()
|
|||||||
_buttonBox->addWidget(open);
|
_buttonBox->addWidget(open);
|
||||||
_buttonBox->addWidget(osg::clone(space, "space1", osg::CopyOp::DEEP_COPY_ALL));
|
_buttonBox->addWidget(osg::clone(space, "space1", osg::CopyOp::DEEP_COPY_ALL));
|
||||||
_buttonBox->getBackground()->setColor(0.0f, 0.0f, 0.0f, 0.7f);
|
_buttonBox->getBackground()->setColor(0.0f, 0.0f, 0.0f, 0.7f);
|
||||||
|
|
||||||
_buttonBox->setEventMask(osgWidget::EVENT_MASK_MOUSE_DRAG);
|
_buttonBox->setEventMask(osgWidget::EVENT_MASK_MOUSE_DRAG);
|
||||||
_buttonBox->addCallback(new osgWidget::Callback(&eatDrag, osgWidget::EVENT_MOUSE_DRAG));
|
_buttonBox->addCallback(new osgWidget::Callback(&eatDrag, osgWidget::EVENT_MOUSE_DRAG));
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimtkViewerGUI::_createListBox()
|
void AnimtkViewerGUI::_createListBox()
|
||||||
{
|
{
|
||||||
_listBox = new osgWidget::Box("listBox", osgWidget::Box::VERTICAL);
|
_listBox = new osgWidget::Box("listBox", osgWidget::Box::VERTICAL);
|
||||||
|
|
||||||
@@ -362,7 +362,7 @@ void AnimtkViewerGUI::_createListBox()
|
|||||||
AnimtkViewerModelController::AnimationMapVector::const_iterator i = amv.begin();
|
AnimtkViewerModelController::AnimationMapVector::const_iterator i = amv.begin();
|
||||||
i != amv.end();
|
i != amv.end();
|
||||||
i++
|
i++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
osgWidget::Label* label = new osgWidget::Label(*i);
|
osgWidget::Label* label = new osgWidget::Label(*i);
|
||||||
|
|
||||||
@@ -387,12 +387,12 @@ void AnimtkViewerGUI::_createListBox()
|
|||||||
_listBox->getBackground()->setColor(0.0f, 0.0f, 0.0f, 0.7f);
|
_listBox->getBackground()->setColor(0.0f, 0.0f, 0.0f, 0.7f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimtkViewerGUI::_createLabelBox()
|
void AnimtkViewerGUI::_createLabelBox()
|
||||||
{
|
{
|
||||||
_labelBox = new osgWidget::Box("labelBox", osgWidget::Box::VERTICAL);
|
_labelBox = new osgWidget::Box("labelBox", osgWidget::Box::VERTICAL);
|
||||||
|
|
||||||
osgWidget::Label* label = new osgWidget::Label("label");
|
osgWidget::Label* label = new osgWidget::Label("label");
|
||||||
|
|
||||||
label->setFont("fonts/Vera.ttf");
|
label->setFont("fonts/Vera.ttf");
|
||||||
label->setFontSize(50);
|
label->setFontSize(50);
|
||||||
label->setFontColor(0.0f, 0.0f, 0.0f, 0.7f);
|
label->setFontColor(0.0f, 0.0f, 0.0f, 0.7f);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* -*-c++-*-
|
/* -*-c++-*-
|
||||||
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
*
|
*
|
||||||
* Cedric Pinson <mornifle@plopbyte.net>
|
* Cedric Pinson <mornifle@plopbyte.net>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -32,7 +32,7 @@ AnimtkKeyEventHandler::AnimtkKeyEventHandler()
|
|||||||
_actionKeys[Prev] = '[';
|
_actionKeys[Prev] = '[';
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimtkKeyEventHandler::printUsage() const
|
void AnimtkKeyEventHandler::printUsage() const
|
||||||
{
|
{
|
||||||
std::cout << (char) _actionKeys.find(Help)->second << " for Help" << std::endl;
|
std::cout << (char) _actionKeys.find(Help)->second << " for Help" << std::endl;
|
||||||
std::cout << (char) _actionKeys.find(List)->second << " for List" << std::endl;
|
std::cout << (char) _actionKeys.find(List)->second << " for List" << std::endl;
|
||||||
@@ -46,13 +46,13 @@ bool AnimtkKeyEventHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIA
|
|||||||
osg::Object*, osg::NodeVisitor*)
|
osg::Object*, osg::NodeVisitor*)
|
||||||
{
|
{
|
||||||
AnimtkViewerModelController& mc = AnimtkViewerModelController::instance();
|
AnimtkViewerModelController& mc = AnimtkViewerModelController::instance();
|
||||||
if(ea.getEventType() == osgGA::GUIEventAdapter::KEYDOWN)
|
if(ea.getEventType() == osgGA::GUIEventAdapter::KEYDOWN)
|
||||||
{
|
{
|
||||||
if (ea.getKey() == _actionKeys[List]) return mc.list();
|
if (ea.getKey() == _actionKeys[List]) return mc.list();
|
||||||
else if (ea.getKey() == _actionKeys[Play]) return mc.play();
|
else if (ea.getKey() == _actionKeys[Play]) return mc.play();
|
||||||
else if (ea.getKey() == _actionKeys[Next]) return mc.next();
|
else if (ea.getKey() == _actionKeys[Next]) return mc.next();
|
||||||
else if (ea.getKey() == _actionKeys[Prev]) return mc.previous();
|
else if (ea.getKey() == _actionKeys[Prev]) return mc.previous();
|
||||||
else if (ea.getKey() == _actionKeys[Help])
|
else if (ea.getKey() == _actionKeys[Help])
|
||||||
{
|
{
|
||||||
printUsage();
|
printUsage();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -108,10 +108,10 @@ class ResetAtomicCounter : public osg::StateAttributeCallback
|
|||||||
osg::AtomicCounterBufferBinding * acbb = dynamic_cast<osg::AtomicCounterBufferBinding *>(sa);
|
osg::AtomicCounterBufferBinding * acbb = dynamic_cast<osg::AtomicCounterBufferBinding *>(sa);
|
||||||
if (acbb)
|
if (acbb)
|
||||||
{
|
{
|
||||||
osg::AtomicCounterBufferObject * acbo = dynamic_cast<osg::AtomicCounterBufferObject*>(acbb->getBufferObject());
|
osg::BufferData * acbd = acbb->getBufferData();
|
||||||
if (acbo && acbo->getBufferData(0))
|
if (acbd)
|
||||||
{
|
{
|
||||||
acbo->getBufferData(0)->dirty();
|
acbd->dirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -165,7 +165,7 @@ int main(int argc, char** argv)
|
|||||||
viewer.addEventHandler(new osgViewer::ScreenCaptureHandler);
|
viewer.addEventHandler(new osgViewer::ScreenCaptureHandler);
|
||||||
|
|
||||||
// load the data
|
// load the data
|
||||||
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
|
osg::ref_ptr<osg::Node> loadedModel = osgDB::readRefNodeFiles(arguments);
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
{
|
{
|
||||||
osg::Geometry * quad = osg::createTexturedQuadGeometry(osg::Vec3f(-2.0f, 0.0f, -2.0f),
|
osg::Geometry * quad = osg::createTexturedQuadGeometry(osg::Vec3f(-2.0f, 0.0f, -2.0f),
|
||||||
@@ -207,10 +207,10 @@ int main(int argc, char** argv)
|
|||||||
acboBlue->setUsage(GL_STREAM_COPY);
|
acboBlue->setUsage(GL_STREAM_COPY);
|
||||||
atomicCounterArrayBlue->setBufferObject(acboBlue.get());
|
atomicCounterArrayBlue->setBufferObject(acboBlue.get());
|
||||||
|
|
||||||
osg::ref_ptr<osg::AtomicCounterBufferBinding> acbbRedAndGreen = new osg::AtomicCounterBufferBinding(0, acboRedAndGreen.get(), 0, sizeof(GLuint)*3);
|
osg::ref_ptr<osg::AtomicCounterBufferBinding> acbbRedAndGreen = new osg::AtomicCounterBufferBinding(0, atomicCounterArrayRedAndGreen.get(), 0, sizeof(GLuint)*3);
|
||||||
ss->setAttributeAndModes(acbbRedAndGreen.get());
|
ss->setAttributeAndModes(acbbRedAndGreen.get());
|
||||||
|
|
||||||
osg::ref_ptr<osg::AtomicCounterBufferBinding> acbbBlue = new osg::AtomicCounterBufferBinding(2, acboBlue.get(), 0, sizeof(GLuint));
|
osg::ref_ptr<osg::AtomicCounterBufferBinding> acbbBlue = new osg::AtomicCounterBufferBinding(2, atomicCounterArrayBlue.get(), 0, sizeof(GLuint));
|
||||||
ss->setAttributeAndModes(acbbBlue.get());
|
ss->setAttributeAndModes(acbbBlue.get());
|
||||||
|
|
||||||
acbbRedAndGreen->setUpdateCallback(new ResetAtomicCounter);
|
acbbRedAndGreen->setUpdateCallback(new ResetAtomicCounter);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
#include <osgViewer/Viewer>
|
#include <osgViewer/Viewer>
|
||||||
#include <osgViewer/ViewerEventHandlers>
|
#include <osgViewer/ViewerEventHandlers>
|
||||||
#include <osgViewer/Renderer>
|
#include <osgViewer/Renderer>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ public:
|
|||||||
osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN),
|
osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN),
|
||||||
_foundNode(0)
|
_foundNode(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void apply(osg::Node& node)
|
void apply(osg::Node& node)
|
||||||
{
|
{
|
||||||
T* result = dynamic_cast<T*>(&node);
|
T* result = dynamic_cast<T*>(&node);
|
||||||
@@ -50,7 +50,7 @@ public:
|
|||||||
else
|
else
|
||||||
traverse(node);
|
traverse(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
T* _foundNode;
|
T* _foundNode;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -62,21 +62,21 @@ T* findTopMostNodeOfType(osg::Node* node)
|
|||||||
|
|
||||||
FindTopMostNodeOfTypeVisitor<T> fnotv;
|
FindTopMostNodeOfTypeVisitor<T> fnotv;
|
||||||
node->accept(fnotv);
|
node->accept(fnotv);
|
||||||
|
|
||||||
return fnotv._foundNode;
|
return fnotv._foundNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Capture the frame buffer and write image to disk*/
|
/** Capture the frame buffer and write image to disk*/
|
||||||
class WindowCaptureCallback : public osg::Camera::DrawCallback
|
class WindowCaptureCallback : public osg::Camera::DrawCallback
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WindowCaptureCallback(GLenum readBuffer, const std::string& name):
|
WindowCaptureCallback(GLenum readBuffer, const std::string& name):
|
||||||
_readBuffer(readBuffer),
|
_readBuffer(readBuffer),
|
||||||
_fileName(name)
|
_fileName(name)
|
||||||
{
|
{
|
||||||
_image = new osg::Image;
|
_image = new osg::Image;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void operator () (osg::RenderInfo& renderInfo) const
|
virtual void operator () (osg::RenderInfo& renderInfo) const
|
||||||
{
|
{
|
||||||
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
|
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
|
||||||
@@ -93,9 +93,9 @@ public:
|
|||||||
|
|
||||||
if (gc->getTraits()->alpha)
|
if (gc->getTraits()->alpha)
|
||||||
pixelFormat = GL_RGBA;
|
pixelFormat = GL_RGBA;
|
||||||
else
|
else
|
||||||
pixelFormat = GL_RGB;
|
pixelFormat = GL_RGB;
|
||||||
|
|
||||||
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
|
#if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
|
||||||
if (pixelFormat == GL_RGB)
|
if (pixelFormat == GL_RGB)
|
||||||
{
|
{
|
||||||
@@ -118,7 +118,7 @@ public:
|
|||||||
|
|
||||||
_image->readPixels(0, 0, width, height, pixelFormat, GL_UNSIGNED_BYTE);
|
_image->readPixels(0, 0, width, height, pixelFormat, GL_UNSIGNED_BYTE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_fileName.empty())
|
if (!_fileName.empty())
|
||||||
{
|
{
|
||||||
std::cout << "Writing to: " << _fileName << std::endl;
|
std::cout << "Writing to: " << _fileName << std::endl;
|
||||||
@@ -126,7 +126,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
GLenum _readBuffer;
|
GLenum _readBuffer;
|
||||||
std::string _fileName;
|
std::string _fileName;
|
||||||
osg::ref_ptr<osg::Image> _image;
|
osg::ref_ptr<osg::Image> _image;
|
||||||
@@ -138,7 +138,7 @@ protected:
|
|||||||
class CustomRenderer : public osgViewer::Renderer
|
class CustomRenderer : public osgViewer::Renderer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CustomRenderer(osg::Camera* camera)
|
CustomRenderer(osg::Camera* camera)
|
||||||
: osgViewer::Renderer(camera),
|
: osgViewer::Renderer(camera),
|
||||||
_cullOnly(true)
|
_cullOnly(true)
|
||||||
{
|
{
|
||||||
@@ -162,19 +162,19 @@ public:
|
|||||||
{
|
{
|
||||||
osgUtil::SceneView* sceneView = _sceneView[0].get();
|
osgUtil::SceneView* sceneView = _sceneView[0].get();
|
||||||
if (!sceneView || _done ) return;
|
if (!sceneView || _done ) return;
|
||||||
|
|
||||||
updateSceneView(sceneView);
|
updateSceneView(sceneView);
|
||||||
|
|
||||||
osgViewer::View* view = dynamic_cast<osgViewer::View*>(_camera->getView());
|
osgViewer::View* view = dynamic_cast<osgViewer::View*>(_camera->getView());
|
||||||
if (view) sceneView->setFusionDistance(view->getFusionDistanceMode(), view->getFusionDistanceValue());
|
if (view) sceneView->setFusionDistance(view->getFusionDistanceMode(), view->getFusionDistanceValue());
|
||||||
|
|
||||||
sceneView->inheritCullSettings(*(sceneView->getCamera()));
|
sceneView->inheritCullSettings(*(sceneView->getCamera()));
|
||||||
sceneView->cull();
|
sceneView->cull();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _cullOnly;
|
bool _cullOnly;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//===============================================================
|
//===============================================================
|
||||||
// MAIN
|
// MAIN
|
||||||
@@ -245,7 +245,7 @@ int main( int argc, char **argv )
|
|||||||
traits->depth = src_traits->depth;
|
traits->depth = src_traits->depth;
|
||||||
traits->pbuffer = true;
|
traits->pbuffer = true;
|
||||||
} else {
|
} else {
|
||||||
//viewer would use fullscreen size (unknown here) pbuffer will use 4096 x4096 (or best avaiable)
|
//viewer would use fullscreen size (unknown here) pbuffer will use 4096 x4096 (or best available)
|
||||||
traits->width = 1 << 12;
|
traits->width = 1 << 12;
|
||||||
traits->height = 1 << 12;
|
traits->height = 1 << 12;
|
||||||
traits->pbuffer = true;
|
traits->pbuffer = true;
|
||||||
@@ -287,8 +287,8 @@ int main( int argc, char **argv )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// load the data
|
// load the data
|
||||||
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
|
osg::ref_ptr<osg::Node> loadedModel = osgDB::readRefNodeFiles(arguments);
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
{
|
{
|
||||||
std::cout << arguments.getApplicationName() <<": No data loaded" << std::endl;
|
std::cout << arguments.getApplicationName() <<": No data loaded" << std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
@@ -309,7 +309,7 @@ int main( int argc, char **argv )
|
|||||||
{
|
{
|
||||||
osg::CoordinateSystemNode* csn = findTopMostNodeOfType<osg::CoordinateSystemNode>(loadedModel.get());
|
osg::CoordinateSystemNode* csn = findTopMostNodeOfType<osg::CoordinateSystemNode>(loadedModel.get());
|
||||||
if(!csn) return 1;
|
if(!csn) return 1;
|
||||||
|
|
||||||
// Compute eye point in world coordiantes
|
// Compute eye point in world coordiantes
|
||||||
osg::Vec3d eye;
|
osg::Vec3d eye;
|
||||||
csn->getEllipsoidModel()->convertLatLongHeightToXYZ(lat, lon, alt, eye.x(), eye.y(), eye.z());
|
csn->getEllipsoidModel()->convertLatLongHeightToXYZ(lat, lon, alt, eye.x(), eye.y(), eye.z());
|
||||||
@@ -331,11 +331,11 @@ int main( int argc, char **argv )
|
|||||||
osg::Vec3d up_cross_tangent = up ^ tangent;
|
osg::Vec3d up_cross_tangent = up ^ tangent;
|
||||||
osg::Matrixd incline_matrix = osg::Matrixd::rotate(incline, up_cross_tangent);
|
osg::Matrixd incline_matrix = osg::Matrixd::rotate(incline, up_cross_tangent);
|
||||||
osg::Vec3d target = incline_matrix.preMult(tangent);
|
osg::Vec3d target = incline_matrix.preMult(tangent);
|
||||||
|
|
||||||
// Roll by rotating the up vector around the target vector ...
|
// Roll by rotating the up vector around the target vector ...
|
||||||
osg::Matrixd roll_matrix = incline_matrix * osg::Matrixd::rotate(roll, target);
|
osg::Matrixd roll_matrix = incline_matrix * osg::Matrixd::rotate(roll, target);
|
||||||
up = roll_matrix.preMult(up);
|
up = roll_matrix.preMult(up);
|
||||||
|
|
||||||
viewer.getCamera()->setViewMatrixAsLookAt(eye, eye+target, up);
|
viewer.getCamera()->setViewMatrixAsLookAt(eye, eye+target, up);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -349,10 +349,10 @@ int main( int argc, char **argv )
|
|||||||
keyswitchManipulator->addMatrixManipulator( '3', "Drive", new osgGA::DriveManipulator() );
|
keyswitchManipulator->addMatrixManipulator( '3', "Drive", new osgGA::DriveManipulator() );
|
||||||
keyswitchManipulator->addMatrixManipulator( '4', "Terrain", new osgGA::TerrainManipulator() );
|
keyswitchManipulator->addMatrixManipulator( '4', "Terrain", new osgGA::TerrainManipulator() );
|
||||||
|
|
||||||
viewer.setCameraManipulator( keyswitchManipulator.get() );
|
viewer.setCameraManipulator( keyswitchManipulator.get() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Optimize DatabasePager for auto-capture
|
// Optimize DatabasePager for auto-capture
|
||||||
osgDB::DatabasePager* pager = viewer.getDatabasePager();
|
osgDB::DatabasePager* pager = viewer.getDatabasePager();
|
||||||
pager->setDoPreCompile(false);
|
pager->setDoPreCompile(false);
|
||||||
@@ -374,9 +374,9 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
// Initiate the first PagedLOD request
|
// Initiate the first PagedLOD request
|
||||||
viewer.frame();
|
viewer.frame();
|
||||||
|
|
||||||
osg::Timer_t beforeLoadTick = osg::Timer::instance()->tick();
|
osg::Timer_t beforeLoadTick = osg::Timer::instance()->tick();
|
||||||
|
|
||||||
// Keep updating and culling until full level of detail is reached
|
// Keep updating and culling until full level of detail is reached
|
||||||
while(!viewer.done() && pager->getRequestsInProgress())
|
while(!viewer.done() && pager->getRequestsInProgress())
|
||||||
{
|
{
|
||||||
@@ -385,14 +385,14 @@ int main( int argc, char **argv )
|
|||||||
viewer.renderingTraversals();
|
viewer.renderingTraversals();
|
||||||
}
|
}
|
||||||
// std::cout<<std::endl;
|
// std::cout<<std::endl;
|
||||||
|
|
||||||
osg::Timer_t afterLoadTick = osg::Timer::instance()->tick();
|
osg::Timer_t afterLoadTick = osg::Timer::instance()->tick();
|
||||||
std::cout<<"Load and Compile time = "<<osg::Timer::instance()->delta_s(beforeLoadTick, afterLoadTick)<<" seconds"<<std::endl;
|
std::cout<<"Load and Compile time = "<<osg::Timer::instance()->delta_s(beforeLoadTick, afterLoadTick)<<" seconds"<<std::endl;
|
||||||
|
|
||||||
// Do cull and draw to render the scene correctly
|
// Do cull and draw to render the scene correctly
|
||||||
customRenderer->setCullOnly(false);
|
customRenderer->setCullOnly(false);
|
||||||
|
|
||||||
|
|
||||||
//--- Capture the image!!! ---
|
//--- Capture the image!!! ---
|
||||||
if (!activeMode)
|
if (!activeMode)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,7 +18,9 @@
|
|||||||
|
|
||||||
#include <osgUtil/Optimizer>
|
#include <osgUtil/Optimizer>
|
||||||
#include <osgDB/ReadFile>
|
#include <osgDB/ReadFile>
|
||||||
#include <osgViewer/Viewer>
|
#include <osgGA/TrackballManipulator>
|
||||||
|
#include <osgViewer/ViewerEventHandlers>
|
||||||
|
#include <osgViewer/CompositeViewer>
|
||||||
|
|
||||||
#include <osg/Material>
|
#include <osg/Material>
|
||||||
#include <osg/Geode>
|
#include <osg/Geode>
|
||||||
@@ -193,13 +195,125 @@ osg::Node* createScene()
|
|||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int, char**)
|
osgViewer::View* createView(osg::ref_ptr<osg::Node> scenegraph, osg::ref_ptr<osg::GraphicsContext> gc, unsigned int x, unsigned int y, unsigned int width, unsigned int height)
|
||||||
{
|
{
|
||||||
// construct the viewer.
|
OSG_NOTICE<<"createView(....,x="<<x<<", y="<<y<<", width="<<width<<", height="<<height<<")"<<std::endl;
|
||||||
osgViewer::Viewer viewer;
|
|
||||||
|
|
||||||
// set the scene to render
|
if (!gc)
|
||||||
viewer.setSceneData(createScene());
|
{
|
||||||
|
osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits;
|
||||||
|
traits->x = x;
|
||||||
|
traits->y = y;
|
||||||
|
traits->width = width;
|
||||||
|
traits->height = height;
|
||||||
|
traits->windowDecoration = true;
|
||||||
|
traits->doubleBuffer = true;
|
||||||
|
traits->sharedContext = 0;
|
||||||
|
|
||||||
|
gc = osg::GraphicsContext::createGraphicsContext(traits.get());
|
||||||
|
if (!gc)
|
||||||
|
{
|
||||||
|
osg::notify(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<<std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
x = 0;
|
||||||
|
y = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
osgViewer::View* view = new osgViewer::View;
|
||||||
|
view->getCamera()->setGraphicsContext(gc.get());
|
||||||
|
view->getCamera()->setViewport(new osg::Viewport(x, y, width, height));
|
||||||
|
//view->getCamera()->setProjectionMatrixAsPerspective(30.0, double(width) / double(height), 1.0, 1000.0);
|
||||||
|
view->setCameraManipulator(new osgGA::TrackballManipulator);
|
||||||
|
view->setSceneData(scenegraph);
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
osg::ArgumentParser arguments(&argc, argv);
|
||||||
|
|
||||||
|
// construct the viewer.
|
||||||
|
osgViewer::CompositeViewer viewer(arguments);
|
||||||
|
|
||||||
|
|
||||||
|
// create the scene graph that contains osg::AutoTransform nodes, see about for implementation details
|
||||||
|
osg::ref_ptr<osg::Node> scenegraph = createScene();
|
||||||
|
|
||||||
|
unsigned int numViews = 1;
|
||||||
|
while (arguments.read("-n",numViews)) {}
|
||||||
|
|
||||||
|
bool windows = false;
|
||||||
|
while (arguments.read("-w")) { windows = true; }
|
||||||
|
|
||||||
|
if (numViews<=1)
|
||||||
|
{
|
||||||
|
osgViewer::View* view = new osgViewer::View;
|
||||||
|
view->setUpViewAcrossAllScreens();
|
||||||
|
view->setSceneData(scenegraph.get());
|
||||||
|
view->setCameraManipulator(new osgGA::TrackballManipulator);
|
||||||
|
view->addEventHandler( new osgViewer::StatsHandler );
|
||||||
|
viewer.addView(view);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();
|
||||||
|
if (!wsi)
|
||||||
|
{
|
||||||
|
osg::notify(osg::NOTICE)<<"Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int width, height;
|
||||||
|
wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height);
|
||||||
|
|
||||||
|
unsigned int x=0, y=0;
|
||||||
|
while(arguments.read("--window", x, y, width, height)) {}
|
||||||
|
|
||||||
|
osg::ref_ptr<osg::GraphicsContext> gc;
|
||||||
|
if (!windows)
|
||||||
|
{
|
||||||
|
osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits;
|
||||||
|
traits->x = x;
|
||||||
|
traits->y = y;
|
||||||
|
traits->width = width;
|
||||||
|
traits->height = height;
|
||||||
|
traits->windowDecoration = true;
|
||||||
|
traits->doubleBuffer = true;
|
||||||
|
traits->sharedContext = 0;
|
||||||
|
|
||||||
|
gc = osg::GraphicsContext::createGraphicsContext(traits.get());
|
||||||
|
if (!gc)
|
||||||
|
{
|
||||||
|
osg::notify(osg::NOTICE)<<" GraphicsWindow has not been created successfully."<<std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (numViews==2)
|
||||||
|
{
|
||||||
|
viewer.addView(createView(scenegraph, gc, 0, 0, width/2, height));
|
||||||
|
viewer.addView(createView(scenegraph, gc, width/2, 0, width/2, height));
|
||||||
|
}
|
||||||
|
else if (numViews==3)
|
||||||
|
{
|
||||||
|
viewer.addView(createView(scenegraph, gc, 0, 0, width/2, height/2));
|
||||||
|
viewer.addView(createView(scenegraph, gc, width/2, 0, width/2, height/2));
|
||||||
|
viewer.addView(createView(scenegraph, gc, 0, height/2, width, height/2));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
viewer.addView(createView(scenegraph, gc, 0, 0, width/2, height/2));
|
||||||
|
viewer.addView(createView(scenegraph, gc, width/2, 0, width/2, height/2));
|
||||||
|
viewer.addView(createView(scenegraph, gc, 0, height/2, width/2, height/2));
|
||||||
|
viewer.addView(createView(scenegraph, gc, width/2, height/2, width/2, height/2));
|
||||||
|
}
|
||||||
|
|
||||||
|
viewer.getView(0)->addEventHandler( new osgViewer::StatsHandler );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// run the viewers frame loop
|
// run the viewers frame loop
|
||||||
return viewer.run();
|
return viewer.run();
|
||||||
|
|||||||
@@ -42,10 +42,10 @@
|
|||||||
typedef std::vector< osg::ref_ptr<osg::Image> > ImageList;
|
typedef std::vector< osg::ref_ptr<osg::Image> > ImageList;
|
||||||
|
|
||||||
/** create quad at specified position. */
|
/** create quad at specified position. */
|
||||||
osg::Drawable* createSquare(const osg::Vec3& corner,const osg::Vec3& width,const osg::Vec3& height, osg::Image* image=NULL)
|
osg::Drawable* createSquare(const osg::Vec3& corner,const osg::Vec3& width,const osg::Vec3& height, osg::ref_ptr<osg::Image> image)
|
||||||
{
|
{
|
||||||
// set up the Geometry.
|
// set up the Geometry.
|
||||||
osg::Geometry* geom = new osg::Geometry;
|
osg::ref_ptr<osg::Geometry> geom = new osg::Geometry;
|
||||||
|
|
||||||
osg::Vec3Array* coords = new osg::Vec3Array(4);
|
osg::Vec3Array* coords = new osg::Vec3Array(4);
|
||||||
(*coords)[0] = corner;
|
(*coords)[0] = corner;
|
||||||
@@ -80,13 +80,13 @@ osg::Drawable* createSquare(const osg::Vec3& corner,const osg::Vec3& width,const
|
|||||||
geom->setStateSet(stateset);
|
geom->setStateSet(stateset);
|
||||||
}
|
}
|
||||||
|
|
||||||
return geom;
|
return geom.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Drawable* createAxis(const osg::Vec3& corner,const osg::Vec3& xdir,const osg::Vec3& ydir,const osg::Vec3& zdir)
|
osg::Drawable* createAxis(const osg::Vec3& corner,const osg::Vec3& xdir,const osg::Vec3& ydir,const osg::Vec3& zdir)
|
||||||
{
|
{
|
||||||
// set up the Geometry.
|
// set up the Geometry.
|
||||||
osg::Geometry* geom = new osg::Geometry;
|
osg::ref_ptr<osg::Geometry> geom = new osg::Geometry;
|
||||||
|
|
||||||
osg::Vec3Array* coords = new osg::Vec3Array(6);
|
osg::Vec3Array* coords = new osg::Vec3Array(6);
|
||||||
(*coords)[0] = corner;
|
(*coords)[0] = corner;
|
||||||
@@ -121,20 +121,20 @@ osg::Drawable* createAxis(const osg::Vec3& corner,const osg::Vec3& xdir,const os
|
|||||||
stateset->setMode(GL_LIGHTING,osg::StateAttribute::OFF);
|
stateset->setMode(GL_LIGHTING,osg::StateAttribute::OFF);
|
||||||
geom->setStateSet(stateset);
|
geom->setStateSet(stateset);
|
||||||
|
|
||||||
return geom;
|
return geom.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Node* createModel()
|
osg::ref_ptr<osg::Node> createModel()
|
||||||
{
|
{
|
||||||
|
|
||||||
// create the root node which will hold the model.
|
// create the root node which will hold the model.
|
||||||
osg::Group* root = new osg::Group();
|
osg::ref_ptr<osg::Group> root = new osg::Group();
|
||||||
|
|
||||||
// add the drawable into a single geode to be shared...
|
// add the drawable into a single geode to be shared...
|
||||||
osg::Billboard* center = new osg::Billboard();
|
osg::Billboard* center = new osg::Billboard();
|
||||||
center->setMode(osg::Billboard::POINT_ROT_EYE);
|
center->setMode(osg::Billboard::POINT_ROT_EYE);
|
||||||
center->addDrawable(
|
center->addDrawable(
|
||||||
createSquare(osg::Vec3(-0.5f,0.0f,-0.5f),osg::Vec3(1.0f,0.0f,0.0f),osg::Vec3(0.0f,0.0f,1.0f),osgDB::readImageFile("Images/reflect.rgb")),
|
createSquare(osg::Vec3(-0.5f,0.0f,-0.5f),osg::Vec3(1.0f,0.0f,0.0f),osg::Vec3(0.0f,0.0f,1.0f),osgDB::readRefImageFile("Images/reflect.rgb")),
|
||||||
osg::Vec3(0.0f,0.0f,0.0f));
|
osg::Vec3(0.0f,0.0f,0.0f));
|
||||||
|
|
||||||
osg::Billboard* x_arrow = new osg::Billboard();
|
osg::Billboard* x_arrow = new osg::Billboard();
|
||||||
@@ -142,7 +142,7 @@ osg::Node* createModel()
|
|||||||
x_arrow->setAxis(osg::Vec3(1.0f,0.0f,0.0f));
|
x_arrow->setAxis(osg::Vec3(1.0f,0.0f,0.0f));
|
||||||
x_arrow->setNormal(osg::Vec3(0.0f,-1.0f,0.0f));
|
x_arrow->setNormal(osg::Vec3(0.0f,-1.0f,0.0f));
|
||||||
x_arrow->addDrawable(
|
x_arrow->addDrawable(
|
||||||
createSquare(osg::Vec3(-0.5f,0.0f,-0.5f),osg::Vec3(1.0f,0.0f,0.0f),osg::Vec3(0.0f,0.0f,1.0f),osgDB::readImageFile("Cubemap_axis/posx.png")),
|
createSquare(osg::Vec3(-0.5f,0.0f,-0.5f),osg::Vec3(1.0f,0.0f,0.0f),osg::Vec3(0.0f,0.0f,1.0f),osgDB::readRefImageFile("Cubemap_axis/posx.png")),
|
||||||
osg::Vec3(5.0f,0.0f,0.0f));
|
osg::Vec3(5.0f,0.0f,0.0f));
|
||||||
|
|
||||||
osg::Billboard* y_arrow = new osg::Billboard();
|
osg::Billboard* y_arrow = new osg::Billboard();
|
||||||
@@ -150,7 +150,7 @@ osg::Node* createModel()
|
|||||||
y_arrow->setAxis(osg::Vec3(0.0f,1.0f,0.0f));
|
y_arrow->setAxis(osg::Vec3(0.0f,1.0f,0.0f));
|
||||||
y_arrow->setNormal(osg::Vec3(1.0f,0.0f,0.0f));
|
y_arrow->setNormal(osg::Vec3(1.0f,0.0f,0.0f));
|
||||||
y_arrow->addDrawable(
|
y_arrow->addDrawable(
|
||||||
createSquare(osg::Vec3(0.0f,-0.5f,-0.5f),osg::Vec3(0.0f,1.0f,0.0f),osg::Vec3(0.0f,0.0f,1.0f),osgDB::readImageFile("Cubemap_axis/posy.png")),
|
createSquare(osg::Vec3(0.0f,-0.5f,-0.5f),osg::Vec3(0.0f,1.0f,0.0f),osg::Vec3(0.0f,0.0f,1.0f),osgDB::readRefImageFile("Cubemap_axis/posy.png")),
|
||||||
osg::Vec3(0.0f,5.0f,0.0f));
|
osg::Vec3(0.0f,5.0f,0.0f));
|
||||||
|
|
||||||
osg::Billboard* z_arrow = new osg::Billboard();
|
osg::Billboard* z_arrow = new osg::Billboard();
|
||||||
@@ -158,7 +158,7 @@ osg::Node* createModel()
|
|||||||
z_arrow->setAxis(osg::Vec3(0.0f,0.0f,1.0f));
|
z_arrow->setAxis(osg::Vec3(0.0f,0.0f,1.0f));
|
||||||
z_arrow->setNormal(osg::Vec3(0.0f,-1.0f,0.0f));
|
z_arrow->setNormal(osg::Vec3(0.0f,-1.0f,0.0f));
|
||||||
z_arrow->addDrawable(
|
z_arrow->addDrawable(
|
||||||
createSquare(osg::Vec3(-0.5f,0.0f,-0.5f),osg::Vec3(1.0f,0.0f,0.0f),osg::Vec3(0.0f,0.0f,1.0f),osgDB::readImageFile("Cubemap_axis/posz.png")),
|
createSquare(osg::Vec3(-0.5f,0.0f,-0.5f),osg::Vec3(1.0f,0.0f,0.0f),osg::Vec3(0.0f,0.0f,1.0f),osgDB::readRefImageFile("Cubemap_axis/posz.png")),
|
||||||
osg::Vec3(0.0f,0.0f,5.0f));
|
osg::Vec3(0.0f,0.0f,5.0f));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
2
examples/osgbindlesstext/CMakeLists.txt
Normal file
2
examples/osgbindlesstext/CMakeLists.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
SET(TARGET_SRC osgbindlesstext.cpp )
|
||||||
|
SETUP_EXAMPLE(osgbindlesstext)
|
||||||
599
examples/osgbindlesstext/osgbindlesstext.cpp
Normal file
599
examples/osgbindlesstext/osgbindlesstext.cpp
Normal file
@@ -0,0 +1,599 @@
|
|||||||
|
/* OpenSceneGraph example, osgbindlesstex.
|
||||||
|
*
|
||||||
|
* 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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
///\author David A Heitbrink
|
||||||
|
/// This is an example implementation of the use of bindless textures.
|
||||||
|
/// "bindless" textures are relatively simple concept, basically
|
||||||
|
/// you get a texture handle, then ask the driver to keep said
|
||||||
|
/// handle resident.
|
||||||
|
///
|
||||||
|
/// Once the texture has been made resident, we need to upload
|
||||||
|
/// the handle (a 64 bit unsigned int) to the shader. This can
|
||||||
|
/// be done in a number of ways, through attributes, uniform
|
||||||
|
/// buffer objects, shader buffer objects or just plain uniforms.
|
||||||
|
///
|
||||||
|
/// The basic point of the bindless texture is to remove the need
|
||||||
|
/// to bind a new texture every time we want to render something
|
||||||
|
/// with a different texture. Generally speaking in broad terms
|
||||||
|
/// driver overhead tends to be a huge bottle neck on modern
|
||||||
|
/// hardware (as of late 2016). By using bindless textures
|
||||||
|
/// we can remove a lot of calls to the driver to switch active
|
||||||
|
/// textures while rendering. What this also allows us to do
|
||||||
|
/// is to consolidate more objects + draw states as we do
|
||||||
|
/// not need to change textures, this save us a lot of calls to
|
||||||
|
/// the driver.
|
||||||
|
///
|
||||||
|
/// This example combines instancing with bindless textures
|
||||||
|
/// to draw 1000 cubes, each with a unique texture. This is
|
||||||
|
/// a pretty simplified example, where each instance ID is
|
||||||
|
/// used as a index into the array of textures.
|
||||||
|
///
|
||||||
|
/// One of the powerful things about bindless textures is it allows
|
||||||
|
/// many more objects to be combined into a single drawable.
|
||||||
|
/// However to do this you may need to add an attribute to
|
||||||
|
/// use an index into the array of texture handles, and not
|
||||||
|
/// just use the instance ID like in this example.
|
||||||
|
|
||||||
|
#include <osg/Depth>
|
||||||
|
#include <osg/Geode>
|
||||||
|
#include <osg/Geometry>
|
||||||
|
#include <osg/Material>
|
||||||
|
#include <osg/Math>
|
||||||
|
#include <osg/MatrixTransform>
|
||||||
|
#include <osg/PolygonOffset>
|
||||||
|
#include <osg/Projection>
|
||||||
|
#include <osg/ShapeDrawable>
|
||||||
|
#include <osg/StateSet>
|
||||||
|
#include <osg/Switch>
|
||||||
|
#include <osg/Texture2D>
|
||||||
|
#include <osg/TextureBuffer>
|
||||||
|
#include <osg/Image>
|
||||||
|
#include <osg/TexEnv>
|
||||||
|
#include <osg/VertexProgram>
|
||||||
|
#include <osg/FragmentProgram>
|
||||||
|
#include <osg/GLExtensions>
|
||||||
|
#include <osg/ContextData>
|
||||||
|
|
||||||
|
#include <osg/TextureBuffer>
|
||||||
|
#include <osg/BufferIndexBinding>
|
||||||
|
|
||||||
|
#include <osgDB/ReadFile>
|
||||||
|
#include <osgDB/FileUtils>
|
||||||
|
|
||||||
|
|
||||||
|
#include <osgText/Text>
|
||||||
|
|
||||||
|
#include <osgViewer/Viewer>
|
||||||
|
#include <osgViewer/ViewerEventHandlers>
|
||||||
|
|
||||||
|
#include <osgGA/StateSetManipulator>
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#include <sstream>
|
||||||
|
//Hard coded constant for number unique textures
|
||||||
|
const int TextureCount = 1000;
|
||||||
|
// To use bindless textures, we need to tell the GPU to
|
||||||
|
// enable the use of 64 bit integers and bindless textures
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// At this time (late 2016) NVidia drivers seem to dislike
|
||||||
|
// the ARB, GL_ARB_bindless_texture, if you do not have a
|
||||||
|
// NVidia driver, you will most likely have to change:
|
||||||
|
// GL_NV_gpu_shader5
|
||||||
|
// to:
|
||||||
|
// GL_ARB_gpu_shader5
|
||||||
|
|
||||||
|
//the XXX is so we can replace it with a string from TextureCount
|
||||||
|
std::string vertShader=
|
||||||
|
"#version 450 compatibility \n"
|
||||||
|
"#extension GL_ARB_bindless_texture : require \n"
|
||||||
|
"#extension GL_NV_gpu_shader5 : require // uint64_t \n"
|
||||||
|
"//#extension GL_ARB_gpu_shader5 : require // uint64_t \n"
|
||||||
|
"//#extension GL_ARB_gpu_shader_int64: require // uint64_t \n"
|
||||||
|
"in float osg_FrameTime; \n"
|
||||||
|
"out vec2 TexCoord; \n"
|
||||||
|
"flat out int textureIndex; \n"
|
||||||
|
"void main() { \n"
|
||||||
|
" mat4 scale =mat4(0.01, 0.00, 0.00, 0.00, \n"
|
||||||
|
" 0.00, 0.01, 0.00, 0.00, \n"
|
||||||
|
" 0.00, 0.00, 0.01, 0.00, \n"
|
||||||
|
" 0.00, 0.00, 0.00, 1.00); \n"
|
||||||
|
" vec4 pos = gl_Vertex*scale; \n"
|
||||||
|
" pos.x += ((gl_InstanceID%100)/10)*0.015-0.075; \n"
|
||||||
|
" pos.y += (gl_InstanceID/100)*0.015 - 0.075; \n"
|
||||||
|
" pos.z += (gl_InstanceID%10)*0.015 - 0.075; \n"
|
||||||
|
" pos.w = 1; \n"
|
||||||
|
" gl_Position = gl_ModelViewProjectionMatrix*pos; \n"
|
||||||
|
" TexCoord = gl_MultiTexCoord0.xy; \n"
|
||||||
|
" textureIndex = gl_InstanceID%XXX; \n"
|
||||||
|
"} \n"
|
||||||
|
;
|
||||||
|
//we could setup tex to be of type sampler2D, and not have to do
|
||||||
|
//the type conversion, but I wanted to added code to test if tex
|
||||||
|
//had a value set.
|
||||||
|
//If we get a red cube, we are not getting our handle from our UBO,
|
||||||
|
//if we get a black cube, then we are having an issue with the
|
||||||
|
//texture handle itself
|
||||||
|
std::string fragShader =
|
||||||
|
"#version 450 compatibility \n"
|
||||||
|
"#extension GL_ARB_bindless_texture : require \n"
|
||||||
|
"#extension GL_NV_gpu_shader5 : require // uint64_t \n"
|
||||||
|
"//#extension GL_ARB_gpu_shader5 : require // uint64_t \n"
|
||||||
|
"//#extension GL_ARB_gpu_shader_int64: require // uint64_t \n"
|
||||||
|
"uniform sampler2D TextureId; \n"
|
||||||
|
"in vec2 TexCoord; \n"
|
||||||
|
"flat in int textureIndex; \n"
|
||||||
|
"layout (binding = 0, std140) uniform TEXTURE_BLOCK \n"
|
||||||
|
"{ \n"
|
||||||
|
" uint64_t tex[XXX]; \n"
|
||||||
|
"}; \n"
|
||||||
|
"void main() { \n"
|
||||||
|
" int tIndex = (int)(textureIndex); \n"
|
||||||
|
" sampler2D myText = sampler2D(tex[tIndex]); \n"
|
||||||
|
" gl_FragColor = texture2D(myText,TexCoord); \n"
|
||||||
|
" if (tex[tIndex] == 0) gl_FragColor.r = 1.0; \n"
|
||||||
|
"} \n"
|
||||||
|
;
|
||||||
|
|
||||||
|
///This class provides a basic wraper for a Uniform Buffer Object
|
||||||
|
///or UBO, and provides the storage for the texture handles
|
||||||
|
class BindlessBuffer: public osg::Referenced{
|
||||||
|
public:
|
||||||
|
typedef osg::ref_ptr<osg::UniformBufferObject> UniBufferObjRef;
|
||||||
|
typedef osg::ref_ptr<osg::UniformBufferBinding> UniBufferBindingRef;
|
||||||
|
typedef osg::ref_ptr<osg::UInt64Array> HandleArrayRef;
|
||||||
|
typedef osg::ref_ptr<BindlessBuffer> BindlessBufferRef;
|
||||||
|
static BindlessBufferRef Make(size_t count){
|
||||||
|
BindlessBufferRef val = new BindlessBuffer();
|
||||||
|
val->_count = count;
|
||||||
|
val->_sbbo = new osg::UniformBufferObject;
|
||||||
|
val->_handles = new osg::UInt64Array();
|
||||||
|
val->_handles->resize(count*2,0);
|
||||||
|
val->_handles->setBufferObject(val->_sbbo.get());
|
||||||
|
val->_ssbb = new osg::UniformBufferBinding(0, val->_handles.get(), 0, sizeof(GLuint64)*count);
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
BindlessBuffer& operator = (const BindlessBuffer& rhs){
|
||||||
|
if (this != &rhs){
|
||||||
|
_count=rhs._count;
|
||||||
|
_sbbo =rhs._sbbo ;
|
||||||
|
_ssbb =rhs._ssbb ;
|
||||||
|
_handles = rhs._handles;
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
BindlessBuffer(const BindlessBuffer& rhs):osg::Referenced(rhs){
|
||||||
|
if (this != &rhs){
|
||||||
|
_count=rhs._count;
|
||||||
|
_sbbo =rhs._sbbo ;
|
||||||
|
_ssbb =rhs._ssbb ;
|
||||||
|
_handles = rhs._handles;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
UniBufferObjRef& Object(){return _sbbo;}
|
||||||
|
UniBufferBindingRef& Binding(){return _ssbb;}
|
||||||
|
HandleArrayRef& Handles(){return _handles;}
|
||||||
|
int count(){return _count;}
|
||||||
|
private:
|
||||||
|
int _count;
|
||||||
|
UniBufferObjRef _sbbo;
|
||||||
|
UniBufferBindingRef _ssbb;
|
||||||
|
HandleArrayRef _handles;
|
||||||
|
|
||||||
|
BindlessBuffer():osg::Referenced(),_count(0){
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
///This class extends a Texture, when this is texture is applied
|
||||||
|
///the first time, it will setup all our texture handles, after that
|
||||||
|
///it will not make any more GL calls until it gets released
|
||||||
|
class BindlessTexture: public osg::Texture2D
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef osg::ref_ptr<BindlessBuffer> BufferRef;
|
||||||
|
typedef std::vector<osg::ref_ptr<osg::Image> > TextureList;
|
||||||
|
typedef std::vector<GLuint64> HandleList;
|
||||||
|
typedef osg::ref_ptr< osg::Texture::TextureObject> TextureObjectRef;
|
||||||
|
typedef std::vector<TextureObjectRef> TextureObjectList;
|
||||||
|
typedef osg::buffered_object<TextureObjectList> TextureObjectBuffer;
|
||||||
|
|
||||||
|
BindlessTexture();
|
||||||
|
BindlessTexture(BufferRef, TextureList);
|
||||||
|
BindlessTexture(const BindlessTexture& rhs, const osg::CopyOp& copy =osg::CopyOp::SHALLOW_COPY);
|
||||||
|
void releaseGLObjects(osg::State* state) const;
|
||||||
|
void resizeGLObjectBuffers(unsigned maxSize);
|
||||||
|
void setBidlessIndex(unsigned int index);
|
||||||
|
META_StateAttribute(osg, BindlessTexture, TEXTURE);
|
||||||
|
|
||||||
|
void apply(osg::State& state) const;
|
||||||
|
protected:
|
||||||
|
void applyOnce(osg::State &state) const;
|
||||||
|
mutable osg::buffered_object<HandleList> _handles;
|
||||||
|
mutable TextureList _textureList;
|
||||||
|
mutable osg::ref_ptr<BindlessBuffer> _buffer;
|
||||||
|
mutable std::vector<bool> _isBound;
|
||||||
|
mutable TextureObjectBuffer _textureBufferList;
|
||||||
|
// array index = texture image unit.
|
||||||
|
unsigned int _bindlessIndex;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
BindlessTexture::BindlessTexture():osg::Texture2D(),_bindlessIndex(0)
|
||||||
|
{
|
||||||
|
_isBound.resize(5,false);
|
||||||
|
}
|
||||||
|
|
||||||
|
BindlessTexture::BindlessTexture(const BindlessTexture& rhs, const osg::CopyOp& copy) :
|
||||||
|
osg::Texture2D( rhs, copy )
|
||||||
|
{
|
||||||
|
_isBound.resize(5,false);
|
||||||
|
_buffer = rhs._buffer;
|
||||||
|
_bindlessIndex = rhs._bindlessIndex;
|
||||||
|
for(unsigned i=0; i<rhs._handles.size(); ++i)
|
||||||
|
_handles[i] = rhs._handles[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
BindlessTexture::BindlessTexture(BufferRef ref,TextureList textureList) :
|
||||||
|
osg::Texture2D( textureList[0] ),
|
||||||
|
_textureList(textureList),
|
||||||
|
_buffer(ref),
|
||||||
|
_bindlessIndex(0)
|
||||||
|
{
|
||||||
|
_isBound.resize(5,false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void BindlessTexture::setBidlessIndex(unsigned int index){
|
||||||
|
_bindlessIndex = index;
|
||||||
|
}
|
||||||
|
/// Just as the name suggest this should be called once per
|
||||||
|
/// context, during its lifetime. This basically
|
||||||
|
/// just sets up our texture handles, and loads them
|
||||||
|
/// into our UBO. A good portion of this was copied from
|
||||||
|
/// Texture2D::apply, this is in no ways a general solution.
|
||||||
|
void BindlessTexture::applyOnce(osg::State& state) const
|
||||||
|
{
|
||||||
|
if (!_buffer)
|
||||||
|
return;
|
||||||
|
|
||||||
|
TextureObject* textureObject;
|
||||||
|
unsigned contextID = state.getContextID();
|
||||||
|
osg::GLExtensions* extensions = osg::GLExtensions::Get( contextID, true );
|
||||||
|
|
||||||
|
osg::ref_ptr<osg::Image> image = _image;
|
||||||
|
if (_handles[contextID].size() < _textureList.size())
|
||||||
|
_handles[contextID].resize( _textureList.size(),0);
|
||||||
|
if (_textureBufferList[contextID].size() < _textureList.size())
|
||||||
|
_textureBufferList[contextID].resize( _textureList.size());
|
||||||
|
int txtcount = _textureList.size();
|
||||||
|
if (_buffer->count() < txtcount)
|
||||||
|
txtcount = _buffer->count();
|
||||||
|
//for each actual texture we have, bind it, get the texture hande, assign the value to our UBO
|
||||||
|
for (int i = 0; i <txtcount; i++){
|
||||||
|
image = _textureList[i];
|
||||||
|
if (_image.valid())
|
||||||
|
computeInternalFormatWithImage(*image);
|
||||||
|
else
|
||||||
|
continue;
|
||||||
|
// compute the dimensions of the texture.
|
||||||
|
computeRequiredTextureDimensions(state,*image,_textureWidth, _textureHeight, _numMipmapLevels);
|
||||||
|
textureObject = generateAndAssignTextureObject(contextID,GL_TEXTURE_2D,_numMipmapLevels,_internalFormat,_textureWidth,_textureHeight,1,_borderWidth);
|
||||||
|
textureObject->bind();
|
||||||
|
applyTexParameters(GL_TEXTURE_2D,state);
|
||||||
|
|
||||||
|
applyTexImage2D_load(state,GL_TEXTURE_2D,image.get(),
|
||||||
|
_textureWidth, _textureHeight, _numMipmapLevels);
|
||||||
|
textureObject->setAllocated(true);
|
||||||
|
_textureBufferList[contextID][i] = textureObject;
|
||||||
|
|
||||||
|
//Here is where the "magic" happens, we get the texture handle for our texture, copy it to our UBO,
|
||||||
|
//and then tell OpenGL to keep the handle resident
|
||||||
|
_handles[contextID][i] = extensions->glGetTextureHandle( textureObject->id() );
|
||||||
|
std::vector<GLuint64> &vec = _buffer->Handles()->asVector();
|
||||||
|
vec[i*2] = _handles[contextID][i];
|
||||||
|
_buffer->Object()->dirty();
|
||||||
|
_buffer->Handles()->dirty();
|
||||||
|
|
||||||
|
if ( _handles[contextID][i] != 0L || extensions->glIsTextureHandleResident( _handles[contextID][i]) == GL_FALSE)
|
||||||
|
{
|
||||||
|
extensions->glMakeTextureHandleResident( _handles[contextID][i] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// update the modified tag to show that it is up to date.
|
||||||
|
getModifiedCount(contextID) = image->getModifiedCount();
|
||||||
|
}
|
||||||
|
|
||||||
|
void BindlessTexture::apply(osg::State& state) const
|
||||||
|
{
|
||||||
|
unsigned contextID = state.getContextID();
|
||||||
|
if ( _isBound[contextID] == false )
|
||||||
|
{
|
||||||
|
applyOnce(state);
|
||||||
|
_isBound[contextID] = true;
|
||||||
|
}else{
|
||||||
|
//we should mostly hit this during the lifetime of this object,
|
||||||
|
//note we basically do nothing......
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// cleanup, we just need to tell OpenGL to release our texture handle
|
||||||
|
void BindlessTexture::releaseGLObjects(osg::State* state) const
|
||||||
|
{
|
||||||
|
if ( state )
|
||||||
|
{
|
||||||
|
unsigned contextID = state->getContextID();
|
||||||
|
osg::Texture2D::releaseGLObjects( state );
|
||||||
|
osg::GLExtensions* ext = osg::GLExtensions::Get( contextID, true );
|
||||||
|
|
||||||
|
for(unsigned i=0; i<_handles[contextID].size(); ++i)
|
||||||
|
{
|
||||||
|
ext->glMakeTextureHandleNonResident( _handles[contextID][i] );
|
||||||
|
_handles[contextID][i] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
BindlessTexture::resizeGLObjectBuffers(unsigned int maxSize)
|
||||||
|
{
|
||||||
|
osg::Texture2D::resizeGLObjectBuffers( maxSize );
|
||||||
|
|
||||||
|
unsigned int handleSize = _handles.size();
|
||||||
|
unsigned int txtSize = _textureList.size();
|
||||||
|
if ( handleSize < maxSize ) {
|
||||||
|
_isBound.resize(maxSize,false);
|
||||||
|
}
|
||||||
|
if ( handleSize < maxSize ) {
|
||||||
|
_handles.resize( maxSize );
|
||||||
|
for(unsigned i=handleSize; i<_handles.size(); ++i){
|
||||||
|
for(unsigned j=0; j<txtSize; ++j)
|
||||||
|
_handles[i][j] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef osg::ref_ptr<osg::Image> ImageRef;
|
||||||
|
///////////////////////////////////////////////////////
|
||||||
|
///Create an array of images, with checkerboard
|
||||||
|
///pattern with random color and size
|
||||||
|
///
|
||||||
|
void createImageArray(osg::StateSet* attachPnt){
|
||||||
|
BindlessTexture::TextureList images;
|
||||||
|
images.resize(TextureCount);
|
||||||
|
BindlessBuffer::BindlessBufferRef buffer = BindlessBuffer::Make(TextureCount);
|
||||||
|
srand (time(NULL));
|
||||||
|
for (int i =0; i < TextureCount; i++){
|
||||||
|
ImageRef tImage = new osg::Image();
|
||||||
|
int powerOf2 = rand()%6+4;
|
||||||
|
const unsigned int imageSize = 1<<powerOf2;
|
||||||
|
tImage->allocateImage(imageSize,imageSize,1,GL_RGBA,GL_UNSIGNED_BYTE);
|
||||||
|
unsigned char* buff = tImage->data();
|
||||||
|
const int stride = 4;
|
||||||
|
unsigned char primaryColor[4];
|
||||||
|
|
||||||
|
int boxWidth = rand()%15+2;
|
||||||
|
int boxLength = rand()%15+2;
|
||||||
|
|
||||||
|
//light squares
|
||||||
|
primaryColor[0] = rand()%128 + 128;
|
||||||
|
primaryColor[1] = rand()%128 + 128;
|
||||||
|
primaryColor[2] = rand()%128 + 128;
|
||||||
|
//dark squares
|
||||||
|
unsigned char secondaryColor[4];
|
||||||
|
secondaryColor[0] = rand()%128;
|
||||||
|
secondaryColor[1] = rand()%128;
|
||||||
|
secondaryColor[2] = rand()%128;
|
||||||
|
for (unsigned int x = 0; x < imageSize; x++){
|
||||||
|
for (unsigned int y =0; y<imageSize; y++){
|
||||||
|
unsigned char* pixel = &buff[(x*imageSize+y)*stride];
|
||||||
|
int xSide = x/boxWidth;
|
||||||
|
int ySide = y/boxLength;
|
||||||
|
bool isPrimaryColor = (xSide+ySide)%2>0;
|
||||||
|
if (isPrimaryColor){
|
||||||
|
pixel[0] = primaryColor[0];
|
||||||
|
pixel[1] = primaryColor[1];
|
||||||
|
pixel[2] = primaryColor[2];
|
||||||
|
}else{
|
||||||
|
pixel[0] = secondaryColor[0];
|
||||||
|
pixel[1] = secondaryColor[1];
|
||||||
|
pixel[2] = secondaryColor[2];
|
||||||
|
}
|
||||||
|
pixel[3] = 255;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
images[i] = tImage;
|
||||||
|
|
||||||
|
std::stringstream sstr;
|
||||||
|
sstr<<"Image"<<i;
|
||||||
|
tImage->setName(sstr.str());
|
||||||
|
}
|
||||||
|
BindlessTexture* tex = new BindlessTexture(buffer,images);
|
||||||
|
attachPnt->setTextureAttribute(0,tex,osg::StateAttribute::ON);
|
||||||
|
attachPnt->setAttributeAndModes(buffer->Binding(), osg::StateAttribute::ON);
|
||||||
|
}
|
||||||
|
///Create a cube centered at the origin, with given by size
|
||||||
|
///
|
||||||
|
osg::Geometry* createCube(float scale, osg::Vec3 origin = osg::Vec3(0.0f,0.0f,0.0f) )
|
||||||
|
{
|
||||||
|
osg::Geometry* geometry = new osg::Geometry;
|
||||||
|
geometry->setName("TexturedCubeArray");
|
||||||
|
|
||||||
|
osg::Vec3Array* vertices = new osg::Vec3Array;
|
||||||
|
geometry->setVertexArray(vertices);
|
||||||
|
|
||||||
|
osg::Vec2Array* tcoords = new osg::Vec2Array();
|
||||||
|
geometry->setTexCoordArray(0,tcoords);
|
||||||
|
|
||||||
|
origin -= osg::Vec3(scale/2.0f,scale/2.0f,scale/2.0f);
|
||||||
|
osg::Vec3 dx(scale,0.0f,0.0f);
|
||||||
|
osg::Vec3 dy(0.0f,scale,0.0f);
|
||||||
|
osg::Vec3 dz(0.0f,0.0f,scale);
|
||||||
|
|
||||||
|
{
|
||||||
|
// front face
|
||||||
|
vertices->push_back(origin);
|
||||||
|
vertices->push_back(origin+dx);
|
||||||
|
vertices->push_back(origin+dx+dz);
|
||||||
|
vertices->push_back(origin+dz);
|
||||||
|
|
||||||
|
tcoords->push_back(osg::Vec2(0.0f,0.0f));
|
||||||
|
tcoords->push_back(osg::Vec2(1.0f,0.0f));
|
||||||
|
tcoords->push_back(osg::Vec2(1.0f,1.0f));
|
||||||
|
tcoords->push_back(osg::Vec2(0.0f,1.0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
// back face
|
||||||
|
vertices->push_back(origin+dy);
|
||||||
|
vertices->push_back(origin+dy+dz);
|
||||||
|
vertices->push_back(origin+dy+dx+dz);
|
||||||
|
vertices->push_back(origin+dy+dx);
|
||||||
|
|
||||||
|
tcoords->push_back(osg::Vec2(0.0f,0.0f));
|
||||||
|
tcoords->push_back(osg::Vec2(1.0f,0.0f));
|
||||||
|
tcoords->push_back(osg::Vec2(1.0f,1.0f));
|
||||||
|
tcoords->push_back(osg::Vec2(0.0f,1.0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
// left face
|
||||||
|
vertices->push_back(origin+dy);
|
||||||
|
vertices->push_back(origin);
|
||||||
|
vertices->push_back(origin+dz);
|
||||||
|
vertices->push_back(origin+dy+dz);
|
||||||
|
|
||||||
|
tcoords->push_back(osg::Vec2(0.0f,0.0f));
|
||||||
|
tcoords->push_back(osg::Vec2(1.0f,0.0f));
|
||||||
|
tcoords->push_back(osg::Vec2(1.0f,1.0f));
|
||||||
|
tcoords->push_back(osg::Vec2(0.0f,1.0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
// right face
|
||||||
|
vertices->push_back(origin+dx+dy);
|
||||||
|
vertices->push_back(origin+dx+dy+dz);
|
||||||
|
vertices->push_back(origin+dx+dz);
|
||||||
|
vertices->push_back(origin+dx);
|
||||||
|
|
||||||
|
tcoords->push_back(osg::Vec2(0.0f,0.0f));
|
||||||
|
tcoords->push_back(osg::Vec2(1.0f,0.0f));
|
||||||
|
tcoords->push_back(osg::Vec2(1.0f,1.0f));
|
||||||
|
tcoords->push_back(osg::Vec2(0.0f,1.0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
// top face
|
||||||
|
vertices->push_back(origin+dz);
|
||||||
|
vertices->push_back(origin+dz+dx);
|
||||||
|
vertices->push_back(origin+dz+dx+dy);
|
||||||
|
vertices->push_back(origin+dz+dy);
|
||||||
|
|
||||||
|
tcoords->push_back(osg::Vec2(0.0f,0.0f));
|
||||||
|
tcoords->push_back(osg::Vec2(1.0f,0.0f));
|
||||||
|
tcoords->push_back(osg::Vec2(1.0f,1.0f));
|
||||||
|
tcoords->push_back(osg::Vec2(0.0f,1.0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
// bottom face
|
||||||
|
vertices->push_back(origin);
|
||||||
|
vertices->push_back(origin+dy);
|
||||||
|
vertices->push_back(origin+dx+dy);
|
||||||
|
vertices->push_back(origin+dx);
|
||||||
|
|
||||||
|
tcoords->push_back(osg::Vec2(0.0f,0.0f));
|
||||||
|
tcoords->push_back(osg::Vec2(1.0f,0.0f));
|
||||||
|
tcoords->push_back(osg::Vec2(1.0f,1.0f));
|
||||||
|
tcoords->push_back(osg::Vec2(0.0f,1.0f));
|
||||||
|
}
|
||||||
|
osg::DrawArrays* primSet = new osg::DrawArrays(GL_QUADS, 0, vertices->size());
|
||||||
|
geometry->addPrimitiveSet(primSet);
|
||||||
|
|
||||||
|
return geometry;
|
||||||
|
}
|
||||||
|
///
|
||||||
|
///Here we are going to create our scene, basically we need to make sure our
|
||||||
|
///Bindless texture gets applied before our shader programs.
|
||||||
|
///
|
||||||
|
///
|
||||||
|
osg::Group* CreateScene(){
|
||||||
|
osg::Group* sceneRoot= new osg::Group();
|
||||||
|
sceneRoot->setName("Root");
|
||||||
|
osg::Geode *geo = new osg::Geode();
|
||||||
|
geo->setName("Geo");
|
||||||
|
sceneRoot->addChild(geo);
|
||||||
|
osg::StateSet* scene_ss = sceneRoot->getOrCreateStateSet();
|
||||||
|
createImageArray(scene_ss);
|
||||||
|
scene_ss->setMode(GL_DEPTH_TEST,osg::StateAttribute::ON);
|
||||||
|
|
||||||
|
osg::ref_ptr<osg::Geometry> geom = createCube(0.9f);
|
||||||
|
osg::PrimitiveSet *prim = geom->getPrimitiveSet(0);
|
||||||
|
//instanced elements must use VBOs
|
||||||
|
geom->setUseDisplayList(false);
|
||||||
|
geom->setUseVertexBufferObjects(true);
|
||||||
|
geom->setCullingActive(false);
|
||||||
|
prim->setNumInstances(1000);
|
||||||
|
prim->dirty();
|
||||||
|
sceneRoot->addChild(geo);
|
||||||
|
geo->addDrawable(geom.get());
|
||||||
|
|
||||||
|
osg::StateSet* ss = geo->getOrCreateStateSet();
|
||||||
|
|
||||||
|
std::string strTextureCount;
|
||||||
|
std::stringstream ssconv;
|
||||||
|
ssconv<<TextureCount;
|
||||||
|
ssconv>>strTextureCount;
|
||||||
|
std::string::size_type pos = vertShader.find("XXX");
|
||||||
|
vertShader.replace(pos,size_t(3),strTextureCount);
|
||||||
|
|
||||||
|
pos = fragShader.find("XXX");
|
||||||
|
fragShader.replace(pos,size_t(3),strTextureCount);
|
||||||
|
|
||||||
|
osg::Program* program = new osg::Program;
|
||||||
|
osg::Shader* vertex_shader = new osg::Shader(osg::Shader::VERTEX, vertShader);
|
||||||
|
program->addShader(vertex_shader);
|
||||||
|
|
||||||
|
osg::Shader* fragment_shader = new osg::Shader(osg::Shader::FRAGMENT, fragShader);
|
||||||
|
program->addShader(fragment_shader);
|
||||||
|
|
||||||
|
ss->setAttributeAndModes(program, osg::StateAttribute::ON);
|
||||||
|
|
||||||
|
|
||||||
|
return sceneRoot;
|
||||||
|
}
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
// set command line options
|
||||||
|
osg::ArgumentParser arguments(&argc,argv);
|
||||||
|
|
||||||
|
// construct the viewer.
|
||||||
|
osgViewer::Viewer viewer(arguments);
|
||||||
|
|
||||||
|
// add the stats handler
|
||||||
|
viewer.addEventHandler(new osgViewer::StatsHandler);
|
||||||
|
|
||||||
|
// add model to viewer.
|
||||||
|
viewer.setSceneData( CreateScene() );
|
||||||
|
|
||||||
|
viewer.realize();
|
||||||
|
|
||||||
|
viewer.getCamera()->getGraphicsContext()->getState()->setUseModelViewAndProjectionUniforms(true);
|
||||||
|
|
||||||
|
return viewer.run();
|
||||||
|
}
|
||||||
|
|
||||||
@@ -71,9 +71,17 @@ int main( int argc, char **argv )
|
|||||||
bool useGlobalBlending = false;
|
bool useGlobalBlending = false;
|
||||||
if ( arguments.read("--no-draw-buffers") ) useGlobalBlending = true;
|
if ( arguments.read("--no-draw-buffers") ) useGlobalBlending = true;
|
||||||
|
|
||||||
|
|
||||||
|
osg::ref_ptr<osg::Node> cessna = osgDB::readRefNodeFile("cessna.osgt");
|
||||||
|
if (!cessna)
|
||||||
|
{
|
||||||
|
OSG_NOTICE<<"Cannot not find model 'cessna.osg' to render"<<std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
// Create a camera to output multi-rendering-targets (MRT)
|
// Create a camera to output multi-rendering-targets (MRT)
|
||||||
osg::Camera* mrtCam = createMRTCamera( textures );
|
osg::ref_ptr<osg::Camera> mrtCam = createMRTCamera( textures );
|
||||||
mrtCam->addChild( osgDB::readNodeFile("cessna.osgt") );
|
mrtCam->addChild( cessna );
|
||||||
|
|
||||||
// Create shader program to be used
|
// Create shader program to be used
|
||||||
const char* mrtFragmentCode = {
|
const char* mrtFragmentCode = {
|
||||||
@@ -87,8 +95,8 @@ int main( int argc, char **argv )
|
|||||||
osg::ref_ptr<osg::Program> program = new osg::Program;
|
osg::ref_ptr<osg::Program> program = new osg::Program;
|
||||||
program->addShader( new osg::Shader(osg::Shader::FRAGMENT, mrtFragmentCode) );
|
program->addShader( new osg::Shader(osg::Shader::FRAGMENT, mrtFragmentCode) );
|
||||||
|
|
||||||
osg::StateSet* ss = mrtCam->getOrCreateStateSet();
|
osg::ref_ptr<osg::StateSet> ss = mrtCam->getOrCreateStateSet();
|
||||||
ss->setAttributeAndModes( program.get() );
|
ss->setAttributeAndModes( program );
|
||||||
|
|
||||||
// Apply blending to the original scene in MRT
|
// Apply blending to the original scene in MRT
|
||||||
if ( !useGlobalBlending )
|
if ( !useGlobalBlending )
|
||||||
@@ -103,8 +111,8 @@ int main( int argc, char **argv )
|
|||||||
// Accept different blend/colormask attributes on multiple render targets
|
// Accept different blend/colormask attributes on multiple render targets
|
||||||
osg::ref_ptr<osg::BlendFunci> blend0 = new osg::BlendFunci(0, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
osg::ref_ptr<osg::BlendFunci> blend0 = new osg::BlendFunci(0, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
osg::ref_ptr<osg::ColorMaski> colormask3 = new osg::ColorMaski(3, false, true, false, true);
|
osg::ref_ptr<osg::ColorMaski> colormask3 = new osg::ColorMaski(3, false, true, false, true);
|
||||||
ss->setAttribute( blend0.get() );
|
ss->setAttribute( blend0 );
|
||||||
ss->setAttributeAndModes( colormask3.get() );
|
ss->setAttributeAndModes( colormask3 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -139,10 +139,10 @@ int main( int argc, char **argv )
|
|||||||
osgViewer::Viewer viewer;
|
osgViewer::Viewer viewer;
|
||||||
|
|
||||||
// load the nodes from the commandline arguments.
|
// load the nodes from the commandline arguments.
|
||||||
osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
|
osg::ref_ptr<osg::Node> loadedModel = osgDB::readRefNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!loadedModel) loadedModel = osgDB::readNodeFile("cessnafire.osgt");
|
if (!loadedModel) loadedModel = osgDB::readRefNodeFile("cessnafire.osgt");
|
||||||
|
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
{
|
{
|
||||||
@@ -150,11 +150,11 @@ int main( int argc, char **argv )
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Group* root = new osg::Group;
|
osg::ref_ptr<osg::Group> root = new osg::Group;
|
||||||
root->addChild(loadedModel);
|
root->addChild(loadedModel);
|
||||||
|
|
||||||
|
|
||||||
osg::StateSet* stateset = new osg::StateSet;
|
osg::ref_ptr<osg::StateSet> stateset = new osg::StateSet;
|
||||||
stateset->setDataVariance(osg::Object::DYNAMIC);
|
stateset->setDataVariance(osg::Object::DYNAMIC);
|
||||||
|
|
||||||
osg::BlendEquation* blendEquation = new osg::BlendEquation(osg::BlendEquation::FUNC_ADD);
|
osg::BlendEquation* blendEquation = new osg::BlendEquation(osg::BlendEquation::FUNC_ADD);
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class DrawableDrawCallback : public osg::Drawable::DrawCallback
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DrawableUpdateCallback : public osg::Drawable::UpdateCallback
|
struct DrawableUpdateCallback : public osg::DrawableUpdateCallback
|
||||||
{
|
{
|
||||||
virtual void update(osg::NodeVisitor*, osg::Drawable* drawable)
|
virtual void update(osg::NodeVisitor*, osg::Drawable* drawable)
|
||||||
{
|
{
|
||||||
@@ -73,7 +73,7 @@ struct DrawableUpdateCallback : public osg::Drawable::UpdateCallback
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DrawableCullCallback : public osg::Drawable::CullCallback
|
struct DrawableCullCallback : public osg::DrawableCullCallback
|
||||||
{
|
{
|
||||||
/** do customized cull code.*/
|
/** do customized cull code.*/
|
||||||
virtual bool cull(osg::NodeVisitor*, osg::Drawable* drawable, osg::State* /*state*/) const
|
virtual bool cull(osg::NodeVisitor*, osg::Drawable* drawable, osg::State* /*state*/) const
|
||||||
@@ -158,11 +158,11 @@ class CameraEventCallback : public osg::NodeCallback
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct TestDrawableUpdateCallback : public osg::Drawable::UpdateCallback
|
struct TestDrawableUpdateCallback : public osg::DrawableUpdateCallback
|
||||||
{
|
{
|
||||||
TestDrawableUpdateCallback(const std::string &message): _message(message) {}
|
TestDrawableUpdateCallback(const std::string &message): _message(message) {}
|
||||||
|
|
||||||
virtual void update(osg::NodeVisitor*, osg::Drawable* drw) {
|
virtual void update(osg::NodeVisitor*, osg::Drawable* /*drw*/) {
|
||||||
printf("%s\n", _message.c_str());
|
printf("%s\n", _message.c_str());
|
||||||
}
|
}
|
||||||
std::string _message;
|
std::string _message;
|
||||||
@@ -172,7 +172,7 @@ struct TestNodeUpdateCallback : public osg::NodeCallback
|
|||||||
{
|
{
|
||||||
TestNodeUpdateCallback(const std::string &message): _message(message) {}
|
TestNodeUpdateCallback(const std::string &message): _message(message) {}
|
||||||
|
|
||||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) {
|
virtual void operator()(osg::Node* /*node*/, osg::NodeVisitor* /*nv*/) {
|
||||||
printf("%s\n", _message.c_str());
|
printf("%s\n", _message.c_str());
|
||||||
}
|
}
|
||||||
std::string _message;
|
std::string _message;
|
||||||
@@ -239,10 +239,10 @@ int main( int argc, char **argv )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rootnode = osgDB::readNodeFiles(arguments);
|
rootnode = osgDB::readRefNodeFiles(arguments);
|
||||||
|
|
||||||
// if not loaded assume no arguments passed in, try use default mode instead.
|
// if not loaded assume no arguments passed in, try use default mode instead.
|
||||||
if (!rootnode) rootnode = osgDB::readNodeFile("cow.osgt");
|
if (!rootnode) rootnode = osgDB::readRefNodeFile("cow.osgt");
|
||||||
|
|
||||||
if (!rootnode)
|
if (!rootnode)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,50 +25,50 @@
|
|||||||
#include <osgGA/AnimationPathManipulator>
|
#include <osgGA/AnimationPathManipulator>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
class ModelHandler : public osgGA::GUIEventHandler
|
class ModelHandler : public osgGA::GUIEventHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
ModelHandler():
|
ModelHandler():
|
||||||
_position(0) {}
|
_position(0) {}
|
||||||
|
|
||||||
typedef std::vector<std::string> Filenames;
|
typedef std::vector<std::string> Filenames;
|
||||||
Filenames _filenames;
|
Filenames _filenames;
|
||||||
unsigned int _position;
|
unsigned int _position;
|
||||||
|
|
||||||
void add(const std::string& filename) { _filenames.push_back(filename); }
|
void add(const std::string& filename) { _filenames.push_back(filename); }
|
||||||
|
|
||||||
bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa)
|
bool handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa)
|
||||||
{
|
{
|
||||||
osgViewer::Viewer* viewer = dynamic_cast<osgViewer::Viewer*>(&aa);
|
osgViewer::Viewer* viewer = dynamic_cast<osgViewer::Viewer*>(&aa);
|
||||||
if (!viewer) return false;
|
if (!viewer) return false;
|
||||||
|
|
||||||
if (_filenames.empty()) return false;
|
if (_filenames.empty()) return false;
|
||||||
|
|
||||||
switch(ea.getEventType())
|
switch(ea.getEventType())
|
||||||
{
|
{
|
||||||
case(osgGA::GUIEventAdapter::KEYUP):
|
case(osgGA::GUIEventAdapter::KEYUP):
|
||||||
{
|
{
|
||||||
if (ea.getKey()=='l')
|
if (ea.getKey()=='l')
|
||||||
{
|
{
|
||||||
osg::ref_ptr<osg::Node> model = osgDB::readNodeFile( _filenames[_position] );
|
osg::ref_ptr<osg::Node> model = osgDB::readRefNodeFile( _filenames[_position] );
|
||||||
++_position;
|
++_position;
|
||||||
if (_position>=_filenames.size()) _position = 0;
|
if (_position>=_filenames.size()) _position = 0;
|
||||||
|
|
||||||
if (model.valid())
|
if (model.valid())
|
||||||
{
|
{
|
||||||
viewer->setSceneData(model.get());
|
viewer->setSceneData(model.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _done;
|
bool _done;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -76,12 +76,12 @@ public:
|
|||||||
void singleWindowMultipleCameras(osgViewer::Viewer& viewer)
|
void singleWindowMultipleCameras(osgViewer::Viewer& viewer)
|
||||||
{
|
{
|
||||||
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();
|
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();
|
||||||
if (!wsi)
|
if (!wsi)
|
||||||
{
|
{
|
||||||
osg::notify(osg::NOTICE)<<"Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
|
osg::notify(osg::NOTICE)<<"Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int width, height;
|
unsigned int width, height;
|
||||||
wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height);
|
wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height);
|
||||||
|
|
||||||
@@ -127,12 +127,12 @@ void singleWindowMultipleCameras(osgViewer::Viewer& viewer)
|
|||||||
void multipleWindowMultipleCameras(osgViewer::Viewer& viewer, bool multipleScreens)
|
void multipleWindowMultipleCameras(osgViewer::Viewer& viewer, bool multipleScreens)
|
||||||
{
|
{
|
||||||
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();
|
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();
|
||||||
if (!wsi)
|
if (!wsi)
|
||||||
{
|
{
|
||||||
osg::notify(osg::NOTICE)<<"Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
|
osg::notify(osg::NOTICE)<<"Error, no WindowSystemInterface available, cannot create windows."<<std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int width, height;
|
unsigned int width, height;
|
||||||
wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height);
|
wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height);
|
||||||
|
|
||||||
@@ -198,7 +198,7 @@ int main( int argc, char **argv )
|
|||||||
// use an ArgumentParser object to manage the program arguments.
|
// use an ArgumentParser object to manage the program arguments.
|
||||||
osg::ArgumentParser arguments(&argc,argv);
|
osg::ArgumentParser arguments(&argc,argv);
|
||||||
|
|
||||||
if (argc<2)
|
if (argc<2)
|
||||||
{
|
{
|
||||||
std::cout << argv[0] <<": requires filename argument." << std::endl;
|
std::cout << argv[0] <<": requires filename argument." << std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
@@ -214,7 +214,7 @@ int main( int argc, char **argv )
|
|||||||
osg::ref_ptr<osg::Node> model;
|
osg::ref_ptr<osg::Node> model;
|
||||||
if (sharedModel)
|
if (sharedModel)
|
||||||
{
|
{
|
||||||
model = osgDB::readNodeFiles(arguments);
|
model = osgDB::readRefNodeFiles(arguments);
|
||||||
if (!model) return 0;
|
if (!model) return 0;
|
||||||
|
|
||||||
if (enableVBO)
|
if (enableVBO)
|
||||||
@@ -242,7 +242,7 @@ int main( int argc, char **argv )
|
|||||||
if (sharedModel) viewer.setSceneData(model.get());
|
if (sharedModel) viewer.setSceneData(model.get());
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
osg::ref_ptr<osg::Node> node = osgDB::readNodeFiles(arguments);
|
osg::ref_ptr<osg::Node> node = osgDB::readRefNodeFiles(arguments);
|
||||||
if (!node) return 0;
|
if (!node) return 0;
|
||||||
|
|
||||||
if (enableVBO)
|
if (enableVBO)
|
||||||
@@ -268,19 +268,19 @@ int main( int argc, char **argv )
|
|||||||
while (arguments.read("-p",pathfile))
|
while (arguments.read("-p",pathfile))
|
||||||
{
|
{
|
||||||
apm = new osgGA::AnimationPathManipulator(pathfile);
|
apm = new osgGA::AnimationPathManipulator(pathfile);
|
||||||
if (!apm.valid() || !(apm->valid()) )
|
if (!apm.valid() || !(apm->valid()) )
|
||||||
{
|
{
|
||||||
apm = 0;
|
apm = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
osgViewer::Viewer viewer(arguments);
|
osgViewer::Viewer viewer(arguments);
|
||||||
|
|
||||||
while (arguments.read("-s")) { viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded); }
|
while (arguments.read("-s")) { viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded); }
|
||||||
while (arguments.read("-g")) { viewer.setThreadingModel(osgViewer::Viewer::CullDrawThreadPerContext); }
|
while (arguments.read("-g")) { viewer.setThreadingModel(osgViewer::Viewer::CullDrawThreadPerContext); }
|
||||||
while (arguments.read("-d")) { viewer.setThreadingModel(osgViewer::Viewer::DrawThreadPerContext); }
|
while (arguments.read("-d")) { viewer.setThreadingModel(osgViewer::Viewer::DrawThreadPerContext); }
|
||||||
while (arguments.read("-c")) { viewer.setThreadingModel(osgViewer::Viewer::CullThreadPerCameraDrawThreadPerContext); }
|
while (arguments.read("-c")) { viewer.setThreadingModel(osgViewer::Viewer::CullThreadPerCameraDrawThreadPerContext); }
|
||||||
|
|
||||||
bool limitNumberOfFrames = false;
|
bool limitNumberOfFrames = false;
|
||||||
unsigned int maxFrames = 10;
|
unsigned int maxFrames = 10;
|
||||||
while (arguments.read("--run-till-frame-number",maxFrames)) { limitNumberOfFrames = true; }
|
while (arguments.read("--run-till-frame-number",maxFrames)) { limitNumberOfFrames = true; }
|
||||||
@@ -292,7 +292,7 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
if (apm.valid()) viewer.setCameraManipulator(apm.get());
|
if (apm.valid()) viewer.setCameraManipulator(apm.get());
|
||||||
else viewer.setCameraManipulator( new osgGA::TrackballManipulator() );
|
else viewer.setCameraManipulator( new osgGA::TrackballManipulator() );
|
||||||
|
|
||||||
viewer.addEventHandler(new osgViewer::StatsHandler);
|
viewer.addEventHandler(new osgViewer::StatsHandler);
|
||||||
viewer.addEventHandler(new osgViewer::ThreadingHandler);
|
viewer.addEventHandler(new osgViewer::ThreadingHandler);
|
||||||
|
|
||||||
@@ -300,7 +300,7 @@ int main( int argc, char **argv )
|
|||||||
while (arguments.read("--config", configfile))
|
while (arguments.read("--config", configfile))
|
||||||
{
|
{
|
||||||
osg::notify(osg::NOTICE)<<"Trying to read config file "<<configfile<<std::endl;
|
osg::notify(osg::NOTICE)<<"Trying to read config file "<<configfile<<std::endl;
|
||||||
osg::ref_ptr<osg::Object> object = osgDB::readObjectFile(configfile);
|
osg::ref_ptr<osg::Object> object = osgDB::readRefObjectFile(configfile);
|
||||||
osgViewer::View* view = dynamic_cast<osgViewer::View*>(object.get());
|
osgViewer::View* view = dynamic_cast<osgViewer::View*>(object.get());
|
||||||
if (view)
|
if (view)
|
||||||
{
|
{
|
||||||
@@ -329,19 +329,19 @@ int main( int argc, char **argv )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// load the scene.
|
// load the scene.
|
||||||
osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFiles(arguments);
|
osg::ref_ptr<osg::Node> loadedModel = osgDB::readRefNodeFiles(arguments);
|
||||||
|
|
||||||
if (!loadedModel) loadedModel = osgDB::readNodeFile("cow.osgt");
|
if (!loadedModel) loadedModel = osgDB::readRefNodeFile("cow.osgt");
|
||||||
|
|
||||||
if (!loadedModel)
|
if (!loadedModel)
|
||||||
{
|
{
|
||||||
std::cout << argv[0] <<": No data loaded." << std::endl;
|
std::cout << argv[0] <<": No data loaded." << std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
viewer.setSceneData(loadedModel.get());
|
viewer.setSceneData(loadedModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
viewer.realize();
|
viewer.realize();
|
||||||
|
|
||||||
unsigned int numFrames = 0;
|
unsigned int numFrames = 0;
|
||||||
|
|||||||
@@ -55,11 +55,11 @@ class Character : public osg::Referenced
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Character();
|
Character();
|
||||||
|
|
||||||
void setCharacter(const std::string& filename, const std::string& name, const osg::Vec3& orgin, const osg::Vec3& width, const osg::Vec3& catchPos, float positionRatio);
|
void setCharacter(const std::string& filename, const std::string& name, const osg::Vec3& orgin, const osg::Vec3& width, const osg::Vec3& catchPos, float positionRatio);
|
||||||
|
|
||||||
void setLives(const std::string& filename, const osg::Vec3& orgin, const osg::Vec3& delta, unsigned int numLives);
|
void setLives(const std::string& filename, const osg::Vec3& orgin, const osg::Vec3& delta, unsigned int numLives);
|
||||||
|
|
||||||
void setCatches(const std::string& filename, const osg::Vec3& orgin, const osg::Vec3& delta, unsigned int numLives);
|
void setCatches(const std::string& filename, const osg::Vec3& orgin, const osg::Vec3& delta, unsigned int numLives);
|
||||||
|
|
||||||
void moveLeft();
|
void moveLeft();
|
||||||
@@ -71,7 +71,7 @@ public:
|
|||||||
void resetCatches();
|
void resetCatches();
|
||||||
|
|
||||||
bool addCatch();
|
bool addCatch();
|
||||||
|
|
||||||
bool looseLife();
|
bool looseLife();
|
||||||
|
|
||||||
osg::Vec3 getCurrentCenterOfBasket() const { return _character->getPosition()+_centerBasket; }
|
osg::Vec3 getCurrentCenterOfBasket() const { return _character->getPosition()+_centerBasket; }
|
||||||
@@ -91,12 +91,12 @@ public:
|
|||||||
|
|
||||||
unsigned int _numCatches;
|
unsigned int _numCatches;
|
||||||
osg::ref_ptr<osg::Switch> _catchSwitch;
|
osg::ref_ptr<osg::Switch> _catchSwitch;
|
||||||
|
|
||||||
osg::ref_ptr<osg::Group> _objectsGroup;
|
osg::ref_ptr<osg::Group> _objectsGroup;
|
||||||
|
|
||||||
osg::Vec3 _centerBasket;
|
osg::Vec3 _centerBasket;
|
||||||
float _radiusBasket;
|
float _radiusBasket;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Character::Character():
|
Character::Character():
|
||||||
@@ -107,17 +107,17 @@ Character::Character():
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Character::setCharacter(const std::string& filename, const std::string& name, const osg::Vec3& origin, const osg::Vec3& width, const osg::Vec3& catchPos, float positionRatio)
|
void Character::setCharacter(const std::string& filename, const std::string& name, const osg::Vec3& origin, const osg::Vec3& cwidth, const osg::Vec3& catchPos, float positionRatio)
|
||||||
{
|
{
|
||||||
_origin = origin;
|
_origin = origin;
|
||||||
_width = width;
|
_width = cwidth;
|
||||||
_positionRatio = positionRatio;
|
_positionRatio = positionRatio;
|
||||||
_numLives = 3;
|
_numLives = 3;
|
||||||
_numCatches = 0;
|
_numCatches = 0;
|
||||||
|
|
||||||
float _characterSize = _width.length()*0.2f;
|
float _characterSize = _width.length()*0.2f;
|
||||||
|
|
||||||
osg::Image* image = osgDB::readImageFile(filename);
|
osg::ref_ptr<osg::Image> image = osgDB::readRefImageFile(filename);
|
||||||
if (image)
|
if (image)
|
||||||
{
|
{
|
||||||
osg::Vec3 pos(-0.5f*_characterSize,0.0f,0.0f);
|
osg::Vec3 pos(-0.5f*_characterSize,0.0f,0.0f);
|
||||||
@@ -136,14 +136,14 @@ void Character::setCharacter(const std::string& filename, const std::string& nam
|
|||||||
_character = new osg::PositionAttitudeTransform;
|
_character = new osg::PositionAttitudeTransform;
|
||||||
_character->setName(name);
|
_character->setName(name);
|
||||||
_character->addChild(geode);
|
_character->addChild(geode);
|
||||||
|
|
||||||
moveTo(positionRatio);
|
moveTo(positionRatio);
|
||||||
|
|
||||||
_centerBasket = width*catchPos.x() + height*catchPos.y() + pos;
|
_centerBasket = width*catchPos.x() + height*catchPos.y() + pos;
|
||||||
_radiusBasket = width.length()*catchPos.z();
|
_radiusBasket = width.length()*catchPos.z();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Character::setLives(const std::string& filename, const osg::Vec3& origin, const osg::Vec3& delta, unsigned int numLives)
|
void Character::setLives(const std::string& filename, const osg::Vec3& origin, const osg::Vec3& delta, unsigned int numLives)
|
||||||
@@ -153,7 +153,7 @@ void Character::setLives(const std::string& filename, const osg::Vec3& origin, c
|
|||||||
_numLives = numLives;
|
_numLives = numLives;
|
||||||
_livesSwitch = new osg::Switch;
|
_livesSwitch = new osg::Switch;
|
||||||
|
|
||||||
osg::Image* image = osgDB::readImageFile(filename);
|
osg::ref_ptr<osg::Image> image = osgDB::readRefImageFile(filename);
|
||||||
if (image)
|
if (image)
|
||||||
{
|
{
|
||||||
osg::StateSet* stateset = _livesSwitch->getOrCreateStateSet();
|
osg::StateSet* stateset = _livesSwitch->getOrCreateStateSet();
|
||||||
@@ -186,7 +186,7 @@ void Character::setCatches(const std::string& filename, const osg::Vec3& origin,
|
|||||||
_numCatches = 0;
|
_numCatches = 0;
|
||||||
_catchSwitch = new osg::Switch;
|
_catchSwitch = new osg::Switch;
|
||||||
|
|
||||||
osg::Image* image = osgDB::readImageFile(filename);
|
osg::ref_ptr<osg::Image> image = osgDB::readRefImageFile(filename);
|
||||||
if (image)
|
if (image)
|
||||||
{
|
{
|
||||||
osg::StateSet* stateset = _catchSwitch->getOrCreateStateSet();
|
osg::StateSet* stateset = _catchSwitch->getOrCreateStateSet();
|
||||||
@@ -249,20 +249,20 @@ void Character::resetCatches()
|
|||||||
bool Character::addCatch()
|
bool Character::addCatch()
|
||||||
{
|
{
|
||||||
if (!_catchSwitch || _numCatches>=_catchSwitch->getNumChildren()) return false;
|
if (!_catchSwitch || _numCatches>=_catchSwitch->getNumChildren()) return false;
|
||||||
|
|
||||||
_catchSwitch->setValue(_numCatches,true);
|
_catchSwitch->setValue(_numCatches,true);
|
||||||
++_numCatches;
|
++_numCatches;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Character::looseLife()
|
bool Character::looseLife()
|
||||||
{
|
{
|
||||||
if (!_livesSwitch || _numLives==0) return false;
|
if (!_livesSwitch || _numLives==0) return false;
|
||||||
|
|
||||||
--_numLives;
|
--_numLives;
|
||||||
_livesSwitch->setValue(_numLives,false);
|
_livesSwitch->setValue(_numLives,false);
|
||||||
|
|
||||||
return (_numLives!=0);
|
return (_numLives!=0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,21 +279,21 @@ class CatchableObject : public osg::Referenced
|
|||||||
bool anyInside(const osg::Vec3& lower_left, const osg::Vec3& top_right);
|
bool anyInside(const osg::Vec3& lower_left, const osg::Vec3& top_right);
|
||||||
|
|
||||||
bool centerInside(const osg::Vec3& center, float radius);
|
bool centerInside(const osg::Vec3& center, float radius);
|
||||||
|
|
||||||
void explode();
|
void explode();
|
||||||
|
|
||||||
bool dangerous() { return _dangerous; }
|
bool dangerous() { return _dangerous; }
|
||||||
|
|
||||||
void stop() { _stopped = true; }
|
void stop() { _stopped = true; }
|
||||||
|
|
||||||
bool stopped() { return _stopped; }
|
bool stopped() { return _stopped; }
|
||||||
|
|
||||||
void setTimeToRemove(double time) { _timeToRemove=time; }
|
void setTimeToRemove(double time) { _timeToRemove=time; }
|
||||||
|
|
||||||
double getTimeToRemove() { return _timeToRemove; }
|
double getTimeToRemove() { return _timeToRemove; }
|
||||||
|
|
||||||
bool needToRemove(double time) { return _timeToRemove>=0.0 && time>_timeToRemove; }
|
bool needToRemove(double time) { return _timeToRemove>=0.0 && time>_timeToRemove; }
|
||||||
|
|
||||||
osg::ref_ptr<osg::PositionAttitudeTransform> _object;
|
osg::ref_ptr<osg::PositionAttitudeTransform> _object;
|
||||||
osg::Vec3 _velocity;
|
osg::Vec3 _velocity;
|
||||||
float _mass;
|
float _mass;
|
||||||
@@ -307,7 +307,7 @@ class CatchableObject : public osg::Referenced
|
|||||||
static void setUpCatchablesMap(const FileList& fileList);
|
static void setUpCatchablesMap(const FileList& fileList);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// update position and velocity
|
// update position and velocity
|
||||||
void update(double dt);
|
void update(double dt);
|
||||||
|
|
||||||
@@ -317,7 +317,7 @@ class CatchableObject : public osg::Referenced
|
|||||||
_viscosity = v;
|
_viscosity = v;
|
||||||
_viscosityCoefficient = 6 * osg::PI * _viscosity;
|
_viscosityCoefficient = 6 * osg::PI * _viscosity;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the viscosity of the fluid.
|
/// Get the viscosity of the fluid.
|
||||||
inline float getFluidViscosity() const { return _viscosity; }
|
inline float getFluidViscosity() const { return _viscosity; }
|
||||||
|
|
||||||
@@ -330,17 +330,17 @@ class CatchableObject : public osg::Referenced
|
|||||||
|
|
||||||
/// Get the density of the fluid.
|
/// Get the density of the fluid.
|
||||||
inline float getFluidDensity() const { return _density; }
|
inline float getFluidDensity() const { return _density; }
|
||||||
|
|
||||||
|
|
||||||
/// Set the wind vector.
|
/// Set the wind vector.
|
||||||
inline void setWind(const osg::Vec3& wind) { _wind = wind; }
|
inline void setWind(const osg::Vec3& wind) { _wind = wind; }
|
||||||
|
|
||||||
/// Get the wind vector.
|
/// Get the wind vector.
|
||||||
inline const osg::Vec3& getWind() const { return _wind; }
|
inline const osg::Vec3& getWind() const { return _wind; }
|
||||||
|
|
||||||
/// Set the acceleration vector.
|
/// Set the acceleration vector.
|
||||||
inline void setAcceleration(const osg::Vec3& v) { _acceleration = v; }
|
inline void setAcceleration(const osg::Vec3& v) { _acceleration = v; }
|
||||||
|
|
||||||
/// Get the acceleration vector.
|
/// Get the acceleration vector.
|
||||||
inline const osg::Vec3& getAcceleration() const { return _acceleration; }
|
inline const osg::Vec3& getAcceleration() const { return _acceleration; }
|
||||||
|
|
||||||
@@ -356,7 +356,7 @@ class CatchableObject : public osg::Referenced
|
|||||||
setFluidDensity(1.2929f);
|
setFluidDensity(1.2929f);
|
||||||
setFluidViscosity(1.8e-5f);
|
setFluidViscosity(1.8e-5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the fluid parameters as for pure water (20<32>C temperature).
|
/// Set the fluid parameters as for pure water (20<32>C temperature).
|
||||||
inline void setFluidToWater()
|
inline void setFluidToWater()
|
||||||
{
|
{
|
||||||
@@ -364,7 +364,7 @@ class CatchableObject : public osg::Referenced
|
|||||||
setFluidDensity(1.0f);
|
setFluidDensity(1.0f);
|
||||||
setFluidViscosity(1.002e-3f);
|
setFluidViscosity(1.002e-3f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@@ -375,15 +375,15 @@ class CatchableObject : public osg::Referenced
|
|||||||
|
|
||||||
float _viscosityCoefficient;
|
float _viscosityCoefficient;
|
||||||
float _densityCoefficeint;
|
float _densityCoefficeint;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
CatchableObject::CatchableObject()
|
CatchableObject::CatchableObject()
|
||||||
{
|
{
|
||||||
_stopped = false;
|
_stopped = false;
|
||||||
_dangerous = false;
|
_dangerous = false;
|
||||||
|
|
||||||
_timeToRemove = -1.0; // do not remove.
|
_timeToRemove = -1.0; // do not remove.
|
||||||
setFluidToAir();
|
setFluidToAir();
|
||||||
}
|
}
|
||||||
@@ -395,14 +395,14 @@ void CatchableObject::setUpCatchablesMap(const FileList& fileList)
|
|||||||
++itr)
|
++itr)
|
||||||
{
|
{
|
||||||
const std::string& filename = *itr;
|
const std::string& filename = *itr;
|
||||||
osg::Image* image = osgDB::readImageFile(filename);
|
osg::ref_ptr<osg::Image> image = osgDB::readRefImageFile(filename);
|
||||||
if (image)
|
if (image)
|
||||||
{
|
{
|
||||||
osg::ref_ptr<osg::StateSet> stateset = new osg::StateSet();
|
osg::ref_ptr<osg::StateSet> stateset = new osg::StateSet();
|
||||||
stateset->setTextureAttributeAndModes(0,new osg::Texture2D(image),osg::StateAttribute::ON);
|
stateset->setTextureAttributeAndModes(0,new osg::Texture2D(image),osg::StateAttribute::ON);
|
||||||
stateset->setMode(GL_BLEND,osg::StateAttribute::ON);
|
stateset->setMode(GL_BLEND,osg::StateAttribute::ON);
|
||||||
stateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
|
stateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
|
||||||
|
|
||||||
osg::Vec3 width((float)(image->s())/(float)(image->t()),0.0f,0.0);
|
osg::Vec3 width((float)(image->s())/(float)(image->t()),0.0f,0.0);
|
||||||
osg::Vec3 height(0.0f,0.0f,1.0f);
|
osg::Vec3 height(0.0f,0.0f,1.0f);
|
||||||
osg::Vec3 pos = (width+height)*-0.5f;
|
osg::Vec3 pos = (width+height)*-0.5f;
|
||||||
@@ -455,8 +455,8 @@ void CatchableObject::update(double dt)
|
|||||||
osg::Vec3 force = _acceleration * (_mass - _density*Volume);
|
osg::Vec3 force = _acceleration * (_mass - _density*Volume);
|
||||||
|
|
||||||
// compute force due to friction
|
// compute force due to friction
|
||||||
osg::Vec3 relative_wind = _velocity-_wind;
|
osg::Vec3 relative_wind = _velocity-_wind;
|
||||||
force -= relative_wind * Area * (_viscosityCoefficient + _densityCoefficeint*relative_wind.length());
|
force -= relative_wind * Area * (_viscosityCoefficient + _densityCoefficeint*relative_wind.length());
|
||||||
|
|
||||||
// divide force by mass to get acceleration.
|
// divide force by mass to get acceleration.
|
||||||
_velocity += force*(dt/_mass);
|
_velocity += force*(dt/_mass);
|
||||||
@@ -466,7 +466,7 @@ void CatchableObject::update(double dt)
|
|||||||
bool CatchableObject::anyInside(const osg::Vec3& lower_left, const osg::Vec3& upper_right)
|
bool CatchableObject::anyInside(const osg::Vec3& lower_left, const osg::Vec3& upper_right)
|
||||||
{
|
{
|
||||||
osg::Vec3 pos = _object->getPosition();
|
osg::Vec3 pos = _object->getPosition();
|
||||||
|
|
||||||
if (pos.x()+_radius < lower_left.x()) return false;
|
if (pos.x()+_radius < lower_left.x()) return false;
|
||||||
if (pos.x()-_radius > upper_right.x()) return false;
|
if (pos.x()-_radius > upper_right.x()) return false;
|
||||||
if (pos.z()+_radius < lower_left.z()) return false;
|
if (pos.z()+_radius < lower_left.z()) return false;
|
||||||
@@ -513,20 +513,20 @@ class GameEventHandler : public osgGA::GUIEventHandler
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
GameEventHandler();
|
GameEventHandler();
|
||||||
|
|
||||||
META_Object(osgStereImageApp,GameEventHandler);
|
META_Object(osgStereImageApp,GameEventHandler);
|
||||||
|
|
||||||
virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter&);
|
virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter&);
|
||||||
|
|
||||||
virtual void getUsage(osg::ApplicationUsage& usage) const;
|
virtual void getUsage(osg::ApplicationUsage& usage) const;
|
||||||
|
|
||||||
osg::Matrix getCameraPosition();
|
osg::Matrix getCameraPosition();
|
||||||
|
|
||||||
void compileGLObjects(osg::State& state)
|
void compileGLObjects(osg::State& state)
|
||||||
{
|
{
|
||||||
osgUtil::GLObjectsVisitor compile;
|
osgUtil::GLObjectsVisitor compile;
|
||||||
compile.setState(&state);
|
compile.setState(&state);
|
||||||
|
|
||||||
for(ObjectMap::iterator itr = s_objectMap.begin();
|
for(ObjectMap::iterator itr = s_objectMap.begin();
|
||||||
itr != s_objectMap.end();
|
itr != s_objectMap.end();
|
||||||
++itr)
|
++itr)
|
||||||
@@ -534,14 +534,14 @@ public:
|
|||||||
itr->second->accept(compile);
|
itr->second->accept(compile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Node* createScene();
|
osg::Node* createScene();
|
||||||
|
|
||||||
void setFOVY(float fovy) { _fovy = fovy; }
|
void setFOVY(float fovy) { _fovy = fovy; }
|
||||||
float getFOVY() const { return _fovy; }
|
float getFOVY() const { return _fovy; }
|
||||||
|
|
||||||
void createNewCatchable();
|
void createNewCatchable();
|
||||||
|
|
||||||
void clearCatchables()
|
void clearCatchables()
|
||||||
{
|
{
|
||||||
for(CatchableObjectList::iterator itr=_catchableObjects.begin();
|
for(CatchableObjectList::iterator itr=_catchableObjects.begin();
|
||||||
@@ -562,7 +562,7 @@ public:
|
|||||||
|
|
||||||
_catchableObjects.clear();
|
_catchableObjects.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void resetLevel()
|
void resetLevel()
|
||||||
{
|
{
|
||||||
_level = 0;
|
_level = 0;
|
||||||
@@ -573,7 +573,7 @@ public:
|
|||||||
|
|
||||||
_levelStartTick = osg::Timer::instance()->tick();
|
_levelStartTick = osg::Timer::instance()->tick();
|
||||||
}
|
}
|
||||||
|
|
||||||
void nextLevel()
|
void nextLevel()
|
||||||
{
|
{
|
||||||
++_level;
|
++_level;
|
||||||
@@ -596,12 +596,12 @@ public:
|
|||||||
void resetGame()
|
void resetGame()
|
||||||
{
|
{
|
||||||
_currentScore = 0;
|
_currentScore = 0;
|
||||||
|
|
||||||
updateTextWithScore();
|
updateTextWithScore();
|
||||||
|
|
||||||
clearCatchables();
|
clearCatchables();
|
||||||
resetLevel();
|
resetLevel();
|
||||||
|
|
||||||
for(unsigned int i=0;i<_numberOfPlayers;++i)
|
for(unsigned int i=0;i<_numberOfPlayers;++i)
|
||||||
{
|
{
|
||||||
_players[i].reset();
|
_players[i].reset();
|
||||||
@@ -629,12 +629,12 @@ public:
|
|||||||
livesPosition = _originBaseLine+osg::Vec3(1000.0f,-0.5f,000.0f);
|
livesPosition = _originBaseLine+osg::Vec3(1000.0f,-0.5f,000.0f);
|
||||||
catchesPosition = _originBaseLine+osg::Vec3(1100.0f,-0.5f,0.0f);
|
catchesPosition = _originBaseLine+osg::Vec3(1100.0f,-0.5f,0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(player)
|
switch(player)
|
||||||
{
|
{
|
||||||
case PLAYER_GIRL:
|
case PLAYER_GIRL:
|
||||||
{
|
{
|
||||||
std::string player_one = "Catch/girl.png";
|
std::string player_one = "Catch/girl.png";
|
||||||
osg::Vec3 catchPos(0.2, 0.57, 0.34);
|
osg::Vec3 catchPos(0.2, 0.57, 0.34);
|
||||||
|
|
||||||
_players[_numberOfPlayers].setCharacter(player_one,"girl", _originBaseLine + osg::Vec3(0.0f,-1.0f,0.0f), _widthBaseLine, catchPos, 0.5f);
|
_players[_numberOfPlayers].setCharacter(player_one,"girl", _originBaseLine + osg::Vec3(0.0f,-1.0f,0.0f), _widthBaseLine, catchPos, 0.5f);
|
||||||
@@ -646,7 +646,7 @@ public:
|
|||||||
}
|
}
|
||||||
case PLAYER_BOY:
|
case PLAYER_BOY:
|
||||||
{
|
{
|
||||||
std::string player_two = "Catch/boy.png";
|
std::string player_two = "Catch/boy.png";
|
||||||
osg::Vec3 catchPos(0.8, 0.57, 0.34);
|
osg::Vec3 catchPos(0.8, 0.57, 0.34);
|
||||||
|
|
||||||
_players[_numberOfPlayers].setCharacter(player_two,"boy", _originBaseLine + osg::Vec3(0.0f,-2.0f,0.0f), _widthBaseLine, catchPos, 0.5f);
|
_players[_numberOfPlayers].setCharacter(player_two,"boy", _originBaseLine + osg::Vec3(0.0f,-2.0f,0.0f), _widthBaseLine, catchPos, 0.5f);
|
||||||
@@ -656,10 +656,10 @@ public:
|
|||||||
++_numberOfPlayers;
|
++_numberOfPlayers;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
typedef std::vector< osg::ref_ptr<osgText::Text> > TextList;
|
typedef std::vector< osg::ref_ptr<osgText::Text> > TextList;
|
||||||
|
|
||||||
void updateScoreWithCatch()
|
void updateScoreWithCatch()
|
||||||
@@ -673,8 +673,8 @@ public:
|
|||||||
osg::Timer_t newTick = osg::Timer::instance()->tick();
|
osg::Timer_t newTick = osg::Timer::instance()->tick();
|
||||||
double timeForLevel = osg::Timer::instance()->delta_s(_levelStartTick, newTick);
|
double timeForLevel = osg::Timer::instance()->delta_s(_levelStartTick, newTick);
|
||||||
|
|
||||||
// a ten second level gets you 10 points,
|
// a ten second level gets you 10 points,
|
||||||
// a twenty second levels gets you 5 points.
|
// a twenty second levels gets you 5 points.
|
||||||
_currentScore += static_cast<unsigned int>(10000.0f/(timeForLevel*timeForLevel));
|
_currentScore += static_cast<unsigned int>(10000.0f/(timeForLevel*timeForLevel));
|
||||||
|
|
||||||
updateTextWithScore();
|
updateTextWithScore();
|
||||||
@@ -685,24 +685,24 @@ public:
|
|||||||
{
|
{
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os<<"Score: "<<_currentScore;
|
os<<"Score: "<<_currentScore;
|
||||||
|
|
||||||
std::string textString = os.str();
|
std::string textString = os.str();
|
||||||
|
|
||||||
for(TextList::iterator itr = _scoreTextList.begin();
|
for(TextList::iterator itr = _scoreTextList.begin();
|
||||||
itr != _scoreTextList.end();
|
itr != _scoreTextList.end();
|
||||||
++itr)
|
++itr)
|
||||||
{
|
{
|
||||||
(*itr)->setText(textString);
|
(*itr)->setText(textString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void updateLevelText()
|
void updateLevelText()
|
||||||
{
|
{
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os<<"Level: "<<_level+1;
|
os<<"Level: "<<_level+1;
|
||||||
_levelText->setText(os.str());
|
_levelText->setText(os.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@@ -715,45 +715,45 @@ protected:
|
|||||||
osg::Vec3 _originBaseLine;
|
osg::Vec3 _originBaseLine;
|
||||||
osg::Vec3 _widthBaseLine;
|
osg::Vec3 _widthBaseLine;
|
||||||
float _characterSize;
|
float _characterSize;
|
||||||
|
|
||||||
float _fovy;
|
float _fovy;
|
||||||
|
|
||||||
unsigned _level;
|
unsigned _level;
|
||||||
|
|
||||||
float _chanceOfExplodingAtStart;
|
float _chanceOfExplodingAtStart;
|
||||||
float _initialNumDropsPerSecond;
|
float _initialNumDropsPerSecond;
|
||||||
|
|
||||||
osg::ref_ptr<osg::Switch> _gameSwitch;
|
osg::ref_ptr<osg::Switch> _gameSwitch;
|
||||||
osg::ref_ptr<osg::Group> _gameGroup;
|
osg::ref_ptr<osg::Group> _gameGroup;
|
||||||
osg::ref_ptr<osg::Switch> _levelSwitch;
|
osg::ref_ptr<osg::Switch> _levelSwitch;
|
||||||
|
|
||||||
unsigned int _currentIndex;
|
unsigned int _currentIndex;
|
||||||
unsigned int _welcomeIndex;
|
unsigned int _welcomeIndex;
|
||||||
unsigned int _lostIndex;
|
unsigned int _lostIndex;
|
||||||
unsigned int _wonIndex;
|
unsigned int _wonIndex;
|
||||||
unsigned int _gameIndex;
|
unsigned int _gameIndex;
|
||||||
|
|
||||||
osg::Timer_t _levelStartTick;
|
osg::Timer_t _levelStartTick;
|
||||||
unsigned int _currentScore;
|
unsigned int _currentScore;
|
||||||
|
|
||||||
osg::ref_ptr<osgText::Text> _levelText;
|
osg::ref_ptr<osgText::Text> _levelText;
|
||||||
TextList _scoreTextList;
|
TextList _scoreTextList;
|
||||||
|
|
||||||
unsigned int _numberOfPlayers;
|
unsigned int _numberOfPlayers;
|
||||||
Character _players[2];
|
Character _players[2];
|
||||||
|
|
||||||
typedef std::list< osg::ref_ptr<CatchableObject> > CatchableObjectList;
|
typedef std::list< osg::ref_ptr<CatchableObject> > CatchableObjectList;
|
||||||
CatchableObjectList _catchableObjects;
|
CatchableObjectList _catchableObjects;
|
||||||
|
|
||||||
FileList _backgroundFiles;
|
FileList _backgroundFiles;
|
||||||
FileList _benignCatachables;
|
FileList _benignCatachables;
|
||||||
|
|
||||||
bool _leftKeyPressed;
|
bool _leftKeyPressed;
|
||||||
bool _rightKeyPressed;
|
bool _rightKeyPressed;
|
||||||
|
|
||||||
osg::ref_ptr<CatchableObject> _dummyCatchable;
|
osg::ref_ptr<CatchableObject> _dummyCatchable;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -791,11 +791,11 @@ GameEventHandler::GameEventHandler()
|
|||||||
_benignCatachables.push_back("Catch/t.png");
|
_benignCatachables.push_back("Catch/t.png");
|
||||||
_benignCatachables.push_back("Catch/u.png");
|
_benignCatachables.push_back("Catch/u.png");
|
||||||
_benignCatachables.push_back("Catch/ball.png");
|
_benignCatachables.push_back("Catch/ball.png");
|
||||||
|
|
||||||
CatchableObject::setUpCatchablesMap(_benignCatachables);
|
CatchableObject::setUpCatchablesMap(_benignCatachables);
|
||||||
|
|
||||||
_currentScore = 0;
|
_currentScore = 0;
|
||||||
|
|
||||||
setFOVY(osg::DegreesToRadians(60.0));
|
setFOVY(osg::DegreesToRadians(60.0));
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -817,7 +817,7 @@ bool GameEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
|
|||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (_currentIndex==_lostIndex)
|
else if (_currentIndex==_lostIndex)
|
||||||
{
|
{
|
||||||
@@ -834,7 +834,7 @@ bool GameEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
|
|||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (_currentIndex==_wonIndex)
|
else if (_currentIndex==_wonIndex)
|
||||||
{
|
{
|
||||||
@@ -851,7 +851,7 @@ bool GameEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
|
|||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (_currentIndex==_gameIndex)
|
else if (_currentIndex==_gameIndex)
|
||||||
{
|
{
|
||||||
@@ -888,7 +888,7 @@ bool GameEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
|
|||||||
for(unsigned int i=0;i<_numberOfPlayers;++i)
|
for(unsigned int i=0;i<_numberOfPlayers;++i)
|
||||||
{
|
{
|
||||||
bool inBasket = ((*itr)->centerInside(_players[i].getCurrentCenterOfBasket(),_players[i].getCurrentRadiusOfBasket()));
|
bool inBasket = ((*itr)->centerInside(_players[i].getCurrentCenterOfBasket(),_players[i].getCurrentRadiusOfBasket()));
|
||||||
|
|
||||||
if ((*itr)->dangerous())
|
if ((*itr)->dangerous())
|
||||||
{
|
{
|
||||||
if ((*itr)->anyInside(_players[i].getLowerLeft(),_players[i].getUpperRight()) || inBasket)
|
if ((*itr)->anyInside(_players[i].getLowerLeft(),_players[i].getUpperRight()) || inBasket)
|
||||||
@@ -912,7 +912,7 @@ bool GameEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
|
|||||||
{
|
{
|
||||||
// player has caught a safe object.
|
// player has caught a safe object.
|
||||||
updateScoreWithCatch();
|
updateScoreWithCatch();
|
||||||
|
|
||||||
if (!_players[i].addCatch())
|
if (!_players[i].addCatch())
|
||||||
{
|
{
|
||||||
_players[i].resetCatches();
|
_players[i].resetCatches();
|
||||||
@@ -930,7 +930,7 @@ bool GameEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(*itr)->anyInside(_origin, _origin+_width+_height) ||
|
if (!(*itr)->anyInside(_origin, _origin+_width+_height) ||
|
||||||
(*itr)->needToRemove(ea.getTime()) ||
|
(*itr)->needToRemove(ea.getTime()) ||
|
||||||
removeEntry)
|
removeEntry)
|
||||||
{
|
{
|
||||||
@@ -968,7 +968,7 @@ bool GameEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
|
|||||||
float numDropsPerSecond = _initialNumDropsPerSecond * (_level+1);
|
float numDropsPerSecond = _initialNumDropsPerSecond * (_level+1);
|
||||||
float r = (float)rand()/(float)RAND_MAX;
|
float r = (float)rand()/(float)RAND_MAX;
|
||||||
if (r < deltaTime*numDropsPerSecond)
|
if (r < deltaTime*numDropsPerSecond)
|
||||||
{
|
{
|
||||||
createNewCatchable();
|
createNewCatchable();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1015,7 +1015,7 @@ bool GameEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionA
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameEventHandler::getUsage(osg::ApplicationUsage&) const
|
void GameEventHandler::getUsage(osg::ApplicationUsage&) const
|
||||||
@@ -1026,9 +1026,9 @@ osg::Matrix GameEventHandler::getCameraPosition()
|
|||||||
{
|
{
|
||||||
osg::Matrix cameraPosition;
|
osg::Matrix cameraPosition;
|
||||||
osg::Vec3 center = _origin+(_width+_height)*0.5f;
|
osg::Vec3 center = _origin+(_width+_height)*0.5f;
|
||||||
|
|
||||||
float distance = _height.length()/(2.0f*tanf(_fovy*0.5f));
|
float distance = _height.length()/(2.0f*tanf(_fovy*0.5f));
|
||||||
|
|
||||||
cameraPosition.makeLookAt(center-osg::Vec3(0.0f,distance,0.0f),center,osg::Vec3(0.0f,0.0f,1.0f));
|
cameraPosition.makeLookAt(center-osg::Vec3(0.0f,distance,0.0f),center,osg::Vec3(0.0f,0.0f,1.0f));
|
||||||
return cameraPosition;
|
return cameraPosition;
|
||||||
}
|
}
|
||||||
@@ -1036,8 +1036,8 @@ osg::Matrix GameEventHandler::getCameraPosition()
|
|||||||
osg::Node* GameEventHandler::createScene()
|
osg::Node* GameEventHandler::createScene()
|
||||||
{
|
{
|
||||||
_gameSwitch = new osg::Switch;
|
_gameSwitch = new osg::Switch;
|
||||||
|
|
||||||
// create a dummy catchable to load all the particule textures to reduce
|
// create a dummy catchable to load all the particule textures to reduce
|
||||||
// latency later on..
|
// latency later on..
|
||||||
_dummyCatchable = new CatchableObject;
|
_dummyCatchable = new CatchableObject;
|
||||||
_dummyCatchable->setObject("Catch/a.png","a",osg::Vec3(0.0f,0.0,0.0f),1.0f,osg::Vec3(0.0f,0.0,0.0f));
|
_dummyCatchable->setObject("Catch/a.png","a",osg::Vec3(0.0f,0.0,0.0f),1.0f,osg::Vec3(0.0f,0.0,0.0f));
|
||||||
@@ -1045,10 +1045,10 @@ osg::Node* GameEventHandler::createScene()
|
|||||||
|
|
||||||
// set up welcome subgraph
|
// set up welcome subgraph
|
||||||
{
|
{
|
||||||
osg::Geode* geode = new osg::Geode;
|
osg::ref_ptr<osg::Geode> geode = new osg::Geode;
|
||||||
|
|
||||||
// set up the background
|
// set up the background
|
||||||
osg::Image* image = osgDB::readImageFile("Catch/Welcome.jpg");
|
osg::ref_ptr<osg::Image> image = osgDB::readRefImageFile("Catch/Welcome.jpg");
|
||||||
if (image)
|
if (image)
|
||||||
{
|
{
|
||||||
osg::Geometry* geometry = osg::createTexturedQuadGeometry(_origin,_width,_height);
|
osg::Geometry* geometry = osg::createTexturedQuadGeometry(_origin,_width,_height);
|
||||||
@@ -1057,7 +1057,7 @@ osg::Node* GameEventHandler::createScene()
|
|||||||
|
|
||||||
geode->addDrawable(geometry);
|
geode->addDrawable(geometry);
|
||||||
}
|
}
|
||||||
|
|
||||||
// set up the text
|
// set up the text
|
||||||
osg::Vec3 textPosition = _origin+_width*0.5f+_height*0.8f -osg::Vec3(0.0f,0.1f,0.0f);
|
osg::Vec3 textPosition = _origin+_width*0.5f+_height*0.8f -osg::Vec3(0.0f,0.1f,0.0f);
|
||||||
{
|
{
|
||||||
@@ -1072,7 +1072,7 @@ osg::Node* GameEventHandler::createScene()
|
|||||||
|
|
||||||
geode->addDrawable(text);
|
geode->addDrawable(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
textPosition -= _height*0.25f;
|
textPosition -= _height*0.25f;
|
||||||
osgText::Text* text = new osgText::Text;
|
osgText::Text* text = new osgText::Text;
|
||||||
@@ -1121,9 +1121,9 @@ osg::Node* GameEventHandler::createScene()
|
|||||||
|
|
||||||
// set up you've lost subgraph
|
// set up you've lost subgraph
|
||||||
{
|
{
|
||||||
osg::Geode* geode = new osg::Geode;
|
osg::ref_ptr<osg::Geode> geode = new osg::Geode;
|
||||||
|
|
||||||
osg::Image* image = osgDB::readImageFile("Catch/YouLost.jpg");
|
osg::ref_ptr<osg::Image> image = osgDB::readRefImageFile("Catch/YouLost.jpg");
|
||||||
if (image)
|
if (image)
|
||||||
{
|
{
|
||||||
osg::Geometry* geometry = osg::createTexturedQuadGeometry(_origin,_width,_height);
|
osg::Geometry* geometry = osg::createTexturedQuadGeometry(_origin,_width,_height);
|
||||||
@@ -1132,7 +1132,7 @@ osg::Node* GameEventHandler::createScene()
|
|||||||
|
|
||||||
geode->addDrawable(geometry);
|
geode->addDrawable(geometry);
|
||||||
}
|
}
|
||||||
|
|
||||||
// set up the text
|
// set up the text
|
||||||
osg::Vec3 textPosition = _origin+_width*0.5f+_height*0.75f -osg::Vec3(0.0f,0.1f,0.0f);
|
osg::Vec3 textPosition = _origin+_width*0.5f+_height*0.75f -osg::Vec3(0.0f,0.1f,0.0f);
|
||||||
{
|
{
|
||||||
@@ -1147,7 +1147,7 @@ osg::Node* GameEventHandler::createScene()
|
|||||||
|
|
||||||
geode->addDrawable(text);
|
geode->addDrawable(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
textPosition -= _height*0.25f;
|
textPosition -= _height*0.25f;
|
||||||
osgText::Text* text = new osgText::Text;
|
osgText::Text* text = new osgText::Text;
|
||||||
@@ -1184,9 +1184,9 @@ osg::Node* GameEventHandler::createScene()
|
|||||||
|
|
||||||
// set up you've won subgraph
|
// set up you've won subgraph
|
||||||
{
|
{
|
||||||
osg::Geode* geode = new osg::Geode;
|
osg::ref_ptr<osg::Geode> geode = new osg::Geode;
|
||||||
|
|
||||||
osg::Image* image = osgDB::readImageFile("Catch/YouWon.jpg");
|
osg::ref_ptr<osg::Image> image = osgDB::readRefImageFile("Catch/YouWon.jpg");
|
||||||
if (image)
|
if (image)
|
||||||
{
|
{
|
||||||
osg::Geometry* geometry = osg::createTexturedQuadGeometry(_origin,_width,_height);
|
osg::Geometry* geometry = osg::createTexturedQuadGeometry(_origin,_width,_height);
|
||||||
@@ -1195,7 +1195,7 @@ osg::Node* GameEventHandler::createScene()
|
|||||||
|
|
||||||
geode->addDrawable(geometry);
|
geode->addDrawable(geometry);
|
||||||
}
|
}
|
||||||
|
|
||||||
// set up the text
|
// set up the text
|
||||||
osg::Vec3 textPosition = _origin+_width*0.5f+_height*0.75f -osg::Vec3(0.0f,0.1f,0.0f);
|
osg::Vec3 textPosition = _origin+_width*0.5f+_height*0.75f -osg::Vec3(0.0f,0.1f,0.0f);
|
||||||
{
|
{
|
||||||
@@ -1210,7 +1210,7 @@ osg::Node* GameEventHandler::createScene()
|
|||||||
|
|
||||||
geode->addDrawable(text);
|
geode->addDrawable(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
textPosition -= _height*0.25f;
|
textPosition -= _height*0.25f;
|
||||||
osgText::Text* text = new osgText::Text;
|
osgText::Text* text = new osgText::Text;
|
||||||
@@ -1258,7 +1258,7 @@ osg::Node* GameEventHandler::createScene()
|
|||||||
_gameGroup->addChild(_players[i]._character.get());
|
_gameGroup->addChild(_players[i]._character.get());
|
||||||
_gameGroup->addChild(_players[i]._livesSwitch.get());
|
_gameGroup->addChild(_players[i]._livesSwitch.get());
|
||||||
_gameGroup->addChild(_players[i]._catchSwitch.get());
|
_gameGroup->addChild(_players[i]._catchSwitch.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
// background
|
// background
|
||||||
{
|
{
|
||||||
@@ -1269,7 +1269,7 @@ osg::Node* GameEventHandler::createScene()
|
|||||||
++itr)
|
++itr)
|
||||||
{
|
{
|
||||||
|
|
||||||
osg::Image* image = osgDB::readImageFile(*itr);
|
osg::ref_ptr<osg::Image> image = osgDB::readRefImageFile(*itr);
|
||||||
if (image)
|
if (image)
|
||||||
{
|
{
|
||||||
osg::Geometry* geometry = osg::createTexturedQuadGeometry(_origin,_width,_height);
|
osg::Geometry* geometry = osg::createTexturedQuadGeometry(_origin,_width,_height);
|
||||||
@@ -1305,7 +1305,7 @@ osg::Node* GameEventHandler::createScene()
|
|||||||
osg::Geode* geode = new osg::Geode;
|
osg::Geode* geode = new osg::Geode;
|
||||||
geode->addDrawable(text);
|
geode->addDrawable(text);
|
||||||
_scoreTextList.push_back(text);
|
_scoreTextList.push_back(text);
|
||||||
|
|
||||||
textPosition -= _height*0.05f;
|
textPosition -= _height*0.05f;
|
||||||
_levelText = new osgText::Text;
|
_levelText = new osgText::Text;
|
||||||
_levelText->setText("Level : 0");
|
_levelText->setText("Level : 0");
|
||||||
@@ -1317,7 +1317,7 @@ osg::Node* GameEventHandler::createScene()
|
|||||||
_levelText->setAxisAlignment(osgText::Text::XZ_PLANE);
|
_levelText->setAxisAlignment(osgText::Text::XZ_PLANE);
|
||||||
|
|
||||||
geode->addDrawable(_levelText.get());
|
geode->addDrawable(_levelText.get());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_gameGroup->addChild(geode);
|
_gameGroup->addChild(geode);
|
||||||
@@ -1325,7 +1325,7 @@ osg::Node* GameEventHandler::createScene()
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_currentIndex = _welcomeIndex;
|
_currentIndex = _welcomeIndex;
|
||||||
_gameSwitch->setSingleChildOn(_currentIndex);
|
_gameSwitch->setSingleChildOn(_currentIndex);
|
||||||
|
|
||||||
@@ -1338,7 +1338,7 @@ void GameEventHandler::createNewCatchable()
|
|||||||
|
|
||||||
unsigned int catachableIndex = (unsigned int)((float)_benignCatachables.size()*(float)rand()/(float)RAND_MAX);
|
unsigned int catachableIndex = (unsigned int)((float)_benignCatachables.size()*(float)rand()/(float)RAND_MAX);
|
||||||
if (catachableIndex>=_benignCatachables.size()) catachableIndex = _benignCatachables.size()-1;
|
if (catachableIndex>=_benignCatachables.size()) catachableIndex = _benignCatachables.size()-1;
|
||||||
|
|
||||||
const std::string& filename = _benignCatachables[catachableIndex];
|
const std::string& filename = _benignCatachables[catachableIndex];
|
||||||
|
|
||||||
float ratio = ((float)rand() / (float)RAND_MAX);
|
float ratio = ((float)rand() / (float)RAND_MAX);
|
||||||
@@ -1356,7 +1356,7 @@ void GameEventHandler::createNewCatchable()
|
|||||||
float r = (float)rand() / (float)RAND_MAX;
|
float r = (float)rand() / (float)RAND_MAX;
|
||||||
if (r < _chanceOfExplodingAtStart)
|
if (r < _chanceOfExplodingAtStart)
|
||||||
{
|
{
|
||||||
catchableObject->explode();
|
catchableObject->explode();
|
||||||
}
|
}
|
||||||
|
|
||||||
_gameGroup->addChild(catchableObject->_object.get());
|
_gameGroup->addChild(catchableObject->_object.get());
|
||||||
@@ -1366,9 +1366,10 @@ class CompileStateCallback : public osg::Operation
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CompileStateCallback(GameEventHandler* eh):
|
CompileStateCallback(GameEventHandler* eh):
|
||||||
|
osg::Referenced(true),
|
||||||
osg::Operation("CompileStateCallback", false),
|
osg::Operation("CompileStateCallback", false),
|
||||||
_gameEventHandler(eh) {}
|
_gameEventHandler(eh) {}
|
||||||
|
|
||||||
virtual void operator () (osg::Object* object)
|
virtual void operator () (osg::Object* object)
|
||||||
{
|
{
|
||||||
osg::GraphicsContext* context = dynamic_cast<osg::GraphicsContext*>(object);
|
osg::GraphicsContext* context = dynamic_cast<osg::GraphicsContext*>(object);
|
||||||
@@ -1379,7 +1380,7 @@ class CompileStateCallback : public osg::Operation
|
|||||||
_gameEventHandler->compileGLObjects(*(context->getState()));
|
_gameEventHandler->compileGLObjects(*(context->getState()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenThreads::Mutex _mutex;
|
OpenThreads::Mutex _mutex;
|
||||||
GameEventHandler* _gameEventHandler;
|
GameEventHandler* _gameEventHandler;
|
||||||
};
|
};
|
||||||
@@ -1389,7 +1390,7 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
// use an ArgumentParser object to manage the program arguments.
|
// use an ArgumentParser object to manage the program arguments.
|
||||||
osg::ArgumentParser arguments(&argc,argv);
|
osg::ArgumentParser arguments(&argc,argv);
|
||||||
|
|
||||||
// set up the usage document, in case we need to print out how to use this program.
|
// set up the usage document, in case we need to print out how to use this program.
|
||||||
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the example which demonstrates use node masks to create stereo images.");
|
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the example which demonstrates use node masks to create stereo images.");
|
||||||
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] image_file_left_eye image_file_right_eye");
|
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] image_file_left_eye image_file_right_eye");
|
||||||
@@ -1409,8 +1410,8 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
while (arguments.read("--boy")) seh->addPlayer(GameEventHandler::PLAYER_BOY);
|
while (arguments.read("--boy")) seh->addPlayer(GameEventHandler::PLAYER_BOY);
|
||||||
while (arguments.read("--girl")) seh->addPlayer(GameEventHandler::PLAYER_GIRL);
|
while (arguments.read("--girl")) seh->addPlayer(GameEventHandler::PLAYER_GIRL);
|
||||||
|
|
||||||
|
|
||||||
// if user request help write it out to cout.
|
// if user request help write it out to cout.
|
||||||
if (arguments.read("-h") || arguments.read("--help"))
|
if (arguments.read("-h") || arguments.read("--help"))
|
||||||
{
|
{
|
||||||
@@ -1427,8 +1428,8 @@ int main( int argc, char **argv )
|
|||||||
arguments.writeErrorMessages(std::cout);
|
arguments.writeErrorMessages(std::cout);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// enable the image cache so we don't need to keep loading the particle files
|
// enable the image cache so we don't need to keep loading the particle files
|
||||||
osgDB::ReaderWriter::Options* options = new osgDB::ReaderWriter::Options;
|
osgDB::ReaderWriter::Options* options = new osgDB::ReaderWriter::Options;
|
||||||
options->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_IMAGES);
|
options->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_IMAGES);
|
||||||
@@ -1453,7 +1454,7 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
double fovy, aspectRatio, zNear, zFar;
|
double fovy, aspectRatio, zNear, zFar;
|
||||||
viewer.getCamera()->getProjectionMatrixAsPerspective(fovy, aspectRatio, zNear, zFar);
|
viewer.getCamera()->getProjectionMatrixAsPerspective(fovy, aspectRatio, zNear, zFar);
|
||||||
seh->setFOVY(osg::DegreesToRadians(fovy));
|
seh->setFOVY(osg::DegreesToRadians(fovy));
|
||||||
|
|
||||||
// todo for osgViewer - create default set up.
|
// todo for osgViewer - create default set up.
|
||||||
viewer.setUpViewAcrossAllScreens();
|
viewer.setUpViewAcrossAllScreens();
|
||||||
@@ -1471,7 +1472,7 @@ int main( int argc, char **argv )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// todo for osgViewer - implement warp pointer that can be done relative to different coordinate frames
|
// todo for osgViewer - implement warp pointer that can be done relative to different coordinate frames
|
||||||
// viewer.requestWarpPointer(0.5f,0.5f);
|
// viewer.requestWarpPointer(0.5f,0.5f);
|
||||||
|
|
||||||
while( !viewer.done() )
|
while( !viewer.done() )
|
||||||
{
|
{
|
||||||
@@ -1479,8 +1480,8 @@ int main( int argc, char **argv )
|
|||||||
|
|
||||||
// fire off the cull and draw traversals of the scene.
|
// fire off the cull and draw traversals of the scene.
|
||||||
viewer.frame();
|
viewer.frame();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user