Compare commits
1202
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d9ce1a956 | ||
|
|
b30be77ad7 | ||
|
|
9b56d2f600 | ||
|
|
6257f5024d | ||
|
|
a040827363 | ||
|
|
76a3b70751 | ||
|
|
5aa461e477 | ||
|
|
96cd2fe5fc | ||
|
|
153838db36 | ||
|
|
af5f023495 | ||
|
|
75081ef5f0 | ||
|
|
544290f60d | ||
|
|
b88fadb61a | ||
|
|
9d09d4c76f | ||
|
|
234f19b774 | ||
|
|
a441a310fd | ||
|
|
bade0670eb | ||
|
|
d5a63adb47 | ||
|
|
fc04226d57 | ||
|
|
a3e10174c5 | ||
|
|
e32724d4cd | ||
|
|
51a675b30d | ||
|
|
57f4256812 | ||
|
|
1b4b1bedda | ||
|
|
99e2af8a86 | ||
|
|
d2837e31fe | ||
|
|
463bc4c292 | ||
|
|
7c3d89ed5c | ||
|
|
fcfce6fc63 | ||
|
|
f215e1ed51 | ||
|
|
310201d843 | ||
|
|
28e201e001 | ||
|
|
cfcadfa8d1 | ||
|
|
563fdd8ef8 | ||
|
|
b665415cb3 | ||
|
|
68ef5901e2 | ||
|
|
f6404c1943 | ||
|
|
14f42b0467 | ||
|
|
f9c969f859 | ||
|
|
5b736326c7 | ||
|
|
4f3fbcaeb5 | ||
|
|
9f7a9ef098 | ||
|
|
48fb4c8ce2 | ||
|
|
fc295b0d57 | ||
|
|
3b30a551c4 | ||
|
|
38ce868f79 | ||
|
|
c20c15dcc8 | ||
|
|
358ea9a37c | ||
|
|
e44a1aee19 | ||
|
|
a7b51ed0ed | ||
|
|
6845653b38 | ||
|
|
bd9999c297 | ||
|
|
6d2f83fb7a | ||
|
|
308c405b09 | ||
|
|
94d6b7e266 | ||
|
|
8820c3113b | ||
|
|
e003bc7f9e | ||
|
|
c55665b60c | ||
|
|
2e4d3d06ba | ||
|
|
4569d5fc5b | ||
|
|
ccc8115321 | ||
|
|
860f96c670 | ||
|
|
f985381049 | ||
|
|
f6c101ca28 | ||
|
|
108a4065d0 | ||
|
|
d8d9e67da2 | ||
|
|
ac606e8f34 | ||
|
|
f4c5782140 | ||
|
|
c7ef1aa801 | ||
|
|
482ffb1008 | ||
|
|
c464487c00 | ||
|
|
ef0e19bd86 | ||
|
|
61976df9bf | ||
|
|
6a9ab4cc5e | ||
|
|
27ead283a0 | ||
|
|
2e96f282a0 | ||
|
|
0da972149a | ||
|
|
18dda78116 | ||
|
|
d910e58c3a | ||
|
|
7c7eadba3a | ||
|
|
1d34438a74 | ||
|
|
239e832bf7 | ||
|
|
673b454123 | ||
|
|
fe23326b70 | ||
|
|
28c139869a | ||
|
|
b611d7b1f5 | ||
|
|
4a05b8e0f3 | ||
|
|
36cf721b8c | ||
|
|
a1c09a7760 | ||
|
|
8c0bb9739d | ||
|
|
e9ba157058 | ||
|
|
8f8b5ec1e0 | ||
|
|
1616826478 | ||
|
|
a08acf4cee | ||
|
|
2df78ad4af | ||
|
|
ee3ff55b26 | ||
|
|
0941911736 | ||
|
|
d9f5488a84 | ||
|
|
cc9a863c9a | ||
|
|
e017002baa | ||
|
|
392e9f4df3 | ||
|
|
f10abe07e5 | ||
|
|
57b1c99db2 | ||
|
|
47717e469c | ||
|
|
a3618c945b | ||
|
|
80e94aeec8 | ||
|
|
604411c80a | ||
|
|
f5dcdf2e9a | ||
|
|
2746c376f8 | ||
|
|
3216eb4df5 | ||
|
|
dda694e13f | ||
|
|
b3e0d78bf9 | ||
|
|
280986940b | ||
|
|
55930ff737 | ||
|
|
d8a00f0f4e | ||
|
|
488a70a3df | ||
|
|
148ed6c507 | ||
|
|
f996e3b092 | ||
|
|
f9f49d355d | ||
|
|
c61ab2c7bb | ||
|
|
26422192e2 | ||
|
|
77fec96878 | ||
|
|
4b7e16741d | ||
|
|
213dcc7919 | ||
|
|
e9573349e7 | ||
|
|
8a319d3efc | ||
|
|
b956fa3e9d | ||
|
|
baa70db5a8 | ||
|
|
5f330f3952 | ||
|
|
5d7fa94a4b | ||
|
|
a93facf9b2 | ||
|
|
0c4b226f1f | ||
|
|
2d31d6fe74 | ||
|
|
50a29a6cf6 | ||
|
|
bf23ecdfe1 | ||
|
|
ce27d3cb2b | ||
|
|
14ba27113e | ||
|
|
1b983add49 | ||
|
|
f132d242aa | ||
|
|
bde9ad61c1 | ||
|
|
314faac311 | ||
|
|
3cb2822512 | ||
|
|
7c16fd3b43 | ||
|
|
35d3f5ae0a | ||
|
|
5a20fbd7f7 | ||
|
|
0e28f1ef38 | ||
|
|
54fd914bc1 | ||
|
|
43055c0ed1 | ||
|
|
953bf8bd1c | ||
|
|
9cf25ef930 | ||
|
|
a440b44ef9 | ||
|
|
efe2957c4a | ||
|
|
4692f7a714 | ||
|
|
5d1882cf2f | ||
|
|
9aa1c3c393 | ||
|
|
394c48c25d | ||
|
|
30457a5373 | ||
|
|
73b2d0926f | ||
|
|
3a65e2ddb8 | ||
|
|
8a61c041d5 | ||
|
|
c74040e9f0 | ||
|
|
223a51270a | ||
|
|
d98da79545 | ||
|
|
26d0bc2e1a | ||
|
|
b2c885f9c7 | ||
|
|
8248a41b9e | ||
|
|
eb5d4ade15 | ||
|
|
9f7af47e45 | ||
|
|
b7f07dc946 | ||
|
|
e3b6789a7c | ||
|
|
d9c2bbe90c | ||
|
|
b8366a1c4b | ||
|
|
ec027b581b | ||
|
|
6bfcb71a0c | ||
|
|
90e2995bad | ||
|
|
ffa2c665f9 | ||
|
|
29cfe103f8 | ||
|
|
1f91e9b662 | ||
|
|
4df21f6df6 | ||
|
|
ae7b113cad | ||
|
|
359cf50a0f | ||
|
|
cf55186b0b | ||
|
|
808ab042e9 | ||
|
|
aa2fb04ab7 | ||
|
|
354c1146ee | ||
|
|
a68be31c9d | ||
|
|
46fd11cef1 | ||
|
|
fb3ff961f8 | ||
|
|
cef28f1791 | ||
|
|
cb4dcef520 | ||
|
|
46a1e426d1 | ||
|
|
f54bbd847e | ||
|
|
439d103665 | ||
|
|
a65d2d6de1 | ||
|
|
d66d9d291b | ||
|
|
925d783330 | ||
|
|
817ce1a9d0 | ||
|
|
8036d6a00f | ||
|
|
e525653fbd | ||
|
|
1fc0f8056d | ||
|
|
d7449cc0d6 | ||
|
|
616604c5c5 | ||
|
|
7db1b126b8 | ||
|
|
9f4ac79720 | ||
|
|
e387e3a221 | ||
|
|
0e5a1c9be9 | ||
|
|
7f514ca27b | ||
|
|
706cfb4cde | ||
|
|
b4e5d07c9f | ||
|
|
2aad0ce782 | ||
|
|
9977c05b4b | ||
|
|
7b2ae68239 | ||
|
|
8b24ce8f3a | ||
|
|
3cf58eef43 | ||
|
|
7dc9766ce1 | ||
|
|
c94ffcfeb7 | ||
|
|
285e87211c | ||
|
|
e65694cc7d | ||
|
|
5d3c322e89 | ||
|
|
6c6e131792 | ||
|
|
c015b60ddd | ||
|
|
9b5fe332a2 | ||
|
|
737a0b57c6 | ||
|
|
fe42a91023 | ||
|
|
ebbcdf999f | ||
|
|
64a818821e | ||
|
|
7979314811 | ||
|
|
879cf43bab | ||
|
|
0817693edd | ||
|
|
4f9e144547 | ||
|
|
210d56b07f | ||
|
|
d955fd38e7 | ||
|
|
927457b104 | ||
|
|
1fcfcaeaca | ||
|
|
f082c5d6b3 | ||
|
|
d5c7d72786 | ||
|
|
b4729fe0be | ||
|
|
b1309d47a8 | ||
|
|
c656765f4d | ||
|
|
75bf1532ee | ||
|
|
29107bbcc6 | ||
|
|
9bbc79e27e | ||
|
|
2dfc7eb661 | ||
|
|
3246fa4d8c | ||
|
|
2b5e669ac1 | ||
|
|
db9ec34b4e | ||
|
|
a782975b74 | ||
|
|
41c3ed9b0e | ||
|
|
8c3bf572db | ||
|
|
b875b65987 | ||
|
|
6e768f27c9 | ||
|
|
0037b05e18 | ||
|
|
c0cde4de4a | ||
|
|
d96d324975 | ||
|
|
3abcc4c5fd | ||
|
|
81b27d8491 | ||
|
|
011eb1be6c | ||
|
|
8ead2d8ad9 | ||
|
|
0dfd6e9cdb | ||
|
|
1a4bd46e16 | ||
|
|
8997b0ce35 | ||
|
|
753576f817 | ||
|
|
578c518fd0 | ||
|
|
e2ade37808 | ||
|
|
8c8f9bc243 | ||
|
|
1a31f42a98 | ||
|
|
0a9ba62baa | ||
|
|
3a11ec3bbc | ||
|
|
cc18aed49d | ||
|
|
7f6bcba697 | ||
|
|
c0967f718d | ||
|
|
3add08b761 | ||
|
|
d171eee434 | ||
|
|
4562a88070 | ||
|
|
032351882c | ||
|
|
60831b59de | ||
|
|
b18b0024c1 | ||
|
|
165df4c474 | ||
|
|
9dc44e5389 | ||
|
|
b3c071d103 | ||
|
|
ca8d44bcc7 | ||
|
|
041356d019 | ||
|
|
48fbd4e223 | ||
|
|
1fa71c34f8 | ||
|
|
22bc14c27e | ||
|
|
52fbd461a3 | ||
|
|
9b4eb573eb | ||
|
|
9157308263 | ||
|
|
2405584dcf | ||
|
|
c43ede6e1f | ||
|
|
c7e7402efc | ||
|
|
0fbdd61dd8 | ||
|
|
d579372d55 | ||
|
|
fa1d58bdb5 | ||
|
|
dd80f8bab9 | ||
|
|
4dd58c77d8 | ||
|
|
18fd5cd8c8 | ||
|
|
73a7e25408 | ||
|
|
d8f09bbafa | ||
|
|
6d6d214bfe | ||
|
|
0a4442669a | ||
|
|
6efbc4f6b4 | ||
|
|
a6c693fe86 | ||
|
|
830b0d6f6e | ||
|
|
f5c30d9f65 | ||
|
|
26a91681df | ||
|
|
7c474fca58 | ||
|
|
70ffaf85a1 | ||
|
|
6d1c56a8ae | ||
|
|
14ffe84f33 | ||
|
|
c6bb14d1f2 | ||
|
|
7c3bb11092 | ||
|
|
cad515fbc3 | ||
|
|
39cda35e60 | ||
|
|
f8d21b6668 | ||
|
|
ec798b8ed5 | ||
|
|
6e3b1e581c | ||
|
|
a68a584cde | ||
|
|
e6eb3d8c9f | ||
|
|
58ed757d39 | ||
|
|
96f988add7 | ||
|
|
d4eaeba227 | ||
|
|
fbf2acc6db | ||
|
|
e7575a0f1d | ||
|
|
16b7dbdfeb | ||
|
|
3b36f81dd1 | ||
|
|
96e4947ac0 | ||
|
|
5fb2914430 | ||
|
|
51e9ef7375 | ||
|
|
36adba82ac | ||
|
|
e57f3b69b1 | ||
|
|
3847a94896 | ||
|
|
87b1030008 | ||
|
|
a39a2fddd5 | ||
|
|
04bb650656 | ||
|
|
49068c01d4 | ||
|
|
ed7fafa028 | ||
|
|
1679a6c498 | ||
|
|
d296c7696d | ||
|
|
19bf21d06d | ||
|
|
bd2b751fd2 | ||
|
|
0b6a2760d8 | ||
|
|
95eefb47a7 | ||
|
|
4295f161a5 | ||
|
|
67df4251a1 | ||
|
|
16e4bb0c9f | ||
|
|
83bdfdecc0 | ||
|
|
8c343088f0 | ||
|
|
f4107bffdb | ||
|
|
8a1be0a5c0 | ||
|
|
fbc1646c9c | ||
|
|
540a4d3862 | ||
|
|
0c708d2e47 | ||
|
|
740401a6bf | ||
|
|
c884a487b8 | ||
|
|
c1252029b1 | ||
|
|
66c0d21c6d | ||
|
|
ddaa493677 | ||
|
|
2bbc787e9e | ||
|
|
824c484ff7 | ||
|
|
87d63d3ae5 | ||
|
|
4dbe3fbc9e | ||
|
|
c907478c21 | ||
|
|
214f34e15d | ||
|
|
5ec798ece7 | ||
|
|
fec371c44a | ||
|
|
1f15dc9908 | ||
|
|
20092dd0a6 | ||
|
|
e4170b5330 | ||
|
|
2e19f59c6f | ||
|
|
4e1d0e4ba3 | ||
|
|
3b4e2f3d3c | ||
|
|
763536f5bf | ||
|
|
41aacdf808 | ||
|
|
287b48319e | ||
|
|
134e87705a | ||
|
|
af9af1cd7f | ||
|
|
a503456c79 | ||
|
|
327f0d4aaa | ||
|
|
9c55aceb51 | ||
|
|
1dce8df2d2 | ||
|
|
007fbafec5 | ||
|
|
d79477fd01 | ||
|
|
f8f123d72d | ||
|
|
674607b577 | ||
|
|
fa9a4dd428 | ||
|
|
ea13ec88ae | ||
|
|
ffccddf7fe | ||
|
|
53548920be | ||
|
|
657564c4b1 | ||
|
|
d886d43777 | ||
|
|
d152dd91b9 | ||
|
|
a9b18f8e78 | ||
|
|
67cf72de3f | ||
|
|
593baaaa67 | ||
|
|
56921c23af | ||
|
|
6676d66586 | ||
|
|
d8162bd7a5 | ||
|
|
605d049476 | ||
|
|
eb0ecc916c | ||
|
|
3b5b7f6adf | ||
|
|
5ba85f9826 | ||
|
|
eafd9bed15 | ||
|
|
c5b9e312bd | ||
|
|
07c2864649 | ||
|
|
a557bd0deb | ||
|
|
0fd9b3cd31 | ||
|
|
2bd38a0d51 | ||
|
|
ec03333722 | ||
|
|
dd002c761f | ||
|
|
879d53d130 | ||
|
|
2cb49f138a | ||
|
|
939e85f452 | ||
|
|
d118748400 | ||
|
|
4417307835 | ||
|
|
089b517943 | ||
|
|
e5e9c6cbf6 | ||
|
|
fa5a7902e1 | ||
|
|
497a0abf78 | ||
|
|
b05efb4733 | ||
|
|
87593a71cf | ||
|
|
4f9dd612b8 | ||
|
|
6e219ab2f2 | ||
|
|
eeef0ec9e5 | ||
|
|
97a2d33e5c | ||
|
|
e45dcbd759 | ||
|
|
85962aee8a | ||
|
|
ad063eb787 | ||
|
|
349db74639 | ||
|
|
dc9f7efb8c | ||
|
|
9d7483d6db | ||
|
|
b51f8be2c5 | ||
|
|
3f1d5ccbed | ||
|
|
e46b66fe01 | ||
|
|
3fb8ffd063 | ||
|
|
f1b536d4a9 | ||
|
|
05007ef21b | ||
|
|
9c894f2d89 | ||
|
|
243e062d0b | ||
|
|
4909d0be84 | ||
|
|
17fc862965 | ||
|
|
e08443f9a7 | ||
|
|
67c66e0ba2 | ||
|
|
6e9f10fa80 | ||
|
|
c2d2219173 | ||
|
|
d417d3c2d3 | ||
|
|
9dc3a7952d | ||
|
|
23aaa0544a | ||
|
|
b275837d50 | ||
|
|
e05f9ca781 | ||
|
|
4d37c59117 | ||
|
|
e1fd746d21 | ||
|
|
8febd91039 | ||
|
|
39d3e0db00 | ||
|
|
82328d59ff | ||
|
|
41e208990a | ||
|
|
2a0e7211b9 | ||
|
|
b46104daff | ||
|
|
defaf381b5 | ||
|
|
99b0d6abb5 | ||
|
|
b97f2c3225 | ||
|
|
d87f2bdd23 | ||
|
|
d574e858cf | ||
|
|
a33b33c192 | ||
|
|
362af687ed | ||
|
|
ceccca0106 | ||
|
|
0b08e9200d | ||
|
|
be5639536d | ||
|
|
3851ef0ba0 | ||
|
|
66938e0ea5 | ||
|
|
67c27aa091 | ||
|
|
e306c0fc7f | ||
|
|
3639a23222 | ||
|
|
4e803bdd96 | ||
|
|
5d34059f06 | ||
|
|
bd73fe76f1 | ||
|
|
3ca5b278a1 | ||
|
|
01f6c7d5c6 | ||
|
|
8a127d5771 | ||
|
|
6197d99c53 | ||
|
|
921d6e2920 | ||
|
|
3e5ca8ff9f | ||
|
|
261f2d9ee2 | ||
|
|
c91003e7bd | ||
|
|
5d104f637a | ||
|
|
2a1dc1b9e3 | ||
|
|
164a84f090 | ||
|
|
70456ba892 | ||
|
|
027e39e8fb | ||
|
|
b3012ec8cf | ||
|
|
632810eeca | ||
|
|
65b84dc4d0 | ||
|
|
694f27461d | ||
|
|
3c15e73a6b | ||
|
|
6f8ae41bad | ||
|
|
327d1da3ee | ||
|
|
1bb2cd5ee1 | ||
|
|
02da28450a | ||
|
|
2ded9adf42 | ||
|
|
853477d8d1 | ||
|
|
fbcf87bbcb | ||
|
|
b0b17ed287 | ||
|
|
77e876f188 | ||
|
|
d9da585754 | ||
|
|
d2cdff2070 | ||
|
|
8c96c56a6e | ||
|
|
fabe172bf0 | ||
|
|
b4ef9baee7 | ||
|
|
e943dfccf8 | ||
|
|
c1d4f36bb1 | ||
|
|
4c1bb4fb87 | ||
|
|
7ddfe918c6 | ||
|
|
0c4d18ee99 | ||
|
|
04d455acd4 | ||
|
|
5cff80f10d | ||
|
|
741d8f4ba6 | ||
|
|
b20add1cde | ||
|
|
478c77d6f9 | ||
|
|
37e3258fc4 | ||
|
|
ff0233dc63 | ||
|
|
32a9b96024 | ||
|
|
f161e7c048 | ||
|
|
29c307fef5 | ||
|
|
fa9f361ab2 | ||
|
|
4accacb877 | ||
|
|
d6f17af683 | ||
|
|
7eebbb6d68 | ||
|
|
634ab23649 | ||
|
|
c6180a1da4 | ||
|
|
8c9ae15ca8 | ||
|
|
34a5b83726 | ||
|
|
e5f1b3f7d7 | ||
|
|
29b910a43b | ||
|
|
516e246ce3 | ||
|
|
0224a66f43 | ||
|
|
24fdf47392 | ||
|
|
9ea5c88a66 | ||
|
|
36cc729aba | ||
|
|
aefe6e8449 | ||
|
|
5a9605983d | ||
|
|
ab04376fa4 | ||
|
|
3d78ab1bd9 | ||
|
|
7cde1091ae | ||
|
|
c18a33178d | ||
|
|
453f243b6b | ||
|
|
61e9c396b9 | ||
|
|
07d4fa0798 | ||
|
|
0b752fc2e4 | ||
|
|
b91b13e75a | ||
|
|
8574834f66 | ||
|
|
b7f6b0ae23 | ||
|
|
67cc11d5f4 | ||
|
|
633a74e6cc | ||
|
|
6e97d22f2b | ||
|
|
cc5fef7835 | ||
|
|
87cedfc36d | ||
|
|
6d1ff876af | ||
|
|
ac5c351563 | ||
|
|
fd009790ef | ||
|
|
b4e435ccac | ||
|
|
006fe0e06c | ||
|
|
45ccfda5bb | ||
|
|
6249d917d3 | ||
|
|
c9256eaf71 | ||
|
|
8992e69cc3 | ||
|
|
4668a1f061 | ||
|
|
3a1e8fcec2 | ||
|
|
04d5108af5 | ||
|
|
b098ebea2f | ||
|
|
5be7b3bb61 | ||
|
|
9bc8ddc2cb | ||
|
|
8271949eed | ||
|
|
40cf075785 | ||
|
|
5ab6a109b1 | ||
|
|
c1be95f167 | ||
|
|
6c81ffca8f | ||
|
|
86fd5819da | ||
|
|
2a6fda6e9c | ||
|
|
1060872f0d | ||
|
|
be20d6d266 | ||
|
|
9dea81428d | ||
|
|
1ecd828e27 | ||
|
|
5b6eec110d | ||
|
|
1a9f68f933 | ||
|
|
d241703dd2 | ||
|
|
e000c3094a | ||
|
|
67a4a96803 | ||
|
|
3e8a0d9c55 | ||
|
|
c6254a4fad | ||
|
|
6d32726edf | ||
|
|
176b41d5db | ||
|
|
e7bf47ac8a | ||
|
|
bd7816eb9a | ||
|
|
cfdf552137 | ||
|
|
37f8c09e5a | ||
|
|
19c394de3f | ||
|
|
8733047d09 | ||
|
|
d44eccda9a | ||
|
|
8935b0120e | ||
|
|
f20f38ac5e | ||
|
|
08f08792c9 | ||
|
|
ab4280c8c1 | ||
|
|
0bf4804fa9 | ||
|
|
a67e3142b6 | ||
|
|
d4911dba7a | ||
|
|
360fcceffd | ||
|
|
8413d4dcb2 | ||
|
|
fca385532d | ||
|
|
7cfd83cad0 | ||
|
|
acdac036b6 | ||
|
|
4e73f75e58 | ||
|
|
8bbec46809 | ||
|
|
165e0f6efe | ||
|
|
11a0e6c2f0 | ||
|
|
d7cc2d88ad | ||
|
|
1fb50ed9ec | ||
|
|
8ed23ea55f | ||
|
|
b909fd7093 | ||
|
|
c529f89dfc | ||
|
|
271eea8b55 | ||
|
|
dee354ca13 | ||
|
|
b0fd588748 | ||
|
|
2553ec9719 | ||
|
|
d24b40d6f0 | ||
|
|
fd606a4bf5 | ||
|
|
f841314b72 | ||
|
|
6c0a0c12be | ||
|
|
bcc77d9517 | ||
|
|
a7880a56a5 | ||
|
|
af77f1d253 | ||
|
|
afda04abb0 | ||
|
|
aafed18dfa | ||
|
|
e855ffe54c | ||
|
|
4fc1492167 | ||
|
|
b5cf37f55f | ||
|
|
97fc03fb12 | ||
|
|
df4bd305f9 | ||
|
|
ec2dc59665 | ||
|
|
04e2719e85 | ||
|
|
7ea9e44323 | ||
|
|
cf51a5de62 | ||
|
|
e1d8ed726d | ||
|
|
3d3abb4d2c | ||
|
|
53c0ce3568 | ||
|
|
62235695d0 | ||
|
|
ec5f0a3653 | ||
|
|
d53dba0ae1 | ||
|
|
1cc4353ed8 | ||
|
|
33629293f9 | ||
|
|
d7566f59ae | ||
|
|
4f19fb156e | ||
|
|
4e832b7872 | ||
|
|
8edf30416d | ||
|
|
f1819b947d | ||
|
|
dab2402cac | ||
|
|
576146c79e | ||
|
|
8e0a60213e | ||
|
|
f138744e2b | ||
|
|
469e039169 | ||
|
|
8f82515085 | ||
|
|
38657337fc | ||
|
|
80781214df | ||
|
|
c80f1c8a0f | ||
|
|
2d5f6dcbd7 | ||
|
|
bc105bb7d8 | ||
|
|
35ac2aea2c | ||
|
|
f08ccba829 | ||
|
|
521f23064b | ||
|
|
83c778be06 | ||
|
|
2b84242600 | ||
|
|
07ed27f4e5 | ||
|
|
11656a589f | ||
|
|
0f2506725f | ||
|
|
52b331b95e | ||
|
|
e981c8994b | ||
|
|
5cf468ce1c | ||
|
|
fb43948c7f | ||
|
|
f3898ae012 | ||
|
|
e95d35c7b2 | ||
|
|
83f0a1e1fe | ||
|
|
edf81ce458 | ||
|
|
5a4e3ef6e9 | ||
|
|
378927c804 | ||
|
|
ad65b5949d | ||
|
|
8978bdd6a3 | ||
|
|
f5dcd85c34 | ||
|
|
deff077560 | ||
|
|
640898750b | ||
|
|
49acb85a78 | ||
|
|
009f7d4cbb | ||
|
|
12fc2afc9f | ||
|
|
3fadc0a664 | ||
|
|
025305fa5d | ||
|
|
f39a8f2cbe | ||
|
|
76bf06acf5 | ||
|
|
e6ca627160 | ||
|
|
bd2028c74c | ||
|
|
42819e746a | ||
|
|
c8d1ecb33a | ||
|
|
1c78db194d | ||
|
|
e027b5c2f7 | ||
|
|
6b07cbe1d5 | ||
|
|
871d8576b1 | ||
|
|
5f0a6aab29 | ||
|
|
5a0168069c | ||
|
|
43ad313ad6 | ||
|
|
6efee92d47 | ||
|
|
175ca1ae6d | ||
|
|
c35996cf7e | ||
|
|
24840cdbed | ||
|
|
5f99409f74 | ||
|
|
3f4a7798ab | ||
|
|
60ddc77512 | ||
|
|
fe11dc418d | ||
|
|
6d75dcd067 | ||
|
|
eb07083296 | ||
|
|
5fd4d4d662 | ||
|
|
07a015d6a2 | ||
|
|
446b3147e0 | ||
|
|
e8ed267553 | ||
|
|
1ed7c4a2bf | ||
|
|
207b7b3ebd | ||
|
|
4aff57eff8 | ||
|
|
5278dfff58 | ||
|
|
635190d907 | ||
|
|
d6676a8ead | ||
|
|
545e36a8c2 | ||
|
|
0278628a59 | ||
|
|
c1b66d0a86 | ||
|
|
70af9bf0fb | ||
|
|
7ace162e97 | ||
|
|
d1e5d8e6d4 | ||
|
|
1fb864acde | ||
|
|
5f15a541b9 | ||
|
|
8d23e8c6aa | ||
|
|
765952f510 | ||
|
|
5e026cdc0b | ||
|
|
d5349ad197 | ||
|
|
85d01b26cb | ||
|
|
1869f12e2c | ||
|
|
4deeaa1a03 | ||
|
|
6314ca6519 | ||
|
|
499f2617a1 | ||
|
|
f6c1b4bddf | ||
|
|
67e00000ca | ||
|
|
126fee11b5 | ||
|
|
bbaa65ce93 | ||
|
|
50d6788c5f | ||
|
|
550058cdb6 | ||
|
|
16fa4eed42 | ||
|
|
049dab3bbc | ||
|
|
1983cfc536 | ||
|
|
2cf5150387 | ||
|
|
5e5525d01b | ||
|
|
e82c54196d | ||
|
|
c04e762b64 | ||
|
|
e52b5b4503 | ||
|
|
8f25f8400c | ||
|
|
487327fabd | ||
|
|
adc900a97a | ||
|
|
f273efe4e9 | ||
|
|
d409103096 | ||
|
|
eb14d8ea25 | ||
|
|
a0617fd244 | ||
|
|
67faff5842 | ||
|
|
28b7cad490 | ||
|
|
55e06061ca | ||
|
|
0cc2f6f109 | ||
|
|
eae3ba05df | ||
|
|
f050b16a79 | ||
|
|
6b9c7aa600 | ||
|
|
538adae600 | ||
|
|
65a2419d66 | ||
|
|
ae2d060ed7 | ||
|
|
3a02a69700 | ||
|
|
ea78c7b01e | ||
|
|
863fd440e3 | ||
|
|
6bb66b1264 | ||
|
|
2c0c4fc62d | ||
|
|
48b6826198 | ||
|
|
bb4010336b | ||
|
|
5a2da1742a | ||
|
|
5e70262b38 | ||
|
|
142b0e326b | ||
|
|
f29ed08e97 | ||
|
|
7f13e3e912 | ||
|
|
b2c232c76c | ||
|
|
17b319e3b5 | ||
|
|
e398a5855b | ||
|
|
11eb5a8da7 | ||
|
|
58d7b1064e | ||
|
|
45e9cc4058 | ||
|
|
2737d51d6a | ||
|
|
9cae999b69 | ||
|
|
f83a779430 | ||
|
|
c87a0ba84a | ||
|
|
f0a934d0c8 | ||
|
|
3a94598aef | ||
|
|
523562aae9 | ||
|
|
39dbbe2e88 | ||
|
|
395ede911c | ||
|
|
68e52bd6bf | ||
|
|
0be43b7133 | ||
|
|
08433c45b3 | ||
|
|
6e3ed4649a | ||
|
|
f0156929c5 | ||
|
|
e8f1ba8181 | ||
|
|
888936dfab | ||
|
|
6eebc3cfe8 | ||
|
|
ebdbff2ea5 | ||
|
|
aec2e8a1ad | ||
|
|
95dbaeeae5 | ||
|
|
b4a4868d8b | ||
|
|
fe21dbc7b9 | ||
|
|
74d91b7490 | ||
|
|
eaa6686314 | ||
|
|
40b350bd24 | ||
|
|
e1545134ac | ||
|
|
536f9a36b8 | ||
|
|
7196b0ca67 | ||
|
|
4560cd0631 | ||
|
|
6190633db7 | ||
|
|
2b77f4cc14 | ||
|
|
b6b71a1f92 | ||
|
|
bcc8272129 | ||
|
|
462dbb01df | ||
|
|
d7423bad31 | ||
|
|
7b2be014e3 | ||
|
|
54d51d2b75 | ||
|
|
fb93287ebc | ||
|
|
da9be5f6f8 | ||
|
|
8616225618 | ||
|
|
23a3688f7c | ||
|
|
5ab2823e00 | ||
|
|
ae0ce9e213 | ||
|
|
4ed871a061 | ||
|
|
69422b912d | ||
|
|
5911e2fd5e | ||
|
|
d9714fa7c4 | ||
|
|
e5927e30d0 | ||
|
|
4211060802 | ||
|
|
1fe27829cf | ||
|
|
ab569c3a7e | ||
|
|
ce1c1b8e90 | ||
|
|
98ca13b9b7 | ||
|
|
f144fbb4db | ||
|
|
8d0af92954 | ||
|
|
f8f136a99b | ||
|
|
f297b684e4 | ||
|
|
d0809ceed0 | ||
|
|
1716f9ff93 | ||
|
|
4afc1a7e91 | ||
|
|
fec24cd89c | ||
|
|
a5ae89ad3c | ||
|
|
b5b6a6f042 | ||
|
|
5f273781e7 | ||
|
|
90e28a4d34 | ||
|
|
841d8f5811 | ||
|
|
794c92542c | ||
|
|
696c682bc3 | ||
|
|
6ee5afc885 | ||
|
|
d2cd12ec27 | ||
|
|
7dcdc475a6 | ||
|
|
12f9350d16 | ||
|
|
6b42ff7312 | ||
|
|
d6dc10dcfa | ||
|
|
d8d2732d69 | ||
|
|
3c6f087c22 | ||
|
|
4f5eea8f94 | ||
|
|
2eacdef110 | ||
|
|
a84bb0eef4 | ||
|
|
abefa6e343 | ||
|
|
0955e0f838 | ||
|
|
9bdd12271f | ||
|
|
8497824bd2 | ||
|
|
ec3c072688 | ||
|
|
4f46e779b8 | ||
|
|
5a760c2814 | ||
|
|
15dee6471e | ||
|
|
76d44a643f | ||
|
|
386de3b7fb | ||
|
|
4b397b4ec3 | ||
|
|
7e233ba2e5 | ||
|
|
1265ce9c6b | ||
|
|
c9e0a5dac5 | ||
|
|
f4c21a51cb | ||
|
|
47b5657fa5 | ||
|
|
730e94b646 | ||
|
|
15f167d6d0 | ||
|
|
b204805de2 | ||
|
|
5302d9b627 | ||
|
|
809311a948 | ||
|
|
2faf429520 | ||
|
|
2e4c0a50d4 | ||
|
|
f17ab2c39e | ||
|
|
5727596f3f | ||
|
|
a85ef89208 | ||
|
|
b613c4007a | ||
|
|
a22c6b24fb | ||
|
|
6bc80acfb3 | ||
|
|
660aec3973 | ||
|
|
781aa4b770 | ||
|
|
5bd6a463fc | ||
|
|
a605c00a48 | ||
|
|
4236dccc3f | ||
|
|
f7f2354a7c | ||
|
|
83b8218c97 | ||
|
|
bd16abeb25 | ||
|
|
82533402a4 | ||
|
|
b3fd75f89e | ||
|
|
4acfd9b037 | ||
|
|
88b6a9e911 | ||
|
|
6d7748759d | ||
|
|
721ac3b4bf | ||
|
|
65cc97eb6d | ||
|
|
d54853e812 | ||
|
|
038ebb230b | ||
|
|
ef5d264f35 | ||
|
|
49466f0280 | ||
|
|
1c00bdf009 | ||
|
|
4e375075b6 | ||
|
|
cad562a390 | ||
|
|
4899323a06 | ||
|
|
e1b7cb5e06 | ||
|
|
b0d3f22701 | ||
|
|
7c0e935f5d | ||
|
|
92eb0927cf | ||
|
|
9bbe0f53f4 | ||
|
|
509a637972 | ||
|
|
891175210e | ||
|
|
aeae115cf2 | ||
|
|
a2b5caaf2f | ||
|
|
166679563a | ||
|
|
32c1efafd1 | ||
|
|
44743284b3 | ||
|
|
f0d27a93a4 | ||
|
|
9d08a41841 | ||
|
|
afa5dae15a | ||
|
|
136e9dac7e | ||
|
|
f63017ef7b | ||
|
|
46c9a46862 | ||
|
|
09fc3ce916 | ||
|
|
46621374d4 | ||
|
|
e6a688e60e | ||
|
|
c8d7a88f28 | ||
|
|
60417f2ac8 | ||
|
|
07f0122056 | ||
|
|
4902ebcd5c | ||
|
|
835d09e32f | ||
|
|
b46856ca2f | ||
|
|
e579bd1602 | ||
|
|
7f77e39fb4 | ||
|
|
0c86b74d1f | ||
|
|
7374b959d5 | ||
|
|
ed7d206c38 | ||
|
|
df08ad2c55 | ||
|
|
9cbd581292 | ||
|
|
644e4e4918 | ||
|
|
ee95287c54 | ||
|
|
54512a77df | ||
|
|
89648e1180 | ||
|
|
2504b9669d | ||
|
|
da6ab7642d | ||
|
|
5eb8509d29 | ||
|
|
91a704206b | ||
|
|
c3a6733db1 | ||
|
|
019dee91f2 | ||
|
|
262e1d13f0 | ||
|
|
2f0eb86498 | ||
|
|
266679ed93 | ||
|
|
7ac021c928 | ||
|
|
36312f8ee1 | ||
|
|
80f1b5ba49 | ||
|
|
3dc96bbfe4 | ||
|
|
2d52f2d3c8 | ||
|
|
598ea4b732 | ||
|
|
3f0158a8e4 | ||
|
|
1522d1da9b | ||
|
|
3cec231409 | ||
|
|
5a94d3e4f5 | ||
|
|
8b311835c5 | ||
|
|
d484193480 | ||
|
|
1d18a7357e | ||
|
|
4a6652650b | ||
|
|
1c6707eb66 | ||
|
|
c5a09f6a3b | ||
|
|
f283d4b070 | ||
|
|
f262e3b5bb | ||
|
|
0fc7d639e3 | ||
|
|
609e801fc7 | ||
|
|
96c2123ae1 | ||
|
|
d8d3e6c95d | ||
|
|
5ceb834077 | ||
|
|
3b05513ba9 | ||
|
|
5364f178ae | ||
|
|
920b12f991 | ||
|
|
3cd62e26e8 | ||
|
|
e4a2b2e942 | ||
|
|
9adf96e18e | ||
|
|
8de2b17bb5 | ||
|
|
eb80ec13da | ||
|
|
1b0040eff8 | ||
|
|
c7ebe93a70 | ||
|
|
6f61b712a0 | ||
|
|
d5fa49cc23 | ||
|
|
f1f71ea8e2 | ||
|
|
257b222d97 | ||
|
|
5dacfedc52 | ||
|
|
e74a6cbdd0 | ||
|
|
78bd58a6ba | ||
|
|
6c1458f91f | ||
|
|
3d3ecb7465 | ||
|
|
9cf0faece1 | ||
|
|
231f88170f | ||
|
|
3c32ec327b | ||
|
|
ad73117961 | ||
|
|
0b2e671dd7 | ||
|
|
7daa01260f | ||
|
|
770995fa00 | ||
|
|
f101588f35 | ||
|
|
684e3e03d0 | ||
|
|
5e4f2b4c4e | ||
|
|
0df6904e64 | ||
|
|
0eaf4daa5c | ||
|
|
cd5146025a | ||
|
|
fafd4eca2a | ||
|
|
4959fc4857 | ||
|
|
92fc93d641 | ||
|
|
bd8b97272a | ||
|
|
f0c8a9b357 | ||
|
|
763d610b5f | ||
|
|
085f45f8de | ||
|
|
60ca87443a | ||
|
|
69baa8c207 | ||
|
|
70cf37d8ca | ||
|
|
4d9b6ed661 | ||
|
|
0cf19c377f | ||
|
|
b7947657dd | ||
|
|
181f2fc639 | ||
|
|
37d71b31e0 | ||
|
|
d8491c2d0e | ||
|
|
18b8815641 | ||
|
|
d37d8b0fb2 | ||
|
|
f39a6fdbf0 | ||
|
|
5e31c99bdb | ||
|
|
0fc763d219 | ||
|
|
0406cb9725 | ||
|
|
1af81c9a00 | ||
|
|
d44e2d2612 | ||
|
|
b8358d5059 | ||
|
|
8ecdfddf17 | ||
|
|
89f2d9619b | ||
|
|
56e31a1c62 | ||
|
|
1806af8358 | ||
|
|
3b031090d5 | ||
|
|
396bd4eb1a | ||
|
|
26908872ac | ||
|
|
e7b28fe55c | ||
|
|
bc40674912 | ||
|
|
6be0ce9925 | ||
|
|
62619d8f22 | ||
|
|
c57c416919 | ||
|
|
9472cfa335 | ||
|
|
a436204dfc | ||
|
|
4de15d04c7 | ||
|
|
b9295791c4 | ||
|
|
83abd537cc | ||
|
|
f6bbe94d62 | ||
|
|
809fd0aab2 | ||
|
|
61de2722ea | ||
|
|
99712b21f7 | ||
|
|
82fb27ffa5 | ||
|
|
db5ea6bc41 | ||
|
|
20056667ae | ||
|
|
1a684eabda | ||
|
|
5447dddb8b | ||
|
|
f474c79e68 | ||
|
|
cc2ec3a661 | ||
|
|
ed99183c0b | ||
|
|
f3e210b6c8 | ||
|
|
95f412ee6b | ||
|
|
61e44d86cc | ||
|
|
2ef13a55fb | ||
|
|
cfa9150bef | ||
|
|
0cdd323720 | ||
|
|
b467a1bcc0 | ||
|
|
8ebdc15ec0 | ||
|
|
9ae285ba61 | ||
|
|
f6e31c19a8 | ||
|
|
7916c6a19d | ||
|
|
b04145bfa7 | ||
|
|
7992d63467 | ||
|
|
3cb48763f9 | ||
|
|
47b0a677e6 | ||
|
|
c6d6197f42 | ||
|
|
8d39bf29a1 | ||
|
|
eda371e96f | ||
|
|
67fbc6cfa1 | ||
|
|
e61bcb82e0 | ||
|
|
0269a33812 | ||
|
|
b839ff0059 | ||
|
|
e849d49f5b | ||
|
|
3319a69410 | ||
|
|
7043d97da7 | ||
|
|
06e76d7c9b | ||
|
|
0bf58251f4 | ||
|
|
8d44a946cc | ||
|
|
3f4269f497 | ||
|
|
989b7ec822 | ||
|
|
6b8100a0b5 | ||
|
|
d1b86d1345 | ||
|
|
a4917834e3 | ||
|
|
a5f1895cb1 | ||
|
|
07d8aaf608 | ||
|
|
7e4fdc1af2 | ||
|
|
8ebeeb3fd1 | ||
|
|
ac189403ce | ||
|
|
b8ca02ec79 | ||
|
|
4fe934c0c7 | ||
|
|
ddd3f0ab33 | ||
|
|
d02e19e707 | ||
|
|
31b79a90e1 | ||
|
|
a7455e3a83 | ||
|
|
5b0cdf40eb | ||
|
|
c254c5b250 | ||
|
|
9af5663ad1 | ||
|
|
b9a06abd61 | ||
|
|
10b68c5112 | ||
|
|
9151bd356d | ||
|
|
9f14af725d | ||
|
|
a0fc4b64d7 | ||
|
|
fe2ff8c2f7 | ||
|
|
1371b5a631 | ||
|
|
8b286b8549 | ||
|
|
ec42337486 | ||
|
|
2936f2000f | ||
|
|
264d536445 | ||
|
|
c0127e81bd | ||
|
|
e3c4bc02a4 | ||
|
|
8a071cffdd | ||
|
|
78df25e76c | ||
|
|
7038764957 | ||
|
|
d4eb52f60b | ||
|
|
0d47849248 | ||
|
|
6f3cdcf459 | ||
|
|
8eac79be87 | ||
|
|
d2272a61af | ||
|
|
8997a2f0c3 | ||
|
|
d3ac26fbde | ||
|
|
f7d1107393 | ||
|
|
0caa54c4a1 | ||
|
|
bcd88c0e82 | ||
|
|
40014ade3d | ||
|
|
19c104c2ac | ||
|
|
06bc68b260 | ||
|
|
6acbcc45cb | ||
|
|
a7d587cf86 | ||
|
|
6c433ed631 | ||
|
|
2cfb4d3381 | ||
|
|
7e829563d6 | ||
|
|
3799fb3b2d | ||
|
|
6ea02b4058 | ||
|
|
d4401cd0bb | ||
|
|
fcbe4b2915 | ||
|
|
3ce2239940 | ||
|
|
42246ec25c | ||
|
|
0a05a4b92d | ||
|
|
0c097f06d1 | ||
|
|
ffee8a95f5 | ||
|
|
93fe92ff63 | ||
|
|
e06f56a43b | ||
|
|
e915183509 | ||
|
|
6dfae80301 | ||
|
|
89eddf8b4e | ||
|
|
2470a951f9 | ||
|
|
3ba3cadee4 | ||
|
|
cedc1d5886 | ||
|
|
232752a186 | ||
|
|
3303bc7f5c | ||
|
|
eab5ced99b | ||
|
|
d1f22b9b0f | ||
|
|
d6e4b2d02a | ||
|
|
680cbea297 | ||
|
|
84fcf8fd5f | ||
|
|
2e6d1f3c73 | ||
|
|
df1c5262d9 | ||
|
|
8151aed456 | ||
|
|
789797986d | ||
|
|
661bea415a | ||
|
|
98388933f9 | ||
|
|
efd725110c | ||
|
|
527aa0dbea | ||
|
|
6376848d97 | ||
|
|
0e17ce1023 | ||
|
|
dfc756208b | ||
|
|
66386b196e | ||
|
|
b325081057 | ||
|
|
928a63d126 | ||
|
|
f27ba7bc1a | ||
|
|
f9748b751a | ||
|
|
769f942742 | ||
|
|
c359c862e4 |
No files matched your search
@@ -0,0 +1,13 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: syoyo
|
||||
#patreon: # Replace with a single Patreon username
|
||||
#open_collective: # Replace with a single Open Collective username
|
||||
#ko_fi: # Replace with a single Ko-fi username
|
||||
#tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
#community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
#liberapay: # Replace with a single Liberapay username
|
||||
#issuehunt: # Replace with a single IssueHunt username
|
||||
#otechie: # Replace with a single Otechie username
|
||||
#lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
#custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
@@ -0,0 +1,45 @@
|
||||
## Description
|
||||
|
||||
What does this PR do? Provide a brief summary of the changes.
|
||||
|
||||
## Type of Change
|
||||
|
||||
- [ ] Bug fix
|
||||
- [ ] New feature
|
||||
- [ ] Refactoring (no functional changes)
|
||||
- [ ] Documentation update
|
||||
- [ ] Other (please describe):
|
||||
|
||||
## Checklist
|
||||
|
||||
### Required for All PRs
|
||||
|
||||
- [ ] Reproducible glTF test file(s) are included (e.g., `models/regression/`, `tests/issue-***.gltf`, etc.)
|
||||
- [ ] Unit tests are written and pass locally (`cd tests && make run`)
|
||||
|
||||
### Required for Feature PRs
|
||||
|
||||
- [ ] Specification document is included (e.g., `docs/spec/<feature-name>.md`)
|
||||
- The spec should cover: purpose, API design, usage examples, and edge cases
|
||||
|
||||
### Security Policy
|
||||
|
||||
This project manages CVE assignments exclusively through GitHub Security Advisories.
|
||||
PRs that include or reference independently obtained CVE IDs or external vulnerability disclosures will be closed.
|
||||
|
||||
## Test Instructions
|
||||
|
||||
How can reviewers verify your changes?
|
||||
|
||||
```
|
||||
# Example:
|
||||
cd build && cmake .. && make test
|
||||
```
|
||||
|
||||
## Related Issues
|
||||
|
||||
Link related issues:
|
||||
|
||||
## Additional Notes
|
||||
|
||||
Any other context, screenshots, or information relevant to the review.
|
||||
+25
-122
@@ -4,162 +4,65 @@ on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
|
||||
# compile with older gcc4.8
|
||||
build-gcc48:
|
||||
|
||||
runs-on: ubuntu-18.04
|
||||
name: Build with gcc 4.8
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential
|
||||
sudo apt-get install -y gcc-4.8 g++-4.8
|
||||
g++-4.8 -std=c++11 -o loader_example loader_example.cc
|
||||
|
||||
- name: NoexceptBuild
|
||||
run: |
|
||||
g++-4.8 -DTINYGLTF_NOEXCEPTION -std=c++11 -o loader_example loader_example.cc
|
||||
|
||||
- name: RapidjsonBuild
|
||||
run: |
|
||||
git clone https://github.com/Tencent/rapidjson
|
||||
g++-4.8 -DTINYGLTF_USE_RAPIDJSON -I./rapidjson/include/rapidjson -std=c++11 -o loader_example loader_example.cc
|
||||
|
||||
# compile with mingw gcc cross
|
||||
build-mingw-cross:
|
||||
|
||||
runs-on: ubuntu-18.04
|
||||
name: Build with MinGW gcc cross
|
||||
runs-on: ubuntu-latest
|
||||
name: Build v3 C tests with MinGW gcc cross
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential
|
||||
sudo apt-get install -y mingw-w64
|
||||
x86_64-w64-mingw32-g++ -std=c++11 -o loader_example loader_example.cc
|
||||
cd tests
|
||||
x86_64-w64-mingw32-gcc -I../ -std=c11 -DTINYGLTF3_ENABLE_FS -o tester_v3_c.exe tester_v3_c.c ../tiny_gltf_v3.c
|
||||
|
||||
# Windows(x64) + Visual Studio 2019 build
|
||||
# Windows(x64) + MSVC build (VS version agnostic: msvc-dev-cmd locates
|
||||
# whatever Visual Studio the runner image ships, e.g. VS2022 or VS2026)
|
||||
build-windows-msvc:
|
||||
|
||||
runs-on: windows-latest
|
||||
name: Build for Windows(x64, MSVC)
|
||||
name: Build v3 C tests on Windows(x64, MSVC)
|
||||
|
||||
# Use system installed cmake
|
||||
# https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
uses: actions/checkout@v5
|
||||
- name: Set up MSVC environment
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
- name: Configure
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "Visual Studio 16 2019" -DTINYGLTF_BUILD_LOADER_EXAMPLE=On -DTINYGLTF_BUILD_GL_EXAMPLES=Off -DTINYGLTF_BUILD_VALIDATOR_EXAMPLE=On ..
|
||||
cd ..
|
||||
run: cmake -B build -G Ninja -DTINYGLTF3_BUILD_TESTS=ON
|
||||
- name: Build
|
||||
run: cmake --build build --config Release
|
||||
run: cmake --build build
|
||||
- name: Run tests
|
||||
run: ctest --test-dir build --output-on-failure
|
||||
|
||||
|
||||
build-linux:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
name: Buld with gcc
|
||||
name: Build v3 C tests with gcc
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v5
|
||||
- name: build
|
||||
run: |
|
||||
g++ -std=c++11 -o loader_example loader_example.cc
|
||||
cd tests
|
||||
cc -I../ -std=c11 -g -O0 -DTINYGLTF3_ENABLE_FS -o tester_v3_c tester_v3_c.c ../tiny_gltf_v3.c
|
||||
- name: test
|
||||
run: |
|
||||
./loader_example models/Cube/Cube.gltf
|
||||
./tests/tester_v3_c models/Cube/Cube.gltf
|
||||
|
||||
- name: tests
|
||||
run: |
|
||||
cd tests
|
||||
g++ -I../ -std=c++11 -g -O0 -o tester tester.cc
|
||||
./tester
|
||||
make all
|
||||
./tester_v3_c
|
||||
./tester_v3_c_v1port
|
||||
./tester_v3_json_c
|
||||
./tester_v3_freestanding
|
||||
cd ..
|
||||
|
||||
- name: noexcept_tests
|
||||
run: |
|
||||
cd tests
|
||||
g++ -DTINYGLTF_NOEXCEPTION -I../ -std=c++11 -g -O0 -o tester_noexcept tester.cc
|
||||
./tester_noexcept
|
||||
cd ..
|
||||
|
||||
|
||||
build-rapidjson-linux:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
name: Buld with gcc + rapidjson
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: build
|
||||
run: |
|
||||
git clone https://github.com/Tencent/rapidjson
|
||||
g++ -v
|
||||
g++ -DTINYGLTF_USE_RAPIDJSON -I./rapidjson/include/rapidjson -std=c++11 -o loader_example loader_example.cc
|
||||
|
||||
- name: loader_example_test
|
||||
run: |
|
||||
./loader_example models/Cube/Cube.gltf
|
||||
|
||||
- name: tests
|
||||
run: |
|
||||
cd tests
|
||||
g++ -DTINYGLTF_USE_RAPIDJSON -I../rapidjson/include/rapidjson -I../ -std=c++11 -g -O0 -o tester tester.cc
|
||||
./tester
|
||||
cd ..
|
||||
|
||||
- name: noexcept_tests
|
||||
run: |
|
||||
cd tests
|
||||
g++ -DTINYGLTF_USE_RAPIDJSON -I../rapidjson/include/rapidjson -DTINYGLTF_NOEXCEPTION -I../ -std=c++11 -g -O0 -o tester_noexcept tester.cc
|
||||
./tester_noexcept
|
||||
cd ..
|
||||
|
||||
# Cross-compile for aarch64 linux target
|
||||
build-cross-aarch64:
|
||||
|
||||
runs-on: ubuntu-18.04
|
||||
name: Build on cross aarch64
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
- name: Build
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential
|
||||
sudo apt-get install -y gcc-8-aarch64-linux-gnu g++-8-aarch64-linux-gnu
|
||||
|
||||
git clone https://github.com/Tencent/rapidjson
|
||||
aarch64-linux-gnu-g++-8 -DTINYGLTF_USE_RAPIDJSON -I./rapidjson/include/rapidjson -std=c++11 -g -O0 -o loader_example loader_example.cc
|
||||
|
||||
# macOS clang
|
||||
build-macos:
|
||||
|
||||
runs-on: macos-latest
|
||||
name: Build on macOS
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
- name: Build
|
||||
run: |
|
||||
clang++ -std=c++11 -g -O0 -o loader_example loader_example.cc
|
||||
./loader_example models/Cube/Cube.gltf
|
||||
|
||||
git clone https://github.com/Tencent/rapidjson
|
||||
clang++ -DTINYGLTF_USE_RAPIDJSON -I./rapidjson/include/rapidjson -std=c++11 -g -O0 -o loader_example loader_example.cc
|
||||
|
||||
@@ -0,0 +1,389 @@
|
||||
name: Comprehensive CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- release
|
||||
- devel
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- release
|
||||
- devel
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
# Linux x64 - GCC
|
||||
linux-gcc-x64:
|
||||
runs-on: ubuntu-latest
|
||||
name: Linux x64 (GCC)
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Configure
|
||||
run: cmake -B build -DTINYGLTF3_BUILD_TESTS=ON
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
|
||||
- name: Run tester_v3_c on a sample model
|
||||
run: ./build/tester_v3_c models/Cube/Cube.gltf
|
||||
|
||||
- name: Run tests
|
||||
run: ctest --test-dir build --output-on-failure
|
||||
|
||||
# Linux x64 - Clang 21
|
||||
linux-clang-x64:
|
||||
runs-on: ubuntu-24.04
|
||||
name: Linux x64 (Clang 21)
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Install Clang 21
|
||||
run: |
|
||||
wget https://apt.llvm.org/llvm.sh
|
||||
chmod +x llvm.sh
|
||||
sudo ./llvm.sh 21
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
cmake -B build -DCMAKE_C_COMPILER=clang-21 -DTINYGLTF3_BUILD_TESTS=ON
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
|
||||
- name: Run tester_v3_c on a sample model
|
||||
run: ./build/tester_v3_c models/Cube/Cube.gltf
|
||||
|
||||
- name: Run tests
|
||||
run: ctest --test-dir build --output-on-failure
|
||||
|
||||
# Linux ARM64 - GCC (native)
|
||||
linux-arm64:
|
||||
runs-on: ubuntu-24.04-arm
|
||||
name: Linux ARM64 (GCC)
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Configure
|
||||
run: cmake -B build -DTINYGLTF3_BUILD_TESTS=ON
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
|
||||
- name: Run tester_v3_c on a sample model
|
||||
run: ./build/tester_v3_c models/Cube/Cube.gltf
|
||||
|
||||
- name: Run tests
|
||||
run: ctest --test-dir build --output-on-failure
|
||||
|
||||
# macOS ARM64 Apple Silicon
|
||||
macos-arm64:
|
||||
runs-on: macos-14
|
||||
name: macOS ARM64 Apple Silicon (Clang)
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Configure
|
||||
run: cmake -B build -DTINYGLTF3_BUILD_TESTS=ON
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
|
||||
- name: Run tester_v3_c on a sample model
|
||||
run: ./build/tester_v3_c models/Cube/Cube.gltf
|
||||
|
||||
- name: Run tests
|
||||
run: ctest --test-dir build --output-on-failure
|
||||
|
||||
# Windows x64 - MSVC (VS version agnostic; msvc-dev-cmd locates the
|
||||
# Visual Studio shipped with the runner image, e.g. VS2022 or VS2026)
|
||||
windows-msvc-x64:
|
||||
runs-on: windows-latest
|
||||
name: Windows x64 (MSVC)
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up MSVC environment
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Configure
|
||||
run: cmake -B build -G Ninja -DTINYGLTF3_BUILD_TESTS=ON
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
|
||||
- name: Run tester_v3_c on a sample model
|
||||
run: |
|
||||
.\build\tester_v3_c.exe models\Cube\Cube.gltf
|
||||
|
||||
- name: Run tests
|
||||
run: ctest --test-dir build --output-on-failure
|
||||
|
||||
# Windows MinGW - MSYS2
|
||||
windows-mingw-msys2:
|
||||
runs-on: windows-latest
|
||||
name: Windows x64 (MinGW MSYS2)
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: UCRT64
|
||||
install: base-devel
|
||||
pacboy: >-
|
||||
cc:p cmake:p ninja:p
|
||||
update: true
|
||||
release: false
|
||||
|
||||
- name: Build with CMake
|
||||
run: |
|
||||
cmake -G"Ninja" -S . -B build -DTINYGLTF3_BUILD_TESTS=ON
|
||||
cmake --build build
|
||||
|
||||
- name: Run tester_v3_c on a sample model
|
||||
run: |
|
||||
./build/tester_v3_c models/Cube/Cube.gltf
|
||||
|
||||
- name: Run tests
|
||||
run: ctest --test-dir build --output-on-failure
|
||||
|
||||
# Linux -> Windows MinGW Cross-compile
|
||||
linux-mingw-cross:
|
||||
runs-on: ubuntu-latest
|
||||
name: Linux→Windows (MinGW Cross) - Build Only
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Install MinGW
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential mingw-w64
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd tests
|
||||
x86_64-w64-mingw32-gcc -I../ -std=c11 -g -O0 -DTINYGLTF3_ENABLE_FS -o tester_v3_c.exe tester_v3_c.c ../tiny_gltf_v3.c
|
||||
|
||||
# v3 C tests through Meson on the primary desktop platforms.
|
||||
v3-c-meson:
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: v3 C Meson (${{ matrix.os }})
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Install Meson
|
||||
run: python -m pip install meson ninja
|
||||
|
||||
- name: Configure
|
||||
run: meson setup build-meson -Dtests=true
|
||||
|
||||
- name: Build
|
||||
run: meson compile -C build-meson
|
||||
|
||||
- name: Run v3 C tests
|
||||
run: meson test -C build-meson --print-errorlogs
|
||||
|
||||
# v3 C runtime: internal security regression tests + ported v1 unit tests.
|
||||
v3-c-tests:
|
||||
runs-on: ubuntu-latest
|
||||
name: v3 C tests (Linux x64, GCC)
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Build tester_v3_c
|
||||
run: |
|
||||
cd tests
|
||||
cc -I../ -std=c11 -g -O0 -Wall -Wextra -Wpedantic -Werror -DTINYGLTF3_ENABLE_FS \
|
||||
-o tester_v3_c tester_v3_c.c ../tiny_gltf_v3.c
|
||||
|
||||
- name: Build tester_v3_c_v1port
|
||||
run: |
|
||||
cd tests
|
||||
cc -I../ -std=c11 -g -O0 -Wall -Wextra -Wpedantic -Werror -DTINYGLTF3_ENABLE_FS \
|
||||
-o tester_v3_c_v1port tester_v3_c_v1port.c ../tiny_gltf_v3.c
|
||||
|
||||
- name: Run tester_v3_c (security regressions)
|
||||
run: |
|
||||
cd tests
|
||||
./tester_v3_c
|
||||
|
||||
- name: Run tester_v3_c_v1port (ported unit tests)
|
||||
run: |
|
||||
cd tests
|
||||
./tester_v3_c_v1port
|
||||
|
||||
# v3 C runtime under stock Ubuntu clang.
|
||||
v3-c-tests-clang:
|
||||
runs-on: ubuntu-latest
|
||||
name: v3 C tests (Linux x64, Clang)
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Install clang
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang
|
||||
|
||||
- name: Build tester_v3_c
|
||||
run: |
|
||||
cd tests
|
||||
clang -I../ -std=c11 -g -O0 -Werror -Weverything \
|
||||
-Wno-padded -Wno-unsafe-buffer-usage -Wno-switch-default \
|
||||
-Wno-format-nonliteral -Wno-float-equal -Wno-cast-align \
|
||||
-Wno-declaration-after-statement -Wno-unknown-warning-option \
|
||||
-Wno-pre-c11-compat \
|
||||
-DTINYGLTF3_ENABLE_FS \
|
||||
-o tester_v3_c tester_v3_c.c ../tiny_gltf_v3.c
|
||||
|
||||
- name: Build tester_v3_c_v1port
|
||||
run: |
|
||||
cd tests
|
||||
clang -I../ -std=c11 -g -O0 -Werror -Weverything \
|
||||
-Wno-padded -Wno-unsafe-buffer-usage -Wno-switch-default \
|
||||
-Wno-format-nonliteral -Wno-float-equal -Wno-cast-align \
|
||||
-Wno-declaration-after-statement -Wno-unknown-warning-option \
|
||||
-Wno-pre-c11-compat \
|
||||
-DTINYGLTF3_ENABLE_FS \
|
||||
-o tester_v3_c_v1port tester_v3_c_v1port.c ../tiny_gltf_v3.c
|
||||
|
||||
- name: Run tester_v3_c
|
||||
run: |
|
||||
cd tests
|
||||
./tester_v3_c
|
||||
|
||||
- name: Run tester_v3_c_v1port
|
||||
run: |
|
||||
cd tests
|
||||
./tester_v3_c_v1port
|
||||
|
||||
# v3 C runtime under bleeding-edge clang 21 (matches local dev environment).
|
||||
v3-c-tests-clang21:
|
||||
runs-on: ubuntu-24.04
|
||||
name: v3 C tests (Linux x64, Clang 21)
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Install clang 21
|
||||
run: |
|
||||
wget https://apt.llvm.org/llvm.sh
|
||||
chmod +x llvm.sh
|
||||
sudo ./llvm.sh 21
|
||||
|
||||
- name: Build tester_v3_c
|
||||
run: |
|
||||
cd tests
|
||||
clang-21 -I../ -std=c11 -g -O0 -Werror -Weverything \
|
||||
-Wno-padded -Wno-unsafe-buffer-usage -Wno-switch-default \
|
||||
-Wno-format-nonliteral -Wno-float-equal -Wno-cast-align \
|
||||
-Wno-declaration-after-statement -Wno-unknown-warning-option \
|
||||
-Wno-pre-c11-compat \
|
||||
-DTINYGLTF3_ENABLE_FS \
|
||||
-o tester_v3_c tester_v3_c.c ../tiny_gltf_v3.c
|
||||
|
||||
- name: Build tester_v3_c_v1port
|
||||
run: |
|
||||
cd tests
|
||||
clang-21 -I../ -std=c11 -g -O0 -Werror -Weverything \
|
||||
-Wno-padded -Wno-unsafe-buffer-usage -Wno-switch-default \
|
||||
-Wno-format-nonliteral -Wno-float-equal -Wno-cast-align \
|
||||
-Wno-declaration-after-statement -Wno-unknown-warning-option \
|
||||
-Wno-pre-c11-compat \
|
||||
-DTINYGLTF3_ENABLE_FS \
|
||||
-o tester_v3_c_v1port tester_v3_c_v1port.c ../tiny_gltf_v3.c
|
||||
|
||||
- name: Run tester_v3_c
|
||||
run: |
|
||||
cd tests
|
||||
./tester_v3_c
|
||||
|
||||
- name: Run tester_v3_c_v1port
|
||||
run: |
|
||||
cd tests
|
||||
./tester_v3_c_v1port
|
||||
|
||||
# v3 C runtime built with MSVC at warning-level 4 (/W4 /WX).
|
||||
v3-c-tests-msvc:
|
||||
runs-on: windows-latest
|
||||
name: v3 C tests (Windows x64, MSVC /W4)
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up MSVC environment
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Build and run tester_v3_c
|
||||
shell: cmd
|
||||
run: |
|
||||
cd tests
|
||||
cl /nologo /W4 /WX /std:c11 /Zi /Od /D_CRT_SECURE_NO_WARNINGS /DTINYGLTF3_ENABLE_FS /I.. tester_v3_c.c ..\tiny_gltf_v3.c /Fe:tester_v3_c.exe
|
||||
tester_v3_c.exe
|
||||
|
||||
- name: Build and run tester_v3_c_v1port
|
||||
shell: cmd
|
||||
run: |
|
||||
cd tests
|
||||
cl /nologo /W4 /WX /std:c11 /Zi /Od /D_CRT_SECURE_NO_WARNINGS /DTINYGLTF3_ENABLE_FS /I.. tester_v3_c_v1port.c ..\tiny_gltf_v3.c /Fe:tester_v3_c_v1port.exe
|
||||
tester_v3_c_v1port.exe
|
||||
|
||||
# v3 C runtime under ASan + UBSan for memory-safety + UB checks.
|
||||
v3-c-tests-sanitizers:
|
||||
runs-on: ubuntu-latest
|
||||
name: v3 C tests (Clang ASan + UBSan)
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Build tester_v3_c with ASan + UBSan
|
||||
run: |
|
||||
cd tests
|
||||
clang -I../ -std=c11 -g -O1 -DTINYGLTF3_ENABLE_FS \
|
||||
-fsanitize=address,undefined -fno-omit-frame-pointer \
|
||||
-o tester_v3_c tester_v3_c.c ../tiny_gltf_v3.c
|
||||
|
||||
- name: Build tester_v3_c_v1port with ASan + UBSan
|
||||
run: |
|
||||
cd tests
|
||||
clang -I../ -std=c11 -g -O1 -DTINYGLTF3_ENABLE_FS \
|
||||
-fsanitize=address,undefined -fno-omit-frame-pointer \
|
||||
-o tester_v3_c_v1port tester_v3_c_v1port.c ../tiny_gltf_v3.c
|
||||
|
||||
- name: Run tester_v3_c
|
||||
env:
|
||||
ASAN_OPTIONS: detect_leaks=1:halt_on_error=1
|
||||
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
|
||||
run: |
|
||||
cd tests
|
||||
./tester_v3_c
|
||||
|
||||
- name: Run tester_v3_c_v1port
|
||||
env:
|
||||
ASAN_OPTIONS: detect_leaks=1:halt_on_error=1
|
||||
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
|
||||
run: |
|
||||
cd tests
|
||||
./tester_v3_c_v1port
|
||||
@@ -0,0 +1,53 @@
|
||||
name: MSYS2 MinGW-w64 Windows 64bit Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- release
|
||||
- devel
|
||||
paths:
|
||||
- 'tiny_gltf.*'
|
||||
- 'tinygltf_json_c.h'
|
||||
- 'CMakeLists.txt'
|
||||
- 'meson.build'
|
||||
- 'meson_options.txt'
|
||||
- 'tests/tester_v3*.c'
|
||||
- '.github/workflows/mingw-w64-msys2.yml'
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
mingw-w64-msys2-build:
|
||||
name: MSYS2 MinGW-w64 Windows Build
|
||||
runs-on: windows-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Install core & build dependencies
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: UCRT64
|
||||
install: base-devel
|
||||
pacboy: >-
|
||||
cc:p cmake:p ninja:p
|
||||
update: true
|
||||
release: false
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
cmake \
|
||||
-G"Ninja" \
|
||||
-S . \
|
||||
-B build \
|
||||
-DTINYGLTF3_BUILD_TESTS=ON
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cmake --build build
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
ctest --test-dir build --output-on-failure
|
||||
+23
-3
@@ -1,4 +1,5 @@
|
||||
# CMake
|
||||
/build/
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
CMakeScripts
|
||||
@@ -21,9 +22,13 @@ premake5.tar.gz
|
||||
*.vcxproj*
|
||||
.vs
|
||||
|
||||
# default cmake build dir
|
||||
build/
|
||||
|
||||
#binary directories
|
||||
bin/
|
||||
obj/
|
||||
out/
|
||||
|
||||
#runtime gui config
|
||||
imgui.ini
|
||||
@@ -65,7 +70,22 @@ imgui.ini
|
||||
*.app
|
||||
|
||||
loader_example
|
||||
tests/tester
|
||||
tests/tester_noexcept
|
||||
tests/issue-97.gltf
|
||||
# Compiled test binaries (built by tests/Makefile, CMakeLists.txt, meson.build)
|
||||
tests/tester_v3
|
||||
tests/tester_v3_c
|
||||
tests/tester_v3_c_cpp
|
||||
tests/tester_v3_c_v1port
|
||||
tests/tester_v3_c_v1port_cpp
|
||||
tests/tester_v3_freestanding
|
||||
tests/tester_v3_json_c
|
||||
tests/v3/fuzzer/fuzz_gltf_v3
|
||||
tests/v3/fuzzer/fuzz_gltf_v3_c
|
||||
|
||||
# Generated by web/Makefile (make / make sample)
|
||||
web/tinygltf_v3.js
|
||||
web/tinygltf_v3.wasm
|
||||
web/Cube.glb
|
||||
|
||||
# unignore
|
||||
!Makefile
|
||||
!tests/Makefile
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]
|
||||
then
|
||||
brew upgrade
|
||||
curl -o premake5.tar.gz https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-macosx.tar.gz
|
||||
else
|
||||
wget https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz -O premake5.tar.gz
|
||||
fi
|
||||
tar xzf premake5.tar.gz
|
||||
-63
@@ -1,63 +0,0 @@
|
||||
language: cpp
|
||||
sudo: false
|
||||
matrix:
|
||||
include:
|
||||
- addons: &1
|
||||
apt:
|
||||
sources:
|
||||
- george-edison55-precise-backports
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-3.9
|
||||
packages:
|
||||
- g++-4.9
|
||||
- clang-3.9
|
||||
compiler: clang
|
||||
env: COMPILER_VERSION=3.9 BUILD_TYPE=Debug
|
||||
- addons: *1
|
||||
compiler: clang
|
||||
env: COMPILER_VERSION=3.9 BUILD_TYPE=Release
|
||||
- addons: &2
|
||||
apt:
|
||||
sources:
|
||||
- george-edison55-precise-backports
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-4.9
|
||||
compiler: gcc
|
||||
env: COMPILER_VERSION=4.9 BUILD_TYPE=Debug EXTRA_CXXFLAGS="-fsanitize=address"
|
||||
- addons: *2
|
||||
compiler: gcc
|
||||
env: COMPILER_VERSION=4.9 BUILD_TYPE=Release EXTRA_CXXFLAGS="-fsanitize=address"
|
||||
- addons: *1
|
||||
compiler: clang
|
||||
env: COMPILER_VERSION=3.9 BUILD_TYPE=Debug CFLAGS="-O0" CXXFLAGS="-O0"
|
||||
- addons: &3
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-4.8
|
||||
compiler: gcc
|
||||
env: COMPILER_VERSION=4.8 BUILD_TYPE=Debug
|
||||
- addons: *3
|
||||
compiler: gcc
|
||||
env: COMPILER_VERSION=4.8 BUILD_TYPE=Release
|
||||
|
||||
before_install:
|
||||
- ./.travis-before-install.sh
|
||||
|
||||
|
||||
script:
|
||||
- export CC="${CC}-${COMPILER_VERSION}"
|
||||
- export CXX="${CXX}-${COMPILER_VERSION}"
|
||||
- ${CC} -v
|
||||
- ${CXX} ${EXTRA_CXXFLAGS} -std=c++11 -Wall -g -o loader_example loader_example.cc
|
||||
- ./loader_example ./models/Cube/Cube.gltf
|
||||
- cd tests
|
||||
- clang++ -v
|
||||
- make
|
||||
- ./tester
|
||||
- ./tester_noexcept
|
||||
- cd ../examples/raytrace
|
||||
- ../../premake5 gmake
|
||||
- make
|
||||
@@ -0,0 +1,55 @@
|
||||
# AGENTS.md — tinygltf v3 (C)
|
||||
|
||||
TinyGLTF v3 C (`tiny_gltf_v3.h` + `tiny_gltf_v3.c` + `tinygltf_json_c.h`) is the
|
||||
mainline. Legacy v1/v2/v3-C++ code lives under `attic/` and is not built or
|
||||
tested.
|
||||
|
||||
## Commands
|
||||
|
||||
- Unit tests (C): `make -C tests all && make -C tests run`
|
||||
- CMake: `cmake -B build -DTINYGLTF3_BUILD_TESTS=ON && cmake --build build && ctest --test-dir build --output-on-failure`
|
||||
- Meson: `meson setup build && meson compile -C build && meson test -C build`
|
||||
- WASM/web demo (requires Emscripten SDK, default `~/work/emsdk`):
|
||||
`make -C web && make -C web sample` — then open `http://localhost:8000` via `make -C web serve`
|
||||
- Fuzzers: `make -C tests/v3/fuzzer` (clang + libFuzzer)
|
||||
|
||||
## Pre-push audit checklist
|
||||
|
||||
Run **before every push**. Fix or unstage anything found; the audit must pass
|
||||
clean.
|
||||
|
||||
1. **Working tree sanity**
|
||||
- `git status --short` — no staged build artifacts, no surprise files.
|
||||
- Never `git add -A` / `git add .`: stage only intended paths. The repo
|
||||
root frequently contains untracked scratch files (`Fox.glb`,
|
||||
`benchmark/synthetic_*`, `log*`, `.cache/`, `tests/v3/fuzzer/artifacts|corpus`,
|
||||
stray `*.gltf`/`*.bin` files). Verify `git status` before staging.
|
||||
|
||||
2. **Secret scan**
|
||||
- `gitleaks detect --source . --no-banner -r /tmp/gitleaks.json`
|
||||
- `~/local/bin/trufflehog git file://$PWD --no-update --only-verified`
|
||||
- Both must report 0 real secrets. Known allowed finding: `B3G_LEFT_ARROW`
|
||||
generic-api-key hits in `attic/examples/common/OpenGLWindow/` are false
|
||||
positives (keyboard key constants).
|
||||
|
||||
3. **No build artifacts or unwanted large binaries**
|
||||
- `git ls-files -z | xargs -0 du -b | sort -rn | head -30` — review the top.
|
||||
- Rule of thumb: nothing over ~1 MB unless it is a tracked, intentional
|
||||
asset (e.g. `attic/tools/windows/premake5.exe`, `models/Cube/*.png`).
|
||||
- Watch for: compiled executables, `*.wasm`/`*.exr`/`*.log`/`*.o`/`*.obj`,
|
||||
generated `output.*`/`cloth*`/`sim*.bin`/`out_*.exr` files, and large
|
||||
`.gltf`/`.glb` files. Small test/regression fixture `.gltf` files
|
||||
(e.g. under `tests/`, `models/regression/`, `tests/v3/security/`) are OK.
|
||||
- `web/tinygltf_v3.js`, `web/tinygltf_v3.wasm`, `web/Cube.glb` are
|
||||
generated by `make -C web` and must stay gitignored (never commit them).
|
||||
|
||||
4. **History is lean**
|
||||
- If an unwanted file was added in an unpushed commit, rewrite it
|
||||
(`git rebase -i origin/<branch>`, `git rm` + `--amend`) so the blob never
|
||||
reaches the remote, then `git gc --prune=now` locally.
|
||||
- Push only intended branches (`git push origin <branch>` — never `--all`
|
||||
or `--force` unless explicitly asked).
|
||||
|
||||
5. **Final smoke check**
|
||||
- `make -C tests run` passes (all 4 testers).
|
||||
- If touched: `cmake`/`meson` builds and `make -C web` still succeed.
|
||||
+47
-32
@@ -1,41 +1,56 @@
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
PROJECT (tinygltf)
|
||||
project(tinygltf_v3 C)
|
||||
|
||||
SET(CMAKE_CXX_STANDARD 11)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
option(TINYGLTF_BUILD_LOADER_EXAMPLE "Build loader_example" ON)
|
||||
option(TINYGLTF_BUILD_GL_EXAMPLES "Build GL exampels(requires glfw, OpenGL, etc)" OFF)
|
||||
option(TINYGLTF_BUILD_VALIDATOR_EXAMPLE "Build validator exampe" OFF)
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD_REQUIRED On)
|
||||
set(CMAKE_C_EXTENSIONS Off)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
if (TINYGLTF_BUILD_LOADER_EXAMPLE)
|
||||
ADD_EXECUTABLE ( loader_example
|
||||
loader_example.cc
|
||||
option(TINYGLTF3_BUILD_TESTS "Build and run tinygltf v3 C unit tests" ON)
|
||||
option(TINYGLTF3_INSTALL "Install tinygltf v3 files during install step" ON)
|
||||
|
||||
set(TINYGLTF3_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
||||
if (TINYGLTF3_BUILD_TESTS)
|
||||
enable_testing()
|
||||
|
||||
function(add_tinygltf_v3_c_test target)
|
||||
add_executable(${target} ${ARGN})
|
||||
target_include_directories(${target} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/tests
|
||||
)
|
||||
endif (TINYGLTF_BUILD_LOADER_EXAMPLE)
|
||||
set_target_properties(${target} PROPERTIES
|
||||
C_STANDARD 11
|
||||
C_STANDARD_REQUIRED ON
|
||||
C_EXTENSIONS OFF
|
||||
)
|
||||
add_test(NAME ${target} COMMAND ${target} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests)
|
||||
endfunction()
|
||||
|
||||
if (TINYGLTF_BUILD_GL_EXAMPLES)
|
||||
ADD_SUBDIRECTORY ( examples/gltfutil )
|
||||
ADD_SUBDIRECTORY ( examples/glview )
|
||||
endif (TINYGLTF_BUILD_GL_EXAMPLES)
|
||||
add_tinygltf_v3_c_test(tester_v3_c tests/tester_v3_c.c tiny_gltf_v3.c)
|
||||
target_compile_definitions(tester_v3_c PRIVATE TINYGLTF3_ENABLE_FS)
|
||||
|
||||
if (TINYGLTF_BUILD_VALIDATOR_EXAMPLE)
|
||||
ADD_SUBDIRECTORY ( examples/validator )
|
||||
endif (TINYGLTF_BUILD_VALIDATOR_EXAMPLE)
|
||||
#
|
||||
# TinuGLTF is a header-only library, so no library build. just install header files.
|
||||
#
|
||||
INSTALL ( FILES
|
||||
json.hpp
|
||||
stb_image.h
|
||||
stb_image_write.h
|
||||
tiny_gltf.h
|
||||
DESTINATION
|
||||
include
|
||||
)
|
||||
add_tinygltf_v3_c_test(tester_v3_c_v1port tests/tester_v3_c_v1port.c tiny_gltf_v3.c)
|
||||
target_compile_definitions(tester_v3_c_v1port PRIVATE TINYGLTF3_ENABLE_FS)
|
||||
|
||||
INSTALL ( FILES
|
||||
cmake/TinyGLTFConfig.cmake
|
||||
DESTINATION
|
||||
cmake
|
||||
add_tinygltf_v3_c_test(tester_v3_json_c tests/tester_v3_json_c.c)
|
||||
|
||||
add_tinygltf_v3_c_test(tester_v3_freestanding tests/tester_v3_freestanding.c)
|
||||
if (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
|
||||
target_compile_options(tester_v3_freestanding PRIVATE -ffreestanding)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (TINYGLTF3_INSTALL)
|
||||
install(FILES
|
||||
tiny_gltf_v3.h
|
||||
tiny_gltf_v3.c
|
||||
tinygltf_json_c.h
|
||||
DESTINATION
|
||||
${TINYGLTF3_INSTALL_DIR}
|
||||
)
|
||||
endif ()
|
||||
@@ -1,13 +1,14 @@
|
||||
|
||||
# Use this for strict compilation check(will work on clang 3.8+)
|
||||
#EXTRA_CXXFLAGS := -fsanitize=address -Wall -Werror -Weverything -Wno-c++11-long-long -Wno-c++98-compat
|
||||
|
||||
# With draco
|
||||
# EXTRA_CXXFLAGS := -I../draco/src/ -I../draco/build -DTINYGLTF_ENABLE_DRACO -L../draco/build
|
||||
# EXTRA_LINKFLAGS := -L../draco/build/ -ldracodec -ldraco
|
||||
# tinygltf v3 (C) — convenience build entry point.
|
||||
#
|
||||
# make — build all v3 C unit testers
|
||||
# make test — build and run all v3 C unit testers
|
||||
# make clean — remove test binaries
|
||||
|
||||
all:
|
||||
clang++ $(EXTRA_CXXFLAGS) -std=c++11 -g -O0 -o loader_example loader_example.cc $(EXTRA_LINKFLAGS)
|
||||
$(MAKE) -C tests all
|
||||
|
||||
lint:
|
||||
deps/cpplint.py tiny_gltf.h
|
||||
test: all
|
||||
$(MAKE) -C tests run
|
||||
|
||||
clean:
|
||||
$(MAKE) -C tests clean
|
||||
@@ -1,229 +1,105 @@
|
||||
# Header only C++ tiny glTF library(loader/saver).
|
||||
# tinygltf v3 — C glTF 2.0 loader/saver
|
||||
|
||||
`TinyGLTF` is a header only C++11 glTF 2.0 https://github.com/KhronosGroup/glTF library.
|
||||
`TinyGLTF v3` is a C11-first implementation of a glTF 2.0
|
||||
https://github.com/KhronosGroup/glTF loader and writer.
|
||||
|
||||
`TinyGLTF` uses Niels Lohmann's json library(https://github.com/nlohmann/json), so now it requires C++11 compiler.
|
||||
If you are looking for old, C++03 version, please use `devel-picojson` branch(but not maintained anymore).
|
||||
- **Pure C POD API** (`tiny_gltf_v3.h` + `tiny_gltf_v3.c` + `tinygltf_json_c.h`) — no STL, no RTTI, no exceptions required; easy to bind to other languages.
|
||||
- **Arena-based memory management** — all parse-time allocations come from a single arena; a single `tg3_model_free()` frees everything.
|
||||
- **Structured error reporting** — `tg3_error_stack` provides machine-readable errors with severity levels and source locations.
|
||||
- **Custom JSON backend** — `tinygltf_json_c.h` is a locale-independent pure-C JSON parser/serializer used by the v3 runtime.
|
||||
- **Streaming callbacks** — opt-in streaming parse/write via user-supplied callbacks.
|
||||
- **Opt-in filesystem and image I/O** — `TINYGLTF3_ENABLE_FS` / `TINYGLTF3_ENABLE_STB_IMAGE` are off by default; you control when and how assets are loaded.
|
||||
- **C++20 coroutine facade** (optional, auto-detected). C17/C++17 default.
|
||||
- **Hardened against untrusted input** — URI sanitization, post-parse index-bounds validation (default-on, opt-out via `tg3_parse_options.validate_indices = 0`), strict numeric range checks; exercised by a libFuzzer harness. See the `Security Considerations` block at the top of `tiny_gltf_v3.h`.
|
||||
|
||||
## Quick start
|
||||
|
||||
Copy `tiny_gltf_v3.h`, `tiny_gltf_v3.c`, and `tinygltf_json_c.h` to your project.
|
||||
Compile `tiny_gltf_v3.c` as C11 or newer. Define `TINYGLTF3_ENABLE_FS` when
|
||||
building `tiny_gltf_v3.c` if you want `tg3_parse_file()` to use stdio-backed
|
||||
filesystem helpers. The legacy `TINYGLTF3_IMPLEMENTATION` include path remains
|
||||
available for compatibility.
|
||||
|
||||
```c
|
||||
#include "tiny_gltf_v3.h"
|
||||
```
|
||||
|
||||
Loading a glTF file:
|
||||
|
||||
```c
|
||||
tg3_parse_options opts;
|
||||
tg3_error_stack errors;
|
||||
tg3_model model;
|
||||
|
||||
tg3_parse_options_init(&opts);
|
||||
tg3_error_stack_init(&errors);
|
||||
|
||||
tg3_error_code err = tg3_parse_file(&model, &errors, "scene.gltf", 10, &opts);
|
||||
if (err != TG3_OK) {
|
||||
for (uint32_t i = 0; i < errors.count; i++) {
|
||||
fprintf(stderr, "[%d] %s\n", (int)errors.entries[i].severity,
|
||||
errors.entries[i].message ? errors.entries[i].message : "(null)");
|
||||
}
|
||||
}
|
||||
// ... use model ...
|
||||
tg3_model_free(&model);
|
||||
tg3_error_stack_free(&errors);
|
||||
```
|
||||
|
||||
## Testing & verification
|
||||
|
||||
The v3 C runtime ships with three layers of automated coverage:
|
||||
|
||||
- **`tests/tester_v3_c.c`** — internal unit checks plus security regression tests (path traversal, negative `byteStride`, OOB indices, error-message lifetime, …). Build via `make` in `tests/`; run `./tester_v3_c` for the internal suite or `./tester_v3_c <file.gltf|file.glb>` to parse a single asset.
|
||||
- **`tests/tester_v3_c_v1port.c`** — v3 C port of the legacy unit tests, keeping behavioral parity with the old C++ API.
|
||||
- **`tests/tester_v3_json_c.c`** and **`tests/tester_v3_freestanding.c`** — JSON backend and freestanding (no libc) checks.
|
||||
- **`test_runner.py`** — model verifier that runs `tests/tester_v3_c` against every model in `glTF-Sample-Models/2.0` and validates the structured COUNTS/DIGEST output.
|
||||
- **`tests/v3/fuzzer/`** — libFuzzer harness with ASan + UBSan (`make run` builds and runs `fuzz_gltf_v3_c`). Crafted regression inputs live in `tests/v3/security/` and are seeded into `tests/v3/fuzzer/corpus/`.
|
||||
|
||||
### Building
|
||||
|
||||
```bash
|
||||
# Plain make (gcc/clang)
|
||||
$ make -C tests && make -C tests run
|
||||
|
||||
# CMake
|
||||
$ cmake -B build && cmake --build build && ctest --test-dir build --output-on-failure
|
||||
|
||||
# Meson
|
||||
$ meson setup build && meson compile -C build && meson test -C build
|
||||
|
||||
# WebAssembly (requires an Emscripten SDK, defaults to ~/work/emsdk)
|
||||
$ make -C web && make -C web sample
|
||||
```
|
||||
|
||||
## Web/WASM demo
|
||||
|
||||
[`web/`](web/) contains a browser demo that compiles the v3 C runtime with
|
||||
Emscripten and renders glTF/GLB files with three.js (file picker + drag &
|
||||
drop). See [`web/README.md`](web/README.md) for build instructions.
|
||||
|
||||
## Legacy v1/v2 (C++)
|
||||
|
||||
The previous C++ implementation (`tiny_gltf.h`, `tiny_gltf.cc`,
|
||||
`tinygltf_json.h`, `json.hpp`, `loader_example.cc`, the C++ examples and
|
||||
tests) is deprecated and has been moved to [`attic/`](attic/) for reference.
|
||||
It is no longer built, tested, or installed. TinyGLTF v3 C is the mainline.
|
||||
|
||||
## Status
|
||||
|
||||
- v2.4.0 Experimental RapidJSON support. Experimental C++14 support(C++14 may give better performance)
|
||||
- v2.3.0 Modified Material representation according to glTF 2.0 schema(and introduced TextureInfo class)
|
||||
- v2.2.0 release(Support loading 16bit PNG. Sparse accessor support)
|
||||
- v2.1.0 release(Draco support)
|
||||
- v2.0.0 release(22 Aug, 2018)!
|
||||
|
||||
### Branches
|
||||
|
||||
* `sajson` : Use sajson to parse JSON. Parsing only but faster compile time(2x reduction compared to json.hpp and RapidJson)
|
||||
TinyGLTF v3 (`tiny_gltf_v3.h` + `tiny_gltf_v3.c`) is the mainline release.
|
||||
API additions and behavior changes go through the usual review process.
|
||||
|
||||
## Builds
|
||||
|
||||
[](https://travis-ci.org/syoyo/tinygltf)
|
||||
|
||||
[](https://ci.appveyor.com/project/syoyo/tinygltf)
|
||||
|
||||

|
||||
|
||||
## Features
|
||||
|
||||
* Written in portable C++. C++-11 with STL dependency only.
|
||||
* [x] macOS + clang(LLVM)
|
||||
* [x] iOS + clang
|
||||
* [x] Linux + gcc/clang
|
||||
* [x] Windows + MinGW
|
||||
* [x] Windows + Visual Studio 2015 Update 3 or later.
|
||||
* Visual Studio 2013 is not supported since they have limited C++11 support and failed to compile `json.hpp`.
|
||||
* [x] Android NDK
|
||||
* [x] Android + CrystaX(NDK drop-in replacement) GCC
|
||||
* [x] Web using Emscripten(LLVM)
|
||||
* Moderate parsing time and memory consumption.
|
||||
* glTF specification v2.0.0
|
||||
* [x] ASCII glTF
|
||||
* [x] Load
|
||||
* [x] Save
|
||||
* [x] Binary glTF(GLB)
|
||||
* [x] Load
|
||||
* [x] Save(.bin embedded .glb)
|
||||
* Buffers
|
||||
* [x] Parse BASE64 encoded embedded buffer data(DataURI).
|
||||
* [x] Load `.bin` file.
|
||||
* Image(Using stb_image)
|
||||
* [x] Parse BASE64 encoded embedded image data(DataURI).
|
||||
* [x] Load external image file.
|
||||
* [x] Load PNG(8bit and 16bit)
|
||||
* [x] Load JPEG(8bit only)
|
||||
* [x] Load BMP
|
||||
* [x] Load GIF
|
||||
* [x] Custom Image decoder callback(e.g. for decoding OpenEXR image)
|
||||
* Morph traget
|
||||
* [x] Sparse accessor
|
||||
* Load glTF from memory
|
||||
* Custom callback handler
|
||||
* [x] Image load
|
||||
* [x] Image save
|
||||
* Extensions
|
||||
* [x] Draco mesh decoding
|
||||
* [ ] Draco mesh encoding
|
||||
|
||||
## Note on extension property
|
||||
|
||||
In extension(`ExtensionMap`), JSON number value is parsed as int or float(number) and stored as `tinygltf::Value` object. If you want a floating point value from `tinygltf::Value`, use `GetNumberAsDouble()` method.
|
||||
|
||||
`IsNumber()` returns true if the underlying value is an int value or a floating point value.
|
||||
|
||||
## Examples
|
||||
|
||||
* [glview](examples/glview) : Simple glTF geometry viewer.
|
||||
* [validator](examples/validator) : Simple glTF validator with JSON schema.
|
||||
* [basic](examples/basic) : Basic glTF viewer with texturing support.
|
||||
|
||||
## Projects using TinyGLTF
|
||||
|
||||
* px_render Single header C++ Libraries for Thread Scheduling, Rendering, and so on... https://github.com/pplux/px
|
||||
* Physical based rendering with Vulkan using glTF 2.0 models https://github.com/SaschaWillems/Vulkan-glTF-PBR
|
||||
* GLTF loader plugin for OGRE 2.1. Support for PBR materials via HLMS/PBS https://github.com/Ybalrid/Ogre_glTF
|
||||
* [TinyGltfImporter](http://doc.magnum.graphics/magnum/classMagnum_1_1Trade_1_1TinyGltfImporter.html) plugin for [Magnum](https://github.com/mosra/magnum), a lightweight and modular C++11/C++14 graphics middleware for games and data visualization.
|
||||
* [Diligent Engine](https://github.com/DiligentGraphics/DiligentEngine) - A modern cross-platform low-level graphics library and rendering framework
|
||||
* Lighthouse 2: a rendering framework for real-time ray tracing / path tracing experiments. https://github.com/jbikker/lighthouse2
|
||||
* [QuickLook GLTF](https://github.com/toshiks/glTF-quicklook) - quicklook plugin for macos. Also SceneKit wrapper for tinygltf.
|
||||
* [GlslViewer](https://github.com/patriciogonzalezvivo/glslViewer) - live GLSL coding for MacOS and Linux
|
||||
* [Vulkan-Samples](https://github.com/KhronosGroup/Vulkan-Samples) - The Vulkan Samples is collection of resources to help you develop optimized Vulkan applications.
|
||||
* [TDME2](https://github.com/andreasdr/tdme2) - TDME2 - ThreeDeeMiniEngine2 is a lightweight 3D engine including tools suited for 3D game development using C++11
|
||||
* Your projects here! (Please send PR)
|
||||
|
||||
## TODOs
|
||||
|
||||
* [ ] Write C++ code generator which emits C++ code from JSON schema for robust parsing.
|
||||
* [ ] Mesh Compression/decompression(Open3DGC, etc)
|
||||
* [x] Load Draco compressed mesh
|
||||
* [ ] Save Draco compressed mesh
|
||||
* [ ] Open3DGC?
|
||||
* [x] Support `extensions` and `extras` property
|
||||
* [ ] HDR image?
|
||||
* [ ] OpenEXR extension through TinyEXR.
|
||||
* [ ] 16bit PNG support in Serialization
|
||||
* [ ] Write example and tests for `animation` and `skin`
|
||||
|
||||
## Licenses
|
||||
|
||||
TinyGLTF is licensed under MIT license.
|
||||
TinyGLTF is licensed under MIT license. See [LICENSE](LICENSE).
|
||||
|
||||
TinyGLTF uses the following third party libraries.
|
||||
TinyGLTF v3 uses the following third party code:
|
||||
|
||||
* json.hpp : Copyright (c) 2013-2017 Niels Lohmann. MIT license.
|
||||
* base64 : Copyright (C) 2004-2008 René Nyffenegger
|
||||
* stb_image.h : v2.08 - public domain image loader - [Github link](https://github.com/nothings/stb/blob/master/stb_image.h)
|
||||
* stb_image_write.h : v1.09 - public domain image writer - [Github link](https://github.com/nothings/stb/blob/master/stb_image_write.h)
|
||||
|
||||
|
||||
## Build and example
|
||||
|
||||
Copy `stb_image.h`, `stb_image_write.h`, `json.hpp` and `tiny_gltf.h` to your project.
|
||||
|
||||
### Loading glTF 2.0 model
|
||||
|
||||
```c++
|
||||
// Define these only in *one* .cc file.
|
||||
#define TINYGLTF_IMPLEMENTATION
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
// #define TINYGLTF_NOEXCEPTION // optional. disable exception handling.
|
||||
#include "tiny_gltf.h"
|
||||
|
||||
using namespace tinygltf;
|
||||
|
||||
Model model;
|
||||
TinyGLTF loader;
|
||||
std::string err;
|
||||
std::string warn;
|
||||
|
||||
bool ret = loader.LoadASCIIFromFile(&model, &err, &warn, argv[1]);
|
||||
//bool ret = loader.LoadBinaryFromFile(&model, &err, &warn, argv[1]); // for binary glTF(.glb)
|
||||
|
||||
if (!warn.empty()) {
|
||||
printf("Warn: %s\n", warn.c_str());
|
||||
}
|
||||
|
||||
if (!err.empty()) {
|
||||
printf("Err: %s\n", err.c_str());
|
||||
}
|
||||
|
||||
if (!ret) {
|
||||
printf("Failed to parse glTF\n");
|
||||
return -1;
|
||||
}
|
||||
```
|
||||
|
||||
#### Loader options
|
||||
|
||||
* `TinyGLTF::SetPreserveimageChannels(bool onoff)`. `true` to preserve image channels as stored in image file for loaded image. `false` by default for backward compatibility(image channels are widen to `RGBA` 4 channels). Effective only when using builtin image loader(STB image loader).
|
||||
|
||||
## Compile options
|
||||
|
||||
* `TINYGLTF_NOEXCEPTION` : Disable C++ exception in JSON parsing. You can use `-fno-exceptions` or by defining the symbol `JSON_NOEXCEPTION` and `TINYGLTF_NOEXCEPTION` to fully remove C++ exception codes when compiling TinyGLTF.
|
||||
* `TINYGLTF_NO_STB_IMAGE` : Do not load images with stb_image. Instead use `TinyGLTF::SetImageLoader(LoadimageDataFunction LoadImageData, void *user_data)` to set a callback for loading images.
|
||||
* `TINYGLTF_NO_STB_IMAGE_WRITE` : Do not write images with stb_image_write. Instead use `TinyGLTF::SetImageWriter(WriteimageDataFunction WriteImageData, void *user_data)` to set a callback for writing images.
|
||||
* `TINYGLTF_NO_EXTERNAL_IMAGE` : Do not try to load external image file. This option would be helpful if you do not want to load image files during glTF parsing.
|
||||
* `TINYGLTF_ANDROID_LOAD_FROM_ASSETS`: Load all files from packaged app assets instead of the regular file system. **Note:** You must pass a valid asset manager from your android app to `tinygltf::asset_manager` beforehand.
|
||||
* `TINYGLTF_ENABLE_DRACO`: Enable Draco compression. User must provide include path and link correspnding libraries in your project file.
|
||||
* `TINYGLTF_NO_INCLUDE_JSON `: Disable including `json.hpp` from within `tiny_gltf.h` because it has been already included before or you want to include it using custom path before including `tiny_gltf.h`.
|
||||
* `TINYGLTF_NO_INCLUDE_STB_IMAGE `: Disable including `stb_image.h` from within `tiny_gltf.h` because it has been already included before or you want to include it using custom path before including `tiny_gltf.h`.
|
||||
* `TINYGLTF_NO_INCLUDE_STB_IMAGE_WRITE `: Disable including `stb_image_write.h` from within `tiny_gltf.h` because it has been already included before or you want to include it using custom path before including `tiny_gltf.h`.
|
||||
* `TINYGLTF_USE_RAPIDJSON` : Use RapidJSON as a JSON parser/serializer. RapidJSON files are not included in TinyGLTF repo. Please set an include path to RapidJSON if you enable this featrure.
|
||||
* `TINYGLTF_USE_CPP14` : Use C++14 feature(requires C++14 compiler). This may give better performance than C++11.
|
||||
|
||||
|
||||
### Saving gltTF 2.0 model
|
||||
|
||||
* Buffers.
|
||||
* [x] To file
|
||||
* [x] Embedded
|
||||
* [ ] Draco compressed?
|
||||
* [x] Images
|
||||
* [x] To file
|
||||
* [x] Embedded
|
||||
* Binary(.glb)
|
||||
* [x] .bin embedded single .glb
|
||||
* [ ] External .bin
|
||||
|
||||
## Running tests.
|
||||
|
||||
### glTF parsing test
|
||||
|
||||
#### Setup
|
||||
|
||||
Python 2.6 or 2.7 required.
|
||||
Git clone https://github.com/KhronosGroup/glTF-Sample-Models to your local dir.
|
||||
|
||||
#### Run parsing test
|
||||
|
||||
After building `loader_example`, edit `test_runner.py`, then,
|
||||
|
||||
```bash
|
||||
$ python test_runner.py
|
||||
```
|
||||
|
||||
### Unit tests
|
||||
|
||||
```bash
|
||||
$ cd tests
|
||||
$ make
|
||||
$ ./tester
|
||||
$ ./tester_noexcept
|
||||
```
|
||||
|
||||
### Fuzzing tests
|
||||
|
||||
See `tests/fuzzer` for details.
|
||||
|
||||
After running fuzzer on Ryzen9 3950X a week, at least `LoadASCIIFromString` looks safe except for out-of-memory error in Fuzzer.
|
||||
We may be better to introduce bounded memory size checking when parsing glTF data.
|
||||
|
||||
## Third party licenses
|
||||
|
||||
* json.hpp : Licensed under the MIT License <http://opensource.org/licenses/MIT>. Copyright (c) 2013-2017 Niels Lohmann <http://nlohmann.me>.
|
||||
* stb_image : Public domain.
|
||||
* catch : Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved. Distributed under the Boost Software License, Version 1.0.
|
||||
* RapidJSON : Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. http://rapidjson.org/
|
||||
* dlib(uridecode, uriencode) : Copyright (C) 2003 Davis E. King Boost Software License 1.0. http://dlib.net/dlib/server/server_http.cpp.html
|
||||
* fast_float (JSON number parsing, in `tinygltf_json_c.h`): Copyright (c) 2021 The fast_float authors. Apache License 2.0 / MIT / Boost 1.0.
|
||||
* dragonbox (JSON number serialization, in `tinygltf_json_c.h`): Copyright 2020-2024 Junekey Jeon. Apache 2.0 with LLVM exceptions / Boost 1.0.
|
||||
* stb_image.h (optional, `TINYGLTF3_ENABLE_STB_IMAGE`) : public domain image loader - [Github link](https://github.com/nothings/stb/blob/master/stb_image.h)
|
||||
@@ -1,18 +0,0 @@
|
||||
version: 0.9.{build}
|
||||
|
||||
image:
|
||||
- Visual Studio 2015
|
||||
|
||||
# scripts that runs after repo cloning.
|
||||
install:
|
||||
- vcsetup.bat
|
||||
|
||||
platform: x64
|
||||
configuration: Release
|
||||
|
||||
build:
|
||||
parallel: true
|
||||
project: TinyGLTFSolution.sln
|
||||
|
||||
after_build:
|
||||
- examples.bat
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
# Use this for strict compilation check(will work on clang 3.8+)
|
||||
#EXTRA_CXXFLAGS := -fsanitize=address -Wall -Werror -Weverything -Wno-c++11-long-long -Wno-c++98-compat
|
||||
|
||||
# With draco
|
||||
# EXTRA_CXXFLAGS := -I../draco/src/ -I../draco/build -DTINYGLTF_ENABLE_DRACO -L../draco/build
|
||||
# EXTRA_LINKFLAGS := -L../draco/build/ -ldracodec -ldraco
|
||||
|
||||
all:
|
||||
clang++ $(EXTRA_CXXFLAGS) -std=c++11 -g -O0 -o loader_example loader_example.cc $(EXTRA_LINKFLAGS)
|
||||
|
||||
lint:
|
||||
deps/cpplint.py tiny_gltf.h
|
||||
@@ -0,0 +1,3 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/TinyGLTFTargets.cmake)
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,117 @@
|
||||
{
|
||||
"scenes" : [
|
||||
{
|
||||
"nodes" : [ 0 ]
|
||||
}
|
||||
],
|
||||
|
||||
"nodes" : [
|
||||
{
|
||||
"mesh" : 0,
|
||||
"rotation" : [ 0.0, 0.0, 0.0, 1.0 ]
|
||||
}
|
||||
],
|
||||
|
||||
"meshes" : [
|
||||
{
|
||||
"primitives" : [ {
|
||||
"attributes" : {
|
||||
"POSITION" : 1
|
||||
},
|
||||
"indices" : 0
|
||||
} ]
|
||||
}
|
||||
],
|
||||
|
||||
"animations": [
|
||||
{
|
||||
"samplers" : [
|
||||
{
|
||||
"input" : 2,
|
||||
"interpolation" : "LINEAR",
|
||||
"output" : 3
|
||||
}
|
||||
],
|
||||
"channels" : [ {
|
||||
"sampler" : 0,
|
||||
"target" : {
|
||||
"node" : 0,
|
||||
"path" : "rotation"
|
||||
}
|
||||
} ]
|
||||
}
|
||||
],
|
||||
|
||||
"buffers" : [
|
||||
{
|
||||
"uri" : "data:application/octet-stream;base64,AAABAAIAAAAAAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAAAAAACAPwAAAAA=",
|
||||
"byteLength" : 44
|
||||
},
|
||||
{
|
||||
"uri" : "data:application/octet-stream;base64,AAAAAAAAgD4AAAA/AABAPwAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAD0/TQ/9P00PwAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAPT9ND/0/TS/AAAAAAAAAAAAAAAAAACAPw==",
|
||||
"byteLength" : 100
|
||||
}
|
||||
],
|
||||
"bufferViews" : [
|
||||
{
|
||||
"buffer" : 0,
|
||||
"byteOffset" : 0,
|
||||
"byteLength" : 6,
|
||||
"target" : 34963
|
||||
},
|
||||
{
|
||||
"buffer" : 0,
|
||||
"byteOffset" : 8,
|
||||
"byteLength" : 36,
|
||||
"target" : 34962
|
||||
},
|
||||
{
|
||||
"buffer" : 1,
|
||||
"byteOffset" : 0,
|
||||
"byteLength" : 100
|
||||
}
|
||||
],
|
||||
"accessors" : [
|
||||
{
|
||||
"bufferView" : 0,
|
||||
"byteOffset" : 0,
|
||||
"componentType" : 5123,
|
||||
"count" : 3,
|
||||
"type" : "SCALAR",
|
||||
"max" : [ 2 ],
|
||||
"min" : [ 0 ]
|
||||
},
|
||||
{
|
||||
"bufferView" : 1,
|
||||
"byteOffset" : 0,
|
||||
"componentType" : 5126,
|
||||
"count" : 3,
|
||||
"type" : "VEC3",
|
||||
"max" : [ 1.0, 1.0, 0.0 ],
|
||||
"min" : [ 0.0, 0.0, 0.0 ]
|
||||
},
|
||||
{
|
||||
"bufferView" : 2,
|
||||
"byteOffset" : 0,
|
||||
"componentType" : 5126,
|
||||
"count" : 5,
|
||||
"type" : "SCALAR",
|
||||
"max" : [ 1.0 ],
|
||||
"min" : [ 0.0 ]
|
||||
},
|
||||
{
|
||||
"bufferView" : 2,
|
||||
"byteOffset" : 20,
|
||||
"componentType" : 5126,
|
||||
"count" : 5,
|
||||
"type" : "VEC4",
|
||||
"max" : [ 0.0, 0.0, 1.0, 1.0 ],
|
||||
"min" : [ 0.0, 0.0, 0.0, -0.707 ]
|
||||
}
|
||||
],
|
||||
|
||||
"asset" : {
|
||||
"version" : "2.0"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
This software is available as a choice of the following licenses. Choose
|
||||
whichever you prefer.
|
||||
|
||||
===============================================================================
|
||||
ALTERNATIVE 1 - Public Domain (www.unlicense.org)
|
||||
===============================================================================
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
|
||||
software, either in source code form or as a compiled binary, for any purpose,
|
||||
commercial or non-commercial, and by any means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors of this
|
||||
software dedicate any and all copyright interest in the software to the public
|
||||
domain. We make this dedication for the benefit of the public at large and to
|
||||
the detriment of our heirs and successors. We intend this dedication to be an
|
||||
overt act of relinquishment in perpetuity of all present and future rights to
|
||||
this software under copyright law.
|
||||
|
||||
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 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.
|
||||
|
||||
For more information, please refer to <http://unlicense.org/>
|
||||
|
||||
===============================================================================
|
||||
ALTERNATIVE 2 - MIT No Attribution
|
||||
===============================================================================
|
||||
Copyright 2020 David Reid
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,2 @@
|
||||
all:
|
||||
clang++ -O1 -g -I../../ main.cc
|
||||
@@ -0,0 +1,3 @@
|
||||
Simple example playing embedded audio data thorough OMI_audio_emitter.
|
||||
|
||||
Supported audio file: mp3
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,67 @@
|
||||
#define TINYGLTF_IMPLEMENTATION
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
#include "tiny_gltf.h"
|
||||
|
||||
#define DR_MP3_IMPLEMENTATION
|
||||
#include "dr_mp3.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
static std::string GetFilePathExtension(const std::string &FileName) {
|
||||
if (FileName.find_last_of(".") != std::string::npos)
|
||||
return FileName.substr(FileName.find_last_of(".") + 1);
|
||||
return "";
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
if (argc < 2) {
|
||||
std::cout << "gltf_audio input.gltf/.glb" << std::endl;
|
||||
}
|
||||
|
||||
float scale = 1.0f;
|
||||
if (argc > 2) {
|
||||
scale = atof(argv[2]);
|
||||
}
|
||||
|
||||
tinygltf::Model model;
|
||||
tinygltf::TinyGLTF loader;
|
||||
std::string err;
|
||||
std::string warn;
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef _DEBUG
|
||||
std::string input_filename(argv[1] ? argv[1]
|
||||
: "../../../models/Cube/Cube.gltf");
|
||||
#endif
|
||||
#else
|
||||
std::string input_filename(argv[1] ? argv[1] : "../../models/Cube/Cube.gltf");
|
||||
#endif
|
||||
|
||||
std::string ext = GetFilePathExtension(input_filename);
|
||||
|
||||
bool ret = false;
|
||||
if (ext.compare("glb") == 0) {
|
||||
// assume binary glTF.
|
||||
ret =
|
||||
loader.LoadBinaryFromFile(&model, &err, &warn, input_filename.c_str());
|
||||
} else {
|
||||
// assume ascii glTF.
|
||||
ret = loader.LoadASCIIFromFile(&model, &err, &warn, input_filename.c_str());
|
||||
}
|
||||
|
||||
if (!warn.empty()) {
|
||||
printf("Warn: %s\n", warn.c_str());
|
||||
}
|
||||
|
||||
if (!err.empty()) {
|
||||
printf("ERR: %s\n", err.c_str());
|
||||
}
|
||||
if (!ret) {
|
||||
printf("Failed to load .glTF : %s\n", argv[1]);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
File renamed without changes.
@@ -0,0 +1,61 @@
|
||||
# GNU Make workspace makefile autogenerated by Premake
|
||||
|
||||
ifndef config
|
||||
config=debug_native
|
||||
endif
|
||||
|
||||
ifndef verbose
|
||||
SILENT = @
|
||||
endif
|
||||
|
||||
ifeq ($(config),debug_native)
|
||||
basic_viewer_config = debug_native
|
||||
endif
|
||||
ifeq ($(config),debug_x64)
|
||||
basic_viewer_config = debug_x64
|
||||
endif
|
||||
ifeq ($(config),debug_x32)
|
||||
basic_viewer_config = debug_x32
|
||||
endif
|
||||
ifeq ($(config),release_native)
|
||||
basic_viewer_config = release_native
|
||||
endif
|
||||
ifeq ($(config),release_x64)
|
||||
basic_viewer_config = release_x64
|
||||
endif
|
||||
ifeq ($(config),release_x32)
|
||||
basic_viewer_config = release_x32
|
||||
endif
|
||||
|
||||
PROJECTS := basic_viewer
|
||||
|
||||
.PHONY: all clean help $(PROJECTS)
|
||||
|
||||
all: $(PROJECTS)
|
||||
|
||||
basic_viewer:
|
||||
ifneq (,$(basic_viewer_config))
|
||||
@echo "==== Building basic_viewer ($(basic_viewer_config)) ===="
|
||||
@${MAKE} --no-print-directory -C . -f basic_viewer.make config=$(basic_viewer_config)
|
||||
endif
|
||||
|
||||
clean:
|
||||
@${MAKE} --no-print-directory -C . -f basic_viewer.make clean
|
||||
|
||||
help:
|
||||
@echo "Usage: make [config=name] [target]"
|
||||
@echo ""
|
||||
@echo "CONFIGURATIONS:"
|
||||
@echo " debug_native"
|
||||
@echo " debug_x64"
|
||||
@echo " debug_x32"
|
||||
@echo " release_native"
|
||||
@echo " release_x64"
|
||||
@echo " release_x32"
|
||||
@echo ""
|
||||
@echo "TARGETS:"
|
||||
@echo " all (default)"
|
||||
@echo " clean"
|
||||
@echo " basic_viewer"
|
||||
@echo ""
|
||||
@echo "For more information, see https://github.com/premake/premake-core/wiki"
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,250 @@
|
||||
# GNU Make project makefile autogenerated by Premake
|
||||
|
||||
ifndef config
|
||||
config=debug_native
|
||||
endif
|
||||
|
||||
ifndef verbose
|
||||
SILENT = @
|
||||
endif
|
||||
|
||||
.PHONY: clean prebuild prelink
|
||||
|
||||
ifeq ($(config),debug_native)
|
||||
RESCOMP = windres
|
||||
TARGETDIR = bin/native/Debug
|
||||
TARGET = $(TARGETDIR)/basic_viewer
|
||||
OBJDIR = obj/native/Debug
|
||||
DEFINES += -DDEBUG
|
||||
INCLUDES += -I. -I../.. -I../common/glm
|
||||
FORCE_INCLUDE +=
|
||||
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
|
||||
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra -fsanitize=address
|
||||
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g -Wall -Wextra -std=c++11 -fsanitize=address
|
||||
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||
LIBS += -lGL -lGLU -lm -lGLEW -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -ldl
|
||||
LDDEPS +=
|
||||
ALL_LDFLAGS += $(LDFLAGS) -fsanitize=address `pkg-config --libs glfw3`
|
||||
LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
|
||||
define PREBUILDCMDS
|
||||
endef
|
||||
define PRELINKCMDS
|
||||
endef
|
||||
define POSTBUILDCMDS
|
||||
endef
|
||||
all: prebuild prelink $(TARGET)
|
||||
@:
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(config),debug_x64)
|
||||
RESCOMP = windres
|
||||
TARGETDIR = bin/x64/Debug
|
||||
TARGET = $(TARGETDIR)/basic_viewer
|
||||
OBJDIR = obj/x64/Debug
|
||||
DEFINES += -DDEBUG
|
||||
INCLUDES += -I. -I../.. -I../common/glm
|
||||
FORCE_INCLUDE +=
|
||||
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
|
||||
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g -Wall -Wextra -fsanitize=address
|
||||
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m64 -g -Wall -Wextra -std=c++11 -fsanitize=address
|
||||
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||
LIBS += -lGL -lGLU -lm -lGLEW -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -ldl
|
||||
LDDEPS +=
|
||||
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -m64 -fsanitize=address `pkg-config --libs glfw3`
|
||||
LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
|
||||
define PREBUILDCMDS
|
||||
endef
|
||||
define PRELINKCMDS
|
||||
endef
|
||||
define POSTBUILDCMDS
|
||||
endef
|
||||
all: prebuild prelink $(TARGET)
|
||||
@:
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(config),debug_x32)
|
||||
RESCOMP = windres
|
||||
TARGETDIR = bin/x32/Debug
|
||||
TARGET = $(TARGETDIR)/basic_viewer
|
||||
OBJDIR = obj/x32/Debug
|
||||
DEFINES += -DDEBUG
|
||||
INCLUDES += -I. -I../.. -I../common/glm
|
||||
FORCE_INCLUDE +=
|
||||
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
|
||||
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g -Wall -Wextra -fsanitize=address
|
||||
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m32 -g -Wall -Wextra -std=c++11 -fsanitize=address
|
||||
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||
LIBS += -lGL -lGLU -lm -lGLEW -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -ldl
|
||||
LDDEPS +=
|
||||
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -m32 -fsanitize=address `pkg-config --libs glfw3`
|
||||
LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
|
||||
define PREBUILDCMDS
|
||||
endef
|
||||
define PRELINKCMDS
|
||||
endef
|
||||
define POSTBUILDCMDS
|
||||
endef
|
||||
all: prebuild prelink $(TARGET)
|
||||
@:
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(config),release_native)
|
||||
RESCOMP = windres
|
||||
TARGETDIR = bin/native/Release
|
||||
TARGET = $(TARGETDIR)/basic_viewer
|
||||
OBJDIR = obj/native/Release
|
||||
DEFINES += -DNDEBUG
|
||||
INCLUDES += -I. -I../.. -I../common/glm
|
||||
FORCE_INCLUDE +=
|
||||
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
|
||||
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O2 -Wall -Wextra -fsanitize=address
|
||||
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O2 -Wall -Wextra -std=c++11 -fsanitize=address
|
||||
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||
LIBS += -lGL -lGLU -lm -lGLEW -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -ldl
|
||||
LDDEPS +=
|
||||
ALL_LDFLAGS += $(LDFLAGS) -s -fsanitize=address `pkg-config --libs glfw3`
|
||||
LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
|
||||
define PREBUILDCMDS
|
||||
endef
|
||||
define PRELINKCMDS
|
||||
endef
|
||||
define POSTBUILDCMDS
|
||||
endef
|
||||
all: prebuild prelink $(TARGET)
|
||||
@:
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(config),release_x64)
|
||||
RESCOMP = windres
|
||||
TARGETDIR = bin/x64/Release
|
||||
TARGET = $(TARGETDIR)/basic_viewer
|
||||
OBJDIR = obj/x64/Release
|
||||
DEFINES += -DNDEBUG
|
||||
INCLUDES += -I. -I../.. -I../common/glm
|
||||
FORCE_INCLUDE +=
|
||||
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
|
||||
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2 -Wall -Wextra -fsanitize=address
|
||||
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m64 -O2 -Wall -Wextra -std=c++11 -fsanitize=address
|
||||
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||
LIBS += -lGL -lGLU -lm -lGLEW -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -ldl
|
||||
LDDEPS +=
|
||||
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -m64 -s -fsanitize=address `pkg-config --libs glfw3`
|
||||
LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
|
||||
define PREBUILDCMDS
|
||||
endef
|
||||
define PRELINKCMDS
|
||||
endef
|
||||
define POSTBUILDCMDS
|
||||
endef
|
||||
all: prebuild prelink $(TARGET)
|
||||
@:
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(config),release_x32)
|
||||
RESCOMP = windres
|
||||
TARGETDIR = bin/x32/Release
|
||||
TARGET = $(TARGETDIR)/basic_viewer
|
||||
OBJDIR = obj/x32/Release
|
||||
DEFINES += -DNDEBUG
|
||||
INCLUDES += -I. -I../.. -I../common/glm
|
||||
FORCE_INCLUDE +=
|
||||
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
|
||||
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2 -Wall -Wextra -fsanitize=address
|
||||
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m32 -O2 -Wall -Wextra -std=c++11 -fsanitize=address
|
||||
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||
LIBS += -lGL -lGLU -lm -lGLEW -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -ldl
|
||||
LDDEPS +=
|
||||
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -m32 -s -fsanitize=address `pkg-config --libs glfw3`
|
||||
LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
|
||||
define PREBUILDCMDS
|
||||
endef
|
||||
define PRELINKCMDS
|
||||
endef
|
||||
define POSTBUILDCMDS
|
||||
endef
|
||||
all: prebuild prelink $(TARGET)
|
||||
@:
|
||||
|
||||
endif
|
||||
|
||||
OBJECTS := \
|
||||
$(OBJDIR)/main.o \
|
||||
$(OBJDIR)/shaders.o \
|
||||
$(OBJDIR)/window.o \
|
||||
|
||||
RESOURCES := \
|
||||
|
||||
CUSTOMFILES := \
|
||||
|
||||
SHELLTYPE := posix
|
||||
ifeq (.exe,$(findstring .exe,$(ComSpec)))
|
||||
SHELLTYPE := msdos
|
||||
endif
|
||||
|
||||
$(TARGET): $(GCH) ${CUSTOMFILES} $(OBJECTS) $(LDDEPS) $(RESOURCES) | $(TARGETDIR)
|
||||
@echo Linking basic_viewer
|
||||
$(SILENT) $(LINKCMD)
|
||||
$(POSTBUILDCMDS)
|
||||
|
||||
$(CUSTOMFILES): | $(OBJDIR)
|
||||
|
||||
$(TARGETDIR):
|
||||
@echo Creating $(TARGETDIR)
|
||||
ifeq (posix,$(SHELLTYPE))
|
||||
$(SILENT) mkdir -p $(TARGETDIR)
|
||||
else
|
||||
$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
|
||||
endif
|
||||
|
||||
$(OBJDIR):
|
||||
@echo Creating $(OBJDIR)
|
||||
ifeq (posix,$(SHELLTYPE))
|
||||
$(SILENT) mkdir -p $(OBJDIR)
|
||||
else
|
||||
$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
|
||||
endif
|
||||
|
||||
clean:
|
||||
@echo Cleaning basic_viewer
|
||||
ifeq (posix,$(SHELLTYPE))
|
||||
$(SILENT) rm -f $(TARGET)
|
||||
$(SILENT) rm -rf $(OBJDIR)
|
||||
else
|
||||
$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
|
||||
$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
|
||||
endif
|
||||
|
||||
prebuild:
|
||||
$(PREBUILDCMDS)
|
||||
|
||||
prelink:
|
||||
$(PRELINKCMDS)
|
||||
|
||||
ifneq (,$(PCH))
|
||||
$(OBJECTS): $(GCH) $(PCH) | $(OBJDIR)
|
||||
$(GCH): $(PCH) | $(OBJDIR)
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CXX) -x c++-header $(ALL_CXXFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
|
||||
else
|
||||
$(OBJECTS): | $(OBJDIR)
|
||||
endif
|
||||
|
||||
$(OBJDIR)/main.o: main.cpp
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
||||
$(OBJDIR)/shaders.o: shaders.cpp
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
||||
$(OBJDIR)/window.o: window.cpp
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
||||
|
||||
-include $(OBJECTS:%.o=%.d)
|
||||
ifneq (,$(PCH))
|
||||
-include $(OBJDIR)/$(notdir $(PCH)).d
|
||||
endif
|
||||
@@ -0,0 +1,152 @@
|
||||
{
|
||||
"asset" : {
|
||||
"generator" : "Khronos glTF Blender I/O v1.1.46",
|
||||
"version" : "2.0"
|
||||
},
|
||||
"scene" : 0,
|
||||
"scenes" : [
|
||||
{
|
||||
"name" : "Scene",
|
||||
"nodes" : [
|
||||
0,
|
||||
1,
|
||||
2
|
||||
]
|
||||
}
|
||||
],
|
||||
"nodes" : [
|
||||
{
|
||||
"mesh" : 0,
|
||||
"name" : "Cube"
|
||||
},
|
||||
{
|
||||
"name" : "Light",
|
||||
"rotation" : [
|
||||
0.16907575726509094,
|
||||
0.7558803558349609,
|
||||
-0.27217137813568115,
|
||||
0.570947527885437
|
||||
],
|
||||
"translation" : [
|
||||
4.076245307922363,
|
||||
5.903861999511719,
|
||||
-1.0054539442062378
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "Camera",
|
||||
"rotation" : [
|
||||
0.483536034822464,
|
||||
0.33687159419059753,
|
||||
-0.20870360732078552,
|
||||
0.7804827094078064
|
||||
],
|
||||
"translation" : [
|
||||
7.358891487121582,
|
||||
4.958309173583984,
|
||||
6.925790786743164
|
||||
]
|
||||
}
|
||||
],
|
||||
"materials" : [
|
||||
{
|
||||
"doubleSided" : true,
|
||||
"emissiveFactor" : [
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"name" : "Material",
|
||||
"pbrMetallicRoughness" : {
|
||||
"baseColorFactor" : [
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
0.800000011920929,
|
||||
1
|
||||
],
|
||||
"metallicFactor" : 0,
|
||||
"roughnessFactor" : 0.4000000059604645
|
||||
}
|
||||
}
|
||||
],
|
||||
"meshes" : [
|
||||
{
|
||||
"name" : "Cube",
|
||||
"primitives" : [
|
||||
{
|
||||
"attributes" : {
|
||||
"POSITION" : 0,
|
||||
"NORMAL" : 1,
|
||||
"TEXCOORD_0" : 2
|
||||
},
|
||||
"indices" : 3,
|
||||
"material" : 0
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"accessors" : [
|
||||
{
|
||||
"bufferView" : 0,
|
||||
"componentType" : 5126,
|
||||
"count" : 24,
|
||||
"max" : [
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"min" : [
|
||||
-1,
|
||||
-1,
|
||||
-1
|
||||
],
|
||||
"type" : "VEC3"
|
||||
},
|
||||
{
|
||||
"bufferView" : 1,
|
||||
"componentType" : 5126,
|
||||
"count" : 24,
|
||||
"type" : "VEC3"
|
||||
},
|
||||
{
|
||||
"bufferView" : 2,
|
||||
"componentType" : 5126,
|
||||
"count" : 24,
|
||||
"type" : "VEC2"
|
||||
},
|
||||
{
|
||||
"bufferView" : 3,
|
||||
"componentType" : 5123,
|
||||
"count" : 36,
|
||||
"type" : "SCALAR"
|
||||
}
|
||||
],
|
||||
"bufferViews" : [
|
||||
{
|
||||
"buffer" : 0,
|
||||
"byteLength" : 288,
|
||||
"byteOffset" : 0
|
||||
},
|
||||
{
|
||||
"buffer" : 0,
|
||||
"byteLength" : 288,
|
||||
"byteOffset" : 288
|
||||
},
|
||||
{
|
||||
"buffer" : 0,
|
||||
"byteLength" : 192,
|
||||
"byteOffset" : 576
|
||||
},
|
||||
{
|
||||
"buffer" : 0,
|
||||
"byteLength" : 72,
|
||||
"byteOffset" : 768
|
||||
}
|
||||
],
|
||||
"buffers" : [
|
||||
{
|
||||
"byteLength" : 840,
|
||||
"uri" : "data:application/octet-stream;base64,AACAPwAAgD8AAIA/AACAPwAAgD8AAIC/AACAvwAAgD8AAIC/AACAvwAAgD8AAIA/AACAvwAAgD8AAIA/AACAvwAAgL8AAIA/AACAPwAAgL8AAIA/AACAPwAAgD8AAIA/AACAvwAAgD8AAIC/AACAvwAAgL8AAIC/AACAvwAAgL8AAIA/AACAvwAAgD8AAIA/AACAvwAAgL8AAIA/AACAvwAAgL8AAIC/AACAPwAAgL8AAIC/AACAPwAAgL8AAIA/AACAPwAAgD8AAIA/AACAPwAAgL8AAIA/AACAPwAAgL8AAIC/AACAPwAAgD8AAIC/AACAPwAAgD8AAIC/AACAPwAAgL8AAIC/AACAvwAAgL8AAIC/AACAvwAAgD8AAIC/AAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AAAAAAAAAAAAAIA/AACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAACAvwAAAAAAAAAAAAAAAAAAgL8AAACAAAAAAAAAgL8AAACAAAAAAAAAgL8AAACAAAAAAAAAgL8AAACAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAACAPwAAAAAAAAAAAAAAAAAAAAAAAIC/AAAAAAAAAAAAAIC/AAAAAAAAAAAAAIC/AAAAAAAAAAAAAIC/AAAgPwAAgD4AACA/AAAAPwAAYD8AAAA/AABgPwAAgD4AACA/AAAAAAAAwD4AAAAAAADAPgAAgD4AACA/AACAPgAAID8AAEA/AADAPgAAQD8AAMA+AACAPwAAID8AAIA/AAAAPgAAgD4AAAA+AAAAPwAAwD4AAAA/AADAPgAAgD4AACA/AACAPgAAwD4AAIA+AADAPgAAAD8AACA/AAAAPwAAID8AAAA/AADAPgAAAD8AAMA+AABAPwAAID8AAEA/AAABAAIAAAACAAMABAAFAAYABAAGAAcACAAJAAoACAAKAAsADAANAA4ADAAOAA8AEAARABIAEAASABMAFAAVABYAFAAWABcA"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -39,8 +39,8 @@ bool loadModel(tinygltf::Model &model, const char *filename) {
|
||||
return res;
|
||||
}
|
||||
|
||||
std::map<int, GLuint> bindMesh(std::map<int, GLuint> vbos,
|
||||
tinygltf::Model &model, tinygltf::Mesh &mesh) {
|
||||
void bindMesh(std::map<int, GLuint>& vbos,
|
||||
tinygltf::Model &model, tinygltf::Mesh &mesh) {
|
||||
for (size_t i = 0; i < model.bufferViews.size(); ++i) {
|
||||
const tinygltf::BufferView &bufferView = model.bufferViews[i];
|
||||
if (bufferView.target == 0) { // TODO impl drawarrays
|
||||
@@ -144,12 +144,10 @@ std::map<int, GLuint> bindMesh(std::map<int, GLuint> vbos,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return vbos;
|
||||
}
|
||||
|
||||
// bind models
|
||||
void bindModelNodes(std::map<int, GLuint> vbos, tinygltf::Model &model,
|
||||
void bindModelNodes(std::map<int, GLuint>& vbos, tinygltf::Model &model,
|
||||
tinygltf::Node &node) {
|
||||
if ((node.mesh >= 0) && (node.mesh < model.meshes.size())) {
|
||||
bindMesh(vbos, model, model.meshes[node.mesh]);
|
||||
@@ -160,7 +158,8 @@ void bindModelNodes(std::map<int, GLuint> vbos, tinygltf::Model &model,
|
||||
bindModelNodes(vbos, model, model.nodes[node.children[i]]);
|
||||
}
|
||||
}
|
||||
GLuint bindModel(tinygltf::Model &model) {
|
||||
|
||||
std::pair<GLuint, std::map<int, GLuint>> bindModel(tinygltf::Model &model) {
|
||||
std::map<int, GLuint> vbos;
|
||||
GLuint vao;
|
||||
glGenVertexArrays(1, &vao);
|
||||
@@ -173,19 +172,29 @@ GLuint bindModel(tinygltf::Model &model) {
|
||||
}
|
||||
|
||||
glBindVertexArray(0);
|
||||
// cleanup vbos
|
||||
for (size_t i = 0; i < vbos.size(); ++i) {
|
||||
glDeleteBuffers(1, &vbos[i]);
|
||||
// cleanup vbos but do not delete index buffers yet
|
||||
for (auto it = vbos.cbegin(); it != vbos.cend();) {
|
||||
tinygltf::BufferView bufferView = model.bufferViews[it->first];
|
||||
if (bufferView.target != GL_ELEMENT_ARRAY_BUFFER) {
|
||||
glDeleteBuffers(1, &vbos[it->first]);
|
||||
vbos.erase(it++);
|
||||
}
|
||||
else {
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
return vao;
|
||||
return {vao, vbos};
|
||||
}
|
||||
|
||||
void drawMesh(tinygltf::Model &model, tinygltf::Mesh &mesh) {
|
||||
void drawMesh(const std::map<int, GLuint>& vbos,
|
||||
tinygltf::Model &model, tinygltf::Mesh &mesh) {
|
||||
for (size_t i = 0; i < mesh.primitives.size(); ++i) {
|
||||
tinygltf::Primitive primitive = mesh.primitives[i];
|
||||
tinygltf::Accessor indexAccessor = model.accessors[primitive.indices];
|
||||
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vbos.at(indexAccessor.bufferView));
|
||||
|
||||
glDrawElements(primitive.mode, indexAccessor.count,
|
||||
indexAccessor.componentType,
|
||||
BUFFER_OFFSET(indexAccessor.byteOffset));
|
||||
@@ -193,20 +202,22 @@ void drawMesh(tinygltf::Model &model, tinygltf::Mesh &mesh) {
|
||||
}
|
||||
|
||||
// recursively draw node and children nodes of model
|
||||
void drawModelNodes(tinygltf::Model &model, tinygltf::Node &node) {
|
||||
void drawModelNodes(const std::pair<GLuint, std::map<int, GLuint>>& vaoAndEbos,
|
||||
tinygltf::Model &model, tinygltf::Node &node) {
|
||||
if ((node.mesh >= 0) && (node.mesh < model.meshes.size())) {
|
||||
drawMesh(model, model.meshes[node.mesh]);
|
||||
drawMesh(vaoAndEbos.second, model, model.meshes[node.mesh]);
|
||||
}
|
||||
for (size_t i = 0; i < node.children.size(); i++) {
|
||||
drawModelNodes(model, model.nodes[node.children[i]]);
|
||||
drawModelNodes(vaoAndEbos, model, model.nodes[node.children[i]]);
|
||||
}
|
||||
}
|
||||
void drawModel(GLuint vao, tinygltf::Model &model) {
|
||||
glBindVertexArray(vao);
|
||||
void drawModel(const std::pair<GLuint, std::map<int, GLuint>>& vaoAndEbos,
|
||||
tinygltf::Model &model) {
|
||||
glBindVertexArray(vaoAndEbos.first);
|
||||
|
||||
const tinygltf::Scene &scene = model.scenes[model.defaultScene];
|
||||
for (size_t i = 0; i < scene.nodes.size(); ++i) {
|
||||
drawModelNodes(model, model.nodes[scene.nodes[i]]);
|
||||
drawModelNodes(vaoAndEbos, model, model.nodes[scene.nodes[i]]);
|
||||
}
|
||||
|
||||
glBindVertexArray(0);
|
||||
@@ -282,7 +293,7 @@ void displayLoop(Window &window, const std::string &filename) {
|
||||
tinygltf::Model model;
|
||||
if (!loadModel(model, filename.c_str())) return;
|
||||
|
||||
GLuint vao = bindModel(model);
|
||||
std::pair<GLuint, std::map<int, GLuint>> vaoAndEbos = bindModel(model);
|
||||
// dbgModel(model); return;
|
||||
|
||||
// Model matrix : an identity matrix (model will be at the origin)
|
||||
@@ -317,10 +328,12 @@ void displayLoop(Window &window, const std::string &filename) {
|
||||
glUniform3fv(sun_position_u, 1, &sun_position[0]);
|
||||
glUniform3fv(sun_color_u, 1, &sun_color[0]);
|
||||
|
||||
drawModel(vao, model);
|
||||
drawModel(vaoAndEbos, model);
|
||||
glfwSwapBuffers(window.window);
|
||||
glfwPollEvents();
|
||||
}
|
||||
|
||||
glDeleteVertexArrays(1, &vaoAndEbos.first);
|
||||
}
|
||||
|
||||
static void error_callback(int error, const char *description) {
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,5 @@
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR})
|
||||
add_executable(create_triangle_gltf create_triangle_gltf.cpp)
|
||||
target_compile_options(create_triangle_gltf PUBLIC -Wall)
|
||||
target_link_libraries(create_triangle_gltf )
|
||||
@@ -0,0 +1,2 @@
|
||||
all:
|
||||
$(CXX) -o create_triangle_gltf -I../../ create_triangle_gltf.cpp
|
||||
@@ -0,0 +1,129 @@
|
||||
// An example of how to generate a gltf file from scratch. This example
|
||||
// was translated from the pygltlib documentation in the pypi project page,
|
||||
// which in turn is based on the Khronos Sample Models at:
|
||||
//
|
||||
// https://github.com/KhronosGroup/glTF-Sample-Models
|
||||
//
|
||||
// This example is released under the MIT license.
|
||||
//
|
||||
// 2021-02-25 Thu
|
||||
// Dov Grobgeld <dov.grobgeld@gmail.com>
|
||||
|
||||
|
||||
// Define these only in *one* .cc file.
|
||||
#define TINYGLTF_IMPLEMENTATION
|
||||
#define TINYGLTF_USE_RAPIDJSON
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
|
||||
// #define TINYGLTF_NOEXCEPTION // optional. disable exception handling.
|
||||
#include "tiny_gltf.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
// Create a model with a single mesh and save it as a gltf file
|
||||
tinygltf::Model m;
|
||||
tinygltf::Scene scene;
|
||||
tinygltf::Mesh mesh;
|
||||
tinygltf::Primitive primitive;
|
||||
tinygltf::Node node;
|
||||
tinygltf::Buffer buffer;
|
||||
tinygltf::BufferView bufferView1;
|
||||
tinygltf::BufferView bufferView2;
|
||||
tinygltf::Accessor accessor1;
|
||||
tinygltf::Accessor accessor2;
|
||||
tinygltf::Asset asset;
|
||||
|
||||
// This is the raw data buffer.
|
||||
buffer.data = {
|
||||
// 6 bytes of indices and two bytes of padding
|
||||
0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,
|
||||
// 36 bytes of floating point numbers
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x3f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x3f,
|
||||
0x00,0x00,0x00,0x00};
|
||||
|
||||
// "The indices of the vertices (ELEMENT_ARRAY_BUFFER) take up 6 bytes in the
|
||||
// start of the buffer.
|
||||
bufferView1.buffer = 0;
|
||||
bufferView1.byteOffset=0;
|
||||
bufferView1.byteLength=6;
|
||||
bufferView1.target = TINYGLTF_TARGET_ELEMENT_ARRAY_BUFFER;
|
||||
|
||||
// The vertices take up 36 bytes (3 vertices * 3 floating points * 4 bytes)
|
||||
// at position 8 in the buffer and are of type ARRAY_BUFFER
|
||||
bufferView2.buffer = 0;
|
||||
bufferView2.byteOffset=8;
|
||||
bufferView2.byteLength=36;
|
||||
bufferView2.target = TINYGLTF_TARGET_ARRAY_BUFFER;
|
||||
|
||||
// Describe the layout of bufferView1, the indices of the vertices
|
||||
accessor1.bufferView = 0;
|
||||
accessor1.byteOffset = 0;
|
||||
accessor1.componentType = TINYGLTF_COMPONENT_TYPE_UNSIGNED_SHORT;
|
||||
accessor1.count = 3;
|
||||
accessor1.type = TINYGLTF_TYPE_SCALAR;
|
||||
accessor1.maxValues.push_back(2);
|
||||
accessor1.minValues.push_back(0);
|
||||
|
||||
// Describe the layout of bufferView2, the vertices themself
|
||||
accessor2.bufferView = 1;
|
||||
accessor2.byteOffset = 0;
|
||||
accessor2.componentType = TINYGLTF_COMPONENT_TYPE_FLOAT;
|
||||
accessor2.count = 3;
|
||||
accessor2.type = TINYGLTF_TYPE_VEC3;
|
||||
accessor2.maxValues = {1.0, 1.0, 0.0};
|
||||
accessor2.minValues = {0.0, 0.0, 0.0};
|
||||
|
||||
// Build the mesh primitive and add it to the mesh
|
||||
primitive.indices = 0; // The index of the accessor for the vertex indices
|
||||
primitive.attributes["POSITION"] = 1; // The index of the accessor for positions
|
||||
primitive.material = 0;
|
||||
primitive.mode = TINYGLTF_MODE_TRIANGLES;
|
||||
mesh.primitives.push_back(primitive);
|
||||
|
||||
// Other tie ups
|
||||
node.mesh = 0;
|
||||
scene.nodes.push_back(0); // Default scene
|
||||
|
||||
// Define the asset. The version is required
|
||||
asset.version = "2.0";
|
||||
asset.generator = "tinygltf";
|
||||
|
||||
// Now all that remains is to tie back all the loose objects into the
|
||||
// our single model.
|
||||
m.scenes.push_back(scene);
|
||||
m.meshes.push_back(mesh);
|
||||
m.nodes.push_back(node);
|
||||
m.buffers.push_back(buffer);
|
||||
m.bufferViews.push_back(bufferView1);
|
||||
m.bufferViews.push_back(bufferView2);
|
||||
m.accessors.push_back(accessor1);
|
||||
m.accessors.push_back(accessor2);
|
||||
m.asset = asset;
|
||||
|
||||
// Create a simple material
|
||||
tinygltf::Material mat;
|
||||
mat.pbrMetallicRoughness.baseColorFactor = {1.0f, 0.9f, 0.9f, 1.0f};
|
||||
mat.doubleSided = true;
|
||||
m.materials.push_back(mat);
|
||||
|
||||
// lights
|
||||
tinygltf::Light dummyLight;
|
||||
dummyLight.name = "bora";
|
||||
m.lights.push_back(dummyLight);
|
||||
tinygltf::Value dummyVal(3.14);
|
||||
m.extensions.emplace("ext1", dummyVal);
|
||||
|
||||
// Save it to a file
|
||||
tinygltf::TinyGLTF gltf;
|
||||
gltf.WriteGltfSceneToFile(&m, "triangle.gltf",
|
||||
true, // embedImages
|
||||
true, // embedBuffers
|
||||
true, // pretty print
|
||||
false); // write binary
|
||||
|
||||
exit(0);
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
// An example of how to generate a gltf file from scratch. This example
|
||||
// was translated from the pygltlib documentation in the pypi project page,
|
||||
// which in turn is based on the Khronos Sample Models at:
|
||||
//
|
||||
// https://github.com/KhronosGroup/glTF-Sample-Models
|
||||
//
|
||||
// This example is released under the MIT license.
|
||||
//
|
||||
// 2021-02-25 Thu
|
||||
// Dov Grobgeld <dov.grobgeld@gmail.com>
|
||||
|
||||
|
||||
// Define these only in *one* .cc file.
|
||||
#define TINYGLTF_IMPLEMENTATION
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
|
||||
// #define TINYGLTF_NOEXCEPTION // optional. disable exception handling.
|
||||
#include "tiny_gltf.h"
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
// Create a model with a single mesh and save it as a gltf file
|
||||
tinygltf::Model m;
|
||||
tinygltf::Scene scene;
|
||||
tinygltf::Mesh mesh;
|
||||
tinygltf::Primitive primitive;
|
||||
tinygltf::Node node;
|
||||
tinygltf::Buffer buffer;
|
||||
tinygltf::BufferView bufferView1;
|
||||
tinygltf::BufferView bufferView2;
|
||||
tinygltf::Accessor accessor1;
|
||||
tinygltf::Accessor accessor2;
|
||||
tinygltf::Asset asset;
|
||||
|
||||
// This is the raw data buffer.
|
||||
buffer.data = {
|
||||
// 6 bytes of indices and two bytes of padding
|
||||
0x00,0x00,0x01,0x00,0x02,0x00,0x00,0x00,
|
||||
// 36 bytes of floating point numbers
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x3f,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x3f,
|
||||
0x00,0x00,0x00,0x00};
|
||||
|
||||
// "The indices of the vertices (ELEMENT_ARRAY_BUFFER) take up 6 bytes in the
|
||||
// start of the buffer.
|
||||
bufferView1.buffer = 0;
|
||||
bufferView1.byteOffset=0;
|
||||
bufferView1.byteLength=6;
|
||||
bufferView1.target = TINYGLTF_TARGET_ELEMENT_ARRAY_BUFFER;
|
||||
|
||||
// The vertices take up 36 bytes (3 vertices * 3 floating points * 4 bytes)
|
||||
// at position 8 in the buffer and are of type ARRAY_BUFFER
|
||||
bufferView2.buffer = 0;
|
||||
bufferView2.byteOffset=8;
|
||||
bufferView2.byteLength=36;
|
||||
bufferView2.target = TINYGLTF_TARGET_ARRAY_BUFFER;
|
||||
|
||||
// Describe the layout of bufferView1, the indices of the vertices
|
||||
accessor1.bufferView = 0;
|
||||
accessor1.byteOffset = 0;
|
||||
accessor1.componentType = TINYGLTF_COMPONENT_TYPE_UNSIGNED_SHORT;
|
||||
accessor1.count = 3;
|
||||
accessor1.type = TINYGLTF_TYPE_SCALAR;
|
||||
accessor1.maxValues.push_back(2);
|
||||
accessor1.minValues.push_back(0);
|
||||
|
||||
// Describe the layout of bufferView2, the vertices themself
|
||||
accessor2.bufferView = 1;
|
||||
accessor2.byteOffset = 0;
|
||||
accessor2.componentType = TINYGLTF_COMPONENT_TYPE_FLOAT;
|
||||
accessor2.count = 3;
|
||||
accessor2.type = TINYGLTF_TYPE_VEC3;
|
||||
accessor2.maxValues = {1.0, 1.0, 0.0};
|
||||
accessor2.minValues = {0.0, 0.0, 0.0};
|
||||
|
||||
// Build the mesh primitive and add it to the mesh
|
||||
primitive.indices = 0; // The index of the accessor for the vertex indices
|
||||
primitive.attributes["POSITION"] = 1; // The index of the accessor for positions
|
||||
primitive.material = 0;
|
||||
primitive.mode = TINYGLTF_MODE_TRIANGLES;
|
||||
mesh.primitives.push_back(primitive);
|
||||
|
||||
// Other tie ups
|
||||
node.mesh = 0;
|
||||
scene.nodes.push_back(0); // Default scene
|
||||
|
||||
// Define the asset. The version is required
|
||||
asset.version = "2.0";
|
||||
asset.generator = "tinygltf";
|
||||
|
||||
// Now all that remains is to tie back all the loose objects into the
|
||||
// our single model.
|
||||
m.scenes.push_back(scene);
|
||||
m.meshes.push_back(mesh);
|
||||
m.nodes.push_back(node);
|
||||
m.buffers.push_back(buffer);
|
||||
m.bufferViews.push_back(bufferView1);
|
||||
m.bufferViews.push_back(bufferView2);
|
||||
m.accessors.push_back(accessor1);
|
||||
m.accessors.push_back(accessor2);
|
||||
m.asset = asset;
|
||||
|
||||
// Create a simple material
|
||||
tinygltf::Material mat;
|
||||
mat.pbrMetallicRoughness.baseColorFactor = {1.0f, 0.9f, 0.9f, 1.0f};
|
||||
mat.doubleSided = true;
|
||||
m.materials.push_back(mat);
|
||||
|
||||
// Save it to a file
|
||||
tinygltf::TinyGLTF gltf;
|
||||
gltf.WriteGltfSceneToFile(&m, "triangle.gltf",
|
||||
true, // embedImages
|
||||
true, // embedBuffers
|
||||
true, // pretty print
|
||||
false); // write binary
|
||||
|
||||
exit(0);
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,94 @@
|
||||
{
|
||||
"accessors": [
|
||||
{
|
||||
"bufferView": 0,
|
||||
"componentType": 5123,
|
||||
"count": 3,
|
||||
"max": [
|
||||
2
|
||||
],
|
||||
"min": [
|
||||
0
|
||||
],
|
||||
"type": "SCALAR"
|
||||
},
|
||||
{
|
||||
"bufferView": 1,
|
||||
"componentType": 5126,
|
||||
"count": 3,
|
||||
"max": [
|
||||
1.0,
|
||||
1.0,
|
||||
0.0
|
||||
],
|
||||
"min": [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"type": "VEC3"
|
||||
}
|
||||
],
|
||||
"asset": {
|
||||
"generator": "tinygltf",
|
||||
"version": "2.0"
|
||||
},
|
||||
"bufferViews": [
|
||||
{
|
||||
"buffer": 0,
|
||||
"byteLength": 6,
|
||||
"target": 34963
|
||||
},
|
||||
{
|
||||
"buffer": 0,
|
||||
"byteLength": 36,
|
||||
"byteOffset": 8,
|
||||
"target": 34962
|
||||
}
|
||||
],
|
||||
"buffers": [
|
||||
{
|
||||
"byteLength": 44,
|
||||
"uri": "data:application/octet-stream;base64,AAABAAIAAAAAAAAAAAAAAAAAAAAAAIA/AAAAAAAAAAAAAAAAAACAPwAAAAA="
|
||||
}
|
||||
],
|
||||
"materials": [
|
||||
{
|
||||
"doubleSided": true,
|
||||
"pbrMetallicRoughness": {
|
||||
"baseColorFactor": [
|
||||
1.0,
|
||||
0.8999999761581421,
|
||||
0.8999999761581421,
|
||||
1.0
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"meshes": [
|
||||
{
|
||||
"primitives": [
|
||||
{
|
||||
"attributes": {
|
||||
"POSITION": 1
|
||||
},
|
||||
"indices": 0,
|
||||
"material": 0,
|
||||
"mode": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"mesh": 0
|
||||
}
|
||||
],
|
||||
"scenes": [
|
||||
{
|
||||
"nodes": [
|
||||
0
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 1423 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user